Now that I can extract WikiCode, I find that I cannot insert it into a page without being incorrectly translated. Logic tells me this could be solved by correcting the "when" parameter in the markup function call, but I have tried so many that I have to give up on trial and error and ask for a definitive/intelligent solution.
<br><br>As a simple test, please see the following page:<br><br><a href="http://www.octocias.com/index.php?n=Private.TestA">http://www.octocias.com/index.php?n=Private.TestA</a><br><br>And here is the test code from my config.php
:<br><br>Markup('test', '&lt;include', '/\\(:[t|T]est +(.+) *:\\)/e', &quot;QuickTest('$1')&quot;);<br>function QuickTest( $Source ) <br>{<br>&nbsp; $page = ReadPage( &quot;$Source&quot;, READPAGE_CURRENT );<br>&nbsp; $out&nbsp; = $page['text']; 
<br>&nbsp; return $out;<br>}<br><br><br>Can you help me solve this?<br><br><br><div><span class="gmail_quote">On 08/04/06, <b class="gmail_sendername">Patrick R. Michaud</b> &lt;<a href="mailto:pmichaud@pobox.com">pmichaud@pobox.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 Sat, Apr 08, 2006 at 08:11:44PM +0100, Octocias wrote:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;As a follow-up, I've tried to borrow code from the (:include:) markup and
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;I did:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;$out = PRR(IncludeText( 'Group.Pagename', ''));<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;.. without success.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;Can you tell me if this is supposed to work or how to make it work?<br><br><br>
If you just want to read the text of another page, it's:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;$page = ReadPage('Group.Pagename', READPAGE_CURRENT);<br>&nbsp;&nbsp;&nbsp;&nbsp;$out = $page['text'];<br><br>The READPAGE_CURRENT says that you're just interested in the<br>
most recent version of the page (so you can avoid reading the<br>history).&nbsp;&nbsp;If you want the history read also, omit the READPAGE_CURRENT.<br><br>Note that this doesn't do any authorization checking for the page --<br>it reads it even if the current visitor isn't authorized to view
<br>it.&nbsp;&nbsp;To get the page only if the visitor has permission to see it,<br>then use:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;$page = RetrieveAuthPage('Group.Pagename', 'read', false, READPAGE_CURRENT);<br>&nbsp;&nbsp;&nbsp;&nbsp;if (!$page) { ...can't read page... }<br>&nbsp;&nbsp;&nbsp;&nbsp;$out = $page['text'];
<br><br>Pm<br></blockquote></div><br><br clear="all"><br>-- <br>Octocias<br><a href="http://www.octocias.com">http://www.octocias.com</a>