############################################################## 
## MOD Title: View New Topics Count
## MOD Author: Nightrider < phpbb@4fxearth.net > (Blake) http://4fxearth.net/phpBB2
## MOD Description: Adds the number of new Topics to the "View topics since last visit"
## 	   				link on the Index page.  This does not eliminate topics posted
##					in forums that cannot be viewed by the member though... 
## MOD Version: 1.0.0
## 
## Installation Level: Easy
## Installation Time: 1 Minute using EasyMod 
## Files To Edit: 1
##                includes/page_header.php
##
## Included Files: 0
############################################################## 
## Author Notes:
##
############################################################## 
## MOD History:
##
## 2007-06-19 Release date
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
# 
#-----[ OPEN ]------------------------------------------ 
#
includes/page_header.php
# 
#-----[ FIND ]------------------------------------------ 
# 
$template->assign_vars(array(
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
if( $userdata['session_logged_in'] ) 
{ 
   $sql = "SELECT COUNT(topic_id) as total 
      FROM " . TOPICS_TABLE . " 
      WHERE topic_time >= " . $userdata['user_lastvisit'] . " 
      AND topic_poster != " . $userdata['user_id'] . " 
      AND topic_first_post_id > " . 0 ; 
       
   $result = $db->sql_query($sql); 
   if( $result ) 
   { 
      $row = $db->sql_fetchrow($result); 
      $lang['Search_new_topics'] = $lang['Search_new_topics'] . " (" . $row['total'] . ")"; 
   } 
   $db->sql_freeresult($result); 
}
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM