Admin Forum:Chatango in WikiaRail

I saw on the Dead Island Wiki that they had Chatango Chat in the WikiaRail and now i wonder what code I need to put in to the MediaWiki so that I could implement that on my Wiki (I allready created an Chatango Channel for my Wiki) and replace the WikiaChat. - Regards rmn777777 My User Page on NFS World Info Wiki 18:41, March 23, 2012 (UTC)


 * They may be violating Wikia's ToU, but it looks pretty straighforward. Maybe you can addapt their code.
 * From w:c:deadisland:MediaWiki:Common.js:

 // Add Chat Box Script importScriptPage('User:Jgjake2/js/Chat.js', 'deadisland');
 * From w:c:deadisland:User:Jgjake2/js/Chat.js:

 function getElementsByClass(elementName, tagname, tclass){ var itemsfound = new Array; var elements = elementName.getElementsByTagName(tagname); for(var i=0;i<elements.length;i++){ if(hasClass(elements[i], tclass)){ itemsfound.push(elements[i]); }	}	return itemsfound; } function insertChatangoSection{ var chatSection = getElementsByClass(document, 'section', 'ChatModule'); if(chatSection[0] != null) chatSection[0].parentNode.removeChild(chatSection[0]); var section = getElementsByClass(document, 'section', 'WikiaBlogListingBox')[0]; if(section == null){ section = getElementsByClass(document, 'section', 'LatestPhotosModule')[0]; if(section == null){ section = getElementsByClass(document, 'section', 'CommunityCornerModule')[0]; if(section == null){ section = getElementsByClass(document, 'div', 'AchievementsModule')[0]; if(section == null){ section = getElementsByClass(document, 'section', 'FollowedPagesModule')[0]; if(section == null){ section = getElementsByClass(document, 'section', 'WikiaLatestEarnedBadgesModule')[0]; if(section == null){ section = document.getElementById('WikiaSpotlightsModule'); if(section == null) return; }					}				}			}		}	}	var newSection = document.createElement("section"); newSection.innerHTML = ' '; newSection.setAttribute('class',"module"); section.parentNode.insertBefore(newSection,section); } addOnloadHook(insertChatangoSection);
 * -- Fandyllic (talk &middot; contr) 23 Mar 2012 2:01 PM Pacific
 * Thanks Frandyllic. I've been trying this for personal use, and later wiki-wide use. Alas, it seems that absolutely nothing happens, even with a hard refresh AND a purge. And it broke other js that I use too. Could someone check what is it that has gone horribly wrong in the code for me to deserve this? thanks. ;( — mfaizsyahmi  (talk) 23:53, April 12, 2012 (UTC)