This wiki is a XML full dump clone of "Heroes Wiki", the main wiki about the Heroes saga that has been shut down permanently since June 1, 2020. The purpose of this wiki is to keep online an exhaustive and accurate database about the franchise.

Template talk:Pagenamenopseudo: Difference between revisions

From Heroes Wiki
Jump to navigation Jump to search
Content deleted Content added
imported>Hardvice
No edit summary
imported>Hardvice
No edit summary
Line 7: Line 7:
*#Reads the first seven characters (can't read more than seven because <tt>Portal:</tt> is only seven long)
*#Reads the first seven characters (can't read more than seven because <tt>Portal:</tt> is only seven long)
*#Looks for a match
*#Looks for a match
*#If it finds it, it truncates the specified number of characters from <nowiki>{{PAGENAME}}</nowiki>. For example, on [[Portal:Cast]], it would skip 7 characters and become "Cast". On [[Heroes Interactive:The Fix]], it would skip 19 characters and become "The Fix".--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 01:09, 18 March 2007 (EDT)
*#If it finds it, it truncates the specified number of characters from <nowiki>{{PAGENAME}}</nowiki>. For example, on [[Portal:Cast]], it would skip 7 characters and become "Cast". On [[Heroes Interactive:The Fix]], it would skip 19 characters and become "The Fix".
*#If it doesn't find a match, it leaves <nowiki>{{PAGENAME}}</nowiki> as it is. This lets it be used on a mix of articles with and without pseudonamespaces (provided the article isn't named "Episode" or the like).--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 01:09, 18 March 2007 (EDT)

Revision as of 05:11, 18 March 2007

This template can strip off the pseudonamespace from the value of {{PAGENAME}}. This is useful for templates because "true" namespaces (like Help:) are automatically excluded from {{PAGENAME}}, but pseudonamespaces are not. Right now, it's set up to strip Episode: and Graphic Novel:. What other pseudonamespaces do we need to add to it?--Hardvice (talk) 23:44, 17 March 2007 (EDT)

  • Portal:, Theories:, Spoiler:, and Heroes Interactive:. Heroes Wiki: is not a pseudonamespace, I believe, right? — RyanGibsonStewart (talk) 23:58, 17 March 2007 (EDT)

Namespace Numbers

How do you know which namespaces are associated with which numbers? Are you just counting down from a dropbox? — RyanGibsonStewart (talk) 00:42, 18 March 2007 (EDT)

  • They aren't namespace numbers. They're the number of characters to skip. I'm counting on my fingers, actually, which is getting me some odd looks. What the template does:
    1. Reads the first seven characters (can't read more than seven because Portal: is only seven long)
    2. Looks for a match
    3. If it finds it, it truncates the specified number of characters from {{PAGENAME}}. For example, on Portal:Cast, it would skip 7 characters and become "Cast". On Heroes Interactive:The Fix, it would skip 19 characters and become "The Fix".
    4. If it doesn't find a match, it leaves {{PAGENAME}} as it is. This lets it be used on a mix of articles with and without pseudonamespaces (provided the article isn't named "Episode" or the like).--Hardvice (talk) 01:09, 18 March 2007 (EDT)