Chào mừng bạn đến vói vietvbb.vn. Hãy Đăng nhập hoặc Đăng Ký để tham gia thảo luận tại diễn đàn.



Results 1 to 1 of 1

Thread: HowTo Display Latest Active Threads on Forumhome

  1. HowTo Display Latest Active Threads on Forumhome Detail »»

  2. HowTo Display Latest Active Threads on Forumhome

    • noob_v2b's Avatar
    • noob_v2b
    • vßullεtiη Viεtηam
    • Friend
    • Join Date
      17 October 2007
      Location
      Hà Nội
      Posts
      6.193
      Thanks
      845
      Thanked 14.340 Times in 2.650 Posts
      Rep Power
      1329
    Rating:  (0 votes - 0 average)
    ############# Install Instructions
    ## THIS WILL DISPLAY THE LATEST 10 ACTIVE THREADS ON THE FORUM'S INDEX PAGE

    ## Admin Control Panel > vBulletin Options > vBulletin Options > External Data Provider > Use External Data Provider:
    YES - type = JavaScript

    ## Admin Control Panel > Styles & Templates > Style Manager > Dropdown: 'edit templates' > expand the group 'Forum Home
    Templates' > select the template 'FORUMHOME' and click on the [Customize] button.

    ## Find this code:
    HTML Code:
    $navbar
    ## Below this, on a new line, add this code:
    HTML Code:
    <if condition="$vbulletin->options['externaljs']">
    <!-- show latest active threads -->
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" 
    align="center">
    <tbody>
    <tr>
    <td class="thead" colspan="2">
    <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_external')"><img 
    id="collapseimg_forumhome_external" 
    src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_external].gif" alt="" border="0" /></a>
    <a href="search.php?$session[sessionurl]do=getnew">Latest Active Threads</a>
    </td>
    </tr>
    </tbody>
    <tbody id="collapseobj_forumhome_external" style="$vbcollapse[collapseobj_forumhome_external]">
    <tr>
     
    <td class="alt1" width="100%">
     
    <div class="smallfont">
    <script type="text/javascript" src="external.php?type=js"></script> 
    <script language="" type="text/javascript">
    <!--
    for (var x in threads)
    {
    document.writeln("<img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <span class=\"time\">($vbphrase[posted_by]: "+threads[x].poster+")</span><br />");
    }
    //-->
    </script></div>
     
    </td>
    </tr>
    </tbody>
    <!-- show latest active threads -->
    </table>
    <br />
    </if>
    ## Save the template and you're done.

    To limit the amount of threads shown
    In the code above, exchange:
    Code:
    for (var x in threads)
    with
    Code:
    for (x = 0; x < 10; x++)
    exchanging 10 with the amount of threads you want displayed.

    To limit the output to the latest threads in one or more specific forums

    In the code above, exchange this:
    Code:
    <script type="text/javascript" src="external.php?type=js"></script>
    with this:
    Code:
    <script type="text/javascript" src="external.php?forumids=95,96,97,98&type=js"></script>
    The bold part is added, and the blue numbers, seperated by commas, are the forumid numbers of the forums you want to fetch the latest threads from.

    The forumid number of a forum can be found by editing a forum in the AdminCP. It's listed at the top, next to the forum name.
    Attached Images Attached Images



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Forum Home Enhancements] Latest X Threads on Forumhome
    By thnam8x in forum VietVBB Modification 4.x.x
    Replies: 64
    Last Post: 24 April 2013, 10:17 PM
  2. [Forum Home Enhancements] [i4D] Changing Forums Display in Forumhome !
    By ntduyphuong in forum vBulletin 3.8 Add-ons
    Replies: 5
    Last Post: 1 December 2011, 04:55 PM
  3. HowTo Display Latest Active Threads on ANY normal HTML page
    By noob_v2b in forum vBulletin Articles
    Replies: 2
    Last Post: 22 April 2011, 06:23 PM
  4. [Forum Home Enhancements] Latest threads V2
    By Luffy Media in forum vBulletin 3.7 Add-ons
    Replies: 10
    Last Post: 4 November 2008, 11:15 AM
  5. [Forum Display Enhancements] Display Options Above Threads
    By noob_v2b in forum vBulletin 3.7 Template
    Replies: 0
    Last Post: 18 August 2008, 12:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •