Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] sab_substr

#37 2008-03-15 00:56:53

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

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

#38 2008-03-15 06:57:29

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#39 2008-03-15 07:06:01

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [archived] sab_substr

ruud wrote:

I’m seriously considering writing a substring plugin that can deal with XHTML properly.

Awesome news. Is it going to a brand new shiny bling bling plugin or update to this? :P

Last edited by Gocom (2008-03-15 07:06:19)

Offline

#40 2008-03-15 07:23:11

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [archived] sab_substr

Probably brand new.

Offline

#41 2008-03-18 16:31:46

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

  1. Index
  2. » Archives
  3. » [archived] sab_substr

Board footer

Powered by FluxBB