Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [archived] sab_substr
For those looking for another plugin that may work better than this (it did for me) try aam_typogrify. It doesn’t do what this plugin does – making substrings and adding ellipses, but it accomplishes a similar improvement in typographical appearance by preventing “widowed” words (single words on the final line of a title, paragraph, etc…) on any block of text.
Last edited by aswihart (2008-03-15 12:22:09)
Offline
Re: [archived] sab_substr
I’ll update the help and I’m seriously considering writing a substring plugin that can deal with XHTML properly.
Offline
Offline
Re: [archived] sab_substr
Probably brand new.
Offline
Re: [archived] sab_substr
I’ve updated sab_substr to correct the help text.
And I’ve written a small plugin that, unlike sab_substr, can cut an XHTML string properly: rvm_substr
Offline
#42 2009-03-03 16:37:12
- paulyoung
- Member
- Registered: 2008-06-21
- Posts: 10
Re: [archived] sab_substr
Feature request!
Remove characters from the end by using negative numbers. eg. to remove a file extension with Podcast.mp3 as the file name
<txp:sab_substr limit="-4"><txp:file_download_name /></txp:sab_substr>
I’m currently doing this instead if it helps:
<txp:php> $name = $thisfile['filename']; substr_replace($name ,"",-4); echo $name; </txp:php>
Offline