•   Notifications
  • Welcome to our forums

    Join us now to get access to all our awesome features. Once registered and logged in, you will be able to create topics, post replies, give reputation to your fellow members, get your own private messenger, and so, so much more.

    + Reply to Thread + Post New Thread
    Results 1 to 4 of 4

    Thread: Last 10 forum posts
  • Share This Thread!
    • Share on Facebook
    1. Question Last 10 forum posts

      i presume u guys r using PHP Nuke on your site and i jus wanted to know how do you get that block last forum posts on the site..i have php nuke also and would liek that feature on my site
      http://www.rpgwh.net

    2. #2
      Join Date
      Sep 2001
      Location
      Austria
      Posts
      2,600
      PHP Code:
      <?php
      $sql_id_forum
      =sql_connect("HOSTNAME","USERNAME","PASSWORD","DATABASENAME");
      $query "SELECT threadid, title FROM thread WHERE forumid != 3 AND forumid != 21 AND forumid != 22 AND forumid !=44 ORDER BY threadid DESC limit 0,10";
      $result sql_query($query,$sql_id_forum);
      $numrows sql_num_rows($result);


      $content "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" valign=\"top\">";
      while(list(
      $threadid$posttitle) = sql_fetch_row($result$dbi)) {
               
      $posttitle str_replace ("_"" "$posttitle);
               
      $posttitle str_replace ("."" "$posttitle);
               
      $content .= "<strong><b>&middot;</b></strong> <a href=\"http://forum.cdrsoft.cc/showthread.php?threadid=$threadid\" target=\"_blank\">$posttitle</a>";
      }

      $query "SELECT userid, lastactivity FROM session";
      $result mysql_query($query,$sql_id_forum);
      $users 0;

      while(list(
      $userid$lastactivity) = sql_fetch_row($result$dbi)) {
               
      $date time()+160;
               if(
      $lastactivity >= ($date 15*60))
                
      $users++;
      }
      $content .= "$users users online";
      $content .= "</table>";
      sql_logout($sql_id_forum);
      ?>
      Life plays with us, like the wind with the leaf
      Success: It is not the position you stand, but the direction in which you look.

    3. thank you very much i appreciate it a lot
      http://www.rpgwh.net

    4. #4
      Join Date
      Sep 2001
      Location
      Austria
      Posts
      2,600
      No problem
      Life plays with us, like the wind with the leaf
      Success: It is not the position you stand, but the direction in which you look.


    Tags for this Thread

    Posting Permissions

    • You may post new threads
    • You may post replies
    • You may not post attachments
    • You may not edit your posts
    Powered by vBulletin™ Version 4.0.3 Copyright © 2012 vBulletin Solutions, Inc. All rights