[ABD] Visitors Today (1.0.4)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
freestyler
Registered User
Posts: 31
Joined: Thu Dec 08, 2005 11:13 pm
Location: Kentucky
Contact:

Re: [RC1] Visitors Today

Post by freestyler » Fri Jun 22, 2007 7:11 pm

phew, I didn't know if I did that right. I ran the code in phpmyadmin and its giving me this database error.

http://www.meanmug.org/forum

I've run it a second time and it tells me the tbl exists.
Last edited by freestyler on Fri Jun 22, 2007 8:08 pm, edited 1 time in total.

Anti.Social
Registered User
Posts: 51
Joined: Wed Dec 13, 2006 6:12 pm
Location: 6' Under with no marker
Contact:

Re: [RC1] Visitors Today

Post by Anti.Social » Fri Jun 22, 2007 7:32 pm

Ok, it looks like you guys have either not ran the sql queries correctly, or perhaps are using a different version of mysql? Like stated before, please make sure to change the 'phpbb_' from the required sql lines to MATCH EXACTLY! the "$table_prefix = "";" line from your config.php file. I suggest paul's modification to the sql query posted above for people who are SURE they have done the required SQL statements via phpMYAdmin or another method. The only version of mysql (or any database engine) I have tested this on is the one stated above in the mod description.

@elcochino6 : Are you sure you completed the template modifications? are you sure you did them for ALL installed templates? or atleast the default template if your board is set to override user settings. Also, you will find the settings for this on the "General" tab of your ACP under "Board Settings" option. Another suggestion, did you remember to clear your templates cache via the ACP as instructed in the DIY section of the install?

If you are sure you did the template edits correctly, try this:

FIND:

Code: Select all

for($i=0; $i < count((isset($today->visitlist)) ? $today->visitlist : '0'); $i++)
{	$today->compiledList .= $today->visitlist[$i];
	$today->compiledList .= ((count($today->visitlist) -1) !== $i) ? ', ' : '';
REPLACE WITH:

Code: Select all

print_r($today->visitlist);
for($i=0; $i < count((isset($today->visitlist)) ? $today->visitlist : '0'); $i++)
{
//	$today->compiledList .= $today->visitlist[$i];
//	$today->compiledList .= ((count($today->visitlist) -1) !== $i) ? ', ' : '';
This will show you if any data is infact in that array. For a while, I had a problem where it wouldn't actually show the usernames, even though they were in the array, but fixed that rather early on.

@ Freestyler: It looks as if your mysql password doesn't match to the mysql username your attempting to use? Did you (or someone else) either modify the config.php file or change the actual password for the database? This doesn't look like something that could be caused by running the sql for this mod, or performing the edits instructed to be done.

@ Stitch: Thanks for the feedback ;) I myself wanted something that was simple, fast, and actually worked the way I expected it too. Just glad some body else finds it useful as well.

I will add the pre-modded files from the demo site to the next update/release of this package, hopefully along with an install_db.php file that will piggy back on phpBB to help those of you who might be having trouble getting the sql executed correctly. However, today is Friday, and I dont code on the weekends, so expect this either Monday, or Tuesday, that is, if you are expecting it at all ;) I do appologize for any inconvience and troubles that you may be encountering with my little mod (thats what I tell the wife as well).

freestyler
Registered User
Posts: 31
Joined: Thu Dec 08, 2005 11:13 pm
Location: Kentucky
Contact:

Re: [RC1] Visitors Today

Post by freestyler » Fri Jun 22, 2007 7:51 pm

Anti.Social wrote: @ Freestyler: It looks as if your mysql password doesn't match to the mysql username your attempting to use? Did you (or someone else) either modify the config.php file or change the actual password for the database? This doesn't look like something that could be caused by running the sql for this mod, or performing the edits instructed to be done.
Bah! I accidentally changed the password when I tried logging into myphpadmin (go figure). I'll update it in the files. Thanks.

[added] Mod is working perfectly. Thanks!

elcochino6
Registered User
Posts: 22
Joined: Mon May 14, 2007 5:58 pm
Contact:

Re: [RC1] Visitors Today

Post by elcochino6 » Fri Jun 22, 2007 9:30 pm

Started over again to try to get this working, and thistime I got even more errors while trying to install... I followed the directions exactly, and got the following errors.

Code: Select all

General Error
SQL ERROR [ mysql4 ]

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

SQL

SELECT u.user_id, u.username, u.user_type, u.group_id, u.user_colour, u.user_allow_viewonline, v.allow_viewonline, v.user_id, v.last_visit, b.bot_id FROM phpbb_users u, phpbb_visitors_today v LEFT JOIN phpbb_bots b ON (b.user_id = u.user_id) WHERE u.user_id = v.user_id ORDER BY u.user_type DESC

