[RC] NV "Who Was Here?" 1.0.0 - English

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling

[RC] NV "Who Was Here?" 1.0.0 - English

Post by nickvergessen »

Modification Name: NW "Who was here?"
Author: nickvergessen

Modification Version: 1.0.0
Modification Description:
  • Adds a list with all users, which visited the page today, on the index.php.
    With saving the record of usercount.
    Features:
  • en-/disable bots in the list (adjustable in ACP)
  • en-/disable hidden users in the list (adjustable in ACP)
  • en-/disable guests in the record (adjustable in ACP)
  • en-/disable visit-time in the list or as "hover" on the name (adjustable in ACP)
  • "Who was here?" or "Who was here in the last time?" (adjustable in ACP)
  • display and store the record (in ACP)
  • reset-function (in ACP)
  • time is displayed with user-timezone and dst(daylight-saving-time) adjustment of the ucp
  • usernames are coloured
Demo URL: http://www.flying-bits.org/index.php
Supported Language-Packages: de, en
Supported Styles: prosilver, subsilver2

MOD Repository: http://code.bantux.org/svn/nv-who-was-here (SVN/Subversion)
Browse Repository: http://code.bantux.org/repositories/sho ... o-was-here

Modification Download: Download v1.0.0
Last edited by nickvergessen on Tue Apr 07, 2009 4:19 pm, edited 41 times in total.
No Support via PM
User avatar
ac_roma
Registered User
Posts: 321
Joined: Thu Mar 08, 2007 2:48 pm
Location: egypt,alexandria

Re: [BETA] who was here 0.1.0

Post by ac_roma »

this kind of mods was made high db load on phpbb2

i hope dont in phpbb3 :)
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling

Re: [BETA] who was here 0.1.0

Post by nickvergessen »

ac_roma wrote:this kind of mods was made high db load on phpbb2
i hope dont in phpbb3 :)
i don't know.. my forum with the most user is 25 actives so i don't know whether the traffic is too high

edit: spotted a large mistake... took it off till i fixed it...
No Support via PM
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling

Re: [BETA] who was here 0.1.1

Post by nickvergessen »

hm i fixed 3 bugs...

here it is again...
now version 0.1.1 (still beta)
update-instruction is included
Last edited by nickvergessen on Sat May 26, 2007 10:39 pm, edited 1 time in total.
No Support via PM
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling

Re: [BETA] who was here 0.1.2

Post by nickvergessen »

and again 2bugs fixed:
1. if there was no member online yet, there was nothing displayed behind "members:".
now there is the language-variable for "NO_ONLINE_USERS".
2. Bots are now displayed as well.

(update instruction from version 0.1.1 is also included in the packet)
No Support via PM
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [BETA] who was here 0.1.2

Post by IPB_Refugee »

Hi nickvergessen,

thanks for the MOD!

How many additional queries does your MOD need on the index page? (You can test it by turning the debug mode on in config.php. Then look at the footer.)

Regards
Wolfgang
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling

Re: [BETA] who was here 0.1.2

Post by nickvergessen »

IPB_Refugee wrote:How many additional queries does your MOD need on the index page? (You can test it by turning the debug mode on in config.php. Then look at the footer.)
in the code i counted 10 Querys. This is worst case... if you don't submit a new userrecord it's 6
No Support via PM
powerful_rogue
Registered User
Posts: 118
Joined: Sun Feb 11, 2007 2:44 pm

Re: [BETA] who was here 0.1.2

Post by powerful_rogue »

Going to sound silly here, but I cant even get past the first step! I get this error when I try and runt he SQl

Code: Select all

Parse error: syntax error, unexpected T_LNUMBER in /mnt/web5/50/39/51546739/htdocs/dover/db_update.php on line 67
Im guessing it hasnt changed since phpBB2 and you can still use a database generator, upload the db_update.php file and run it?
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling

Re: [BETA] who was here 0.1.2

Post by nickvergessen »

powerful_rogue wrote:Im guessing it hasnt changed since phpBB2 and you can still use a database generator, upload the db_update.php file and run it?
It hasn't changed and so it doesn't work ;)
No Support via PM
powerful_rogue
Registered User
Posts: 118
Joined: Sun Feb 11, 2007 2:44 pm

