The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
![]()
Hi guys
I like to pull out newest thread on non vbul index-page. I found this mod wich seems to work. But the mod do not include text from the posts. I like to include around 25 characters from each post. It must be relatively easy to pull out post-text, but is it? and what is the database-name of a post? Here is the code: Code:
bla bla bla $thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter,post FROM thread WHERE visible=1 AND open=1 $forumid ORDER BY lastpost DESC $limited"); while($thread_get=mysql_fetch_array($thread_sql)) { $lastpost = $thread_get['lastpost']; $poster = $thread_get['lastposter']; $tid = $thread_get['threadid']; $psql = mysql_query("SELECT postid FROM post WHERE threadid=$tid ORDER BY postid DESC"); $getp=mysql_fetch_array($psql); $pid = $getp['postid']; $date2 = date ("m/d/y h:i A" ,$lastpost); $title = $thread_get['title']; $title = substr($title,0,$txtlimit); echo "<tr><td><font size=\"2\" face=\"arial,verdana,geneva\"><a href=\"$forum_url/showthread.php?p=$pid#post$pid\"><FONT SIZE=\"2\" COLOR=\"$titlecolor\" face=\"arial,verdana,geneva\">$title</FONT></a></font><br /><font color=\"$postedcolor\" face=\"arial,verdana,geneva\" size='1'>posted by $poster <i>$date2</i></FONT></td></tr>"; } echo "</table>"; |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|