The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
IS that very hard to do?
I was trying to incorporate that in the follwing script: PHP Code:
I know it has something to do with: PHP Code:
But haven't got a clue how to combine that.... Can you help me out? |
#2
|
||||
|
||||
![]()
little more detail would be good. Max characters for what, subject?
|
#3
|
||||
|
||||
![]()
Sorry i forgot to mention that, yes the subject, in this case: $row["title"] But i haven't got a clue how yet. So if you could help that would be great
|
#4
|
||||
|
||||
![]()
I have got my pencil and paper ready, how do i do this?
|
#5
|
||||
|
||||
![]()
My fingers are getting cramped holding the pencil
![]() Nobody knows how? |
#6
|
|||
|
|||
![]()
Are you saying that you want a string to be no longer than a certain length?
I use a small addition like this in my forums to shrink usernames to show no more than 20 characters in the thread lists. Taking that as an example, you could do this: PHP Code:
Does that make any sense? heh |
#7
|
||||
|
||||
![]()
Yes thats exactly what i wanted. Thanks!
So my string is this: $row["title"] So the code for me would be like this?: if (strlen($row["title"]) > 20) $row["title"] = substr($row["title"], 0, 17) . "..."; I am doing something wrong i guess, because the above example doesn't work... Argh! |
#8
|
||||
|
||||
![]()
Let me give you the complete code:
------------------------- $result = mysql_query("SELECT title, threadid, dateline FROM thread WHERE forumid NOT IN ('10','16')ORDER BY dateline DESC LIMIT 40"); while($row = mysql_fetch_assoc($result)) { echo ".$row["title"]."\r\n"; } ------------------------- I hope this helps |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|