Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
Blues
Regular
Regular



Joined: Jun 17, 2006
Posts: 81
Location: MD

PostPosted: Sun Jul 30, 2006 7:46 pm Reply with quote

A search of the forum didn't come up with what I am looking for, so I figure I should ask.

Previously, when operating a phpbb forum, there was a hack for displaying the number of posts since last visit in parenthesis, next to "View posts since last visit"

This number never decreased or anything, it did increase though with each page refresh if there were new posts.

I see it in use on Nuke sites, but can't find the actual code for it, except on phpbbhacks site.

I assume I can use the code supplied in the .mod for phpbb, but there is sure to be some conflict. Anyone implement this and know what changes are needed to make it compliant?

Here is the code from the MOD for phpbb

Code:
#

#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//
#
#-----[ AFTER ADD ]------------------------------------------
#
if( $userdata['session_logged_in'] )
{
   $sql = "SELECT COUNT(post_id) as total
      FROM " . POSTS_TABLE . "
      WHERE post_time >= " . $userdata['user_lastvisit'] . "
      AND poster_id != " . $userdata['user_id'];

   $result = $db->sql_query($sql);
   if( $result )
   {
      $row = $db->sql_fetchrow($result);
      $lang['Search_new'] = $lang['Search_new'] . " (" . $row['total'] . ")";
   }
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


I am sure the POSTS_TABLE needs to be changed, but what else?
 
View user's profile Send private message Visit poster's website
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Sun Jul 30, 2006 8:51 pm Reply with quote

Not much to it...why not test? (be sure to backup...).

_________________
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
Blues







PostPosted: Mon Jul 31, 2006 4:40 pm Reply with quote

Well, it appears to work as is, no change necessary. WOOHOO!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

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 ©