You are not logged in.
adi_gps extracts GET/POST variables from the URL and assigns them to TXP variables.
See the help supplied with the plugin, or have a look online.
Personalise a feedback page:
On the client’s website, a feedback link points back to your own website. The link URL would look something like:
Then on your feedback page, in the welcome article, do something like:
Thank you for your feedback regarding the <txp:adi_gps name="client" /> website.
Control page output:
To display different content on a page when arriving via a particular link. Set up the link with a URL to the appropriate page & include a variable:
Then in the page for ‘mysection’ use:
<txp:adi_gps name="option" quiet="1" /> <txp:if_variable name="option" value="extras"> ... do something extra .. </txp:if_variable>
(Note the use of
quiet="1" to suppress the output of the variable’s value.)
adi_gps can be installed in pre-4.0.7 versions of Textpattern but obviously the creation of TXP variables can’t be performed. Use attribute
txpvar="0" to switch this off.
Download & Installation
Download adi_gps and install the plugin in the usual way.
Bugs & Limitations
Let me know if you find any problems.
Comments are most welcome.
Last edited by gomedia (2012-01-30 06:20:00)
Mighty fine stuff. Among myriad applications I can already envisage, this will make an excellent companion to smd_if to make it easier to test for stuff on the URL line. The
decode attributes are muchos useful, and integration with
<txp:variable /> is an excellent move.
Hats off to ya.
Last edited by Bloke (2008-11-18 09:06:24)
Mighty fine stuff … Hats off to ya.
Thanks very much. I’ve just converted my (handcoded PHP) site to Textpattern and 95% of it could be achieved with the standard tags/plugins but accessing the URL vars was one of the things that needed a bit of polish.
The ‘decode’ bit came about because I had to employ a touch of htaccess redirect and “client%20name” was appearing out the other side as “client%2520name” – so an extra urldecode() was called for.
I reckon TXP variables are an absolute master stroke – they make Textpattern so much more programmable at the basic level. 4.0.7 is going to be a top release – tags in tags, variables, expiry dates … Christmas has come early (thanks to SVN)!
I reckon TXP variables are an absolute master stroke – they make Textpattern so much more programmable
I agree. They make far more personable and customisable sites possible out of the box. And this plugin just made it a hell of a site easier to create them on the fly. Marvellous!
OT: I wonder when would be a good time to broach the subject with the dev team about expanding txp:variable’s scope to be able to handle the concept of array-type data. e.g. some sort of comma-separated list as a
value within which you can
replace items inside the value?! Or perhaps add a dedicated
<txp:varray /> ;-)
Last edited by Bloke (2008-11-18 10:08:24)
Yeay, SQL :)
Wet dream and amazingly hot (sounds nasty, so does varray) ;D
I agree. They make far more personable and customisable sites possible out of the box.
Yep, but I’m not so impressed; reason: I’m not going to use variable so much( – ever). It’s nice feature, me likes but well… Maybe I’m losing my dark side (a coder side) :D Varible<3Love. Variable, my lost puppy.
Rah-plugins | What? I’m a little confused… again :-)
Gocom wrote: Yep, but I’m not so impressed; reason: I’m not going to use variable so much( – ever). It’s nice feature, me likes but well… Maybe I’m losing my dark side (a coder side) :D Varible<3Love. Variable, my lost puppy.
gocom has just officially lost it.
I found a little problem.
I have this page template :
bc.. <txp:if_section name=”,default”>
<txp:adi_gps name=“month” quiet=“1” />
<txp:adi_gps name=“page” quiet=“1” />
<txp:if_variable name=“month” value=“2004-05”>
<txp:article limit=“1” form=“dagboek” sort=“Posted asc” />
<txp:ob1_pagination outputlastfirst =“0” outputnextprevious=“0” />
<txp:article_custom section=“voorpagina” form=“default” />
But if i have this url : http://test2.tamarawobben.nl/?c=zwangerschap&month=2005-04.
I get a false.
What went wrong ?
<txp:if_variable name="month" value="2004-05"> But if i have this url : http://test2.tamarawobben.nl/?c=zwangerschap&month=2005-04.
Do you mean to have URL
In a way, each of us has an El Guapo to face. -Lucky Day (Three Amigos)