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:

2 of 4 pages  <  1 2 3 4 >

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

Sure, here is a headline that has the my “...” attached to the end even though it shouldn’t. (Title is less than 60 characters, but notice the dash, colon. Doesn’t apply to all of them though, just these two. Seems to be random

RUMOR: Transforming DVD Case At Target? ...

Masterpiece MP-05 Megatron To Be Re-Issued ...

This is th code

{exp:trunchtml chars="60" inline="..."}
{title}
{
/exp:trunchtml}

Posted by  on  10/06  at  06:29 AM

Have you got an example for this behaviour?

Posted by  on  10/02  at  02:11 PM

Hmm.. for some reason it’s adding the ending string (...) to pieces of text that are far below the chars limit, seems to be if the text contains colons or commas, etc?

Posted by  on  10/02  at  12:54 AM

It appears it’s version 4.3.2
---
EDIT: There was compatibility issue with certain PHP builds. TruncHTML v. 1.2.1 addresses this.
- Oliver

Posted by Kevin  on  09/03  at  05:09 PM

Not really. What version of PHP is running on your server?

Posted by  on  08/30  at  08:47 AM

2 of 4 pages  <  1 2 3 4 >