how to add a smarty modifier?

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

how to add a smarty modifier?

Postby ruthenoid » Thu Dec 18, 2014 7:47 pm

Hi, I would like to use this smarty modifier:
http://smarty.incutio.com/?page=CloseTags

i tried to put it into /modules/smarty/plugins
without a result.

i then pasted the function into /modules/module_smarty.php
and registered it above, where other stuff is registered, using:
Code: Select all
$this->register_modifier('close_tags', 'smarty_modifier_close_tags');

i test it using
Code: Select all
[[$somehtml|truncate:20|close_tags]]
in the template
and i just get my truncated string, no errors.

could anybody help, plz?
ruthenoid
 
Posts: 12
Joined: Mon Jul 12, 2010 8:00 pm

Re: how to add a smarty modifier?

Postby ruthenoid » Fri Dec 19, 2014 6:55 am

pardon me. the modifier actually works. :oops:
should have tested more carefully.
there is a totally different bug: it seems not to be able to handle single char tags like <p> (it cuts them, so i didnt see an output).
i have replaced the modifier with this:
http://www.gunnart.de/wp-uploads/xtc-to ... ags_v2.zip
from http://www.gunnart.de/tipps-und-tricks/ ... tten-wird/

case closed.
ruthenoid
 
Posts: 12
Joined: Mon Jul 12, 2010 8:00 pm


Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 4 guests

cron