List Info

Thread: Re: Anomaly in ROE pattern?




Re: Anomaly in ROE pattern?
country flaguser name
United States
2008-05-05 09:56:12
Thanks Patrick.

Peter, I've added a "preg_match" alternative to filtering out the include_once for template pages, at http://www.pmwiki.org/wiki/Cookbook/EditMX#installation, ie

$EditTemplatesFmt = '$Group.Template';
if (!preg_match('/.*Template$/',$pagename))
	include_once('cookbook/EditMX.php');
My test template page now reads:

==============start

Tomorrow's date is {ROE(ftime "%B %d, %Y" tomorrow)}

==============end

Saves, edits, and works as a template, like a charm!

Best,

- Henrik

Patrick R. Michaud wrote:
host.pmichaud.com" type="cite">
On Sun, May 04, 2008 at 05:36:47PM -0400, Henrik Bechmann wrote:
  
Patrick,

It appears that ROEPatterns (unexpectedly) changes text on save, not 
just on load, when in scope of the ROE pattern. Is this as designed?

    

Yes, this is as designed.  A ROS pattern should be replaced only
when someone saves a page, so that repeatedly hitting preview will
continue to show the non-replaced markup.


A ROE pattern should do the replacement when someone hits preview.
However, it should also do the replacement if someone never hits
preview -- i.e., if someone enters a ROE pattern and goes directly 
to save without hitting preview, then the replacement should 
still take place.

Pm

  

-- 

Henrik Bechmann
bechmann.ca
Webmaster, celos.ca webhosting services
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )