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:NovelsCreated: Difference between revisions

From Heroes Wiki
Jump to navigation Jump to search
Content deleted Content added
imported>MiamiVolts
No edit summary
imported>Ryangibsonstewart
 
(32 intermediate revisions by 3 users not shown)
Line 3: Line 3:
** It would be a nice way to catch when, say, an episode writer writes her first GN. I have a feeling this automation is going to make us a bit lazy, and it's likely we'll forget to go and add the template for the other function. But then again, I guess it's no more likely than forgetting to add the new variable to crewnav.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 02:08, 19 December 2007 (EST)
** It would be a nice way to catch when, say, an episode writer writes her first GN. I have a feeling this automation is going to make us a bit lazy, and it's likely we'll forget to go and add the template for the other function. But then again, I guess it's no more likely than forgetting to add the new variable to crewnav.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 02:08, 19 December 2007 (EST)
*** Well, this template actually already does 4 searches for every pageload. If Admin thinks it's okay to do both, it's fine with me but I really do worry about taxing the server and the resulting performance in terms of speed.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 02:11, 19 December 2007 (EST)
*** Well, this template actually already does 4 searches for every pageload. If Admin thinks it's okay to do both, it's fine with me but I really do worry about taxing the server and the resulting performance in terms of speed.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 02:11, 19 December 2007 (EST)
**** I was able to modify [[Template:DPLSearch]] to use this template. Who is left to switch over from the graphic novel crew? Also, another thing we could do is to make the episode and graphic novel checklists dynamic such that they note when the NovelsCreated/EpisodesCreated templates needs to be added. DPL opens a lot of possibilities.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 02:56, 19 December 2007 (EST)
**** I was able to modify [[Template:DPLSearch]] to use this template. Who is left to switch over from the graphic novel crew? Also, another thing we could do is to make the episode and graphic novel checklists dynamic such that they note where the NovelsCreated/EpisodesCreated template needs to be added. DPL opens a lot of possibilities.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 02:56, 19 December 2007 (EST)
== Multiple creators ==
The code is breaking for when there are multiple artists or writers for a single novel, such as on [[Joe Pokaski]]'s page. Trying to figure out a solution. Hmm.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 03:20, 19 December 2007 (EST)
* It's the pipes in Aron Coleite's name. Should work fine if Aron's listed last or if we remove the pipes.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 03:22, 19 December 2007 (EST)
* Oh no wait. That was the problem before. Now it's that it's only stripping off <nowiki>[[PAGENAME]]</nowiki> while the field is actually populated with <nowiki>[[PAGENAME]]</nowiki> and <nowiki>[[Some Other Guy]]</nowiki>, so it's printing the remainder of the <tt>include</tt>. Hmm. Maybe the template wasn't such a bad deal after all.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 03:25, 19 December 2007 (EST)
** Yup, it's DPLSearch. The old version works OK. Hmm. Not sure how we can get it to strip the whole field. You could use a second dpl statement to produce ''just'' the include and remove it, but that's an extra DPL for each section--at which point it would be just as efficient to use the phony template.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 03:29, 19 December 2007 (EST)
*** No, 4 times using DPLSearch would still be better than a lot more with the template. However, I've still a couple ideas to try.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 03:36, 19 December 2007 (EST)
**** It wouldn't be DPLSearch 4 times, though. You'd actually be calling dpl twice per section -- once to produce the output, and once to calculate what to remove. You could probably do it all with one DPLSearch.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 03:42, 19 December 2007 (EST)
***** Yeah, I noticed that the extra text is always before the * character, so my first idea is to pass through the string produced and nullify the text before each new line and the * character. Just trying to think up the correct use of pos and replace now; though now I think about it more it looks like there is no way to strip the different variations in one pass, and that it would take two dpl calls; good call.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 03:53, 19 December 2007 (EST)
*I'm not sure what the reason is, but I'm noticing either formatting problems or actual content problems on every single page using this template. I'd much rather go back to using the second template. -- {{User:Ryangibsonstewart/sig}} 06:33, 19 December 2007 (EST)
** Yeah, still trying to figure out a better DPLSearch using recursion, so you have seen some disparity while I tried to change the format. However, I haven't got it to parse yet, so I commented it out momentarily to get some rest. I try some more on it in a few hours.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 11:02, 19 December 2007 (EST)
*** That's fine. What I'm still noticing is that people who worked on GNs with other creators are funky (see [[Aron Coleite]]). Some GNs don't italicize (see [[Chuck Kim]]). There's a lot of whitespace on some pages (see [[Jason Badower]]). -- {{User:Ryangibsonstewart/sig}} 11:30, 19 December 2007 (EST)

