Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BBtoNuke Mods
Author Message
redhairz
Worker
Worker



Joined: Nov 17, 2006
Posts: 222

PostPosted: Sat Jun 23, 2007 2:52 am Reply with quote

Hi ravan team i notice forum with last 5 post or recent post had help poster to look out on the recent post, can anyone tell me where to find this mod forum similar to raven site.? Thanks alot manz. Embarassed

_________________
Jesus is Alive, He is our joy, be it good times or bad time. 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Sat Jun 23, 2007 10:00 am Reply with quote

Do you mean stickys? If not, can you give a link or screenshot?

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
Loki
Worker
Worker



Joined: Oct 05, 2003
Posts: 107
Location: Illinois

PostPosted: Sun Jun 24, 2007 4:46 pm Reply with quote

I think red is referring to the Recent Posts v2.3.3.
 
View user's profile Send private message Visit poster's website
redhairz







PostPosted: Tue Jun 26, 2007 3:17 pm Reply with quote

No no i mean the forum mod called recent post mod. what it does is in the forum index can show a recent post of 5 or 10. To save user time to seach for the latest discussion topic.

recent post v2.3.3? whats that?
 
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Tue Jun 26, 2007 5:54 pm Reply with quote

This isn't a forum mod, it is a center block. Is that what you mean?

Code:


<?php
// By Gremmie

if (!defined('BLOCK_FILE'))
{
    Header("Location: ../index.php");
    die();
}

global $prefix, $db, $sitename;

$sql = 'SELECT t.topic_title, p.post_time, p.post_id, u.username ' .
  "FROM {$prefix}_bbtopics AS t, {$prefix}_bbforums AS f, {$prefix}_bbposts AS p, {$prefix}_users as u " .
  'WHERE t.forum_id = f.forum_id AND f.auth_view = 0 AND p.topic_id = t.topic_id AND p.post_id = t.topic_last_post_id ' .
  'AND p.poster_id = u.user_id ' .
  'ORDER BY p.post_time DESC LIMIT 0, 10';

$result = $db->sql_query($sql);
if ($db->sql_numrows($result) > 0)
{
   $forumLink     = 'forums.html';
   $forumPostLink = $forumLink . '&amp;file=viewtopic&amp;p=';
   $content = '<center>Join us in our forums for some lively discussions. Here are the latest forum threads with ' .
      'new posts:<br /><br /><table border="0">';
   while ($row = $db->sql_fetchrow($result))
   {
      $title   = $row['topic_title'];
      $time    = strftime('%I:%M %p %b %d', intval($row['post_time']));
      $pid     = intval($row['post_id']);
      $pidStr  = $pid . '#' . $pid;
      $uname   = $row['username'];

      $content .= '<tr><td align="left"><img src="images/arrow.gif" border="0" alt="arrow" />&nbsp;';
      $content .= '<a href="' . $forumPostLink . $pidStr . '">' . $title . '</a> by ' . $uname .
         ' at ' . $time . '</td></tr>';
   }
   $content .= '</table>';
   $content .= "<br /><a href=\"$forumLink\"><b>$sitename Forums</b></a><br /><br /></center>";
}
else
{
   $content = '<center><i>No forum info available at this time.</i></center>';
}

?>


Unfortunately it won't work as is because the forums software here keeps changing: (spaces added by me)

$forumLink = 'modules . php ? name = Forums';

Into

$forumLink = 'forums.html';

So make that change before you try it.

Laughing

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
redhairz







PostPosted: Tue Jun 26, 2007 8:51 pm Reply with quote

haha Gremmie i was talking abt the forum mod, i had the forum center block for the index. Anyway your help is thanksful Smile
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BBtoNuke Mods

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©