User talk:Spang

From JoCopedia
Jump to: navigation, search

Welcome!

Hi, Spang, and welcome to JoCopedia! Thanks heaps for your contributions thus far! We really hope you like the place and decide to stay!

If you're new to wikis you might find the following "new-user" links helpful. Even if you are familiar with other wikis, each one is different, so please have a brief look at some point.

Once you are done there, or if you are a seasoned wiki editor, then jump straight into these:

  • WikiProjects - What we are currently focusing on around the site.
  • The "To Do" Lists - Two lists of jobs around the site that need doing, one of quick jobs and one of larger tasks.


I hope you enjoy editing here and being a contributor! Please sign your name on talk pages using four tildes (~~~~) or use the "sign" button (Button sig.png) above the edit box. This will automatically produce your name and the date.

If you need help, really do feel free to ask me on my talk page (that's what it's there for!), ask at the main page discussion, or ask a moderator on the moderators' talk page, we promise they don't bite...much! ;)

Again, welcome!  --MitchO 14:54, 12 May 2008 (EDT)

Hi there! Spang 14:55, 12 May 2008 (EDT)

Hey, Spang, neat trick with Template:Nosubst! Definitely a better solution than the cheap, one-time hack I'm ashamed to admit you caught me suggesting... ;) --Bry 15:03, 12 May 2008 (EDT)

No problem :) I'm quite familiar with all sorts of technical things to do with mediawiki, so if there's anything else similar that could use some fixing, I'll probably be able to help! Spang 15:30, 12 May 2008 (EDT)

Awww I wanted to welcome him! Spang is my personal wiki-angel. He fixes everything so I begged him to come over here and help me! He leaves a trail of glittersprinkles wherever he goes and all the pages he edits turn to glod. He's not so hot on spelling though. Uncyc has a lot of pages about a short dwarf named Glod now. <3 ~ Percephene ~ talk contribs 12:07, 13 May 2008

The world definitely needs to know about dwarves called Glod. Spang 22:09, 12 May 2008 (EDT)
Indeed it does. :) So, hows about that To Do list then ;) Where shall we start? Personally its the VFD templates that I hate the most. I had the idea to look at what Wikipedia use atm for their template style and base it loosely off that since I guess that will look better (perhaps?) Thoughts? ~ Percephene ~ talk contribs 07:44, 13 May 2008
Ohhhh and "Title." I'd really like that to work, but purely for vanity reasons ;) ~ Percephene ~ talk contribs 08:18, 13 May 2008
Man, I thought I set this thing up to email me when my page was changed :( Ah well!
Well I think it's perfectly fine to steal anything you like from wikipedia, I'm pretty sure nobody will care :)
And to get title working, copy the following code into mediawiki:common.js and copy the title template from uncyc (has to be the newest one) and it'll work! Spang 21:26, 26 May 2008 (EDT)
 function userNameReplace() {
 if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return;
    for(var i=0; userName = document.getElementsByTagName("span")[i]; i++) {
        if ((document.getElementById('pt-userpage'))&&(UserName.getAttribute('class') == "insertusername")) {
            userName.innerHTML = wgUserName;
        }
    }
 }
 addOnloadHook(userNameReplace);

Fanks ;) I have asked for it to be added. mediawiki:common.js is locked here :( I knew it was a good idea begging you to come over here to sort things out for me ;) ~ Percephene ~ talk contribs 02:09, 27 May 2008

Hmmm, its still not working. I'm testing it on my user page. No joy still. Go go SpangSignal! ~ Percephene ~ talk contribs 07:04, 28 May 2008

Hmmm, I seem to have pasted the username replace code instead... it was late! This is the title one

function rewriteTitle()
 {
    if(typeof(SKIP_TITLE_REWRITE) != 'undefined' && SKIP_TITLE_REWRITE)
        return;
    var titleDiv = document.getElementById('title-meta');
    if(titleDiv == null || titleDiv == undefined)
        return;
    var cloneNode = titleDiv.cloneNode(true);
    var firstHeading = document.getElementById('content').getElementsByTagName('h1')[0];
    var node = firstHeading.childNodes[0];
    firstHeading.replaceChild(cloneNode, node);
    cloneNode.style.display = "inline";
    var titleAlign = document.getElementById('title-align');
    firstHeading.style.textAlign = titleAlign.childNodes[0].nodeValue;
 }
 
 addOnloadHook(rewriteTitle, false);

Yep, definitely right this time :) Spang 08:22, 28 May 2008 (EDT)

How sure are you about that? Its still not working. Perhaps I'm misusing the template on my User page? Something is fubared somewhere. Odds are high that its something to do with me! :) ~ Percephene ~ talk contribs 02:47, 30 May 2008
Man, I'm failing pretty hard at this one. It almost doesn't seem worth it the number of times I've got it wrong. I fixed the above, it should work now. Probably. Spang 22:58, 29 May 2008 (EDT)
Its ok, failure is a pretty rare occurance for you :P When you fail as often as I do you'll get used to it :P I even voluntarily admit ahead of time that its probably my fault because usually it is! :) Fingers crossed this time. ~ Percephene ~ talk contribs 10:27, 30 May 2008
Yay it totally works now! Thanks so much <3 ~ Percephene ~ talk contribs 08:14, 02 June 2008

Add a Show, etc.

Hey, Spang, I wonder if you could give me a suggestion about how to get some preloading, subst-ing, etc. to work out properly. I'll try to explain coherently, but I may have some difficulty making myself clear.

Right now, I've got a Rube Goldberg setup of Add a Show preloading User:Bry/Shows template helper, which itself contains a subst call to User:Bry/Shows template, which takes some optional parameters. After the subst, I get the entire "if" code pasted in, which isn't quite what I want -- take the "guest" parameter, for example. If "guest" is given value val, I'd like the post-subst template to read

* Special guest: [[val]]

Instead, I get

{{#if: val | * Special guest: [[val]] }}

And, of course, I don't want anything to appear if "guest" is omitted, but I get

{{#if: | * Special guest: [[]] }}

Do you have a suggestion? A quick fix for this would be much appreciated, but if you have any elegant solution to avoid all the preloading and subst'ing and everything, I'd be most grateful too. --Bry 05:28, 1 June 2008 (EDT)

It should be fixed now - you needed to subst the #if calls as well! See test to see if that's what you want it to output (and then delete it if it is). I think the preloading and substing is the only way to do what you want, so the setup you have is fine :) Spang 16:11, 1 June 2008 (EDT)
Excellent. Thanks so much! (Subst'ing the #if... didn't even think of it, obviously.) --Bry 16:58, 1 June 2008 (EDT)