Forum:Embedding and HTML


 * 1) How would I add this clock to my wiki? http://www.widgetbox.com/widget/digital-clock-widget
 * 2) Is it possible to add an mp3 or radio embedded code to your wiki and make it work.
 * 3) How do you edit the Pages on this wiki slot like Runescape Wiki I want to put either my clock on there or something else?

Code I want to embed for my wiki

Can it be done?

--Andromeda Vadum 02:36, April 27, 2011 (UTC)


 * Yes - put that into a MediaWiki page, like  or something similar, and then put   on the page where you want it.


 * Okay, *sigh* is there any way to put these widgets onto you wiki by copying the HTML code or the Embed Code? It would also be helpful if you can answer questions 1, 2, and 3 please.--Andromeda Vadum 19:22, April 27, 2011 (UTC)


 * Yes, as I said, you put the HTML in a MediaWiki page and use verbatim tags to display it. That works for clocks and any other widget you can find.


 * I displayed it here http://modernsociety.wikia.com/wiki/Unseen_MediaWiki_Content and my code for it is here http://modernsociety.wikia.com/wiki/MediaWiki:Shoutcast-player. It wont work. Dont I have to put it in Wikia.css or Wikia.js?-- Andrew Schlieffen (talk &middot; contr) 20:45, April 27, 2011 (UTC)
 * I'm seeing it just fine. Clear your cache, and see if it's still not there.


 * Its there. Can you help me with question #3 now.-- Andrew Schlieffen (talk &middot; contr) 20:55, April 27, 2011 (UTC)
 * That can be done with JS. You'll want  in your MediaWiki:Wikia.js, as well as the script for the clock.


 * Where does the script go?-- Andrew Schlieffen (talk &middot; contr) 21:17, April 27, 2011 (UTC)
 * In MediaWiki:Wikia.js, along with the code above. Also make sure to replace 'HTML for clock goes here' in the above code.


 * Yeah, I tried embedding a weather widget and it wont work. Check code here .-- Andrew Schlieffen (talk &middot; contr) 20:54, April 28, 2011 (UTC)
 * You need single quotes around everything in the . So instead of , you want.


 * Still not working anything else, I also cached the page about 3 times and waited a day. Are you sure it's the right code?-- Andrew Schlieffen (talk &middot; contr) 21:15, April 28, 2011 (UTC)
 * There are single quotes in your script, and some brackets missing - replace what you had with this:

 $(function {$('.WikiaPagesOnWikiModule').append(' if (WIDGETBOX) WIDGETBOX.renderWidget(\'5ede5587-140c-4e8a-b83e-f5519ae64a08\'); Get the The Weather Channel widget and many other great free widgets at Widgetbox! Not seeing a widget? (More info) ');});
 * Unfortunately, the code you got from that website (presumably InsertWidget.js) has an error in it that causes it to paste over the entire body element.


 * I replaced it with the code you gave me. I'll wait and see what happens. It should take awhile to load it up.-- Andrew Schlieffen (talk &middot; contr) 21:32, April 28, 2011 (UTC)
 * Clear your cache, the change should be instantaneous.