Announcement

Collapse
No announcement yet.

HowTo Display Latest Active Threads on ANY normal HTML page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Colin F
    replied
    To limit the amount of threads shown

    In the code above, exchange:
    Code:
    for (var x in threads)
    with
    Code:
    for (x = 0; x < [B]10[/B]; 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?[B]forumids=[COLOR=Blue]95[/COLOR],[COLOR=Blue]96[/COLOR],[COLOR=Blue]97[/COLOR],[COLOR=Blue]98[/COLOR]&[/B]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.
    In the example attached below, the forumid is 2:[ATTACH]27374[/ATTACH]


    Thanks to RaZor Edge

    Leave a comment:


  • Floris
    replied
    HowTo Display Latest Active Threads on Forumhome

    Leave a comment:


  • HowTo Display Latest Active Threads on ANY normal HTML page

    ############# Install Instructions
    ## THIS WILL DISPLAY THE LATEST 10 ACTIVE THREADS ON ANY NON VBULLETIN HTML PAGE

    ## Requires vBulletin version 3.5.0 stable.

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

    ## At any location in your custom .html page, add this code:
    HTML Code:
    <!-- show latest active threads -->
    <table cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
    <tbody>
    <tr>
    <td colspan="2">
    <a href="search.php?do=getnew">Latest Active Threads</a>
    </td>
    </tr>
    </tbody>
    <tbody>
    <tr>
     
    <td width="100%">
     
    <div>
    <script type="text/javascript" src="external.php?type=js"></script> 
    <script language="" type="text/javascript">
    <!--
    for (var x in threads)
    {
    document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> (Posted By: "+threads[x].poster+")<br />");
    }
    //-->
    </script></div>
     
    </td>
    </tr>
    </tbody>
    <!-- show latest active threads -->
    </table>
    <br />
    ## Save the html file, upload it, and you're done.

    Note: Don't forget to turn on the External Feed options here:

    Admin CP -> vBulletin Options -> External Data Provider
    Attached Files
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X