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 |
#12
|
|||
|
|||
Its possible to export this mod to a Javascript that lent me some like this:
Code:
<script type="text/javascript" language="JavaScript1.2"> var parameter1=value1; var parameter2=value2; etc. |
#13
|
||||
|
||||
Awesome! Thanks for this.
|
#14
|
|||
|
|||
Quote:
If you modified it like I said before and it shows 24hr time and AM/PM just do a find/replace turning "H:i A" into "H:i". Quote:
You're welcome. |
#15
|
||||
|
||||
I use something similar based on a stripped vaispy code (without the scrolling part) inside an iframe. I use this because I need it to look at the permissions, so gathering data directly from the database wouldn't suit my needs.
Congratz anyway. |
#16
|
||||
|
||||
Quote:
Bob |
#17
|
|||
|
|||
Quote:
Stay tuned. |
#18
|
|||
|
|||
UPDATE: uploaded a new version that can restrict the threads to just a select number of forums. If you want to use this feature, modify "$fid_raw =" (there's instructions in the code).
It won't check whether the user is logged in and what he/she has permission to. But you can simply restrict it to forums that you want to be publicly available. edit: Added following instructions. In this newer version, if you guys want to include the thread creator as was discussed in post 7, do this: FIND: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Anybody need upgrade instructions to go from 1.00 if you already installed it to 1.01? Only new functionality is to be able to restrict threads to multiple forums. |
#19
|
||||
|
||||
i've entered my db settings but it only outputs this
Quote:
|
#20
|
|||
|
|||
FABULOUS, FABULOUS!!! (Nice site, btw!)
Any chance this works on non-vb pages that are on a different domain? ETA I just went back and read the entire first post. Now I see it works on any HTML page. I think I'm in love!! |
#21
|
|||
|
|||
Re-check the db settings, it sounds like the connection to the database or the query failed. Did you remember about the table prefix (if any) also? PM me if you still have trouble.
Quote:
I haven't tried it on different domains since my site isn't run like that but I would think you'd just change $db_host to whatever the db server is. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|