<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>Re: [pmwiki-users] Create a Wiki Trail from dynamic pages</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText64128 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>John,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>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.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Do I have to do anything else to 'activate'
a local copy of a PmWiki core script?</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Thanks very much for your
help,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>-Steve.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Wiki home: <A
href="http://www.scoobypedia.co.uk/">http://www.scoobypedia.co.uk/</A></FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> John Rankin
[mailto:john.rankin@affinity.co.nz]<BR><B>Sent:</B> Fri 04/11/2005
20:55<BR><B>To:</B> pmwiki-users@pmichaud.com; Crisp, Steve
[UK]<BR><B>Subject:</B> Re: [pmwiki-users] Create a Wiki Trail from dynamic
pages<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>On Saturday, 5 November 2005 2:50 AM, Crisp, Steve [UK]
<SCRISP@ngms.eu.com> wrote:<BR>><BR>>Dear PmWiki
community,<BR>> <BR>>I would like to be able to create a Trail from a
dynamic Wiki<BR>>page. I57;ve looked at the DynamicTrail recipe but
this is not<BR>>the same thing (I think). An example is best
here. Let57;s<BR>>assume I have a page called DynamicPage which
contains the following Wiki mark-up:<BR>> <BR>>! This is a dynamic
page<BR>> <BR>>(:include ThisPage
lines=5..:)<BR>> <BR>>(:include
AnotherPage:)<BR>> <BR>>Consider that the pages 56;included57; above
may contain a few<BR>>bulleted lists - the above page wraps other
content. I would<BR>>like to be able to point a Wiki trail at my
DynamicPage.<BR>> <BR>>I would be greatful is someone could let me
know how to do this?<BR>> <BR>>-Steve.<BR><BR>You'll need to create a
modified version of scripts/trails.php<BR>in your local/ directory.<BR><BR>After
that script reads the page, but before it explodes the content<BR>into
lines, you'll need to match \\(:include\\s+(\\S.*?):\\) and<BR>process the
result through the IncludeText($pagename, '$1')<BR>function.<BR><BR>Something
like<BR><BR>$trailpage['text'] =
preg_replace('/\\(:include\\s+(\\S.*?):\\)/ei',<BR>
"IncludeText($pagename, '$1')",$trailpage['text']);<BR><BR>This is off the top
of my head, so is probably not quite right.<BR><BR>If this 'implementation
details are left as an exercise for the reader'<BR>hint is not enough, let me
know and we'll look more closely at what's needed.<BR><BR>--<BR>JR<BR>--<BR>John
Rankin<BR><BR><BR></FONT></P></DIV>
</BODY>
</HTML>