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:ArchiveLinks

From Heroes Wiki
Revision as of 05:26, 7 January 2008 by imported>MiamiVolts (Implementation: decided not to add section 0; but if you think it should be added, let me know.)
Jump to navigation Jump to search

Implementation

Ok, I'm close on this... just have to figure out why there's an extra linebreak appearing when I apply the Delink template. I'll check on it tommorrow, but if someone else wants to try before then, feel free.--MiamiVolts (talk) 02:42, 6 January 2008 (EST)

  • Delink is working good now to help capture headers which are links, but Archive_1 and Archive_2 are breaking if a pre or nowiki tag is used. Archive_1 is breaking on the second section, Archive_2 is breaking for sections 4 through 13.--MiamiVolts (talk) 12:42, 6 January 2008 (EST)
    • This ArchiveLink template is working now for my archives! A few more things to improve still: the Delink only currently removes a link if it's the entire string that's given; the sections can be and should be hardcoded 1-20 so they don't have to be entered.--MiamiVolts (talk) 23:18, 6 January 2008 (EST)
  • This is really cool, and will be very helpful in archiving pages. A quick test shows a couple of issues, which I'm sure you're already aware of:

Talk:Main Page/Archive 1: User:MiamiVolts/ArchiveLink

It looks like sections 1, 6, and 15 aren't showing up. Really, what the problem is is that the last six characters are cutting off. And since the section names aren't complete, the jumps aren't working. Everything else looks great to me! -- RyanGibsonStewart (talk) 23:41, 6 January 2008 (EST)

  • Right, the code is customized to crop correctly based on the length of my archive's pagename. That's why it's working for my archive's but not others (and why I put that comment [at least for my archive]). I just finished implementing the hard-coding of the argument. Next up is making the cropping vary based on pagename length.--MiamiVolts (talk) 23:57, 6 January 2008 (EST)
    • See below the lengths for reference:

Length of User talk:MiamiVolts/Archive 1: 30
Length of Talk:Main Page/Archive 1: 24
--MiamiVolts (talk) 00:04, 7 January 2008 (EST)

  • Length varying implemented but looks like we need to add section 0's, or should we? Is there any way we can fix the archive so the section numbering is correct?--MiamiVolts (talk) 00:16, 7 January 2008 (EST)
    • Ok, I fixed the archive so it's numbered correctly by moving the first header to a separate line (it was on the same line as the archiveheader template call before I moved it), and now it shows up in the above listing as expected. My current opinion is the section 0's should not be included cause if the first header is section 0, that throws off all of the edit links.--MiamiVolts (talk) 00:26, 7 January 2008 (EST)