BACKTRACE


FILE: includes/db/mysql.php
LINE: 133
CALL: dbal->sql_error()

FILE: includes/functions_visitors.php
LINE: 82
CALL: dbal_mysql->sql_query()

FILE: includes/functions.php
LINE: 4069
CALL: include('includes/functions_visitors.php')

FILE: index.php
LINE: 124
CALL: page_header()

I would really like to get this working, any suggestions would be greatly appreciated.

Btw I sql'ed everything in the xml, and I cheked my config.php and my prefix is indeed phpbb, so it should be working.
http://www.ifishct.com Fishing reports and information for Connecticut and the Northeast...

IzNoGoud
Registered User
Posts: 3
Joined: Sun May 27, 2007 2:21 pm

Re: [RC1] Visitors Today

Post by IzNoGoud » Fri Jun 22, 2007 9:31 pm

Can I download this somewhere else?
I can't connect to your domain for some reason :cry:

Anti.Social
Registered User
Posts: 51
Joined: Wed Dec 13, 2006 6:12 pm
Location: 6' Under with no marker
Contact:

Re: [RC1] Visitors Today

Post by Anti.Social » Fri Jun 22, 2007 9:57 pm

@ elcochino6:
OPEN root/includes/functions_visitors.php
FIND :

Code: Select all

$sql = 'SELECT  
		u.user_id, 
		u.username, 
		u.user_type, 
		u.group_id, 
		u.user_colour, 
		u.user_allow_viewonline, 
		v.allow_viewonline, 
		v.user_id, 
		v.last_visit, 
		b.bot_id 
	FROM 
		' . USERS_TABLE . ' u, 
		' . VISITORS_TABLE . ' v 
REPLACE WITH :

Code: Select all

$sql = 'SELECT  
		u.user_id, 
		u.username, 
		u.user_type, 
		u.group_id, 
		u.user_colour, 
		u.user_allow_viewonline, 
		v.allow_viewonline, 
		v.user_id, 
		v.last_visit, 
		b.bot_id 
	FROM (
		' . USERS_TABLE . ' u, 
		' . VISITORS_TABLE . ' v )
Let me know if that solves your problem, if not I will attempt to rewrite the sql for that section again.

@ IzNoGoud : Here are 2 mirrors I just setup. They are for the 1.0.1RC1 version, I will post mirrors when I update the code next time as well.
http://www.wikiupload.com/download_page.php?id=164621
http://www.filesend.net/download.php?f= ... 4967e51b5b

IzNoGoud
Registered User
Posts: 3
Joined: Sun May 27, 2007 2:21 pm

Re: [RC1] Visitors Today

Post by IzNoGoud » Fri Jun 22, 2007 9:59 pm

Thank you!

User avatar
LuckyPip
Registered User
Posts: 69
Joined: Fri Dec 03, 2004 4:40 am

Re: [RC1] Visitors Today

Post by LuckyPip » Fri Jun 22, 2007 10:23 pm

Anti.Social wrote:Ok, it looks like you guys have either not ran the sql queries correctly, or perhaps are using a different version of mysql? Like stated before, please make sure to change the 'phpbb_' from the required sql lines to MATCH EXACTLY! the "$table_prefix = "";" line from your config.php file. I suggest paul's modification to the sql query posted above for people who are SURE they have done the required SQL statements via phpMYAdmin or another method. The only version of mysql (or any database engine) I have tested this on is the one stated above in the mod description.
It was not the SQL not being executed correctly or a different version of mySQL, as I am using mySQL and I know for sure I followed your SQL instruction to the dot - it finally worked after following paul999's fix, so obviously that where the problem was

But anyway, thanks for this great MOD - it is an excellent addition to any forums

And thanks to paul999 too for the fix

Have a good weekend ! :D

elcochino6
Registered User
Posts: 22
Joined: Mon May 14, 2007 5:58 pm
Contact:

Re: [RC1] Visitors Today

Post by elcochino6 » Fri Jun 22, 2007 10:46 pm

Anti.Social wrote:@ elcochino6:
OPEN root/includes/functions_visitors.php
FIND :

Code: Select all

$sql = 'SELECT  
		u.user_id, 
		u.username, 
		u.user_type, 
		u.group_id, 
		u.user_colour, 
		u.user_allow_viewonline, 
		v.allow_viewonline, 
		v.user_id, 
		v.last_visit, 
		b.bot_id 
	FROM 
		' . USERS_TABLE . ' u, 
		' . VISITORS_TABLE . ' v 
REPLACE WITH :

Code: Select all

