Textpattern Forum

You are not logged in. Register | Login | Help

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

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,501
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

Board footer

Powered by FluxBB