• Welcome to NIWA Community Forums.
 

Your name in an article

Started by Axiomist, September 30, 2010, 05:00:48 AM

Previous topic - Next topic

Axiomist

Meta Knight has your WiKirby account name somewhere in the article! Moydow and I innovated some wiki code for a feature to personalize WiKirby instead of using "the player", we put your name.

Tell us what you think. Personally, I think it's an incredibly great tool unique to MediaWiki and we'd be sillier to not take advantage of it.

Malake256

For those who don't want to take five mins looking for your name like i did, look on the last line of the Kirby & the Amazing Mirror section. This thing is so freaking amazing haha. I did suggest to have the real name though haha, that'd be funny...
My Weavile Brick Breaks Blisseys :)

dany36

I checked it out and it looks pretty cool in action. Awesome stuff!  ;D

Moydow

Quote from: Malake256 on October 01, 2010, 03:51:19 AM
I did suggest to have the real name though haha, that'd be funny...
It's possible, and the required variable is easily added;
Put this at the bottom of MyVariables.php, inside the curly bracket before the last "return true":

case MAG_USERREALNAME
        $parser
->disableCache();
        
$ret $GLOBALS['wgUser']->mRealName;
        break;

Then add 'USERREALNAME' to the array on the top line. You can change that code to display anything contained in the SQL table 'user'. I tried to make one to display passwords, but it renders as ":B:random letters". :P
NIWA Coordinator

Axiomist

I'm heading to work tonight, but when I get off and have time to test it out backwards and forwards after adding it; I'll do just that. I can't imagine it would be different in any browsers, so the only test I really want to try is what it does without a real name set in preferences.

But anytime I do something in ftp I check it logged in/logged out for both IE and FF just to be sure.

Moydow

Without a real name set it just blanks, but {{#if}} and {{#ifexist}} can be used to make a template that defaults to {{CURRENTUSER}} (logged in) or "the player" (logged out). This page shows the coding for that.
NIWA Coordinator

Irockz

brilliant. absolutely brilliant.

Axiomist

Thanks Irockz, I can't believe that feature generated more new accounts than the game give-away :D

I'll try adding your improvised code now Moydow.

Moydow

The completed template.

It isn't in any articles yet, but the documentation in that page makes plenty of use of it. :D
NIWA Coordinator

Tina

I like this feature a lot, personally! Using "the player" over and over in articles always felt really funny to me. Although, for guests, when it's just "the player"... since the T is uncapitalized, you can't really use it at the start of a sentence. I'm not sure how you'd fix that though, it seems like a hassle and it'd be easier to just reword the sentence instead. :P (I have a habit of taking the lazy/easy route a lot, though...)

(totally want this on WB)
WikiBound Editor-in-Chief

Moydow

Quote from: Tina on October 04, 2010, 05:21:36 AM
Although, for guests, when it's just "the player"... since the T is uncapitalized, you can't really use it at the start of a sentence. I'm not sure how you'd fix that though...
Quite simple really, I can just add an optional parameter using {{#switch}}, so that typing {{RealMe|cap=1}} will capitalise "The player" when used.
NIWA Coordinator

Tina

...Oh. Pfff. I forgot switch statements existed! Silly me.

Also, what about he/she in an article (referring to the player) based on the user's selected gender? That'd be cool, too.
WikiBound Editor-in-Chief

Moydow

#12
Quote from: Tina on October 04, 2010, 03:19:16 PM
Also, what about he/she in an article (referring to the player) based on the user's selected gender? That'd be cool, too.
Yeah. We had discussed that, but {{I}} seemed too short for a template. Also, it brings up the issue mentioned here, of how to refer to one of unspecified gender. That needs to be resolved first, although it seems either way, someone will claim that it's wrong. We could use "the player" to avoid this, but that could get repetitive. :|

Edit: Templates updated and working with the new optional parameter.
NIWA Coordinator

Axiomist

I brought that back up in the talk page, hopefully the personalization tools are an acceptable compromise to those opposed to using "they" and "their". I have no issues with WB using it, I wouldn't think Moydow would. Although it's intended to give WiKirby some spunk, I knew from the start of WiKirby that it would be an experimentation and innovation cradle. And that other friendly wikis could use whatever we conjure with no strings attached.

Things in the works (for other wikis actually) are even more incredible than this set of templates. Of course, I love the element of surprise, so.... no one will know until its ready-except those who know. :p


Moydow

I have absolutely no problems with the code being imported. I also perfected one of... those, but it's a secret to everybody. For now. ;)
NIWA Coordinator

Lazor Shroom Midna Freak

QuoteAdeleine's Paintbrush should note
Squee!  ;D

I joined WiKirby just to  see this. Yup yup.

Axiomist

Thanks! If you want to help get people's name in more articles. This would be a good start

I just searched for "player" to see where it currently could go. But I'm certain there's out-of-universe content we haven't covered such as how Canvas Curse's story involves the player as tho the DS stylus were the magic paintbrush from Drawcia.

Lazor Shroom Midna Freak

You're welcome! :)

All instances of "the player" in Dedede's article have been replace with {{me}}.