The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How do I limit the characters in JS
So I'm using this as a latest post module,
PHP Code:
so for example: Welcome to our forums, please read our forum rules before you post. should output, Welcome to our forums, please read our forum... Thanks |
#2
|
|||
|
|||
Maybe:
Code:
var maxTitle = 20; for (x = 0; x < 5; x++) { var title = threads[x].title; if (title.length > maxTitle ) { title = title.substr(0,maxTitle-3) + "..."; } document.writeln("<li><a href=\"showthread.php?t="+threads[x].threadid+"\">"+title+"</a><span>By: "+threads[x].poster+")</span><br /></li>"); } |
#3
|
|||
|
|||
Thanks worked perfectly!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|