Re: [BETA] who was here 0.1.2

Post by powerful_rogue »

Ah right.

Any idea what the error is?
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling

Re: [BETA] who was here 0.1.2

Post by nickvergessen »

i don't know how the file looks like that you use!
No Support via PM
powerful_rogue
Registered User
Posts: 118
Joined: Sun Feb 11, 2007 2:44 pm

Re: [BETA] who was here 0.1.2

Post by powerful_rogue »

Sorry, Im guessing it would help if you could see the file!

Code: Select all

<?php
/***************************************************************************
 *                               db_update.php
 *                            -------------------
 *
 *   copyright            : ©2003 Freakin' Booty ;-P & Antony Bailey
 *   project              : http://sourceforge.net/projects/dbgenerator
 *   Website              : http://freakingbooty.no-ip.com/ & http://www.rapiddr3am.net
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//


if( !$userdata['session_logged_in'] )
{
	$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
	header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));
	exit;
}

if( $userdata['user_level'] != ADMIN )
{
	message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}


$page_title = 'Updating the database';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';


$sql = array();
$sql[] = "CREATE TABLE `" . $table_prefix . "wwh_counter_ips` (
`ip` VARCHAR( 15 ) NOT NULL ,
PRIMARY KEY ( `ip` )
)";
$sql[] = "INSERT INTO " . $table_prefix . "config( config_name, config_value, is_dynamic )
VALUES ('wwh_counter_date', '0', '1')";
$sql[] = "INSERT INTO " . $table_prefix . "config( config_name, config_value, is_dynamic )
VALUES ('wwh_record_time', '0', '1')";
$sql[] = "INSERT INTO " . $table_prefix . "config( config_name, config_value, is_dynamic )
VALUES ('wwh_counter_ips', '0', '1')";
$sql[] = "ALTER TABLE `" . $table_prefix . "users` ADD `user_lastpage_time` varchar(20)  DEFAULT "0" NOT NULL AFTER user_lastpage";

for( $i = 0; $i < count($sql); $i++ )
{
	if( !$result = $db->sql_query ($sql[$i]) )
	{
		$error = $db->sql_error();

		echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
	}
	else
	{
		echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successful</b></font></li><br />';
	}
}


echo '</ul></span></td></tr><tr><td class="catBottom" height="28">&nbsp;</td></tr>';

echo '<tr><th>Installation Complete</th></tr><tr><td><span class="genmed">Please be sure to delete this file now.<br />If you require any further assistance, please visit the <a href="http://www.phpbbhacks.com/forums">phpBBHacks.com Support Forums</a>.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Go back to your index page</a>.</span></td></table>';

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Line 67 is

Code: Select all

$sql[] = "ALTER TABLE `" . $table_prefix . "users` ADD `user_lastpage_time` varchar(20)  DEFAULT "0" NOT NULL AFTER user_lastpage";
powerful_rogue
Registered User
Posts: 118
Joined: Sun Feb 11, 2007 2:44 pm

Re: [BETA] who was here 0.1.2

Post by powerful_rogue »

Was my error, ignore the above!

Got the mod installed and it works great!

Couple of questions!

1) How do i remove the time after the name?
Eg

Powerful_Rogue (last at 16.01)

2)
How do I change "In total there was 1 user online " to "In total 1 user has visited this site today "
User avatar
nepukjon
Registered User
Posts: 116
Joined: Sat Jul 23, 2005 8:07 pm
Location: Cardiff. S. Wales

Re: [BETA] who was here 0.1.2

Post by nepukjon »

Did any language files get edited? Did any come with the mod? Check those first, should be there. If not ill have a look through and see what its like.

Thats if no one answers your queiry first :)
knowledge is knowing a tomato is a fruit, wisdom is not putting it in a fruit salad
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling

Re: [BETA] who was here 0.1.2

Post by nickvergessen »

nepukjon wrote:Did any language files get edited? Did any come with the mod? Check those first, should be there. If not ill have a look through and see what its like.
till now i edited the common.php language file...
but this evening there'll be a new version which has it's own language file...

@powerful_rogue: i'll answer your question afterwards, ok?
No Support via PM

Return to “[3.0.x] MODs in Development”