Embed

From eRepublik Official Wiki
Jump to: navigation, search

Embedding is a "feature" of eRepublik where one would use HTML to embed Flash files into the game. It's also incorrectly used to describe adding CSS to posts around eRepublik to achieve numerous effects, ranging from replacing the eRepublik logo to obscuring the Reply field. Embedding has been frequently enabled and disabled throughout the history of the game, and is currently disabled.[1] enabled as of 30th March 2010 with the introduction of the new forum module.

History

THAT'S NO MOON!
72 hours remains.

Embed harks back to the early days of eRepublik and is believed to have been discovered by the citizens of Pakistan first[?]. During the Beta stages Pakistan discovered that JavaScript could be written in posts and take affect[?]. This was mostly used to play hidden flash files.[2][3]

Later it was discovered the same could be done with newspaper article comments. This lead to the discovery that images on that page could be changed. As a result there was a mad scramble to change the image of Plato and the eRepublik logo. With a little tinkering it was discovered the script could be used to change every image on the page in one swoop.




Example code that would change the image of Plato:

<script>
var i; for (i = 0; i < document.images.length; i++)
{
   if (document.images[i].src == "http://www.erepublik.com/advisors/advisor_2.jpg")
   {
      document.images[i].src = "replacementpic.jpg";
      break;
   }
}
</script>

Example code that would change the eRepublik logo found in the top left hand corner:

<script>
var j; for (j = 0; i < document.images.length; j++)
{
   if (document.images[j].src == "http://www.erepublik.com/parts/EN/logo-erepublik.gif")
   {
       document.images[j].src = "replacement pictre.tiff";
       break;
   }
}
</script>

Example code that would change all images of the page.:

<script>
var i; for (i = 0; i < document.images.length; i++)
{
    document.images[i].src = "replacement picture.bmp";
}
</script>

Although the admins found that adding videos and changing images to be humorous, it was in their best interest to make changes to the code. This was because the same breaches that allowed the fun scripts could also be used for harmful reasons, such as stealing gold from other users. This also lead to rule 10 to be changed.[4][5]

No code scripts are allowed to be inserted in the Erepublik pages without the consent of the Admin.
we've kind of found funny your idea to put Dio's graphic instead of Plato's. The problem is that some other Citizens would not appreciate your creativity. Let's keep Plato where he is and respect the new 10th rule.

—Admins[6]

The V1 resurrection

Rave On, one of the songs that was embedded into multiple threads.

With V1's birth a new forum system was put in place and along with it a new age of embedding.[7] Rather than using script tags, this used embed tags and instead of flash files, YouTube videos were the order of the day. HTML could also be used to add a background to the page for added fun.[8] Originally it started with a few videos posted in threads, but a citizen found adjusting the code could make videos auto-play, loop and become hidden.[9] Furthermore, CSS was used to cause certain effects, such as hiding the reply box[10][11] and it even spread to articles[12]. Some say this was their highlight of V1[13] and even brought some Pakistanis back from the dead[14] after they heard the news on IRC. There was quite a variety of songs chosen, ranging from Yoshi's Story[15] to Gaston[16] . Eventually, the admins fixed the code, much to the displeasure of some. [17]


This is by far the best thing added in V1. Pakis is able to add their music, always a surprise what they can come up with.

—Flammbar [18]

Code that would embed a video into a forum post.

<embed src="http://www.youtube.com/v/UmNwawd5aG4&hl=en&fs=1&autoplay=0&loop=0"
type="application/x-shockwave-flash"
allowfullscreen="true"
width="425"
height="344">
</embed>

Tweaked code that would make the video "hidden", autoplay and loop.

<embed src="http://www.youtube.com/v/UmNwawd5aG4&hl=en&fs=1&autoplay=1&loop=1"
type="application/x-shockwave-flash"
allowfullscreen="true"
width="0"
height="0">
</embed>

Code to add a background image.

<body background="image.jpg">

On December 15, 2008 a Pakistani posted on their IRC channel that embed had been re-enabled by the admins resulting in many running back to V1[?]. Knowing time was short a great "V1 party" took place with all sorts of music and trippy backdrops being posted in threads.[19] Even citizens of other nations joined in on the early Christmas celebrations. However, it must be noted that not everyone enjoyed embedding and some wished for it to stop. [20]

Unlike earlier occasions, the admins didn't disable embedding after seeing the chaos that had been caused. Instead, they made a new set of rules in order to have some control over the situation.[21] Although this meant no more crazy backgrounds and songs it did mean the old parties could still be celebrated. A functional example of embedded music can be seen here.

THe [sic] forums rock. It's like a party except not as fun.

—Pierric Bross [22]

The new rules were:

17. Any citizen can post embedded videos under the following conditions:
•the video is related to the subject of the topic
•the content of the video respects the eRepublik Laws and our Terms of Service
•the width of the video to be set to - width="425"
•the height of the video to be set to - height="344"
•the embedded video should not be autoplaying - "autoplay=0"
We will suspend the accounts of any citizen that will not follow these conditions. Any other forms of usage of EMBED will lead to the banning of the citizen.
Regards, The eRepublik Team.
•18. The usage of any form of CSS code is strictly forbidden.

Three days later on the 18th Admins supposedly decided to once again disable embed even though there was no visible sign of anyone breaking the new rules. This also leads to threads and posts with old code being hidden and the removal of the new rules. A side effect was that all formatting was disabled as well. [23] The admin's current opinion on embedding is currently unknown.

New Forum Module

With a new forum, the ability to embed videos into posts was enabled[24]. Users can type

[video]link to video url[/video]

to insert a video or just click the Insert Video button Insert Video to open up a small window with instructions. As this is now an officially supported feature many of the original exploits such as auto-play or video resizing are not available.

Notes

While the sources may not show functioning uses of embed, this is due to it being disabled at the time of writing. You can often tell which posts have hidden code because they are either blank or have large white spaces. In order to see the code, right click the page and choose the option 'View Page Source'. Here you'll see the hidden YouTube links etc. That means the code is still there and if embed were to be re-enabled the code would run again as it is still part of those forum posts.