[pmwiki-users] Using ROSPatterns with fox forms

Hans Bracker design at softflow.co.uk
Sun Feb 24 03:12:14 CST 2013


Hello James,

Sunday, February 24, 2013, 6:44:38 AM, you wrote:

> I have a page which I want to have no more than 50 lines of text at a
> time. People will post to this page using a simple fox form. I created
> an ROSPattern like:

> $ROSPatterns["/^(([^\n]*\n?){0,5}).*/s"] = "$1"; 

> which works perfectly if I'm opening the page directly and saving it,
> but has no effect when posting to the page via fox form. Is there a way
> to do this?

Generally, when Fox updates a page, $ROSPatterns are processed, as are
most $EditFunctions (some are excluded, because they are not needed).
[Fox uses PmWiki's UpdatePage() function, which calls the various
functions in the $EDitFunctions array.]

I tested your ROSPattern posting text to a page, and it works fine:
the page contains max five lines, any posting to the top will replace
lines on the target page with what is posted.

So I am not sure what is going on in your setup.


Best regards,
 Hans                         
mailto:design at softflow.co.uk
www.softflow.co.uk




More information about the pmwiki-users mailing list