vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Forum Home Enhancements - Latest X Threads on Forumhome (https://vborg.vbsupport.ru/showthread.php?t=165830)

fahl 05-07-2008 02:25 PM

Having problems with this,Shows up ok but when thread link is clicked it is showing
Code:

No Thread specified. If you followed a valid link, please notify the administrator
Thepage it is attempting to access is
Code:

http://www.goldies.us/forums/showthread.php?t=2720
The page it should go to is
Code:

http://goldiez.com/forums/showthread.php?t=2721
I have downloaded latest version & reinstalled it,but still the same

bigtime 05-07-2008 05:11 PM

How can this be used on a non-VB page?

shaynehammy 05-08-2008 05:19 AM

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.

Thanks mate.

vanbao 05-10-2008 03:41 AM

I am looking for ways to display the latest x posts on a non vb homepage. Like this one.
http://www.vietshowbiz.com

Can someone please help.

car20 05-10-2008 05:23 AM

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 .

shaynehammy 05-11-2008 11:14 PM

Is this mod still supported?

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.

If that makes sense.

orok 05-13-2008 03:44 AM

i did some changes to lock like this :

https://vborg.vbsupport.ru/attachmen...1&d=1210653797

Demo

thank you for this Product

meolangthang 05-20-2008 03:17 PM

Thank you man :D

Zacarias 06-07-2008 10:35 AM

Quote:

Originally Posted by ++++++ (Post 1443466)
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']) . '...';

        
// convert pagetext to nice looking variable
        
$pagetext $row['pagetext'];
        
$username $row['username'];
        
$userid $row['userid'];
        
$forumid $row['forumid'];
        
$threadid $row['threadid'];
        
$forumtitle $row['forum_title'];
        
$threadtitle $row['thread_title']; 

Replace with:
PHP Code:

   // 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']) . '...';

        
// 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']; 

Then open your "forumhome_latest_thread_bit" template and change the variables. Mine looks like this:

HTML Code:

<tr>
    <td class="$bgclass">
        <a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$threadid1" class="smallfont">$threadtitle1</a>
        <if condition="$vboptions['latest_thread_time']"><span class="smallfont">$date</span></if>
        <if condition="$vboptions['latest_thread_cut'] != '0'"><div class="smallfont">$pagetext1</div></if>
    </td>
    <td class="$bgclass">
      <span class="smallfont">in</span> <a href="$vboptions[bburl]/forumdisplay.php?$session[sessionurl]f=$forumid1" class="smallfont">$forumtitle1</a>
    </td>
    <td class="$bgclass">
  <span class="smallfont">by</span>      <a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$userid1" class="smallfont">$username1</a>
    </td>
</tr>


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!

am3rgin 06-08-2008 10:24 PM

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.


All times are GMT. The time now is 03:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01371 seconds
  • Memory Usage 1,796KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete