PDA

View Full Version : Truncate $thread_get[title] with ... at end?


amnesia623
30 Aug 2007, 03:57
How would I truncate the $thread_get[title] to a specific amount of characters and add ... at the end if the title is truncated?

I'm trying to apply it to the modification here -> http://www.vbulletin.org/forum/showthread.php?t=134552&highlight=recent+posts&page=2


I would really appreciate it! thanks!

edit: i tried this http://www.vbulletin.org/forum/showthread.php?t=75418 but the fetch_trimmed_title function seems to be missing? probably dropped in recent versions of VB maybe?

Eikinskjaldi
30 Aug 2007, 04:18
How would I truncate the $thread_get[title] to a specific amount of characters and add ... at the end if the title is truncated?

I'm trying to apply it to the modification here -> http://www.vbulletin.org/forum/showthread.php?t=134552&highlight=recent+posts&page=2


I would really appreciate it! thanks!

edit: i tried this http://www.vbulletin.org/forum/showthread.php?t=75418 but the fetch_trimmed_title function seems to be missing? probably dropped in recent versions of VB maybe?

fetch_trimmed_title lives in functions.php

if you make sure that file is included in your script, the function will work.

grep is your friend!

amnesia623
30 Aug 2007, 06:05
What is grep?

edit - thanks for your help, I have it working as I planned! :)

I appreciate it!

Eikinskjaldi
30 Aug 2007, 12:56
What is grep?

edit - thanks for your help, I have it working as I planned! :)

I appreciate it!

grep is a *nix command that allows you to search inside all files for a particular string or even regular expression.


I simply went to my public_html/includes directory and typed
grep 'function fetch_trimmed" *.php

Opserty
30 Aug 2007, 15:07
grep is a *nix command that allows you to search inside all files for a particular string or even regular expression.


I simply went to my public_html/includes directory and typed
grep 'function fetch_trimmed" *.php

Or

http://members.vbulletin.com/api/
vBulletin 3.6 Code Documentation

:P