SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    Not Bad, eh? Justin Sampson's Avatar
    Join Date
    Aug 2000
    Location
    N.S., Canada
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    I was wondering how, with vBulletin, do you include the hottest topics links on other pages (like sitepoint.com). Is it a hack, a feature that came with vBulletin, or a custom script?

    Thanks,
    Justin Sampson

    [Edited by justin_sampson on 11-13-2000 at 07:45 PM]

  2. #2
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Run a search on the vBulletin Forums, it's easy to find. Search for "Active Topics" - that ought to work:

    http://www.vbulletin.com/forum

    You also might want to try this site:
    http://www.vbulletin.org

    Hope this helps.

  3. #3
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here ya go. Not that hard to do.

    Code:
    <?php
    // Set this to the max number of threads to display
    $maxthreads = 10;
    
    require("config.php");
    $db=mysql_connect($servername,$dbusername,$dbpassword);
    mysql_select_db($dbname);
    $query="select * from thread ORDER BY lastpost DESC LIMIT $maxthreads";
    $resultlatest=mysql_query($query,$db);
    while ($latest_array = mysql_fetch_array($resultlatest)) {
    echo "<FONT  class=\"hotTopicsLink\" SIZE=\"-1\" FACE=\"Arial, Helvetica, sans-serif\">
          <A HREF=\"http://www.YOURFORUM.com/showthread.php?threadid=$latest_array[threadid]\">
          <IMG SRC=\"graphics/hottopic.gif\" WIDTH=\"15\" HEIGHT=\"9\" BORDER=\"0\">$latest_array[title]</A>
          </FONT><BR>";
    }
    
    ?>
    Wayne Luke
    ------------


  4. #4
    Not Bad, eh? Justin Sampson's Avatar
    Join Date
    Aug 2000
    Location
    N.S., Canada
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, Thanks It's simpler then I thought but there's nothing wrong with that!

    Thanks,
    Justin Sampson

  5. #5
    Sports Publisher mjames's Avatar
    Join Date
    Jan 2000
    Location
    Charlotte, NC
    Posts
    5,891
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have been having to manually update my "Hot Sports Chatter" section on my page weekly. (I put the top five or so discussion threads there per week on my main page). I'd also be very interested in doing this sort of thing where it updates automatically. So Wayne, all I do is copy that code where I want the headlines? (Obviously, I have to customize it some). And how do I prevent our private threads from showing up? Thanks for the help.

  6. #6
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah all you need to do is copy that code
    Over at my forum we are using SSI to include it..that works just as well
    To exclude private forums from the search, just change this line:
    Code:
    $query="select * from thread ORDER BY lastpost DESC LIMIT $maxthreads";
    to
    Code:
    $query="select * from thread WHERE forumid != '<privateforumid>' ORDER BY lastpost DESC LIMIT $maxthreads";
    To find the forum id, just hover over the link to that forum on your mainpage and look for the forumid in the link path in the status bar.
    Hope that helps!

  7. #7
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Actually it is better to use '<>' instead of '!=' as some OSes might have problems with the later version of the Not Equal Operator. You never know where your going to move your site to next.
    Wayne Luke
    ------------


  8. #8
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Interesting, I didn't know that. Thanks for the tip, Wayne.

  9. #9
    Sports Publisher mjames's Avatar
    Join Date
    Jan 2000
    Location
    Charlotte, NC
    Posts
    5,891
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, guys! I'll see if I can get this working when I have some time.

  10. #10
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that tip Wayne...I'll stick to <> in the future

  11. #11
    Freelance Web Designer KeithMcL's Avatar
    Join Date
    Oct 1999
    Location
    Dublin, Ireland
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tried the code above but the topic in my private forum is still being shown

  12. #12
    Freelance Web Designer KeithMcL's Avatar
    Join Date
    Oct 1999
    Location
    Dublin, Ireland
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tiss ok, got it working


Bookmarks

Posting Permissions

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