<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thank you Peter, John -- Much appreciated.  I have it working now.   Changing the markup expression to a page variable worked.<div class=""><br class=""><div apple-content-edited="true" class="">
<p style="margin: 0.0px 0.0px 0.0px 0.0px" class=""><font face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS" class="">Crisses</font></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px" class=""><br class=""></p>


</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Apr 2, 2015, at 7:25 AM, Peter Bowers <<a href="mailto:pbowers@pobox.com" class="">pbowers@pobox.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Try turning on diagnostics and then loading with ?action=ruleset.<div class=""><br class=""></div><div class="">Confirm that the rule '{$Var}' occurs before the rule 'if'.</div><div class=""><br class=""></div><div class="">Confirm that the rule '{(' occurs before '{$Var}' -- oops! I just checked it on my own system and '{$Var}' occurs before '{('. This will mean that the variable-substitution will be attempted before you have created the variable name using your markup expression. Of course the difficulty is that often markup expressions use variables and so you wouldn't really want to swap the order.  You may want to implement my '{earlymx(' rule that I have in WikiSh.php.  The markup itself is about as ugly as I think could be invented, but it will solve your problem. Other, more elegant, solutions will hopefully be suggested by others.</div><div class=""><br class=""></div><div class="">-Peter</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Apr 2, 2015 at 11:51 AM, Criss Ittermann <span dir="ltr" class=""><<a href="mailto:crisses@kinhost.org" target="_blank" class="">crisses@kinhost.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">Thank you, it spits out:</div><div class=""><br class=""></div><div class=""><span style="color:rgb(24,24,24);font-family:'Liberation sans',Verdana,Arial,Helvetica,sans-serif;line-height:15px" class="">(:if exists Profile-Data.{Members/Hosts$:201504} :) [...] (:else:) [...] (:if:)</span></div><div class=""><span style="color:rgb(24,24,24);font-family:'Liberation sans',Verdana,Arial,Helvetica,sans-serif;line-height:15px" class=""><br class=""></span></div><div class=""><span style="color:rgb(24,24,24);font-family:'Liberation sans',Verdana,Arial,Helvetica,sans-serif;line-height:15px" class="">So the PTV does not appear to have been processed yet -- the markup expression has, though.  And this goes for ALL the PTVs throughout the entire IF condition, including the ones I've redacted with [...]</span></div><div class=""><span style="color:rgb(24,24,24);font-family:'Liberation sans',Verdana,Arial,Helvetica,sans-serif;line-height:15px" class=""><br class=""></span></div><div class=""><span style="color:rgb(24,24,24);font-family:'Liberation sans',Verdana,Arial,Helvetica,sans-serif;line-height:15px" class="">However this violates documentation:</span></div><div class=""><span style="color:rgb(24,24,24);font-family:'Liberation sans',Verdana,Arial,Helvetica,sans-serif;line-height:15px" class=""><br class=""></span></div><div class=""><h3 style="margin-top:1em;margin-bottom:0.6em;font-weight:normal;font-size:1.22em;font-family:Arial,Helvetica,sans-serif;line-height:19.50666618347168px" class="">Use page text variables in <a href="http://www.pmwiki.org/wiki/PmWiki/ConditionalMarkup" target="_blank" class="">conditional markup</a></h3><div style="margin-top:0px;margin-bottom:0px;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:19.50666618347168px" class="">Page text variables will be assigned/evaluated <strong class="">before</strong> any conditional markup is evaluated. This effectively means that you cannot declare a PTV within an if...else condition; and also that a PTV will have a value even if it is set within a <code style="font-size:0.9em;font-family:'Lucida Console','Andale Mono','Courier New',Courier,monospace;white-space:nowrap" class="">(:if false:)....(:if:)</code> condition.</div></div><div class=""><br class=""></div><div class="">on page</div><div class=""><a href="http://www.pmwiki.org/wiki/PmWiki/PageTextVariables" target="_blank" class="">http://www.pmwiki.org/wiki/PmWiki/PageTextVariables</a></div><div class=""><br class=""></div><div class="">I upgraded to the latest version and it still doesn't work.  I turned off each recipe and commented out sections of code that even vaguely might affect conditional processing or PTV evaluation one at a time (it's a live site), and no change.  I did not comment out authentication, captcha or PmForm, since these would break the site in a very bad way and are released by PM & Petko.</div><div class=""><br class=""></div><div class="">Just for giggles, to take the complexity out of the if-conditional, I even tried:</div><div class=""><br class=""></div><div class=""><div class="">TempVar:Profile-Data.{Members/Hosts$:{(ftime "%Y%m")}}</div><div class=""><br class=""></div><div class="">(:if exists {$:TempVar} :)</div></div><div class=""><br class=""></div><div class="">But of course, that failed too.  But the variable itself is set correctly.</div><div class=""><br class=""></div><div class="">This fails too, whether I use the full expression, or the new variable:</div><div class=""><br class=""></div><div class="">(:if equal "{$:TempVar}" "Profile-Data.HEdelman" :)  </div><div class="">revealing the if conditional before it processes:</div><div class=""><span style="color:rgb(24,24,24);font-family:'Liberation sans',Verdana,Arial,Helvetica,sans-serif;line-height:15px" class="">(:if equal "Profile-Data.{Members/Hosts$:201504}" "Profile-Data.HEdelman" :)</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">(:if false:)</div><div class="">TempVar:Profile-Data.{Members/Hosts$:{(ftime "%Y%m")}}</div><div class="">(:if:)</div></div><div class=""><br class=""></div><div class="">Still sets the variable.</div><div class=""><div class="h5"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 1, 2015, at 8:25 PM, John Rankin <<a href="mailto:john.rankin@affinity.co.nz" target="_blank" class="">john.rankin@affinity.co.nz</a>> wrote:</div><br class=""><div class="">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000" class="">
    It may be possible to intercept the if code and find out what
    condition pmwiki is evaluating, which should give information about
    what is happening. Try this in local/config.php:<br class="">
    <br class="">
    $CondTextReplacement = "MyTempRepl(\$pagename, \$m[0], \$m[1])";<br class="">
    function MyTempRepl($pagename, $text, $code='') {<br class="">
      echo $text;<br class="">
      return CondText2($pagename, $text, $code);<br class="">
    }<br class="">
    <br class="">
    If I am reading stdmarkup.php correctly, this should echo the
    contents of the if code at the time the conditional is evaluated,
    which will show whether the var has been evaluated as intended.<br class="">
    <br class="">
    JR<br class="">
    <br class="">
    <div class="">On 2/04/15 12:07 AM, Criss Ittermann
      wrote:<br class="">
    </div>
    <blockquote type="cite" class="">
      
      <div class="">I'm trying to figure out why this is returning false
        ("To be announced."):</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div class="">(:if exists Profile-Data.{Members/Hosts$:{(ftime
          "%Y%m")}} :)</div>
        <div class="">...</div>
        <div class="">(:else:)</div>
        <div class="">To be announced.</div>
        <div class="">(:ifend:)</div>
        <div class=""><br class="">
        </div>
        <div class=""><br class="">
        </div>
        <div class="">When the following returns a fully functioning
          link to the correct page, which exists:</div>
        <div class=""><br class="">
        </div>
        <div class="">[[Profile-Data.{Members/Hosts$:{(ftime "%Y%m")}}]]</div>
      </div>
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
      </div>
      <div class="">What am I doing wrong?</div>
      <br class="">
      <div class=""><div style="margin:0px" class=""><font style="font:12.0px Comic Sans MS" face="Comic Sans
            MS" size="3" class="">Crisses</font></div><div style="margin:0px" class=""><br class="">
        </div>
      </div>
      <br class="">
      <fieldset class=""></fieldset>
      <br class="">
      <pre class="">_______________________________________________
pmwiki-users mailing list
<a href="mailto:pmwiki-users@pmichaud.com" target="_blank" class="">pmwiki-users@pmichaud.com</a>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank" class="">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a>
</pre>
    </blockquote>
    <br class="">
    <pre cols="72" class="">-- 
John Rankin
Affinity Limited
T <a href="tel:%2B64%204%20495%203737" value="+6444953737" target="_blank" class="">+64 4 495 3737</a>
M <a href="tel:%2B64%2021%20726%20546" value="+6421726546" target="_blank" class="">+64 21 726 546</a></pre>
  </div>

_______________________________________________<br class="">pmwiki-users mailing list<br class=""><a href="mailto:pmwiki-users@pmichaud.com" target="_blank" class="">pmwiki-users@pmichaud.com</a><br class=""><a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank" class="">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br class=""></div></blockquote></div><br class=""></div></div></div><br class="">_______________________________________________<br class="">
pmwiki-users mailing list<br class="">
<a href="mailto:pmwiki-users@pmichaud.com" class="">pmwiki-users@pmichaud.com</a><br class="">
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank" class="">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>