Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-12-31 02:47:48
- kiplet
- Member
- Registered: 2006-01-28
- Posts: 33
Parsing text in custom fields in 4.0.7
I use a custom field to allow for fancy typographic treatments in my article titles—I use a dumbed-down version in title, and use a custom field to display the pretty version on the website.
In 4.0.5, the custom field handled tags just fine, and displayed the following:
When all the elements of need are satisfied in the situation of want
when I entered this:
When <em>all</em> the elements of need are satisfied in the situation of <em>want</em>
Now, in 4.0.7, the text in my custom title field gets turned to this in the HTML:
When <em>all</em> the elements of need are satisfied in the situation of <em>want</em>
Which, of course, rips out all my tags. (I also use spans and carriage returns in the pretty, custom titles.)
How do I tell Textpattern to stop trying to finess my text in a custom field?
Offline
Re: Parsing text in custom fields in 4.0.7
kiplet wrote:
How do I tell Textpattern to stop trying to finess my text in a custom field?
Try adding escape=""
to your custom_field tag. The default behaviour changed in 4.0.7.
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
#3 2008-12-31 05:32:11
- kiplet
- Member
- Registered: 2006-01-28
- Posts: 33
Re: Parsing text in custom fields in 4.0.7
It would, of course, be something simple. Thanks.
Offline
Re: Parsing text in custom fields in 4.0.7
i’m trying to embed a paypal dropdown form into a custom field. if i don’t use escape=”“, then it obviously can’t read the code. if i do use escape=”“ it starts to do weird things, one of them being it snips off the majority of the embed code. the other is it begins to mess with the overall page. any ideas?
Offline
Re: Parsing text in custom fields in 4.0.7
custom fields are limited to 255 chars… and it should be escape="0"
Offline
Re: Parsing text in custom fields in 4.0.7
ruud wrote:
custom fields are limited to 255 chars… and it should be
escape="0"
tried escape="0"
too. do i have to modify the txp_article.php to pull this off? i can’t think of any other way to embed paypal code on the fly short of using custom fields.
Offline
Re: Parsing text in custom fields in 4.0.7
Could you just put a flag or some of the parameters needed for the button in the custom field that your page or form would check and conditionally add the paypal button?
Something like…
<txp:if_custom_field name="paypalitem">
<Code_for_button item='<txp:custom_field name="paypalitem"/>' />
</txp:if_custom_field>
Last edited by MattD (2009-01-15 23:16:18)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Parsing text in custom fields in 4.0.7
MattD wrote:
Could you just put a flag or some of the parameters needed for the button in the custom field that your page or form would check and conditionally add the paypal button?
Something like…
bc..
<txp:if_custom_field name=“paypalitem”>
<Code_for_button item=’<txp:custom_field name=“paypalitem”/>’ />
</txp:if_custom_field>
well that could get really confusing cause some of them are basic buttons, and others are dropdown options (size S,M,L)
Offline
Re: Parsing text in custom fields in 4.0.7
I’ve never used it but have you looked at yab_shop
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Parsing text in custom fields in 4.0.7
MattD wrote:
I’ve never used it but have you looked at yab_shop
ha yeah i was just looking at that earlier. looks nice, but it’d be a bit of a stretch considering my only problem right now is a 255 character limit
i’d be opening a whole can of worms with a full out shopping cart :)
Offline
#11 2009-01-16 01:52:06
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Parsing text in custom fields in 4.0.7
I think it’s possible now to change the character limit of the field (in phpMyAdmin). I’m just not sure which mySQL version you need to be able to do that, you’d have to check.
Offline
Re: Parsing text in custom fields in 4.0.7
what i’m settling on is no custom fields. i think hak-tinymce was throwing me off. it’s a nice plugin, but it gets in the way of embedding anything. so now we’re going to just embed the paypal code write into the article, with a div around it.
Offline