This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

View posts since last visit

Old posts that have not been replied to for several years.
Locked
P
PLUGGER
Voice
Posts: 24
Joined: Sat Nov 30, 2002 6:54 am
Contact:

View posts since last visit

Post by PLUGGER »

hey slennox, would you consider this little hack, all it does is show exactly how many posts there have been since last visit. i thin its a must for every forum, and comes in very handy...

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 
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

I'm sure it has merit but I try to avoid installing everyone's favourite mod or theme. The more mods and themes there are, the more complicated forum maintenance becomes, with patch upgrades often failing, and having to check whether updates are available for each mod/theme. There are about ten installed at the moment, which is near my limit for long-term sustainability :)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

With every forum upgrade usually all the mods get overwritten and then you have to run around (like a headless chook in my case) and spend valuable time re-editing everything to get it back the way you had it set.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Locked