thiswiki.php 1.3 KB

12345678910111213141516171819202122232425262728
  1. <?php if (!defined('PmWiki')) exit();
  2. /* Copyright 2002-2004 Patrick R. Michaud (pmichaud@pobox.com)
  3. This file is part of PmWiki; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published
  5. by the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version. See pmwiki.php for full details.
  7. This script defines the ThisPage:, ThisGroup:, and ThisWiki:
  8. InterMap links. It is included by default from the stdconfig.php
  9. script unless disabled by $EnableThisWiki=0; in config.php.
  10. To explicitly enable this feature, execute
  11. include_once("scripts/thiswiki.php");
  12. from config.php somewhere.
  13. Note that any changes to $ScriptUrl or $UrlPathPattern must occur
  14. prior to executing this script.
  15. */
  16. $LinkPatterns[100]["ThisWiki:($UrlPathPattern)"] = $FmtUrlLink;
  17. $LinkPatterns[100]["ThisPage:($UrlPathPattern)"] = $FmtUrlLink;
  18. $LinkPatterns[100]["ThisGroup:($UrlPathPattern)"] = $FmtUrlLink;
  19. $LinkPatterns[100]["ThisSite:($UrlPathPattern)"] = $FmtUrlLink;
  20. $InterMapUrls['ThisWiki'] = $ScriptUrl.'$1';
  21. $InterMapUrls['ThisPage'] = FmtPageName('$PageUrl$1',$pagename);
  22. $InterMapUrls['ThisGroup'] = FmtPageName('$ScriptUrl/$Group/$1',$pagename);
  23. $InterMapUrls['ThisSite'] = 'http://'.$_SERVER['HTTP_HOST'].'$1';
  24. ?>