The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
LBmtb's Recent Topics on Non-VB Pages Details »» | |||||||||||||||||||||||||
RECENT TOPICS by LBmtb
Version 1.03 Last updated: March 27th, 2007 DESCRIPTION This script will display the topics with the most recent posts on a non-vb page (any HTML page). The page it's on must have a .php extension or you should setup apache to parse the page correctly. The threads with the latest posts are on top. The output is a clean list in this format: HTML Code:
<ul class="vb_topics"> <li><a href="http://www.yourdomain.com/forum/showthread.php?t=4150">This is the latest thread</a> <span class="vb_last_post">(user1 @ 12/18/06 05:58 PM)</span></li> <li><a href="http://www.yourdomain.com/forum/showthread.php?t=4138">Another recent thread</a> <span class="vb_last_post">(user2 @ 12/18/06 05:58 PM)</span></li> </ul>
There is a copyright line. I am releasing this script on the condition that you do not remove this line unless you send $5 via paypal to webmaster@socaltrailriders.org. Thanks in advance for understanding. NEED CUSTOMIZATION OR PROFESSIONAL INSTALLATION? Email me at webmaster@socaltrailriders.org, PM me on vbulletin.org, or aim me at "lbmtb" to inquire about customizing this script or installation. REVISION HISTORY Version 1.03: Adds small preview of first post when the user rolls over the links Version 1.02: option to exclude certain forums Version 1.01: option to only include certain forums Version 1.0: Initial Release INSTRUCTIONS: 1) Copy and paste the following code where you want the list to appear and adjust the values in the section "CUSTOMIZE THE FOLLOWING": PHP Code:
3) Enjoy! 4) Donate (this step optional) UPGRADE INSTRUCTIONS (from 1.02 to 1.03): FIND: Code:
$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter FROM ".$db_prefix."thread WHERE visible=1 AND open=1 $fid_final $fidx_final ORDER BY lastpost desc LIMIT $limit"); Code:
$thread_sql = mysql_query("SELECT SQL_CACHE t.threadid,t.title,t.lastpost,t.lastposter,t.forumid,substring(p.pagetext,1,90) as post_text FROM ".$GLOBALS['db_prefix']."thread t INNER JOIN ".$GLOBALS['db_prefix']."post p ON t.firstpostid = p.postid WHERE t.visible=1 AND t.open=1 $fidi_final $fidx_final ORDER BY t.lastpost desc LIMIT $limit"); Code:
$tid = $thread_get['threadid']; Code:
$text = $thread_get['post_text']; Code:
forumid=".$value Code:
t.forumid=".$value Code:
echo "<li><a href=\"$forum_url/showthread.php?t=$tid\">$thread_get[title]</a> <span class=\"$recent_poster\">($poster $seperator $date2)</span></li>\n"; Code:
echo "<li><a href=\"$forum_url/showthread.php?t=$tid\" title=\"".$text."\">$thread_get[title]</a> <span class=\"$recent_poster\">($poster $seperator $date2)</span></li>\n"; UPGRADE INSTRUCTIONS (from 1.01 to 1.02): FIND: PHP Code:
PHP Code:
PHP Code:
NOTES: This is my first mod/script so be nice, please DEMO: http://www.socaltrailriders.org/latest_posts.php Supporters / CoAuthors Show Your Support
|
Comments |
#52
|
||||
|
||||
I have a request that would benefit me greatly. I am using this modification, or will be anyways, ON vBulletin powered pages. I would LOVE to have this as a variable. My attempts so far have failed at making it function as one though. The best I could do was get it to display a single entry.
I realize there are other modifications out there that do this within the boundries of vB. They don't serve my purpose though. This one allows me to quickly reuse the same information, except output different forums in a different file. This is what I need. Any chance you could make this a variable or show me how to make it a variable that I could toss into custom templates I have created? (I already include the global file in THIS modification and output the template below this code. I would like the ability to insert this code though into the templates. Thanks for any input you could give. |
#53
|
|||
|
|||
Great script! Thanks! I'm looking to send you over a donation, but Paypal is acting up. Any chance you can add a "donation" link in your post? You may get more clicks.
Keep rockin! Sarah |
#54
|
|||
|
|||
Quote:
Hi Roni. I'm interested in what query the script if using for you. Do this: After Code:
$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter FROM ".$db_prefix."thread WHERE visible=1 AND open=1 $fid_final $fidx_final ORDER BY lastpost desc LIMIT $limit"); Code:
echo "<!-- query: SELECT threadid,title,lastpost,lastposter FROM ".$db_prefix."thread WHERE visible=1 AND open=1 $fid_final $fidx_final ORDER BY lastpost desc LIMIT $limit -->"; Quote:
Quote:
Thanks, "ricker" |
#55
|
|||
|
|||
Very nice!
|
#56
|
||||
|
||||
Quote:
Bob |
#57
|
||||
|
||||
A work around would be to input the forums that wish NOT to display. The location to do that is directly below the location where you input the forums you DO wish to display.
|
#58
|
|||
|
|||
wow this looks great, wondering can i get it to show the full post as well as the topic ?
|
#59
|
|||
|
|||
Quote:
|
#60
|
|||
|
|||
do you know how cool this is? rock the house baby!
|
#61
|
|||
|
|||
Despite my best of efforts I could not make it display posts only from a single forum. It still displays recent posts from all forums.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|