The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Need help incorporating "strlen"
I would like to set the maximum characters using STRLEN in this piece of code:
---------------------------------------------------- $result = mysql_query("SELECT title, threadid, dateline FROM thread WHERE forumid NOT IN ('10','12')ORDER BY dateline DESC LIMIT 40"); while($row = mysql_fetch_assoc($result)) { echo "<tr><td><a onFocus=\"if(this.blur)this.blur()\" class=\"cap\" href=\"javascript:;\" onClick=\"opener.location='/forum/showthread.php?s=&threadid=".$row["threadid"]."'\">".$row["title"]."</a></td></tr>\r\n"; } ---------------------------------------------------- Because i would like to limit the number of characters .$row["title"] puts out. I hope you can help out, because i haven't got a clue how to start. |
#2
|
|||
|
|||
------------------------------------
$result = mysql_query("SELECT title, threadid, dateline FROM thread WHERE forumid NOT IN ('10','12')ORDER BY dateline DESC LIMIT 40"); while($row = mysql_fetch_assoc($result)) { echo "<tr><td><a onFocus=\"if(this.blur)this.blur()\" class=\"cap\" href=\"java script:;\" onClick=\"opener.location='/forum/showthread.php?s=&threadid=".substr($row["threadid"],0,MAX)."'\">".$row["title"]."</a></td></tr>\r\n"; } ------------------------------------ Replace MAX with the maximum number of characters you want to show. |
#3
|
||||
|
||||
Thanks for helping but that didn't work for me.
I noticed that you didn't use the 'strlen' btw. Maybe that isn't nescesary? And you incorperated it, into the link and not the RowTitle? Best regards |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|