Is there any way we can just have the thread title and not part of the post underneath it? This virtually doubles the length of the hack on the forum home. Ie i want to disaply the last 30 threads but dont want the user to be scrolling down for ages just to look through it all.
tanks a lot for this nice hack .
please tell me how do i can change Author , Forum And Latest 5 Threads words to other lang .
and how do i can changes dir to right to left .
Anyone know how to get rid of the preview that is showing under the last updated post. I would also like to show thread view and replies to the thread that has been updated where the lastest post is.
I just wish this thing could work on every page...it would be so much more useful. Great hack though!
I got it to work on every page by changing the hook location for 'Main Code' from "forumhome_start" to "global_start". One query is added per page.
Also, some variables need to be changed to do it... Hope I'm allowed to do this.
First open the "Main Code" plugin.
Find:
PHP Code:
// query to get the last posts $query = $vbulletin->db->query_read(" SELECT thread.forumid as forumid, thread.visible, thread.title as thread_title, thread.threadid as threadid, thread.postusername as username, thread.postuserid as userid, thread.dateline as date, forum.title as forum_title, post.postid, post.pagetext as pagetext FROM " . TABLE_PREFIX . "thread as thread LEFT JOIN " . TABLE_PREFIX . "post as post on (thread.firstpostid = post.postid) LEFT JOIN " . TABLE_PREFIX . "forum as forum on (thread.forumid = forum.forumid) WHERE thread.visible = 1 AND $latest_and AND $latest_and_1 ORDER BY postid DESC LIMIT $limit" );
Replace with:
PHP Code:
// query to get the last posts $query = $vbulletin->db->query_read(" SELECT thread.forumid as forumid1, thread.visible, thread.title as thread_title1, thread.threadid as threadid1, thread.postusername as username1, thread.postuserid as userid1, thread.dateline as date, forum.title as forum_title1, post.postid, post.pagetext as pagetext1 FROM " . TABLE_PREFIX . "thread as thread LEFT JOIN " . TABLE_PREFIX . "post as post on (thread.firstpostid = post.postid) LEFT JOIN " . TABLE_PREFIX . "forum as forum on (thread.forumid = forum.forumid) WHERE thread.visible = 1 AND $latest_and AND $latest_and_1 ORDER BY postid DESC LIMIT $limit" );
Find:
PHP Code:
// strips the bbcode out of the post $row['pagetext'] = strip_bbcode($row['pagetext'], $stripquotes = true, $fast_and_dirty = false, $showlinks = true);
// adds the cutoff ... with substr $row['pagetext'] = substr($row['pagetext'], 0, $vbulletin->options['latest_thread_cut']) . '...';
// strips the bbcode out of the post $row['pagetext1'] = strip_bbcode($row['pagetext1'], $stripquotes = true, $fast_and_dirty = false, $showlinks = true);
// adds the cutoff ... with substr $row['pagetext1'] = substr($row['pagetext1'], 0, $vbulletin->options['latest_thread_cut']) . '...';
// convert pagetext to nice looking variable $pagetext1 = $row['pagetext1']; $username1 = $row['username1']; $userid1 = $row['userid1']; $forumid1 = $row['forumid1']; $threadid1 = $row['threadid1']; $forumtitle1 = $row['forum_title1']; $threadtitle1 = $row['thread_title1']; // strips the bbcode out of the post $row['pagetext1'] = strip_bbcode($row['pagetext1'], $stripquotes = true, $fast_and_dirty = false, $showlinks = true);
// adds the cutoff ... with substr $row['pagetext1'] = substr($row['pagetext1'], 0, $vbulletin->options['latest_thread_cut']) . '...';
Make sure "Auto Location" is set to no.
Then put "$latest" wherever you want it in your templates. I have it in my navbar template. DEMO (must be registered.. sorry can't have guests running up queries.. oh and the place is still under construction too... :P)
I guess my version is kind of a new hack. Or a mod to this one...
Great hack anyway, thank you!
Any idea how to set the limit to something like 50, then add the pagenav options? Just like the search results but limit whats shown to the latest 5 on forum home. The pagnav would provide the ability to goto to the next 5 latest threads or jump to any page within the list of 50 latest threads.
This same mod from another forum package has this ability. Users can hit the "Next 5" link until they scroll through a weeks worth of threads.