Please note that Form2Content is no longer being developed. All files from the latest version can be found on Github.

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. alena
  2. F2C article templating
  3. Thursday, 24 January 2019
  4.  Subscribe via email
Hi,

I need to truncate the texts in my article intros, but also to use common html tags in them - now when the truncate plugin cuts the code in between a tag, it creates a terrible mess in the code,
e.g.: [b]
Accepted Answer
Accepted Answer Pending Moderation
sorry, found the mistake - it was Event Gallery component causing the trouble
Responses (8)
Accepted Answer Pending Moderation
Use the strip tags. See code in this message:
https://forum.form2content.com/styles-not-working-in-introtext

Regards, Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C article templating
  3. # 1
Accepted Answer Pending Moderation
Hi, Patrick, thanks a lot, but I´m afraid that doesn´t solve my problem - we actually need to keep the tags in the intro
  1. more than a month ago
  2. F2C article templating
  3. # 2
Accepted Answer Pending Moderation
You are asking for a catch 22 ;)
Can you limit characters in the editor? Than you don't need to strip

This is what the strip_tags does: https://www.smarty.net/docs/en/language.modifier.strip.tags.tpl

You can create your own smarty modifier and maybe exclude certain types of tags?

No other easy solution that I know of.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C article templating
  3. # 3
Accepted Answer Pending Moderation
Maybe this will help or even work: https://stackoverflow.com/questions/11840349/php-smarty-strip-tag-allow-specific-tags

Please do note that we use Smarty 3 but might work.
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C article templating
  3. # 4
Accepted Answer Pending Moderation
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C article templating
  3. # 5
Accepted Answer Pending Moderation
Hope that´s not Catch 22 as much :D :) :), before I made it work before.
But in previous F2C version I just placed a custom smarty plugin in smarty/plugins folder, and It worked. Now - even if the plugin is the same as the original truncate plugin, I get the "unknown modifier" error. I can even delete the plugins folder from FTP and the website still works - so I suspect the plugins get cached or compiled somewhere... is there a way to use custom plugins now?
  1. more than a month ago
  2. F2C article templating
  3. # 6
Accepted Answer Pending Moderation
Thanks for sharing!
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C article templating
  3. # 7
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.