[BETA] User Online Time

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!
Suggested Hosts
User avatar
geeklife
Registered User
Posts: 172
Joined: Tue Jan 29, 2008 1:13 am

Re: [BETA] User Online Time

Post by geeklife »

Also,

Is there a way to make the online time viewable to moderators and admin only on viewtopic page?
MewDragon
Registered User
Posts: 191
Joined: Fri Dec 23, 2005 6:24 pm

Re: [BETA] User Online Time

Post by MewDragon »

I love this mod, this is an absolutely fantastic idea. ^^
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India

Re: [BETA] User Online Time

Post by TheUniqueTiger »

Actually, this online-time is visible to all, including guests... This is nothing private... so I don't think it should be hidden from general users.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
jason bourne
Registered User
Posts: 23
Joined: Fri Jul 27, 2007 9:14 am
Location: uk

Re: [BETA] User Online Time

Post by jason bourne »

Installed on my test forum but getting

Code: Select all

Parse error: syntax error, unexpected T_CLASS, expecting T_FUNCTION in C:\xampp\htdocs\phpBB3\includes\session.php on line 1314
Also noticed that the following Find in sessions.php occurs twice in the file. Should I be using the first or second?

Code: Select all

$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
								WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
							$db->sql_query($sql);
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India

Re: [BETA] User Online Time

Post by TheUniqueTiger »

You should use the second find... It was actually a mistake on my part to give reference of such a line.

I don't have the slightest idea about the error that you are getting... May be you have done one of the edits wrong. Please check whether everything is correct (parentheses and block open/close brackets) before the class definition 'user' in that file.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
jason bourne
Registered User
Posts: 23
Joined: Fri Jul 27, 2007 9:14 am
Location: uk

Re: [BETA] User Online Time

Post by jason bourne »

Thanks for the quick response

I've moved the first edit but the second edit before

Code: Select all

$this->data['is_registered'] = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false;)
is now giving me...

Code: Select all

Parse error: syntax error, unexpected T_ELSE in C:\xampp\htdocs\phpBB3\includes\session.php on line 316
These are the only 2 edits in session.php so not sure how I could have gone wrong.
jason bourne
Registered User
Posts: 23
Joined: Fri Jul 27, 2007 9:14 am
Location: uk

Re: [BETA] User Online Time

Post by jason bourne »

Installed using a fresh version of session.php and no errors now...but the time doesn't seem to be incrementing between visits, it stick at 0s :(
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India

Re: [BETA] User Online Time

Post by TheUniqueTiger »

Its a complicated edit, without a good reference line... One of the code blocks is around the if...else structure so it may be causing the problem. I'm looking into it and possibly I'll come up within a couple of days with more numbers of reference lines to be sure.

If your time is not incrementing I guess its because you have put an edit code block around the first reference find instead of the second. I'll get some proper reference lines soon.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
jason bourne
Registered User
Posts: 23
Joined: Fri Jul 27, 2007 9:14 am
Location: uk

Re: [BETA] User Online Time

Post by jason bourne »

At the moment my edits in session.php follow on from each other, but I thin from what you are saying this is wrong.

Will try to have another look at the code later to see if I can see where I am going wrong, but any help would be much appreciated :)
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] User Online Time

Post by RedTrinity »

Hi TUT,

I have just installed this MOD and am having problems with it unfortunately - time logged in for all members remains on '0 seconds' even though they have all clearly been online for at least more than that. I also used a test account to login for a period of time and then logout again successfully, but that account has also not logged any online activity for this MOD. Cache was purged both via the ACP and manually.

I actually attempted to install this a few months ago unsuccessfully, and never removed the database entries, so I also would assume that something would have been logged over that period of time? Either way, it still doesn't seem to be working :(

Would appreciate some help with finding the problem as I can't seem to locate it after checking my edits.

Cheers,

Nikki :)
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India

Re: [BETA] User Online Time

Post by TheUniqueTiger »

I'm looking into it as I have seen several such complaints. At the moment I'm busy and looking to release the next version of Ratings first. This would be further down the list.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
issjut
Registered User
Posts: 113
Joined: Tue Oct 09, 2007 5:02 am
Location: Berlin, Germany

Re: [BETA] User Online Time

Post by issjut »

Hi TheUniqueTiger,

first let me say you wrote a great mod, thank you for doing this nice job :-D
Everything works perfect!

Now my suggestion^^

It would be great if this mod could be made compatible with Handymans Cash Mod! Users could get points for there online time.

Do you think there is a chance?
sorry for my bad English ;-)
User avatar
geeklife
Registered User
Posts: 172
Joined: Tue Jan 29, 2008 1:13 am

Re: [BETA] User Online Time

Post by geeklife »

That would be pretty cool.
xxxgamer
Registered User
Posts: 574
Joined: Mon Jul 16, 2007 11:25 pm

Re: [BETA] User Online Time

Post by xxxgamer »

Can you make it so the mod resets the counter to 0 when a user logs out and a script that shows the longest user online?

Cheers.
naushadhassam
Registered User
Posts: 506
Joined: Wed Aug 15, 2007 9:57 pm

Re: [BETA] User Online Time

Post by naushadhassam »

great mod mate :D
Free Hosting - Here
Sports Entertainment Online ( A PS3 Online Gaming Community ) - Here
FREE UNLIMITED HOSTING FOR PHPBB MOD MAKERS - PM ME FOR MORE INFO ( MY WAY ON DONATING TO PHPBB )

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