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 |
#42
|
||||
|
||||
First of all, thanks to everyone for their interest in this mod.
Quote:
Code:
AddType application/x-httpd-php .html .htm Quote:
Quote:
Just list off the forum ID's and separate them with a comma. For example if I want to only include threads from three forums with ID's 9, 11, and 15 I would have this: PHP Code:
Quote:
If you need custom work done, PM me. |
#43
|
|||
|
|||
Quote:
Thanks for your reply. BY the way, where is the apache config file. ANd which part of the page should i put the code in. I am sorry to ask you this question as programming is out of my league. Learning now. |
#44
|
|||
|
|||
Quote:
|
#45
|
|||
|
|||
Is there a way to trim the number of characters in the topic title? For example: a topic has 50 characters in its title. Can I show just 25 characters with this script?
|
#46
|
|||
|
|||
I'm trying to rescrict this to only public forums and it's still showing threads from all forums.
Here is the code I have: Code:
// use one or the other, not both. if left blank the script will return threads from any forum $fid_raw = "99,3,119,134"; // ONLY include threads from these forums. seperate each ID with a comma $fidx_raw = ""; // Exclude threads from these forum. seperate each ID with a comma |
#47
|
|||
|
|||
LBmtb, is your 'upcoming events' list using the EVENTS mod, or is your mod using a feed directly from the calendar?
|
#48
|
|||
|
|||
Quote:
|
#49
|
|||
|
|||
i wanna add it to header - i added this code
PHP Code:
|
#50
|
|||
|
|||
Is there a way to limit the text string? I have small "modules" and some times they wrap 3 times.
|
#51
|
|||
|
|||
This may be a long shot, but I'm using extra threadfields and am wondering if it'd be easy to include a field or two in the display. Thanks for the great mod!!!
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|