Page 1 of 20

[ABD] Visitors Today (1.0.4)

Posted: Wed Jun 20, 2007 7:38 pm
by Anti.Social
MOD Title: Visitors Today.
MOD Description: Adds a list of users who visited today on the forum index. Complete with user count, total, and break down of all users.
» Enable/Disable display/counting of bots via ACP
» Enable/Disable display/counting of guests via ACP
» Enable/Disable display of hidden users to admins/moderators via ACP
» Enable/Disable display of last visit time on hover via ACP
» Enable/Disable the use of user/group colors in the visitors list via ACP
» Enable/Disable use of board timezone via ACP
» Configure what is displayed via the ACP, tons of new options to play with.
» ACP configurable tracking threshold, allowing for easy customization of how long ago to display visitors from
» Ability to control format used to display date/times via ACP (The date format is the same as the PHP date function.)
» Simple database setup & template cache clearing install script included (you will still need to use either the pre-modded files, or manually modify your board.)

» It manages all of this with just sql 4 queries. (6 when setting a new record for # of visitors in a set period)
» Update from previous versions included in 1.0.4 RC2
» Correctly handles permissions for displaying hidden users

» Tested on phpBB3.0 RC2/RC3, current version RC2/RC3 compatible, not tested w/ RC1 or earlier!

» Beta tested by the users/members of and my forum whore ZOLE to whom goes a special thanks.

MOD Version: 1.0.4 RC2
MOD Download: Main Download Site (This allows me to track the # of downloads so I know how popular this mod is)
Mirror #1: WikiUpload Mirror
Mirror #2: Mirror
Updated: 7/10/2007
Last Stable version: 1.0.4 RC2

Language Files (comming soon?)
en (included in package)
German (Thanks to IPB Refugee aka Wolfgang)
Dutch (Thanks to rohithathie)

Demo Board: (currently running v1.0.4RC2 & phpBB3.0RC3)
Demo Username: Not Required
Demo Password: Not Required

(Updated Screenshots comming w/ version 1.0.4 RC2)
forum index as normal user w/ hidden users ... normal.jpg

forum index as admin w/ hidden users ... _admin.jpg

last visit hover ... _hover.jpg

ACP Board Settings

ACP Main/Index

Re: [RC1] Visitors Today

Posted: Thu Jun 21, 2007 2:23 am
by Stitch625
I posted this originally in the wrong thread :oops:

Hello Anti,

I would like to try your mod out. However can you make it so it resets the count and list at midnight? The mod says 24 hours is the default. Default from what time? The time from when you install the mod?

Kind of confused how it works?

[EDIT] Ok so I am A little impatiant. I went ahead and installed it and it seems to be working so far. The only thing that is not working is the time does not show even though I have it checked to yes in the ACP and the Bots show even though I have them set to NO.

Re: [RC1] Visitors Today

Posted: Thu Jun 21, 2007 5:04 pm
by Anti.Social
I have updated the mod, posted a new screenshot explaining the "Last Visit Hover" and updated the above post.

For users who have v1.0.0RC1 installed simply extract the 'root/includes/functions_visitors.php' file from v1.0.1RC1 over your existing 'root/includes/functions_visitors.php' to updated as that is the only file to be changed between versions.

Let me know if you encounter any other errors.

BTW: Default delete threshold of 86400 will cause the mod to use 12:00AM (midnight, SERVER TIME!!!) as the oldest allowed visitors time, anything prior to this will be purged from the database upon ANYBODY visiting the forums. Example: you have a vistors list that looks like : "In total there were 18 users online :: 48 registered users, 15 hidden users, 10 bots and 85 guests." ..... etc... @ 11:59:59PM tonight, the next person to visit your forums, refresh a page, etc. will cause this mod to purge the previous days visitors data.

Setting a delete threshold of anything other then 86400 will result in the mod purging the database every required intervul, Example: If you set delete threshold to 3600 then the mod will purge of ANYTHING older then 1 HOUR FROM WHEN THE PAGE WAS LAST LOADED.

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 1:04 am
by Stitch625
DUDE! This mod ROCKS! Totally awsome job! This mod does exactly what I want it to do. I have tried 3 other similar mods like this but they either have bugs, run way too many queries or don't have all the options I was used to with the Last Visit mod for phpbb2.

I must say, you worked the bugs out of this one in a hurry. I just love the last visit hover option. Very professional!. So far since I have dowloaded your latest version today it is working perfectly!

Thank you very much! KUDOS!

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 1:05 am
by Stitch625
oops double post

sorry. No delete button.

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 3:45 am
by notaloafer
SQL ERROR [ mysql4 ]

Unknown column 'u.user_id' in 'on clause' [1054]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.

I followed the directions....


Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 5:44 am
by cillinz
The same error for me :/

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 7:33 am
by LuckyPip
And same here - something to do with line 82 in functions_visitors.php, I believe

Code: Select all

$result = $db->sql_query($sql);$i=-1; $today->visitlist = array();
Hope this will get fixed quickly as I believe I'm gonna like this nifty little MOD :P

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 2:26 pm
by spollin
same issue for me too :( looking forward to it getting fixed as it seems like a nice little mod indeed :)

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 3:52 pm
by Stitch625
I am no coder or anything but It almost seems like your guys problem has something to do with the DB queries. Did you install all of the queries that came with the mod.

I installed mine and first time around it is working perfectly.

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 5:50 pm
by freestyler
Where do I add the database queries? I'm getting this error,

This wasn't the easiest mod to install for a first-timer. :?

I don't know where this code goes. Do I go into myphpadmin to add it?

Code: Select all

DROP TABLE IF EXISTS `phpbb_visitors_table`;
CREATE TABLE `phpbb_visitors_today` (
  `index` int(11) NOT NULL auto_increment,
  `user_id` int(1) NOT NULL default '0',
  `user_ip` varchar(15) NOT NULL default '',
  `allow_viewonline` tinyint(1) NOT NULL default '0',
  `last_visit` int(11) NOT NULL default '0',
  PRIMARY KEY  (`index`)

INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('visit_display_bots', '1', 1);
INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('visit_display_time', '1', 1);
INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('visit_display_color', '1', 1);
INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('visit_display_hidden', '1', 1);
INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('visit_delete_threshold', 86400, 1);
INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('visit_record_count', '0', 1);
INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('visit_record_date', '0', 1);

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 6:00 pm
by elcochino6
I have installed the mod as instructed in the xml file, and it appears to have worked in the sense that there are no errors showing. I do not however show any users there and am having trouble finding the settings in the acp. please check out my board and let me know what could be going on... Thanks

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 6:23 pm
by Paul
To fix the mysql that happens with mysql5 (For error see above) replace in includes/functions_visitors.php

Code: Select all

                ' . USERS_TABLE . ' u,
                ' . VISITORS_TABLE . ' v 

Code: Select all

        FROM (
                ' . USERS_TABLE . ' u,
                ' . VISITORS_TABLE . ' v )
around line 76.

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 6:40 pm
by elcochino6
i rechecked everything and tried again, but this time I got the error on line 82, I have uninstalled and backed up my database to a previous version, all seems to be back to normal, but I was unable to successfully get the mod working.

Re: [RC1] Visitors Today

Posted: Fri Jun 22, 2007 6:47 pm
by Stitch625

You need to open up phpmyadmin. Hopefully you have it. Select your DB and click the button at the top that says SQL and a text area should appear. Just copy that query code into the box and click go. it will come back and let you know if everything went ok.

Good Luck

PS. You may have to change your db prefix in the query code to match your if it's different.

For example: My db tables prefix is phpbb3

so in other words

Code: Select all

INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('visit_display_bots', '1', 1);

Code: Select all

INSERT INTO `phpbb_3config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('visit_display_bots', '1', 1);