[pmwiki-users] Create a Wiki Trail from dynamic pages
Crisp, Steve [UK]
SCRISP at ngms.eu.com
Sat Nov 5 11:46:19 CST 2005
Your a star! worked first time. One thing that threw me though is that you said "create a modified version of scripts/trails.php in your local/ directory." The only way I could get it to work (read: pick up my change) was to modify the scripts/ version. If I put a local copy in the local/ directory this looks like it's not used.
Do I have to do anything else to 'activate' a local copy of a PmWiki core script?
Thanks very much for your help,
Wiki home: http://www.scoobypedia.co.uk/
From: John Rankin [mailto:john.rankin at affinity.co.nz]
Sent: Fri 04/11/2005 20:55
To: pmwiki-users at pmichaud.com; Crisp, Steve [UK]
Subject: Re: [pmwiki-users] Create a Wiki Trail from dynamic pages
On Saturday, 5 November 2005 2:50 AM, Crisp, Steve [UK] <SCRISP at ngms.eu.com> wrote:
>Dear PmWiki community,
>I would like to be able to create a Trail from a dynamic Wiki
>page. I57;ve looked at the DynamicTrail recipe but this is not
>the same thing (I think). An example is best here. Let57;s
>assume I have a page called DynamicPage which contains the following Wiki mark-up:
>! This is a dynamic page
>(:include ThisPage lines=5..:)
>Consider that the pages 56;included57; above may contain a few
>bulleted lists - the above page wraps other content. I would
>like to be able to point a Wiki trail at my DynamicPage.
>I would be greatful is someone could let me know how to do this?
You'll need to create a modified version of scripts/trails.php
in your local/ directory.
After that script reads the page, but before it explodes the content
into lines, you'll need to match \\(:include\\s+(\\S.*?):\\) and
process the result through the IncludeText($pagename, '$1')
$trailpage['text'] = preg_replace('/\\(:include\\s+(\\S.*?):\\)/ei',
This is off the top of my head, so is probably not quite right.
If this 'implementation details are left as an exercise for the reader'
hint is not enough, let me know and we'll look more closely at what's needed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pmwiki-users