[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
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] User Online Time

Post by TheUniqueTiger »

Blanky wrote:Suggestion : Add a average online time per day on user profile?
Hmmm... interesting... but you can always judge this number from the two numbers shown above... joining date and total online time. I disagree on this as on a live forum, there are always a large number of users who visit rarely, and hence their numbers of avg online time per day won't look that good, isn't it?
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
Mr.Black-LSG
Registered User
Posts: 17
Joined: Sat Dec 15, 2007 8:50 am

Re: [BETA] User Online Time

Post by Mr.Black-LSG »

I have installed your mod on my forum. I changed all the files like it says in the install.xml folder. I have added the tables to SQL and it still doesn't show up.

Any ideas? :ugeek:
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] User Online Time

Post by TheUniqueTiger »

Ok lets go step by step since this has been reported by two of you...

First of all we have to alter the users table to add the two columns.

Next we have to do the edits...

Here, the session.php file edits cause recording of the online time for the current user.
The page_header function in functions.php gets the user online time and sends to template.
The template edits will show this info at the appropriate place.

So I can't say why its not showing up... If you are still experiencing problems, then remove the MOD and wait for the next version... Btw, some people could get this MOD to work... I wonder why there are such differences.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
gavo
Registered User
Posts: 91
Joined: Sat Jun 23, 2007 10:44 am

Re: [BETA] User Online Time

Post by gavo »

Great mod, I cant wait to get it working.

I am having problems with the second edit Open: includes/functions.php

When I make the edit my forum stops working :x , I see the line in the mod includes the word ANONYMOUS, I have renamed the anonymous user account, could this be the reason why I get the error?

Warning: require(./includes/functions.php) [function.require]: failed to open stream: No such file or directory in /home/xxxxxxx/public_html/common.php on line 188

Fatal error: require() [function.require]: Failed opening required './includes/functions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxx/public_html/common.php on line 188

The 1st edit stopped the memberlist working aswell

Thanks Gavo
jimcarrel
Registered User
Posts: 671
Joined: Fri Jul 27, 2007 10:49 pm
Location: Oklahoma City, Oklahoma

Re: [BETA] User Online Time

Post by jimcarrel »

gavo,

I see no reason for the 1st edit to stop your memberlist view

<find><![CDATA[ 'SIGNATURE' => $member['user_sig'],]]></find>
<action type="after-add"><![CDATA[ //MOD User Online Time
'TOTAL_TIME_LOGGED_IN' => get_time_text($member['user_online_time'], $user->data['user_online_timeformat']),
//END MOD]]></action>

Doesn't make the least bit of sense. Unless of course you added on the same line.
You have to add it on its on own Line. ( after-add )
Grace--Getting what I don't deserve
Mercy--Not getting what I do deserve
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] User Online Time

Post by TheUniqueTiger »

@gavo,
Please check if your includes/functions.php is in the proper place. How can it fail to open this important file...! (Showing no such file or directory!)
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
JunglistPerfection
Registered User
Posts: 611
Joined: Mon Apr 09, 2007 11:58 pm
Location: Chicago, IL

Re: [BETA] User Online Time

Post by JunglistPerfection »

Just curious if this mod works for phpBB Gold?
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] User Online Time

Post by TheUniqueTiger »

Yes it works all right... But I'm working on a new version, and I urge you to try once the new version is out, although this works fine too.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
gavo
Registered User
Posts: 91
Joined: Sat Jun 23, 2007 10:44 am

Re: [BETA] User Online Time

Post by gavo »

TheUniqueTiger wrote:@gavo,
Please check if your includes/functions.php is in the proper place. How can it fail to open this important file...! (Showing no such file or directory!)
I havent a clue why this edit creats an error, it seems about imposable



<edit> I have the edits working now, I added an exta line after each edit from the modx file



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

Re: [BETA] User Online Time

Post by TheUniqueTiger »

You should anyway add every line on a new line of its own in any 'add after' instruction block. Good to hear its working now.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] User Online Time

Post by TheUniqueTiger »

New version will be releasing today... New additions include showing this information on viewtopic pages along with other info for each poster.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] User Online Time

Post by TheUniqueTiger »

New version 0.1.2 (beta 2) has been released. The first post has been updated accordingly.

Changelog as in the above post.

For updating from 0.1.0, do the following...

Replace the entire blocks for this MOD in the files
memberlist.php
includes/functions_content.php
styles/prosilver/template/memberlist_view.html
styles/subsilver2/template/memberlist_view.html

Add the new edits in the files
viewtopic.php
styles/prosilver/template/viewtopic_body.html
styles/subsilver2/template/viewtoic_body.html

I'll try to manage a few screenshots and put it in the first post.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
gavo
Registered User
Posts: 91
Joined: Sat Jun 23, 2007 10:44 am

Re: [BETA] User Online Time

Post by gavo »

If you start doing the edits in the modx file, the 1st edit to make is in memberlist.php
this contains the edit => get_time_text( ,
The function get_time_text isnt defined until an edit later on in the modx file in includes/functions_content.php

It would be better if the edits in the modx file were in order so it didnt create any errors while adding the mod to a forum.


Thanks Great mod, my members requested this mod ages ago
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] User Online Time

Post by TheUniqueTiger »

Its not so... When you are adding a MOD to your forum, you are doing all the edits before uploading all your edited files. (I guess no one uploads the files one by one after each edit.) The listing of the edits is such that you have ease of opening the files... (look at the directory structure... its first the root directory files like memberlist.php, viewtopic.php and then the inner files like from the includes folder and finally the template files.) Whichever other MODs I have seen also follow this order. So after doing all the edits when you upload the files, it doesn't really matter which edit you made first.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
gavo
Registered User
Posts: 91
Joined: Sat Jun 23, 2007 10:44 am

Re: [BETA] User Online Time

Post by gavo »

I always edit the files straight from ftp & leave open so I can undo quickly if needed, every other mod I have used has the edits in order so the forum runs while the mod is being added.

Could you add the feature so the total users online time is displayed when you view memberlist.php so members can check who has been logged into the board the longest.

Great MOD & everything is working ok :)
Locked

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