FANDOM


Any hint as to the JavaScript required? --Yoshord 21:31, September 2, 2009 (UTC)

That would be the following, source w:c:starwars:MediaWiki:Functions.js: Tedjuh10 (Talk) 13:58, September 9, 2009 (UTC)
/*
    Replaces {{USERNAME}} with the name of the user browsing the page.
    Requires copying Template:USERNAME.
*/
function substUsername()
{
    var spans = getElementsByClass('insertusername', null, 'span');

    for(var i = 0; i < spans.length; i++)
    {
        spans[i].innerHTML = wgUserName;
    }
}
Hey, how would I be able to activate this template on a Monobook skin? --Blemo
Append the above code to MediaWiki:Monobook.js to make the template work on Monobook skins, and MediaWiki:Monaco.js to make the template work on Monaco skins. On the wiki where this has to work, of course. --Yoshord 00:08, March 4, 2010 (UTC)
I would recommend copying it instead to MediaWiki:Common.js, so it'll work on all skins. --Dinoguy1000 (talkcontribslogsblock log) as 67.58.229.153 05:16, March 4, 2010 (UTC)

Use needs clarifying Edit

  • What sort of page is this to go on?
  • Just what does it do?

Robin Patterson (Talk) 01:55, January 24, 2010 (UTC)

This shows the user's name. I don't know when it would be used. --Yoshord 22:02, January 24, 2010 (UTC)
I've seen this template being used on a couple users' userpages and talk pages. --Blemo

How to add it Edit

Can someone teach me how to use this template? I'm such a nub and I can't seem to get to work right. It says <insert name here> instead of <insert name here> ಠ_ಠ WaterDude™ 10:31, October 16, 2011 (UTC)

Try clearing your cache @WaterDude —Preceding unsigned comment added by Legofan100 (talkcontribs) 22:59, July 2, 2015. Please sign your posts with ~~~~!

Community content is available under CC-BY-SA unless otherwise noted.