Nevermind -- I think my version should be high enough<BR><BR><B><I>wiki question &lt;wiki_questions@yahoo.com&gt;</I></B> wrote:  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">  <DIV>I may have answered my own question -- looks like I will need to be on 2.2-beta&nbsp; I am on </DIV>  <DIV>Wiki Version: <EM>pmwiki-2.1.27</EM><BR><BR><B><I>wiki question &lt;wiki_questions@yahoo.com&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">  <DIV>Hans,</DIV>  <DIV>&nbsp;</DIV>  <DIV>I cut and pasted your exact syntax into my config.php and something is not correct on my side..</DIV>  <DIV>&nbsp;</DIV>  <DIV>The only thing that show up on my page is the syntax.&nbsp; I also downloaded the Grep.php and I am having the same results.&nbsp; Does somthing need to be enable at the server level for this to work?</DIV>  <DIV>&nbsp;</DIV>  <DIV>In my config I
 placed the following at the end</DIV>  <DIV>####Test GREP<BR>include_once("$FarmD/cookbook/grep.php");</DIV>  <DIV>&nbsp;</DIV>  <DIV>and</DIV>  <DIV>$MarkupExpr['textrows'] = 'ExtractTextRows($pagename, @$args[0],<BR>&nbsp;@$args[1])';<BR>function ExtractTextRows($pagename, $str, $source) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($str=='' || $source=='') return '';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $pn = MakePageName($pagename, $source);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($pn==$pagename) return '';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $page = RetrieveAuthPage($pn, 'read', true);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $text = $page['text'];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $section = TextSection($text, $source);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $textrows = explode("\n",$section);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $newrows = array();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 foreach ($textrows as $row) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (strstr($row, $str))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $newrows[] = $row;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return implode("\n", $newrows);<BR><BR></DIV>  <DIV>&nbsp;</DIV>  <DIV>My Syntax:</DIV>  <DIV>{(grep Complete <SPAN class=wikiword>Wiki.TestA</SPAN> suffix=STRING )} </DIV>  <DIV class=vspace>&nbsp;</DIV>  <DIV class=vspace>{(textrows Complete <SPAN class=wikiword>Wiki.TestA</SPAN>)} </DIV>  <DIV class=vspace>&nbsp;</DIV>  <DIV class=vspace>My Test page Content:</DIV>  <DIV id=wikitext>  <DIV>Test A Complete<BR>Test B Complete<BR>Test C Pending </DIV></DIV>  <DIV class=clearer><!-- a clearer division --></DIV>  <DIV class=vspace>&nbsp;</DIV>  <DIV class=vspace>Wiki Version:
 <EM>pmwiki-2.1.27</EM></DIV>  <DIV>Skin: FixFlow</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>Thanks for all of your help on this,</DIV>  <DIV>Ben</DIV>  <DIV class=vspace><BR><BR><B><I>Hans &lt;design5@softflow.co.uk&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Friday, January 18, 2008, 8:24:52 PM, wiki question wrote:<BR><BR>&gt; Maybe -- Can you explain how page text variable work.<BR>&gt; A simplified example of what I am trying to accomplish:<BR><BR>&gt; Page basically contains:<BR><BR>&gt; TEST_NAME TEST_STATUS<BR>&gt; Test A Complete<BR>&gt; Test B Not Started<BR>&gt; Test C In Progress<BR>&gt; Test D Complete<BR>&gt; Test E In Progress<BR>&gt; ... <BR>&gt; ...<BR>&gt; ..<BR><BR>&gt; I want to display, on a seperate page, only those tests that are completed and<BR>&gt; have it refresh when the main page is updated.<BR><BR>&gt; So in the current state Test A and D will
 display<BR><BR>This is a tricky problem. I don't think page text variables are the<BR>best answer, but I will explain it a bit, before offering a different<BR>solution:<BR><BR>Page text variables (PTVs) can be defined in various ways, but the variable<BR>name cannot contain spaces and has to start with a letter.<BR>So your MainPage could contain this, which will automatically defines<BR>PTVs:<BR><BR>TEST_NAME: TEST_STATUS<BR>Test_A: Complete<BR>Test_B: Not Started<BR>Test_C: In Progress<BR>Test_D: Complete<BR>Test_E: In Progress<BR><BR>Each PTV can be referred to as {$:Var}, i.e. {$:Test_A}, which<BR>displays its value, i.e. 'Complete'.<BR>From a different page it can be referred to with<BR>{PageName$:Var}, i.e {MainPage$:Test_A}<BR>And importantly PTVs can be used in conditional markup.<BR>So your page can contain this:<BR><BR>!!Completed Tests:<BR>(:if {MainPage$:Test_A} 'Complete':)Test A<BR>(:if {MainPage$:Test_B} 'Complete':)Test B<BR>etc.<BR>(:ifend:)<BR><BR>This may
 give you an idea how to work with PTVs.<BR>It may even be good enough for your problem.<BR><BR>A different approach, I thought, would be to extract text rows from<BR>a page which contain a certain string. Here is a definition of a markup<BR>expression which does this. It should be added to config.php:<BR><BR># {(textrows 'STRING' PAGENAME)} displays textrows from page PAGENAME which<BR># have STRING in them (as a substring). STRING is case sensitive.<BR># {(textrows 'STRING' PAGENAME#section)} displays textrows with STRING from<BR># section #section of PAGENAME.<BR># The current page cannot be a source for textrow extraction.<BR>$MarkupExpr['textrows'] = 'ExtractTextRows($pagename, @$args[0], @$args[1])';<BR>function ExtractTextRows($pagename, $str, $source) {<BR>if ($str=='' || $source=='') return '';<BR>$pn = MakePageName($pagename, $source);<BR>if ($pn==$pagename) return '';<BR>$page = RetrieveAuthPage($pn, 'read', true);<BR>$text = $page['text'];<BR>$section =
 TextSection($text, $source);<BR>$textrows = explode("\n",$section);<BR>$newrows = array();<BR>foreach ($textrows as $row) {<BR>if (strstr($row, $str))<BR>$newrows[] = $row;<BR>}<BR>return implode("\n", $newrows);<BR>}<BR><BR><BR>So with this you could put into the page:<BR><BR>{(textrows Complete MainPage)}<BR><BR>and it will display:<BR><BR>Test A Complete<BR>Test D Complete<BR><BR>Note it displays whole text rows, not just Test A, Test B.<BR>It is a text extraction tool, and can be sourced from a whole page or<BR>a page section.<BR><BR>I suppose it could be easily modified, for your case, to remove the<BR>STRING from the textrows, by changing in the function this:<BR><BR>foreach ($textrows as $row) {<BR>if (strstr($row, $str))<BR>$newrows[] = $row;<BR>}<BR><BR>with this:<BR><BR>foreach ($textrows as $row) {<BR>if (strstr($row, $str)) {<BR>$row = substr_replace($row, '', strpos($row, $str), strlen($str));<BR>$newrows[] =
 $row;<BR>}<BR>}<BR><BR><BR>~Hans<BR><BR></BLOCKQUOTE><BR>  <DIV>  <HR SIZE=1>  Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <A href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ">Try it now.</A>_______________________________________________<BR>pmwiki-users mailing list<BR>pmwiki-users@pmichaud.com<BR>http://www.pmichaud.com/mailman/listinfo/pmwiki-users<BR></DIV></BLOCKQUOTE><BR>  <div>  <HR SIZE=1>  Never miss a thing. <A href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs">Make Yahoo your homepage.</A> </BLOCKQUOTE><BR><p>&#32;
      <hr size=1>Looking for last minute shopping deals? <a href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping"> 
Find them fast with Yahoo! Search.</a>