The Arcive of vBulletin Modifications Site. |
|
|
#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>";
|
|
#2
|
||||
|
||||
|
You need to grab post.pagetext from the 'post' table. So, you'll have to do a join with the 'post' table on post.postid = thread.firstpostid
|
|
#3
|
|||
|
|||
|
Hmm, I must admit I can't handle this alone. My PHP/Sql-skill are obviously to low. Can anyone help me. There are lots of mods that pulls latest posts out on nonVB index-page, but non of them pulls alsom some of the text from latest posts. It should be easy to make?! I am ready to pay for this.
|
|
#4
|
||||
|
||||
|
If you are wanting to pay for it, let me know and I'll move this thread to paid requests. Or you can just make a post in Paid Requests yourself about this.
|
|
#5
|
|||
|
|||
|
Thanks, I will try making a request in paid section
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|