query current settings of <URLCP>

nduvnjak
Posts: 40
Joined: Wed Feb 06, 2008 3:45 pm

query current settings of <URLCP>

Post by nduvnjak »

How can I find out what is the current setting of certain URL Control Parameter?

Actual problem: I am modifying the complex parsing script, that calls so many other scripts, and during that long execution it may have the <urlcp alttext ...> set to "yes" or "no".
I need to set it to "no" before a certain <fetch...>, but right after that I want to set it back to what it was.
How can I find out what was it?


Thanks a lot.
User avatar
John
Site Admin
Posts: 2625
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH

query current settings of <URLCP>

Post by John »

<urlcp alttxt> will return the previous setting, 0 for yes, 1 for no.

So you can do:

<urlcp alttxt no>
<$oldalttxt=$ret>
...
<if $oldalttxt eq 0>
<urlcp alttxt yes>
<else>
<urlcp alttxt no>
</if>

You could also use <urlcp ignorealttxt> which will return the value, e.g.

<urlcp ignorealttxt yes>
<$oldval=$ret>
...
<urlcp ignorealttxt $oldval>
John Turnbull
Thunderstone Software
nduvnjak
Posts: 40
Joined: Wed Feb 06, 2008 3:45 pm

query current settings of <URLCP>

Post by nduvnjak »

that's it, thank you!