[Pmwiki-users] WikiTrail modified

John Rankin john.rankin
Tue Sep 7 15:36:47 CDT 2004

On Wednesday, 8 September 2004 1:40 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>On Tue, Sep 07, 2004 at 03:04:09PM +0200, Eike Decker wrote:
>> Hi
>> I needed a different format for the wikitrails, so I've replaced a few lines in
>> the trails.php to accept a $WikiTrailFmt that describes how the trail should be
>> formated (I used css to change the appearing of the links with hoveringarrows
>> and other stuff like that and therefore I needed to extend this a little bit).
>> I would be nice if this idea would be part of future
>The traditional way to adapt wikitrails has been to create a custom trailstop
>function, as in:
>    include_once('scripts/trails.php');
>    function CustomTrailStop($link) {
>      global $pagename;
>      $t = ReadTrail($link);
>      // ... rest of code copied from MakeTrailStop here, with modifications
>      return "whatever you want the trailstop to output";
>    }
>    $DoubleBrackets["/&lt;&lt;\\|($TrailLinkPattern)\\|&gt;&gt;/e"] =
>      'CustomTrailStop("$1")';
Depending on the rendering changes required, one can also try something like

    $InlineReplacements["/&lt;&lt;(.*?)\\|(.*?)\\|(.*?)&gt;&gt;/"] =

replacing the ... with suitable alternatives.
John Rankin

More information about the pmwiki-users mailing list