Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-07-02 04:22:30
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Abbreviating titles ...?
Anybody know if there’s a way of outputting an abbreviated version of an article’s title?
For example, displaying the first 4 words of “This is a title which is very long” to make “This is a title”.
I guess it’s the functionality of rss_auto_excerpt I’m looking for.
I’ve written a plugin that can do it but I’m curious if there’re other ways.
Thanks.
Offline
Re: Abbreviating titles ...?
plugin: rvm_substr (cuts a specific number of characters, not words)
Offline
Re: Abbreviating titles ...?
Hello,
beginning should do the trick.
But kgr_safe_excerpt can count your words.
Last edited by fpradignac (2008-07-02 10:48:36)
françois
Offline
#4 2008-07-02 13:00:44
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Abbreviating titles ...?
ruud wrote:
plugin: rvm_substr (cuts a specific number of characters, not words)
Thanks Ruud. It’s not quite what I’m after, but interesting nonetheless. You should list it on textpattern.org
Offline
#5 2008-07-02 13:04:53
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Abbreviating titles ...?
fpradignac wrote:
beginning should do the trick. But kgr_safe_excerpt can count your words.
Thanks François. Both these plugins appear to work along the lines of rss_auto_excerpt. I needed something to work on the article title, not the body.
Offline
Re: Abbreviating titles ...?
I’d skip “beginning” because it doesn’t adhere to plugin prefix standards.
You can probably modify rss_auto_excerpt quite easy to work on the title instead of the excerpt.
Offline
Re: Abbreviating titles ...?
Sorry gomedia, I forgot that it was only on title.
françois
Offline
Re: Abbreviating titles ...?
Use rss_auto_excerpt like this:
<txp:rss_auto_excerpt words=“4” body=“title” />
That should work!
Cheers
Offline
#9 2008-07-03 13:12:39
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Abbreviating titles ...?
Dragondz wrote:
Use rss_auto_excerpt like this:
<txp:rss_auto_excerpt words=“4” body=“title” />
Thanks Dragondz. Yes it does work. I’m using txp:rss_auto_excerpt elsewhere but never thought that it could operate on a title.
Offline
#10 2008-07-06 03:02:04
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Abbreviating titles ...?
I’ve taken the plunge and released a plugin called adi_title to abbreviate article titles in various ways. I hope it’s of some use.
Offline
Pages: 1