[pmwiki-users] Bulk Change with FoxReplace

Hans design5 at softflow.co.uk
Wed Jan 13 11:59:39 CST 2010


Wednesday, January 13, 2010, 4:12:20 PM, edwin marte wrote:

> (:fox frm  :)

> (:input hidden mk01 ":Month:"  size=40:)
> (:input hidden mk02 ":Succes Date:"  size=40:) 

> || On Target Pages:||(:input text pat size=40:) ||
> || ||(:input submit post 'Replace Now':) ||

> (:foxreplace  target='{$$(plist {$$pat})}'  foxtemplate=":mth:" mark='{$$mk01}':)
> (:foxreplace target='{$$(plist {$$pat})}'  foxtemplate=":scdate:" mark='{$$mk02}':)

>....

Fox cannot construct a valid target list.
foxtemplate=... is not a valid parameter in the (:foxreplace...:)
markup. It should be template=PageName, i.e a template page.
Or use (:foxtemplate "...":) markup. But then you cannot use two
(:foxreplace :) markups, I think.
To have two instances of (:foxreplace ...:) you need something like
this, (markup on one line):
(:foxreplace  target='{$$(plist {$$pat})}' template=MyTemplatePage
  put=string mark='{$$mk01}' :)

MyTemplatePage should contain :mth:

Note that to replace text in 500 or so pages the script may run out
of time. This may be dependent on the system. I managed to do text
replaces for ca 100 pages. Having two (:foxreplace ..:) will also
double the target array: Fox will replace text A first on all target
pages given, then text B on the next set of target pages.


cheers,
  ~Hans




More information about the pmwiki-users mailing list