[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.
Locked
vw_speedsterke
Registered User
Posts: 2
Joined: Tue Jun 26, 2007 8:07 pm

Re: [RC1] Visitors Today

Post by vw_speedsterke » Wed Jun 27, 2007 9:24 am

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

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 » Wed Jun 27, 2007 12:35 pm

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.

TIM3PORT
Registered User
Posts: 221
Joined: Fri May 25, 2007 5:35 pm
Location: New Jersey
Contact:

Re: [RC1] Visitors Today

Post by TIM3PORT » Wed Jun 27, 2007 3:19 pm

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

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 » Wed Jun 27, 2007 3:52 pm

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.

TIM3PORT
Registered User
Posts: 221
Joined: Fri May 25, 2007 5:35 pm
Location: New Jersey
Contact:

Re: [RC1] Visitors Today

Post by TIM3PORT » Wed Jun 27, 2007 4:28 pm

can you try and add the option of keep data of the last 24 hours instead of reseting at midnight?

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 » Wed Jun 27, 2007 7:44 pm

that option is present already, just enter 86401 instead of 86400 and it should drop all entries older then 24 hours and 1 second.

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 » Wed Jun 27, 2007 7:45 pm

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=
Doc.

TIM3PORT
Registered User
Posts: 221
Joined: Fri May 25, 2007 5:35 pm
Location: New Jersey
Contact:

Re: [RC1] Visitors Today

Post by TIM3PORT » Wed Jun 27, 2007 8:42 pm

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?

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 » Wed Jun 27, 2007 11:49 pm

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 ;)

thehawke
Registered User
Posts: 108
Joined: Thu Nov 03, 2005 12:32 pm
Contact:

Re: [RC1] Visitors Today

Post by thehawke » Thu Jun 28, 2007 8:23 am

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.

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 » Thu Jun 28, 2007 6:29 pm

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.

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 » Thu Jun 28, 2007 6:33 pm

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.

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 » Thu Jun 28, 2007 6:58 pm

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. ;)

TIM3PORT
Registered User
Posts: 221
Joined: Fri May 25, 2007 5:35 pm
Location: New Jersey
Contact:

Re: [RC1] Visitors Today

Post by TIM3PORT » Thu Jun 28, 2007 7:53 pm

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.

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 » Thu Jun 28, 2007 9:17 pm

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.

Locked

Return to “[3.0.x] Abandoned MODs”