InterPageLinks

From Exalted - Unofficial Wiki
Revision as of 01:16, 6 April 2010 by Conversion script (talk) (link fix)
Jump to: navigation, search

In rereading ReaderCentricDesign, I realized that items on individual pages is not a minimum condition for it. The minimum condition is individual references. That is, there can be many items on a given page, as long as it is possible to link directly to them from other pages. This is possible with interpage linking, which allows a web link to target a specific section of a page, provided that section is marked in a special way.

Interpage linking is trivial to accomplish with raw HTML, as you can embed named anchors on pages with <a name="anchorname"> tags. If a page like foo has such a tag in a section, then a URL containing foo#anchorname will lead right to this section.

UseModWiki has a syntax for supporting the addition of named anchors. Prior to a header line (i.e. one using syntax similar to === Header ===), you can embed a tag like so [#anchorname]. Unfortunately, the rest of the implementation of this feature is so colossally stupid that it isn't really worth using.

In the first place, the above wiki syntax translates not into <a name="anchorname">, but <a name="#anchorname">. This means the URL to access it must be foo##anchorname. This would not be so bad, but it turns out to be very hard to convince UseModWiki to actually build a link like this.

For example, I have placed name anchors on the ReaderCentricDesign page. One of these is for the "Going Forward" section, marked using the wiki code [#goingforward]. You would think that at least one of the following might generate links to this section, but none of them do:

markup -> result
ReaderCentricDesign#goingforward -> ReaderCentricDesign#goingforward
ReaderCentricDesign##goingforward -> ReaderCentricDesign##goingforward
[[ReaderCentricDesign#goingforward]] -> ReaderCentricDesign#goingforward
[[ReaderCentricDesign##goingforward]] -> ReaderCentricDesign##goingforward
[ReaderCentricDesign#goingforward] -> [[[ReaderCentricDesign]]#goingforward]
[ReaderCentricDesign##goingforward] -> [[[ReaderCentricDesign]]##goingforward]
[ReaderCentricDesign%23goingforward] -> [[[ReaderCentricDesign]]%23goingforward]
[ReaderCentricDesign%23%23goingforward] -> [[[ReaderCentricDesign]]%23%23goingforward]

The only syntax I can get to work is:

[http://exalted.xi.co.nz/wiki/wiki.pl?ReaderCentricDesign%23%23goingforward this one] -> this one

That's right. It requires a full server path, and gets marked as an external link. This design choice is so foolish that it makes me want to track down the source, print out 1000 copies, bind them into a big book, find the programmer and bludgeon him with it. Why even bother releasing the feature at that point.

(MediaWiki, by the way, generates sensible name anchors for all header tags automatically.)

-- Wordman

I tracked down the source for this. It is trivial to fix. Basically, the code is largely written correctly. The problem is the code that generates the <a name="#anchorname"> tag. If this were change to generate <a name="anchorname"> instead, a wiki-word link like ReaderCentricDesign#goingforward would work. This is a single character change in the source code, I think. It's tough to test, because I don't know which version of the code this site uses.

-- Wordman

There is an official patch for this problem created July 14, 2008. -- Wordman