Dom,<br><br>Thank you.&nbsp; That was very helpful and got me on my way to making this work...<br><br>-- Harry<br><br><br><br><div><span class="gmail_quote">On 2/7/07, <b class="gmail_sendername">Dominique Faure</b> &lt;<a href="mailto:dominique.faure@gmail.com">
dominique.faure@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 2/7/07, Harry Forsdick &lt;<a href="mailto:harry@forsdick.com">
harry@forsdick.com</a>&gt; wrote:<br>&gt; I have mastered some parts of extending pmWiki markup, but there is one<br>&gt; simple case that I can&#39;t seem to get to work.<br>&gt;<br>&gt; In a travelog that has navigation between pages, I have been laboriously
<br>&gt; copying the same code at the top and bottom of each pakge and then modifying<br>&gt; it so that there is a previous day and next day link.&nbsp;&nbsp;The wiki code is<br>&gt; something like:<br>&gt;<br>&gt; ||[[Main.MonFeb05|
&lt;- Monday, February 5]] || [[Main.WedFeb07|Wednesday,<br>&gt; February 7 -&gt;]]||<br>&gt;<br>&gt; I have gotten tired of this copying and so I decided to create what I think<br>&gt; of as a macro to generate the pmWiki language code from a short directive:
<br>&gt;<br>&gt; (:navprevnext Feb6:)<br>&gt;<br>&gt; the code that I have added to my config.php file is:<br>&gt;<br>&gt; ## NAVPREVNEXT<br>&gt; Markup(&#39;navprevnext&#39;, &#39;fulltext&#39;, &#39;/\\(:navprevnext +(.*?):\\)/e&#39;,
<br>&gt; &quot;GenerateNavPrevNextCode(&#39;$1&#39;)&quot;);<br>&gt; function GenerateNavPrevNextCode($DateStr)<br>&gt; {<br>&gt;&nbsp;&nbsp; $date = strtotime($DateStr);<br>&gt;&nbsp;&nbsp; $prev = $date - 86400;<br>&gt;&nbsp;&nbsp; $next = $date + 86400;
<br>&gt;<br>&gt;&nbsp;&nbsp; $result = &quot;||[[Main.&quot; . date(&quot;DMd&quot;,$prev) . &quot;|&lt;- &quot; . date(&quot;l, F j&quot;, $prev)<br>&gt; . &quot;]] ||&nbsp;&nbsp;[[Main.&quot; . date(&quot;DMd&quot;,$next) . &quot;|&quot; . date(&quot;l, F j&quot;, $next) . &quot;
<br>&gt; -&gt;]]||&quot;;<br>&gt;<br>&gt;&nbsp;&nbsp; return Keep($result);<br>&gt; }<br>&gt;<br>&gt; The problem is that the pmWiki markup appears, not the interpretation of the<br>&gt; markup.<br>&gt;<br><br>The Keep() function prevent your computed result to be interpreted as
<br>further markup. You should have a try without it:<br><br>&nbsp;&nbsp;...<br>&nbsp;&nbsp;return $result;<br>}<br><br>Dom<br></blockquote></div><br><br clear="all"><br>-- <br>Harry Forsdick<br>781.861.6149 (home)&nbsp;&nbsp;781.799.6002 (cell)<br><a href="http://www.forsdick.com">
http://www.forsdick.com</a><br><a href="http://forsdick.blogspot.com">http://forsdick.blogspot.com</a><br><a href="http://www.lexdig.com">http://www.lexdig.com</a>