Community Central

Admin Forum:Getting TwitterWidget to the right rail

18,824pages on
this wiki
Add New Page
Add New Page Talk0

This Forum has been archived

Forums: Admin Central Index Technical Help Getting TwitterWidget to the right rail
Central's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 1328 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

At w:c:tardis, we have an added bit of javascript called tardis:MediaWiki:Common.js/mosbox.js that was pioneered at w:c:lego. It allows us to put a little message into the right rail, above the Recent Wiki Activity module. Currently, we use it to more prominently invite people to create a new account by promoting the fun of the achievements game.

But I want to convert it into something that will display the contents of tardis:MediaWiki:TwitterWidget. I have no idea how to do this. Can anyone tell me what I'd have to do to get it to work?

The current form of the javascript is:

$(function() {
	if(skin == "oasis") {
		var $sidebar = $('.activity-heading');
		var comboString = "message text goes here";
	} else if(skin == "monobook") {
something else happens, but it's not relevant to this question.

I've tried putting a straight <verbatim> into the comboString variable, but that failed. As did simply cutting and pasting the entirety of TwitterWidget. There's gotta be someway I can say, "If you're in oasis, produce the results of the page MediaWiki:TwitterWidget. But how? czechout@fandom    fly tardis 20:16: Thu 22 Nov 2012

I'm guessing you'd have to insert all the widget code into the page and insert the HTML to call it in the sidebar with Javascript. You can't put wikicode into the sidebar, because it won't get parsed which includes the <verbatim> tags. That's my guess at least.
I'm also not sure Wikia wants anyone to mess with the sidebar in such a significant way, but maybe they're okay with it as long as the ads aren't interfered with. -- Fandyllic (talk · contr) 30 Nov 2012 1:48 PM Pacific
Unfortunately, Fandyllic is correct that Wikia says adding or removing modules from the right siderail in Oasis is not allowed (stated at Help:Customization policy). For example, a few months ago Merrystar asked one wiki I edit to remove a module we had added to the siderail. Also, just today Eladkse created a script which adds a module for the new forums to the siderail: per w:c:dev:Talk:RelatedDiscussionsModule he checked with staff that it's not allowed for sitewide use. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 23:25 UTC, Friday, 30 November 2012

Also on Fandom

Random Wiki