01117: Treat PmWiki: - Cookbook: - PITS: links as internal on pmwiki.org

Summary: Treat PmWiki: - Cookbook: - PITS: links as internal on pmwiki.org
Created: 2009-07-14 08:20
Status: Closed - enabled
Category: Documentation
From: Petko
Priority: 3333

Description: From a discussion on the mailing list. The PmWiki documentation pages are maintained to be consistent with a default empty installation. Thus, links to pages which exist on pmwiki.org, but which are not intended to be shipped with the core need to be converted to InterMap links.

This entry suggests that we configure pmwiki.org to treat InterMap links pointing to itself as internal, which would improve backlinks and searches.

I agree with your first statement, but don't understand what you mean with your second statement. Can you elaborate?
-- SchreyP November 25, 2009, at 02:48 PM

I understand the second statement and agree with it. InterMap links aren't recognized as backlinks. It would be nice if they were treated as internal links when possible, and external links when necessary. This is more broadly useful than just for PmWiki documentation: I've set up wikis where I've used InterMap links to provide the flexibility to have links be internal or external as needed - but that eliminated the backlink capability that would have otherwise existed when the InterMap configuration was set to internal. -- RandyB December 3, 2009, at 2:33 PM

OK, in this case I agree too -- SchreyP December 03, 2009, at 03:13 PM

This is now enabled on PmWiki.org, but the pageindex will be updated upon saving a page. Here is how we do it.

  • The file scripts/intermap.txt has the 3 entries PmWiki: PITS: and Cookbook: commented out.
  • config.php contains the following code:
    function LocalIMap($pagename,$imap,$path,$alt,$txt,$fmt=NULL) {
      $group = substr($imap, 0, -1);
      return LinkPage($pagename,'<:page>',"$group.$path",$alt,$txt,$fmt);
    foreach(array("PmWiki:", "Cookbook:", "PITS:") as $i) {
      $LinkFunctions[$i] = 'LocalIMap';