View Full Version : Truncate $thread_get[title] with ... at end?
amnesia623
08-30-2007, 02:57 AM
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 -> https://vborg.vbsupport.ru/showthread.php?t=134552&highlight=recent+posts&page=2
I would really appreciate it! thanks!
edit: i tried this https://vborg.vbsupport.ru/showthread.php?t=75418 but the fetch_trimmed_title function seems to be missing? probably dropped in recent versions of VB maybe?
Eikinskjaldi
08-30-2007, 03:18 AM
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 -> https://vborg.vbsupport.ru/showthread.php?t=134552&highlight=recent+posts&page=2
I would really appreciate it! thanks!
edit: i tried this https://vborg.vbsupport.ru/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
08-30-2007, 05:05 AM
What is grep?
edit - thanks for your help, I have it working as I planned! :)
I appreciate it!
Eikinskjaldi
08-30-2007, 11:56 AM
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
08-30-2007, 02:07 PM
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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.