$sql = 'SELECT  
		u.user_id, 
		u.username, 
		u.user_type, 
		u.group_id, 
		u.user_colour, 
		u.user_allow_viewonline, 
		v.allow_viewonline, 
		v.user_id, 
		v.last_visit, 
		b.bot_id 
	FROM (
		' . USERS_TABLE . ' u, 
		' . VISITORS_TABLE . ' v )
that appears to solve the problem, until I go into the acp. when displaying the options for the mod I get these errors at the top of the page:

Code: Select all

[phpBB Debug] PHP Notice: in file /adm/index.php on line 277: Undefined index: visit_delete
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3661)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 155: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3661)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 156: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3661)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 157: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3661)
any ideas? Thanks for your help!
http://www.ifishct.com Fishing reports and information for Connecticut and the Northeast...

Anti.Social
Registered User
Posts: 51
Joined: Wed Dec 13, 2006 6:12 pm
Location: 6' Under with no marker
Contact:

Re: [RC1] Visitors Today

Post by Anti.Social » Sat Jun 23, 2007 12:47 am

quick fix, open includes/acp/acp_board.php

find : 'visit_delete'

replace with : 'visit_delete_threshold'

be back monday.

User avatar
Stitch625
Registered User
Posts: 683
Joined: Wed Jun 20, 2007 3:38 pm
Location: Michigan
Contact:

Re: [RC1] Visitors Today

Post by Stitch625 » Sat Jun 23, 2007 1:51 am

Anti,

The mod isn't counting the bots.
In total there were 25 users online :: 8 registered Members, 0 hidden Members, 0 bots and 17 guests.
(This data based on users active Today Friday Jun 22nd 2007)
I have plenty of bots visiting but they aen't being counted as you can see. Is there a QUICK FIX FOR THIS?

User avatar
bikesandscooters
Registered User
Posts: 44
Joined: Fri Jun 01, 2007 9:49 pm
Location: Australia
Contact:

Re: [RC1] Visitors Today

Post by bikesandscooters » Sat Jun 23, 2007 6:36 am

Works fine for me, I would be checking to see if you installed the mod correctly.
my site looks like this wrote:In total there were 53 users online :: 19 registered users, 0 hidden users, 3 bots and 31 guests.
(This data based on users active during Saturday Jun 23rd 2007)
The most ever members to visit in one day was 53 on Saturday June 23rd, 2007
Cheers Steve
http://www.bikesandscooters.com.au Discussion for bikes and scooters in OZ!

User avatar
Dr.Death
QA Team
Posts: 363
Joined: Fri Apr 25, 2003 10:04 am
Location: Germany
Contact:

Re: [RC1] Visitors Today

Post by Dr.Death » Sat Jun 23, 2007 10:48 am

Hi,

in your file includes/functions_vistors.php i found some "hardcoded" language.

Please swap the title="Last visit: ' to the language file.
Doc.

User avatar
LuckyPip
Registered User
Posts: 69
Joined: Fri Dec 03, 2004 4:40 am

Re: [RC1] Visitors Today

Post by LuckyPip » Sat Jun 23, 2007 11:36 am

bikesandscooters wrote:Works fine for me, I would be checking to see if you installed the mod correctly.
my site looks like this wrote:In total there were 53 users online :: 19 registered users, 0 hidden users, 3 bots and 31 guests.
(This data based on users active during Saturday Jun 23rd 2007)
The most ever members to visit in one day was 53 on Saturday June 23rd, 2007
Works fine for me too, as you can see below (bots were Google and Ask Jeeves)
In total there were 60 users online :: 18 registered users, 2 hidden users, 2 bots and 38 guests.
(This data based on users active during Saturday Jun 23rd 2007)
The most ever members to visit in one day was 60 on Saturday June 23rd, 2007
Anti.Social, just a little suggestion to improve your MOD, I notice that if there was only one member online today, it'd say

Code: Select all

In total there were 1 users
Obviously, that's grammatically incorrect so my suggestion is to do the same as phpbb does for who is online - to put an extra IF command when there was only one user logged in today, to show

Code: Select all

In total there was 1 user
Only a suggestion and should be easily done :D

User avatar
Stitch625
Registered User
Posts: 683
Joined: Wed Jun 20, 2007 3:38 pm
Location: Michigan
Contact:

Re: [RC1] Visitors Today

Post by Stitch625 » Sat Jun 23, 2007 5:58 pm

bikesandscooters wrote:Works fine for me, I would be checking to see if you installed the mod correctly.
my site looks like this wrote:In total there were 53 users online :: 19 registered users, 0 hidden users, 3 bots and 31 guests.
(This data based on users active during Saturday Jun 23rd 2007)
The most ever members to visit in one day was 53 on Saturday June 23rd, 2007
I know the mod is installed correctly. Everything else works just fine.

Locked

Return to “[3.0.x] Abandoned MODs”