Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
some old plugins not supporting the tags-in-tags magic
Hi,
I’ve noticed that there are some old plugins that doesn’t support the tags-in-tags magic.
To be more precise: zem_contact_reborn
and chs_cookie
.
For example, in zem_contact_reborn, if you try something like this:
<txp:zem_contact_select list='<txp:output_form form="countries" />' />
It won’t output anything.
I’ll report in the plugin’s thread too, but in the meanwhile if anyone could confirm that it may be that old plugins, by the way they have been coded, could be not supporting the tags-in-tags feature.
Thanks.
Offline
Re: some old plugins not supporting the tags-in-tags magic
Weird, it works for me. Both these return correctly-formatted widgets:
<txp:variable name="phonelab">Phone number</txp:variable>
<txp:zem_contact_text label='<txp:variable name="phonelab" />' min="7" max="20" break="" />
<txp:zem_contact_select list='<txp:output_form form="lister" />' label="Chooser" />
Where the ‘lister’ form contains item1, item2, item3
.
Are you sure you’ve not got any other unescaped tags lying around that might be killing your tags-in-tags ninjary?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: some old plugins not supporting the tags-in-tags magic
Hi Bloke,
thanks for the prompt reply and sorry about spreading FUD about old plugins.
Your report of success lead me to more research on this.
It seems this tags in tags totally fails when used inside article body.
Please, could you try your exact same code inside an article?
If it works for you, we’re definitely on living on parallel, distant, slightly different Universes.
If it doesn’t work for you, I welcome you to my Universe.
Offline
Re: some old plugins not supporting the tags-in-tags magic
maniqui wrote:
It seems this tags in tags totally fails when used inside article body.
Yes, it will. Blame Textile :-\
It’s not just the plugins you mention either, but pretty much anything tag-in-tag-like.
Solutions:
- turn off textile processing for that article
- surround the entire failing txp tag block in
==
ornotextile.
markers - use a form :-)
Last edited by Bloke (2010-05-04 14:43:26)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: some old plugins not supporting the tags-in-tags magic
Oh, yeah, Textile… I didn’t want to mention him to not offend him.
I’ll try escaping it.
In the case of (a modded version of) chs_cookie, tags-in-tags may be failing too.
This modified version (http://pastebin.com/uDDNEPK9) allows now a ‘domain’ attribute.
I’ve never found the way to feed this domain attribute with the value coming from a txp:tag.
If you are kind enough to try it…
Works:
<txp:chs_set_cookie cookie="original_subdomain" path="/" domain='.yourdomain.com' value='<txp:variable name="subdomain" />' />
Doesn’t:
<txp:chs_set_cookie cookie="original_subdomain" path="/" domain='.<txp:variable name="domain" />' value='<txp:variable name="subdomain" />' />
Thanks again.
Offline
Re: some old plugins not supporting the tags-in-tags magic
BTW, the wrapping ==
did the trick. Gracias!!! :D
Offline
Re: some old plugins not supporting the tags-in-tags magic
maniqui wrote:
In the case of (a modded version of) chs_cookie, tags-in-tags may be failing too.
Aside from the fact that plugin is seriously in need of some lovin’ (it’s error and warning central in debugging mode!) and there’s at least one bug in the plugin, both seem to work for me when escaped with ==
inside an article.
You might want to add:
global $cookieunset;
at the top of the chs_set_cookie function so it has a chance of stashing the value in the global scope. Not sure if that helps at all, but it might.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: some old plugins not supporting the tags-in-tags magic
In the case of chs_cookie, I wasn’t using it inside an article, and even in that case, I wasn’t able to use tags in tags just for the domain
attribute. Other attributes (like value
) worked fine with tags in tags.
Anyway, I’m not currently using chs_cookie on this project, so no need for it right now.
Thanks, Bloke.
Offline