Page 5 of 20

Re: [RC1] Visitors Today

Posted: Wed Jun 27, 2007 9:24 am
by vw_speedsterke
vw_speedsterke wrote:the mod have working 2 days perfectly, but now i have an error if i will start my forum

SQL ERROR [ mysqli ]

Duplicate entry '841' for key 1 [1062]


what can i do
i have now install visitors_today_1.0.2rc1 and my problem is away

Re: [RC1] Visitors Today

Posted: Wed Jun 27, 2007 12:35 pm
by Stitch625
Thank you TIM3PORT,

If anyone knows how to update the first version so it goes by board time instead of server time, that would be very much appreciated. Based on all the errors everyone is having with 2nd version, I do not want to update. The first version is working nice except it resets at midnight server time wich is a 3 hour difference from my board time.

Re: [RC1] Visitors Today

Posted: Wed Jun 27, 2007 3:19 pm
by TIM3PORT
stich I think that is done via the functions php file he included Id say grab the file and look through it it's almost double the size from the old one that's for sure

Re: [RC1] Visitors Today

Posted: Wed Jun 27, 2007 3:52 pm
by Anti.Social
I will roll back the main post in this thread to version 1.0.1 RC1 until I can fix the bugs that have been found in 1.0.2 RC1, which as far as I am aware, worked fine. The bugs in 1.0.2 RC1 are inherant to the "new features" that users have requested, and I think, are mosly the cause of an attempt at extending "hidden" user handling.

So, for the time being, I would suggest that everybody roll back to v1.0.1 RC1. You can do that by simply replacing the includes/functions_visitors.php file that came with v1.0.2 RC1 with includes/functions_visitors.php from v1.0.1 RC1. The extra entries in your config database will affect nothing, and it will not matter if you leave them there.

I'm sorry for the inconvience, I will get back to testing & fixing the bugs caused by the addition of new features in the latest version and will attempt to have it available thursday or friday morning.

Re: [RC1] Visitors Today

Posted: Wed Jun 27, 2007 4:28 pm
by TIM3PORT
can you try and add the option of keep data of the last 24 hours instead of reseting at midnight?

Re: [RC1] Visitors Today

Posted: Wed Jun 27, 2007 7:44 pm
by Anti.Social
that option is present already, just enter 86401 instead of 86400 and it should drop all entries older then 24 hours and 1 second.

Re: [RC1] Visitors Today

Posted: Wed Jun 27, 2007 7:45 pm
by Dr.Death
Tip:

to be XHTML 1.0 Strict change in the includes/functions_visitors.php the following codes:

SEARCH twice and REPLACE WITH twice:

SEARCH FOR:

Code: Select all

memberlist.php?mode=viewprofile&u=
REPLACE WITH:

Code: Select all

memberlist.php?mode=viewprofile&u=

Re: [RC1] Visitors Today

Posted: Wed Jun 27, 2007 8:42 pm
by TIM3PORT
Anti.Social wrote:that option is present already, just enter 86401 instead of 86400 and it should drop all entries older then 24 hours and 1 second.
doesn't it still reset at midnight?

Re: [RC1] Visitors Today

Posted: Wed Jun 27, 2007 11:49 pm
by Stitch625
TIM3PORT wrote:stich I think that is done via the functions php file he included Id say grab the file and look through it it's almost double the size from the old one that's for sure
I admit, I am not very good at coding, and I have no idea how to make the mod reset with board time insted of server time. Can someone please help out with this one?

This can't be that hard of a change can it?

Thanks ;)

Re: [RC1] Visitors Today

Posted: Thu Jun 28, 2007 8:23 am
by thehawke
I'm getting the following:
In total there were 0 users online :: 1 registered user, 1 hidden user, 1 bot, and 1 guest.
(This data based on users active during Thursday Jun 28th 2007)
The most ever members to visit in one day was 0 on Wednesday December 31st, 1969

Registered Visitors : Yahoo! [Bot], martsmart, thehawke
Why is it saying there are 0 users online yet there are obviously 4? And why is the date 1969? Or rather how can I fix it so it totals the number online and puts in the correct date?

ETA: nevermind. I rolled back to RC1 and it seems to be functioning properly. Thanks for this. Had a request for it.

Re: [RC1] Visitors Today

