You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

Template:U: Difference between revisions

From MafiaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(11 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<includeonly>{{ #ifexist: User:{{{1|thisuserdoesnotexist}}} |[[User:{{{1}}}|{{{1|User}}}]]|{{ #ifexist:{{{1|thisuserdoesnotexist}}} |[[{{{1|:Category:Scummers}}}|{{{1|User}}}]]|[http://www.mafiascum.net/forum/memberlist.php?mode=viewprofile&un={{{1|}}} {{{1|User}}}]}}}}</includeonly><noinclude>This template links to a page of the user with username {{{1}}}.
<includeonly>{{ #ifexist: User:{{{1|thisuserdoesnotexist}}} |[[User:{{{1}}}|{{{2|{{{1|User}}}}}}]]|{{ #ifexist:{{{1|thisuserdoesnotexist}}} |[[{{{1|:Category:Scummers}}}|{{{2|{{{1|User}}}}}}]]|<span class="plainlinks">[http://forum.mafiascum.net/memberlist.php?mode=viewprofile&un={{{1|}}} {{{2|{{{1|User}}}}}}]</span>}}}}</includeonly><noinclude>This template links to a page of the user with username {{{1}}}.


*It will first check for a wiki page <nowiki>[[User:username]]</nowiki>, and link to it if it exists.
*It will first check for a wiki page <nowiki>[[User:username]]</nowiki>, and link to it if it exists.
*If the above is a redlink, it will check if there is a wiki page at <nowiki>[[username]]</nowiki> (without the ''User:'' prefix), and link to it if it exists.
*If the above is a redlink, it will check if there is a wiki page at <nowiki>[[username]]</nowiki> (without the ''User:'' prefix), and link to it if it exists.
*If the above is a redlink, too, it will link to the user's profile page on the forum.
*If the above is a redlink, too, it will link to the user's profile page on the forum.
</noinclude>
 
==={{{1}}}===
 
The user name. Spaces need to be replaced with <code>&amp;#32;</code> to work properly; <code>%20</code> also works but requires using the second parameter below to look good.
 
==={{{2}}}===
 
The displayed text. If not specified, {{{1}}} is used.
 
Note that this uses <code>#ifexist</code> parser functions (always one, and maybe two), which are considered [http://www.mediawiki.org/wiki/Manual:$wgExpensiveParserFunctionLimit expensive]. As a result, if more than <code>$wgExpensiveParserFunctionLimit</code> of these are used on a page (which is 100 as of this edit), the later ones will assume the wiki pages don't exist and act accordingly. (Note that this is 100 pages checked for, not 100 template usages - so checking for the same page 100 times counts as 1.)
 
[[Category:Pimped by Fenhl]][[Category:Templates|{{PAGENAME}}]]</noinclude>

Latest revision as of 02:27, 7 August 2014

This template links to a page of the user with username {{{1}}}.

  • It will first check for a wiki page [[User:username]], and link to it if it exists.
  • If the above is a redlink, it will check if there is a wiki page at [[username]] (without the User: prefix), and link to it if it exists.
  • If the above is a redlink, too, it will link to the user's profile page on the forum.

{{{1}}}

The user name. Spaces need to be replaced with &#32; to work properly; %20 also works but requires using the second parameter below to look good.

{{{2}}}

The displayed text. If not specified, {{{1}}} is used.

Note that this uses #ifexist parser functions (always one, and maybe two), which are considered expensive. As a result, if more than $wgExpensiveParserFunctionLimit of these are used on a page (which is 100 as of this edit), the later ones will assume the wiki pages don't exist and act accordingly. (Note that this is 100 pages checked for, not 100 template usages - so checking for the same page 100 times counts as 1.)