TruncHTML - Yet another text limiter

Most current version is 1.2.2

  • Truncates HTML/Text after the specified number of characters.
  • Does not count characters in ...

Leave a comment:

Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?

If you found something useful here and want to show your appreciation feel free to

or


Comments:

1 of 4 pages  1 2 3 >  Letzte »

Nice.

Posted by David Murphey  on  02/17  at  03:32 AM

@ Edward:
In version 1.2.2 the leading space before the inline-text is removed.

If you want a leading space on first position in the inline-text use an underscore instead, e. g. inline="_foo".

Posted by  on  02/15  at  08:52 PM

Thank you! Works much better for me than the other limiters. Some question-marks about the performance of inline and ending but for now it is not important, my page look good and validates in strict mode. Cheers!

Posted by  on  02/07  at  12:59 PM

I’m using 1.2.1 and it works really well except for one thing: I have an ellipsis (...) being displayed using that new “inline” parameter but it always adds a space before it. Thus, sometimes the line will break right _before_ the ellipsis and it’ll end up on a line by itself. Hope a future version will fix.

Many thanks!

Posted by  on  01/23  at  06:16 PM

I am impressed with the plugin but find that I cannot use it as a replacement for Word Limiter Plus because there is a line-break placed before the ending bit, whereas I need it to appear on the same line as the preceding text. I tried using “inline” for my “read on...” link but then it is affected by the formatting of the preceding text. Given that a line-break can be scripted into the ending bit I think the default should be no line-break, or there should be a parameter available for this.

Please let me know if and once this functionality is made available!

Also useful would be if_exceeds functionality a la Word Limiter Plus.

Posted by David  on  11/28  at  01:34 AM

I had a lot of spaces after the text i wanted truncated which was a reason why it was adding “...” even though it was well under 60 characters.

Still having the issue wtih some text though

{exp:trunchtml chars="60" inline="..."}{title}      lots of spaces here                          {/exp:trunchtml}

This is 35 characters long or so, but still having “...” added. Again, very random,

“Transformers Custom Protoform Starscream ...”

Posted by  on  10/07  at  04:00 PM

1 of 4 pages  1 2 3 >  Letzte »