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:Newpage theory: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>MiamiVolts m →Link template: fix indent |
imported>Hardvice No edit summary |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 13: | Line 13: | ||
*** In the end, I had to remove the subst: logic. It works fine when you subst the template, but not when you preload it. IIRC we ran into the same problem when we added the Welcome button. Ah well, no biggie.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 01:17, 21 September 2007 (EDT) |
*** In the end, I had to remove the subst: logic. It works fine when you subst the template, but not when you preload it. IIRC we ran into the same problem when we added the Welcome button. Ah well, no biggie.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 01:17, 21 September 2007 (EDT) |
||
**** Check out [http://meta.wikimedia.org/wiki/Help:Recursive_conversion_of_wikitext here]. I think they say how to do optional substitution, though I'm still learning about how it works. Something like <nowiki>{{subst:subst}}PAGENAME}}</nowiki> should work for preloading, right? At least that's what the help says...--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 01:25, 21 September 2007 (EDT) |
**** Check out [http://meta.wikimedia.org/wiki/Help:Recursive_conversion_of_wikitext here]. I think they say how to do optional substitution, though I'm still learning about how it works. Something like <nowiki>{{subst:subst}}PAGENAME}}</nowiki> should work for preloading, right? At least that's what the help says...--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 01:25, 21 September 2007 (EDT) |
||
***** The trouble is that preloaded pages behave oddly with noinclude and includeonly tags (same reason we can't add any cats, even in noinclude tags, to preload pages). I tried all three subst: tricks I know and none worked, but I'll take a look at that help page.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 01:28, 21 September 2007 (EDT) |
|||
****** The trick is that they make subst itself a template that returns "{{subst:"--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 01:32, 21 September 2007 (EDT) |
|||
******* I actually got it to behave by putting the subst: in its own set of includeonly tags, but only by closing and reopening the overall includeonly tags around it. Bizarre.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 01:35, 21 September 2007 (EDT) |
|||
******** Very nifty, Hardvice! <sup>5</sup> So there is more than one way to do it, then.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 01:37, 21 September 2007 (EDT) |
|||
********* There are at least a half-dozen ways to get a template to write in a subst. Unfortunately, most of them don't seem to work with preloaded pages. And I still have no idea ''why'' this one works. It really makes no sense that <noinclude>text </noinclude><noinclude>substitution </noinclude><noinclude>text</noinclude> is different from <noinclude>text substitution text</noinclude>, but hey.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 01:41, 21 September 2007 (EDT) |
|||
Latest revision as of 05:41, 21 September 2007
Automate?
I think it has to be an admin to install this to work automatically like the season histories template. For now, I'm going to be using {{subst:Newpage_theory}}.--MiamiVolts (talk) 22:15, 20 September 2007 (EDT)
- I've updated the template some and it's going well. I just rediscovered that MediaWiki:Newarticletext is what needs to be edited, and that it is protected for administrator-only editing.--MiamiVolts (talk) 23:58, 20 September 2007 (EDT)
- Actually, it's Template:Newarticletextbuttons that does the work. I don't think that's protected.--Hardvice (talk) 00:23, 21 September 2007 (EDT)
- Oh wait, you want it to be automagic. Yeah, that's MediaWiki:Newarticletext. I'll do it now.--Hardvice (talk) 00:25, 21 September 2007 (EDT)
- K. Should be working now.--Hardvice (talk) 00:51, 21 September 2007 (EDT)
- Awesome, kudos.--MiamiVolts (talk) 00:59, 21 September 2007 (EDT)
- K. Should be working now.--Hardvice (talk) 00:51, 21 September 2007 (EDT)
Link template
- To make things easier, since some of the theory base articles don't exist and don't need to exist, I added a link template which returns a link or just the text specified. Perhaps this template can be used elsewhere to simplify some of the other templates?--MiamiVolts (talk) 00:59, 21 September 2007 (EDT)
- Yeah, good call. It had an extraneous line break that was breaking the formatting, but I took care of it. Now to get it to subst properly...--Hardvice (talk) 01:01, 21 September 2007 (EDT)
- All good to go. This ought to be cake, really, since we're just cnp-ing from the existing articles.--Hardvice (talk) 01:06, 21 September 2007 (EDT)
- In the end, I had to remove the subst: logic. It works fine when you subst the template, but not when you preload it. IIRC we ran into the same problem when we added the Welcome button. Ah well, no biggie.--Hardvice (talk) 01:17, 21 September 2007 (EDT)
- Check out here. I think they say how to do optional substitution, though I'm still learning about how it works. Something like {{subst:subst}}PAGENAME}} should work for preloading, right? At least that's what the help says...--MiamiVolts (talk) 01:25, 21 September 2007 (EDT)
- The trouble is that preloaded pages behave oddly with noinclude and includeonly tags (same reason we can't add any cats, even in noinclude tags, to preload pages). I tried all three subst: tricks I know and none worked, but I'll take a look at that help page.--Hardvice (talk) 01:28, 21 September 2007 (EDT)
- The trick is that they make subst itself a template that returns "{{subst:"--MiamiVolts (talk) 01:32, 21 September 2007 (EDT)
- I actually got it to behave by putting the subst: in its own set of includeonly tags, but only by closing and reopening the overall includeonly tags around it. Bizarre.--Hardvice (talk) 01:35, 21 September 2007 (EDT)
- Very nifty, Hardvice! 5 So there is more than one way to do it, then.--MiamiVolts (talk) 01:37, 21 September 2007 (EDT)
- There are at least a half-dozen ways to get a template to write in a subst. Unfortunately, most of them don't seem to work with preloaded pages. And I still have no idea why this one works. It really makes no sense that <noinclude>text </noinclude><noinclude>substitution </noinclude><noinclude>text</noinclude> is different from <noinclude>text substitution text</noinclude>, but hey.--Hardvice (talk) 01:41, 21 September 2007 (EDT)
- Very nifty, Hardvice! 5 So there is more than one way to do it, then.--MiamiVolts (talk) 01:37, 21 September 2007 (EDT)
- I actually got it to behave by putting the subst: in its own set of includeonly tags, but only by closing and reopening the overall includeonly tags around it. Bizarre.--Hardvice (talk) 01:35, 21 September 2007 (EDT)
- The trick is that they make subst itself a template that returns "{{subst:"--MiamiVolts (talk) 01:32, 21 September 2007 (EDT)
- The trouble is that preloaded pages behave oddly with noinclude and includeonly tags (same reason we can't add any cats, even in noinclude tags, to preload pages). I tried all three subst: tricks I know and none worked, but I'll take a look at that help page.--Hardvice (talk) 01:28, 21 September 2007 (EDT)
- Check out here. I think they say how to do optional substitution, though I'm still learning about how it works. Something like {{subst:subst}}PAGENAME}} should work for preloading, right? At least that's what the help says...--MiamiVolts (talk) 01:25, 21 September 2007 (EDT)
- Yeah, good call. It had an extraneous line break that was breaking the formatting, but I took care of it. Now to get it to subst properly...--Hardvice (talk) 01:01, 21 September 2007 (EDT)