Code: Select all
##########################################################################################
## MOD Title: Number of Posts Since Last Visit
## MOD Author: mitsubishi <mitsubishiuk@aol.com> (Adam Ismay) http://www.boardz.tk/
## MOD Description: This MOD will add the number of new posts after the link on
## index page to view new posts.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: ~1 Minutes
## Files To Edit: index.php
## Included Files: none
##########################################################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious
## code to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not
## offered in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##########################################################################################
## Authors Note:
##
## The number in brackets is posts. When you click it and search,
## the results are given as topics.
##
##########################################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##########################################################################################
#
#-----[ 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'];
$result = $db->sql_query($sql);
if( $result )
{
$row = $db->sql_fetchrow($result);
$lang['Search_new'] = $lang['Search_new'] . " (" . $row['total'] . ")";
}
}
#
#-----[ SAVE ALL FILES ]------------------------------------------
#
# EoM