Posted: Thu Jun 28, 2007 6:29 pm
by Anti.Social
I'm working on a fix for the newest version, which will now be 1.0.3 RC1, adding several of the requested features, as well as fixing the problems that arose when they were added to 1.0.2 RC1. I'll have it tested some more, and posted sometime tomorrow morning, sorry for the wait guys.

Re: [RC1] Visitors Today

Posted: Thu Jun 28, 2007 6:33 pm
by Anti.Social
TIM3PORT wrote:
Anti.Social wrote:that option is present already, just enter 86401 instead of 86400 and it should drop all entries older then 24 hours and 1 second.
doesn't it still reset at midnight?

No, it would work like this:

Say, Joeblow visited 23h 59m 40s ago, you are viewing your forum index, he is listed. Now, 22 seconds later, you refresh the page, Joeblow would no longer be on the list because his entry in the database is older then 24h 00m 01s and would there for get dumped by the cleaning routine in the beginning of the script.

The way the script works, is if you set the time to exactly 1 day (86400 seconds) then it will asume you want it to refresh @ midnight, then using a small specialized function it calculates the time() value for midnight of that day. If you set a slighly higher value it will dump ANYTHING OLDER then that value, no matter the actual time of day.

Re: [RC1] Visitors Today

Posted: Thu Jun 28, 2007 6:58 pm
by Stitch625
Anti.Social wrote:
TIM3PORT wrote:
Anti.Social wrote:that option is present already, just enter 86401 instead of 86400 and it should drop all entries older then 24 hours and 1 second.
doesn't it still reset at midnight?

No, it would work like this:

Say, Joeblow visited 23h 59m 40s ago, you are viewing your forum index, he is listed. Now, 22 seconds later, you refresh the page, Joeblow would no longer be on the list because his entry in the database is older then 24h 00m 01s and would there for get dumped by the cleaning routine in the beginning of the script.

The way the script works, is if you set the time to exactly 1 day (86400 seconds) then it will asume you want it to refresh @ midnight, then using a small specialized function it calculates the time() value for midnight of that day. If you set a slighly higher value it will dump ANYTHING OLDER then that value, no matter the actual time of day.
Now if you could could just make the mod reset with board time instead of server time, that would be awesome. Sorry I keep posting the same thing but I haven't heard a response on this yet. ;)

Re: [RC1] Visitors Today

Posted: Thu Jun 28, 2007 7:53 pm
by TIM3PORT
Anti.Social wrote:No, it would work like this:

Say, Joeblow visited 23h 59m 40s ago, you are viewing your forum index, he is listed. Now, 22 seconds later, you refresh the page, Joeblow would no longer be on the list because his entry in the database is older then 24h 00m 01s and would there for get dumped by the cleaning routine in the beginning of the script.

The way the script works, is if you set the time to exactly 1 day (86400 seconds) then it will asume you want it to refresh @ midnight, then using a small specialized function it calculates the time() value for midnight of that day. If you set a slighly higher value it will dump ANYTHING OLDER then that value, no matter the actual time of day.
I set it to one second more like you showed earlier but at midnight it flushed the table.

Re: [RC1] Visitors Today

Posted: Thu Jun 28, 2007 9:17 pm
by Anti.Social
Stitch625 wrote: Now if you could could just make the mod reset with board time instead of server time, that would be awesome. Sorry I keep posting the same thing but I haven't heard a response on this yet. ;)
This will be an option in the newest version.
TIM3PORT wrote:I set it to one second more like you showed earlier but at midnight it flushed the table.

Code: Select all

(($config['visit_use_boardtimezone'] == true)) ? $today->time = time() + ($config['board_timezone'] * 3600) : $today->time = time();
if($config['visit_delete_threshold'] == 86400)
{
	// This will start fresh every night @ midnight according to $config['board_timezone']
	$today->stale_date = (convert_timestamp(date('d')) + ($config['board_timezone'] * 3600));
} else {
	// This will be current time minus the delete threshold relative to $config['board_timezone']
	$today->stale_date = $today->time - $config['visit_delete_threshold'];
	$extra_period_date = sprintf($user->lang['VISITORS_EXTRA_EXPLAIN'], $user->format_date($today->stale_date - ($config['board_timezone'] *3600), $config['visit_time_format_hma']), $user->format_date(time(), $config['visit_time_format_hma']));
}
says otherwise. note this is code from the newest version, but the same basic function is performed in ALL versions.