== Recursion ==
I think we can add the extra text as part of the search using recursion in DPLSearch, something like the following:
<pre>
{{#if: {{{result|}}}
| {{#if: {{{search|}}}
| {{#if: {{#len: {{#explode: {{{search}}}|\n|1}}}}}}
| {{DPLSearch|result={{#replace: {{{result}}} | {{#explode: {{{search}}}|\n|0}} |}}
|search={{#sub: {{{search}}} | {{#pos: {{{search}}}|\n}} }} }}
| {{#replace: {{{result}}} | {{#explode: {{{search}}}|\n|0}} |}}
| {{{result}}}
}}
}}
</pre>
--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 05:43, 19 December 2007 (EST)
* Ok, I also switched the code to use <nowiki><p> instead of <nospan></nowiki> and was able to eliminate the extra whitespace. Still working on the recusion still. I've learned that explode doesn't work on the newline character (\n), so I switched to try switching to inline mode and am exploding <nowiki>&rarr;</nowiki> (right arrows) instead. Making progress, but going to eat now so I'll revert until I get back.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 17:04, 19 December 2007 (EST)
**Cool. Thanks for all your work on it--you've got a better [[brain]] than I for dpl. -- {{User:Ryangibsonstewart/sig}} 18:31, 19 December 2007 (EST)
***Ok, I got the inclusion-type stripping to work by using a chain of 'replace' function calls, and spacing is working great. I checked the crew Ryan mentioned on Hardvice's talk page. The only remaining issue appears to be the font. I'll try and work on that tommorrow. Will revert for now.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 02:07, 20 December 2007 (EST)
****Ah, I think I may have found a [http://heroeswiki.com/index.php?title=Heroes_Wiki:Sandbox&diff=145806&oldid=145651 solution] to the <nowiki><pre></nowiki> tags too. Now to implement it...--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 15:08, 20 December 2007 (EST)
***** Finished implementing. I appear to have finally fixed the bug. Whee. :) I'm going through the graphic novel crew and checking the whitespace now. Please let me know if any of the GN crew pages look off to you.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 16:50, 20 December 2007 (EST)
== Inline version ==
Hmm, I just noticed that we need to add a Template:NovelsCreatedInline for the disambigs.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 17:05, 20 December 2007 (EST)
* Good catch. The template really doesn't need to change--we should just simplify the disambig. -- {{User:Ryangibsonstewart/sig}} 18:42, 20 December 2007 (EST)
** Are you sure? I didn't see your comment and just finished making [[Template:NovelsCreatedInline]].--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 18:58, 20 December 2007 (EST)
*** It looks good, but I'm not sure we should be including a full list of credits for a crew member on a disambig page. [[Kotzebue]] is the only one I can think of where we list any credits at all, and that was just because there were two artists with the same name. Since Travis has done a few more novels, we really don't need to list more than one novel to distinguish Jordan from Travis, or to break up the monotony of "So and so is a graphic novel artist". -- {{User:Ryangibsonstewart/sig}} 19:03, 20 December 2007 (EST)
**** Ok, then we don't need it for the disambigs but we could need it laters, so we could move it to my userspace if no one thinks it worth keeping.--[[User:MiamiVolts|MiamiVolts]] ([[User_talk:MiamiVolts|talk]]) 19:11, 20 December 2007 (EST)

== Benefits to automation ==

Just for posterity's sake, here are some credits that we forgot, but were found with automation:
* [http://heroeswiki.com/index.php?title=Edgar_Delgado&diff=145971&oldid=133772 Edgar Delgado, ''Petrified Lightning'']
* [http://heroeswiki.com/index.php?title=David_Moran&diff=145974&oldid=89273 David Moran, ''Trial By Fire'']
* [http://heroeswiki.com/index.php?title=John_Starr&diff=145986&oldid=142316 John Starr, ''Molly's Dream'' and ''Elle's First Assignment, Part 2'']
* [http://heroeswiki.com/index.php?title=Harrison_Wilcox&diff=145874&oldid=79139 Harrison Wilcox, ''Molly's Dream'']
* [http://heroeswiki.com/index.php?title=Jesse_Alexander&diff=145774&oldid=142077 Jesse Alexander, ''HDYSAEM?,P1'' and ''HDYSAEM?,P2'']
* [http://heroeswiki.com/index.php?title=Aron_Coleite&diff=145775&oldid=120517 Aron Coleite, ''TDOHG,P2'']
-- {{User:Ryangibsonstewart/sig}} 21:06, 20 December 2007 (EST)

Latest revision as of 02:11, 21 December 2007

We can actually move (or alias) this and put the episode sections in here, too, so that one template call prints all applicable sections.--Hardvice (talk) 02:03, 19 December 2007 (EST)

  • I thought about that too, but it seems like a waste to go through the novels and episodes for each person, when most people only do one or the other.--MiamiVolts (talk) 02:06, 19 December 2007 (EST)
    • It would be a nice way to catch when, say, an episode writer writes her first GN. I have a feeling this automation is going to make us a bit lazy, and it's likely we'll forget to go and add the template for the other function. But then again, I guess it's no more likely than forgetting to add the new variable to crewnav.--Hardvice (talk) 02:08, 19 December 2007 (EST)
      • Well, this template actually already does 4 searches for every pageload. If Admin thinks it's okay to do both, it's fine with me but I really do worry about taxing the server and the resulting performance in terms of speed.--MiamiVolts (talk) 02:11, 19 December 2007 (EST)
        • I was able to modify Template:DPLSearch to use this template. Who is left to switch over from the graphic novel crew? Also, another thing we could do is to make the episode and graphic novel checklists dynamic such that they note where the NovelsCreated/EpisodesCreated template needs to be added. DPL opens a lot of possibilities.--MiamiVolts (talk) 02:56, 19 December 2007 (EST)

Multiple creators

The code is breaking for when there are multiple artists or writers for a single novel, such as on Joe Pokaski's page. Trying to figure out a solution. Hmm.--MiamiVolts (talk) 03:20, 19 December 2007 (EST)

  • It's the pipes in Aron Coleite's name. Should work fine if Aron's listed last or if we remove the pipes.--Hardvice (talk) 03:22, 19 December 2007 (EST)
  • Oh no wait. That was the problem before. Now it's that it's only stripping off [[PAGENAME]] while the field is actually populated with [[PAGENAME]] and [[Some Other Guy]], so it's printing the remainder of the include. Hmm. Maybe the template wasn't such a bad deal after all.--Hardvice (talk) 03:25, 19 December 2007 (EST)
    • Yup, it's DPLSearch. The old version works OK. Hmm. Not sure how we can get it to strip the whole field. You could use a second dpl statement to produce just the include and remove it, but that's an extra DPL for each section--at which point it would be just as efficient to use the phony template.--Hardvice (talk) 03:29, 19 December 2007 (EST)
      • No, 4 times using DPLSearch would still be better than a lot more with the template. However, I've still a couple ideas to try.--MiamiVolts (talk) 03:36, 19 December 2007 (EST)
        • It wouldn't be DPLSearch 4 times, though. You'd actually be calling dpl twice per section -- once to produce the output, and once to calculate what to remove. You could probably do it all with one DPLSearch.--Hardvice (talk) 03:42, 19 December 2007 (EST)
          • Yeah, I noticed that the extra text is always before the * character, so my first idea is to pass through the string produced and nullify the text before each new line and the * character. Just trying to think up the correct use of pos and replace now; though now I think about it more it looks like there is no way to strip the different variations in one pass, and that it would take two dpl calls; good call.--MiamiVolts (talk) 03:53, 19 December 2007 (EST)
  • I'm not sure what the reason is, but I'm noticing either formatting problems or actual content problems on every single page using this template. I'd much rather go back to using the second template. -- RyanGibsonStewart (talk) 06:33, 19 December 2007 (EST)
    • Yeah, still trying to figure out a better DPLSearch using recursion, so you have seen some disparity while I tried to change the format. However, I haven't got it to parse yet, so I commented it out momentarily to get some rest. I try some more on it in a few hours.--MiamiVolts (talk) 11:02, 19 December 2007 (EST)
      • That's fine. What I'm still noticing is that people who worked on GNs with other creators are funky (see Aron Coleite). Some GNs don't italicize (see Chuck Kim). There's a lot of whitespace on some pages (see Jason Badower). -- RyanGibsonStewart (talk) 11:30, 19 December 2007 (EST)

Recursion

I think we can add the extra text as part of the search using recursion in DPLSearch, something like the following:

{{#if: {{{result|}}} 
| {{#if: {{{search|}}} 
|   {{#if: {{#len: {{#explode: {{{search}}}|\n|1}}}}}}
|     {{DPLSearch|result={{#replace: {{{result}}} | {{#explode: {{{search}}}|\n|0}} |}}
                 |search={{#sub: {{{search}}} | {{#pos: {{{search}}}|\n}} }} }}
|   {{#replace: {{{result}}} | {{#explode: {{{search}}}|\n|0}} |}} 
| {{{result}}} 
  }} 
}}

--MiamiVolts (talk) 05:43, 19 December 2007 (EST)

  • Ok, I also switched the code to use <p> instead of <nospan> and was able to eliminate the extra whitespace. Still working on the recusion still. I've learned that explode doesn't work on the newline character (\n), so I switched to try switching to inline mode and am exploding → (right arrows) instead. Making progress, but going to eat now so I'll revert until I get back.--MiamiVolts (talk) 17:04, 19 December 2007 (EST)
    • Cool. Thanks for all your work on it--you've got a better brain than I for dpl. -- RyanGibsonStewart (talk) 18:31, 19 December 2007 (EST)
      • Ok, I got the inclusion-type stripping to work by using a chain of 'replace' function calls, and spacing is working great. I checked the crew Ryan mentioned on Hardvice's talk page. The only remaining issue appears to be the font. I'll try and work on that tommorrow. Will revert for now.--MiamiVolts (talk) 02:07, 20 December 2007 (EST)
        • Ah, I think I may have found a solution to the <pre> tags too. Now to implement it...--MiamiVolts (talk) 15:08, 20 December 2007 (EST)
          • Finished implementing. I appear to have finally fixed the bug. Whee. :) I'm going through the graphic novel crew and checking the whitespace now. Please let me know if any of the GN crew pages look off to you.--MiamiVolts (talk) 16:50, 20 December 2007 (EST)

Inline version

Hmm, I just noticed that we need to add a Template:NovelsCreatedInline for the disambigs.--MiamiVolts (talk) 17:05, 20 December 2007 (EST)

  • Good catch. The template really doesn't need to change--we should just simplify the disambig. -- RyanGibsonStewart (talk) 18:42, 20 December 2007 (EST)
    • Are you sure? I didn't see your comment and just finished making Template:NovelsCreatedInline.--MiamiVolts (talk) 18:58, 20 December 2007 (EST)
      • It looks good, but I'm not sure we should be including a full list of credits for a crew member on a disambig page. Kotzebue is the only one I can think of where we list any credits at all, and that was just because there were two artists with the same name. Since Travis has done a few more novels, we really don't need to list more than one novel to distinguish Jordan from Travis, or to break up the monotony of "So and so is a graphic novel artist". -- RyanGibsonStewart (talk) 19:03, 20 December 2007 (EST)
        • Ok, then we don't need it for the disambigs but we could need it laters, so we could move it to my userspace if no one thinks it worth keeping.--MiamiVolts (talk) 19:11, 20 December 2007 (EST)

Benefits to automation

Just for posterity's sake, here are some credits that we forgot, but were found with automation:

-- RyanGibsonStewart (talk) 21:06, 20 December 2007 (EST)