[pmwiki-users] PTVReplace not redirecting as expected

Randy randy at brownragfilms.com
Wed Jan 9 05:38:53 CST 2008


Hans,

Thanks for suggesting the Fox syntax. I've just discovered Fox - it's  
a wonderful recipe! I had been using PTVReplace and CommentBoxPlus.  
I'm not done making the transition to Fox yet, but it isn't isn't as  
hard as I thought it would be.

Randy


On Jan 9, 2008, at 5:02 AM, Hans wrote:

> Sunday, January 6, 2008, 6:37:33 AM, Randy wrote:
>
>> 1) How do I suppress redirection?
>
>> 2) Since PTVReplace doesn't allow specifying the page to redirect to,
>> is there a way to detect that the Change button has been pressed,  
>> so I
>> can at least use a conditional to change which sections on
>> PageWithForm are visible? (For example, to show "Click here to
>> continue...")
>
> Thanks for the alert!
> It seems PTVReplace is indeed buggy.
> It also does not replace any PTV in a different format than the three
> standard formats, i.e. it ignores the $PageTextVarPatterns array.
> And it does not allow at present redirection to another page.
>
> I am not sure if it is worthwhile to rewrite the script, or perhaps
> better to scrap it.
>
> I recommend to use Fox to do the PTV replacements.
> It has a  built-in PTVUpdate function, you can specify multiple PTVs,
> update them on one or several target pages, and redirect to any page
> you wish. Your form would look something like this:
>
> (:fox ptvform1 template=0 ptvtarget=PAGENAME redir=REDIRECTPAGE  
> ptvfields=VARIABLE:)
> (:input text VARIABLE:)
> (:input submit post Change:)
> (:foxend ptvform1:)
>
> ptvtarget: set to {*$FullName} for current page.
> ptvfields: this can be  a comma seperated list of var names.
> If ptvfields is not given, Fox will attempt to update any PTV on the
> target page(s) for which field names are given in the input form.
>
>  ~Hans
>




More information about the pmwiki-users mailing list