<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>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>Your a star!&nbsp; worked first time.&nbsp; 
One thing that threw me though is that you said "create a modified version of 
scripts/trails.php in your local/ directory."&nbsp; The only way I could get it 
to work (read: pick up my change) was to modify the scripts/ version.&nbsp; 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>&nbsp;</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>&nbsp;</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>&nbsp;</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] 
&lt;SCRISP@ngms.eu.com&gt; wrote:<BR>&gt;<BR>&gt;Dear PmWiki 
community,<BR>&gt;&nbsp;<BR>&gt;I would like to be able to create a Trail from a 
dynamic Wiki<BR>&gt;page.&nbsp; I57;ve looked at the DynamicTrail recipe but 
this is not<BR>&gt;the same thing (I think).&nbsp; An example is best 
here.&nbsp; Let57;s<BR>&gt;assume I have a page called DynamicPage which 
contains the following Wiki mark-up:<BR>&gt;&nbsp;<BR>&gt;! This is a dynamic 
page<BR>&gt;&nbsp;<BR>&gt;(:include ThisPage 
lines=5..:)<BR>&gt;&nbsp;<BR>&gt;(:include 
AnotherPage:)<BR>&gt;&nbsp;<BR>&gt;Consider that the pages 56;included57; above 
may contain a few<BR>&gt;bulleted lists - the above page wraps other 
content.&nbsp; I would<BR>&gt;like to be able to point a Wiki trail at my 
DynamicPage.<BR>&gt;&nbsp;<BR>&gt;I would be greatful is someone could let me 
know how to do this?<BR>&gt;&nbsp;<BR>&gt;-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&nbsp; explodes the content<BR>into 
lines, you'll need to match \\(:include\\s+(\\S.*?):\\)&nbsp; 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>&nbsp;&nbsp;&nbsp; 
"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>