Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2012-08-05 23:25:03

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,367
Website

Re: adi_gps – Extract GET & POST variables

etc wrote:

Adi, can adi_gps import GET/POST arrays?

That’s a good question. The answer is probably yes & no. I’m sure it’ll try! adi_gps replicates individual URL vars into TXP variables, which by their nature are single (non-array) variables. I’ve never tried it & the end result might be horrible!

Not sure how the mapping would work anyway: URL var[0], var[1], var[2] -> TXP var_0, var_1, var_2 ?

Offline

#38 2012-08-09 12:21:56

etc
Developer
Registered: 2010-11-11
Posts: 4,665
Website GitHub

Re: adi_gps – Extract GET & POST variables

gomedia wrote: Not sure how the mapping would work anyway: URL var[0], var[1], var[2] -> TXP var_0, var_1, var_2 ?

In the above-mentioned discussion we needed to map var to var[0]%var[1]%.... So, you could introduce some glue attribute to implode arrays with.

Offline

#39 2012-08-10 23:30:06

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,367
Website

Re: adi_gps – Extract GET & POST variables

etc wrote:

In the above-mentioned discussion we needed to map var to var[0]%var[1]%.... So, you could introduce some glue attribute to implode arrays with.

I’ll look into it.

Offline

#40 2012-08-22 15:55:51

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: adi_gps – Extract GET & POST variables

Hope someone could help me out, am in a desperate situation … have a look at my snapshot:

!http://husainhk.com/images/form-adi-gps.png!

I am passing in an article’s title from a page to this form, but this HTML character always appears before the last word. If I manually change the variable, or use some other value when passing it to the form, it works absolutely fine. My charset is UTF-8, doctype is HTML.

Offline

#41 2012-08-22 16:03:31

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,278

Re: adi_gps – Extract GET & POST variables

If you’re using the txp:title tag: add no_widow="0" to it, else think about changing the widows pref.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#42 2012-08-22 16:14:56

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: adi_gps – Extract GET & POST variables

It worked beautifully … thanks so much Uli! Learnt something new on article titles as well. Cheers!

Offline

#43 2015-06-15 04:44:04

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,367
Website

Re: adi_gps – Extract GET & POST variables

Version 0.3 available for download:

  • copes with forms which supply data as arrays (checkboxes)
  • new attribute ‘glue’
  • TXP 4.6 tag registration

Offline

#44 2016-06-21 22:56:50

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,367
Website

Re: adi_gps – Extract GET & POST variables

Version 0.4 available:

  • updated for TXP 4.6 trace

Offline

#45 2016-10-12 04:24:46

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: adi_gps – Extract GET & POST variables

Hello,

I have articles that have an “Enquire” about. When user hits that I need to populate a zem_contact form field with the title of that article. How can I go about getting it done with this plugin?

Appreciate any help or link to similar solution.

Offline

#46 2016-10-12 04:43:51

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,367
Website

Re: adi_gps – Extract GET & POST variables

This any help?

Offline

#47 2016-10-12 10:48:16

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: adi_gps – Extract GET & POST variables

Thanks Adi … Does help a lot!

I have one more issue, some of my variables have ‘&’ in them, for example: “Pots & Pans”. How can I have the plugin ignore the ‘&’ in the variable’s value?

Offline

#48 2016-10-12 11:32:01

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,367
Website

Re: adi_gps – Extract GET & POST variables

husainhk wrote #302107:

Thanks Adi … Does help a lot!

I have one more issue, some of my variables have ‘&’ in them, for example: “Pots & Pans”. How can I have the plugin ignore the ‘&’ in the variable’s value?

You might have to experiment. As long as the URL variables are encoded correctly, adi_gps should pull out the values OK. If you don’t want HTML entities to be escaped use attribute escape="".

Offline

Board footer

Powered by FluxBB