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>Ryangibsonstewart
No edit summary
imported>Hardvice
No edit summary
 
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This template can strip off the pseudonamespace from the value of <nowiki>{{PAGENAME}}</nowiki>. This is useful for templates because "true" namespaces (like <tt>Help:</tt>) are automatically excluded from <nowiki>{{PAGENAME}}</nowiki>, but pseudonamespaces are not. Right now, it's set up to strip <tt>Episode:</tt> and <tt>Graphic Novel:</tt>. What other pseudonamespaces do we need to add to it?--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 23:44, 17 March 2007 (EDT)
This template can strip off the pseudonamespace from the value of <nowiki>{{PAGENAME}}</nowiki>. This is useful for templates because "true" namespaces (like <tt>Help:</tt>) are automatically excluded from <nowiki>{{PAGENAME}}</nowiki>, but pseudonamespaces are not. Right now, it's set up to strip <tt>Episode:</tt> and <tt>Graphic Novel:</tt>. What other pseudonamespaces do we need to add to it?--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 23:44, 17 March 2007 (EDT)
*<tt>Heroes Wiki:</tt>. &mdash; [[User:Ryangibsonstewart|<font color=#0147FA>RyanGibsonStewart</font>]] ([[User talk:Ryangibsonstewart|<font color=#0147FA>talk</font>]]) 23:58, 17 March 2007 (EDT)
*<tt>Portal:</tt>, <tt>Theories:</tt>, <tt>Spoiler:</tt>, and <tt>Heroes Interactive:</tt>. <tt>Heroes Wiki:</tt> is not a pseudonamespace, I believe, right? &mdash; [[User:Ryangibsonstewart|<font color=#0147FA>RyanGibsonStewart</font>]] ([[User talk:Ryangibsonstewart|<font color=#0147FA>talk</font>]]) 23:58, 17 March 2007 (EDT)
**Graphic Novel is a pseudo-namespace. Heroes Wiki is a true namespace. and if it would make things easier I could make those psuedo-namespaces true namespaces instead. ([[User:Admin|Admin]] 02:39, 18 March 2007 (EDT))
***Hmmm. What would that do to searching? And does it mean more changes to remember the next time you upgrade? In any case, this template will still work, even if some of these get made into real namespaces, because then they'd fall into the default. So whatever works from a maintenance POV works.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 02:49, 18 March 2007 (EDT)
**** I can set them to be included in searches by default. No additional changes to remember during next upgrade, either (in fact they release patches for MediaWiki so it's usually pretty easy to upgrade even with modified code). The only downside is that in order to make them real namespaces we have to temporarily rename the articles because if there's overlap between a namespace and articles beginning with that namespace name then they'll be inaccessible. Would only be a one time thing, though, so it doesn't matter too much. Whatever makes things easier for everyone. ([[User:Admin|Admin]] 02:53, 18 March 2007 (EDT))
*****Will they then have tick boxes on the search screen? If so, I'm all in favor. That actually adds functionality we can't approximate with templates like this.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 03:04, 18 March 2007 (EDT)
****** Yes, they'd have checkboxes on the search page and I can set them to default to being checked so that for default searches they'll be included. ([[User:Admin|Admin]] 03:14, 18 March 2007 (EDT))
*******Groovy. That's not too important now, with 20 episodes, but after a few seasons, being able to search ''just'' in episodes or ''just'' in graphic novels might be a nice feature.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 03:16, 18 March 2007 (EDT)
*******Also, if we have to rename the articles to do the change, it's better to do it now, when there aren't too many, rather than later, when there are a ton.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 03:19, 18 March 2007 (EDT)
***** It doesn't really matter to me. The only problem I could see with having pseudonamespaces has been presumably fixed with this template.... Right now, there are 24 "Graphic Novel:" and 20 "Episode:" namespaces, as far as I can tell. &mdash; [[User:Ryangibsonstewart|<font color=#0147FA>RyanGibsonStewart</font>]] ([[User talk:Ryangibsonstewart|<font color=#0147FA>talk</font>]]) 03:06, 18 March 2007 (EDT)
******What the heck is a psuedo name space? [[User:Heroe|<span style="color:green;">Heroe</span>]] 19:21, 18 March 2007 (EDT)
*******There are "real" namespaces (Image:, Category:, User:, for example), and then there are the ones we make up ourselves (Episode:, Graphic Novel:, Theories:, for example) which would be considered "pseudo" namespaces. It really doesn't make too much of a difference normally (except when linking, you can link to [[User:Heroe]] or [[User: Heroe]] for real namespaces, but when linking to pseudos, it needs to be exact: [[Episode:Genesis]], not "Episode: Genesis"). The problems start when you try to do <nowiki>{{PAGENAME}}</nowiki>: on a real namespace, just "Heroe" would show up. On a pseudo namespace, the whole thing (Episode:Genesis) would show up. Does that make sense? &mdash; [[User:Ryangibsonstewart|<font color=#0147FA>RyanGibsonStewart</font>]] ([[User talk:Ryangibsonstewart|<font color=#0147FA>talk</font>]]) 19:28, 18 March 2007 (EDT)
*******Another differences is that you can [[Special:Search|search]] "true" namespaces. Notice the check boxes at the bottom of the search page let you include or exclude namespaces when searching. There are other differences, but those are the most noticeable.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 19:41, 18 March 2007 (EDT)

==Namespace Numbers==
How do you know which namespaces are associated with which numbers? Are you just counting down from a dropbox? &mdash; [[User:Ryangibsonstewart|<font color=#0147FA>RyanGibsonStewart</font>]] ([[User talk:Ryangibsonstewart|<font color=#0147FA>talk</font>]]) 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:
*#First it tests for articles whose titles match the first seven letters of the pseudonamespaces (i.e. an article named "Episode" or "Graphic") and excludes them.
*#Then it reads the first seven characters (can't read more than seven because <tt>Portal:</tt> is only seven long)
*#Then it 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".
*##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.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 01:09, 18 March 2007 (EDT)
**Oh my goodness, I was going crazy trying to figure out what those numbers meant and how you came up with them. Sheesh ... By the way, you counting on your fingers reminds me of when I took my massage therapy certification test at a testing center--we had to name different muscles, their inserts and attachments, and what actions they performed. I'm such a kinesthetic learner that I would sit there an move my arm back and forth, or my shoulders up and down so I could remember the associated actions--meanwhile the guy next to me is taking the bar exam or a writing text or whatever and is looking at me like I'm crazy...which I am, so it was quite apt. &mdash; [[User:Ryangibsonstewart|<font color=#0147FA>RyanGibsonStewart</font>]] ([[User talk:Ryangibsonstewart|<font color=#0147FA>talk</font>]]) 01:29, 18 March 2007 (EDT)

Latest revision as of 23:41, 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)
    • Graphic Novel is a pseudo-namespace. Heroes Wiki is a true namespace. and if it would make things easier I could make those psuedo-namespaces true namespaces instead. (Admin 02:39, 18 March 2007 (EDT))
      • Hmmm. What would that do to searching? And does it mean more changes to remember the next time you upgrade? In any case, this template will still work, even if some of these get made into real namespaces, because then they'd fall into the default. So whatever works from a maintenance POV works.--Hardvice (talk) 02:49, 18 March 2007 (EDT)
        • I can set them to be included in searches by default. No additional changes to remember during next upgrade, either (in fact they release patches for MediaWiki so it's usually pretty easy to upgrade even with modified code). The only downside is that in order to make them real namespaces we have to temporarily rename the articles because if there's overlap between a namespace and articles beginning with that namespace name then they'll be inaccessible. Would only be a one time thing, though, so it doesn't matter too much. Whatever makes things easier for everyone. (Admin 02:53, 18 March 2007 (EDT))
          • Will they then have tick boxes on the search screen? If so, I'm all in favor. That actually adds functionality we can't approximate with templates like this.--Hardvice (talk) 03:04, 18 March 2007 (EDT)
            • Yes, they'd have checkboxes on the search page and I can set them to default to being checked so that for default searches they'll be included. (Admin 03:14, 18 March 2007 (EDT))
              • Groovy. That's not too important now, with 20 episodes, but after a few seasons, being able to search just in episodes or just in graphic novels might be a nice feature.--Hardvice (talk) 03:16, 18 March 2007 (EDT)
              • Also, if we have to rename the articles to do the change, it's better to do it now, when there aren't too many, rather than later, when there are a ton.--Hardvice (talk) 03:19, 18 March 2007 (EDT)
          • It doesn't really matter to me. The only problem I could see with having pseudonamespaces has been presumably fixed with this template.... Right now, there are 24 "Graphic Novel:" and 20 "Episode:" namespaces, as far as I can tell. — RyanGibsonStewart (talk) 03:06, 18 March 2007 (EDT)
            • What the heck is a psuedo name space? Heroe 19:21, 18 March 2007 (EDT)
              • There are "real" namespaces (Image:, Category:, User:, for example), and then there are the ones we make up ourselves (Episode:, Graphic Novel:, Theories:, for example) which would be considered "pseudo" namespaces. It really doesn't make too much of a difference normally (except when linking, you can link to User:Heroe or User: Heroe for real namespaces, but when linking to pseudos, it needs to be exact: Episode:Genesis, not "Episode: Genesis"). The problems start when you try to do {{PAGENAME}}: on a real namespace, just "Heroe" would show up. On a pseudo namespace, the whole thing (Episode:Genesis) would show up. Does that make sense? — RyanGibsonStewart (talk) 19:28, 18 March 2007 (EDT)
              • Another differences is that you can search "true" namespaces. Notice the check boxes at the bottom of the search page let you include or exclude namespaces when searching. There are other differences, but those are the most noticeable.--Hardvice (talk) 19:41, 18 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. First it tests for articles whose titles match the first seven letters of the pseudonamespaces (i.e. an article named "Episode" or "Graphic") and excludes them.
    2. Then it reads the first seven characters (can't read more than seven because Portal: is only seven long)
    3. Then it looks for a match
      1. 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".
      2. 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.--Hardvice (talk) 01:09, 18 March 2007 (EDT)
    • Oh my goodness, I was going crazy trying to figure out what those numbers meant and how you came up with them. Sheesh ... By the way, you counting on your fingers reminds me of when I took my massage therapy certification test at a testing center--we had to name different muscles, their inserts and attachments, and what actions they performed. I'm such a kinesthetic learner that I would sit there an move my arm back and forth, or my shoulders up and down so I could remember the associated actions--meanwhile the guy next to me is taking the bar exam or a writing text or whatever and is looking at me like I'm crazy...which I am, so it was quite apt. — RyanGibsonStewart (talk) 01:29, 18 March 2007 (EDT)