News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Time Logged-In

Started by Bulakbol, December 06, 2008, 07:43:00 AM

Previous topic - Next topic

Bulakbol

Link to Mod

Author: Bulakbol   Mod Name: Time Logged-In   Version: 3.1
Tested: Freshly installed SMF 1.1.7 and SMF 2.0 Beta 4


If you want to see the amount of time a member has been logged-in (session in days, hours and minutes),
count of posts they made the day while/was online, "Total time logged in", and a Theme your member is using,
then this mod is for you. The information can be found in the summary of a member's profile.
After installation, your members should log-in first before "Logged in", "Posts made" and "Online for" info are available.
Support for "Super Admin" mod. No configuration required.

Supported languages
English
English-utf8

December 8, 2008 - Released version 2.0
  Rewritten code because of additional feature.
  Added the "Total time logged in". Requested by SunKing.

December 10, 2008 - Released version 3.0
  Rewritten and optimized code because of additional feature.
  Added count of posts made the day a member logged-in ("Posts made").
 
December 11, 2008
  Removed excess code and added missing line of code (SMF 2.0 Beta 4) - fixed. Thanks edi67.
  Added Italian language translation. Thanks ed67.
  Added Swedish language translation. Thanks ScarMix.
  Added Greek-utf8 language translation. Thanks villasg.

December 17, 2008
  Added "Current Theme". A Theme a member is using.
  Added Spanish language translation. Thanks ksawery.

February 19, 2009
Released update for SMF version 2.0 RC1 and 1.1.8.
 
Please support mod authors and SMF by becoming a charter member.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

edi67

CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

fords8

Mod installed without any issues.

But all I get is:

Logged in:  Not Available.
Online for:  Not Available.

Does it take sometime to get the info.?

I have SMF2 Beta 4!


villasg

Quote from: fords8 on December 06, 2008, 11:20:11 AM
Mod installed without any issues.

But all I get is:

Logged in:  Not Available.
Online for:  Not Available.

Does it take sometime to get the info.?

I have SMF2 Beta 4!

Need to login and logout a member AFTER installation

senyorito

#4
Hey bro Bulakbol!  Nice MOD here huh!  I definitely need it to my board... heheh.

Thanks bro!

Bulakbol

Quote from: fords8 on December 06, 2008, 11:20:11 AM
Mod installed without any issues.

But all I get is:

Logged in:  Not Available.
Online for:  Not Available.

Does it take sometime to get the info.?

I have SMF2 Beta 4!



Villasg figured it out correctly. :) Sorry, I forgot to mention it in the readme file. I will in the next update.


@senyorito
8) Thanks for liking it bro.  Good to see you again.

@All
Thank you for using or trying this mod. I hope you'll find it usefull too.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

fords8

Quote from: villasg on December 06, 2008, 12:38:11 PM
Quote from: fords8 on December 06, 2008, 11:20:11 AM
Mod installed without any issues.

But all I get is:

Logged in:  Not Available.
Online for:  Not Available.

Does it take sometime to get the info.?

I have SMF2 Beta 4!

Need to login and logout a member AFTER installation

Yup! That worked! Thanks!

TW1ST3D

Great Mod !!  Installed Flawlessly on my Heavily Modded Forum !!

Great Job !!
Running 2.0 Gold.......SMF Rocks!!

Bulakbol

Thanks guys. I've been using this mod for a while and decided to share it to all.

You probably figured already that only admins can see the information. If you want to show to everyone including guests, you have to edit default/Profile.template.php and remove the
if ($context['user']['is_admin'])

If you want to show only to Admins and Global Moderators, you can try using
if (allowedTo('moderate_forum'))

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Sudhakar Arjunan

Such a Excellent Mod. Its very Useful.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

senyorito

@Bulakbol:  Bro, I've just noticed something...

It is clearly that this MOD remembers the time and date of the member's "last logged-in".  However, there are many forum members that doesn't logout when they leave the board/forum. 

If for example, member1 logged in today and stayed for only 5 minutes and left the forum without logging out, then he returns after 7 days, when you look at member1's profile, the hours and minutes will even count the days that member1 was missing.

My question is, is there a way that time logged-in will only count the time whenever member1 is in connected to the forum?

Can it be done like this?

member1's profile page

Logged in:    Today at 01:00:00 AM (Note: Today = December 7, 2008)
Online for:    5 minutes.

member1 left the forum without logging out.

After 7 days member1 came back.  He didn't login this time because he logged with "Forever" the last time he login.


Is it possible to only remember the time he is online to the forum?

Logged in:    Today at 010:00:00 AM (Today = December 14, 2008) <== This will become Today.
Online for:    45 minutes.

Thank you bro.

villasg

#11
Translate for greek-utf8

$txt['tli_logged_in'] = 'Συνδέθηκε ';
$txt['tli_online_for'] = 'Συνδεδεμένος για';
$txt['tli_not_available'] = 'Μη διαθέσιμο.';
$txt['tli_day'] = ' ημέρα,';
$txt['tli_days'] = ' ημέρες,';
$txt['tli_hour'] = ' ώρα και';
$txt['tli_hours'] = ' ώρες και';
$txt['tli_minute'] = ' λεπτό';
$txt['tli_minutes'] = ' λεπτά'

Alpay

#12
Good mod. Thanks

Translate for turkish

Modifications.turkish.php


$txt['tli_logged_in'] = 'Son Giriş Zamanı:';
$txt['tli_online_for'] = 'Ne Kadar Süredir Burada';
$txt['tli_not_available'] = 'Kayıt yok.';
$txt['tli_day'] = ' Gün, ';
$txt['tli_days'] = ' Gün, ';
$txt['tli_hour'] = ' Saat ve';
$txt['tli_hours'] = ' Saat ve';
$txt['tli_minute'] = ' dakika.';
$txt['tli_minutes'] = ' dakika.';

[unplugged]

Is there a way to show total time logged in since they registered? Like what's in the user info area (like Total time logged in: XX days, XX hours and XX minutes)?

Thanks in advance.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Bulakbol

#14
@A.SK
Thanks for the compliment.

@Alpay and villasg
Thanks for the language translation guys. I'll add them to version 2.0. :)

@senyorito
You are right there. I understand what you mean bro but sorry, I can't. The only way is to configure your members' browser to delete cookies when they close their browser window. Maybe they don't want to login again that's why they don't click on the logout button. At least, you now have information telling you that they want to stay logged-in all the time. :)

@SunKing
That's a good idea. Maybe I should update the mod now. Thanks for the suggestion.

<edit>
December 11, 2008 - Released version 2.0
  Added the "Total time logged in" as requested by SunKing.
  Added support for Greek-utf8 language (Thanks villasg)
  Added support for Turkish language (Thanks Alpay)
</edit>
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

[unplugged]

Quote from: Bulakbol on December 08, 2008, 07:53:12 PM
...Added the "Total time logged in"...

Fantastic!! Works perfectly.

Thanks for a great mod.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



tyhgdgh

Great mod, but i get an error

8: Undefined index: total_logged_in
File: /var/www/html/forum/Themes/default/languages/Who.english.php (eval?)
Line: 299

PLAYBOY

I wish it was more "Theme Friendly"
Anyway, good mod. Thx.

ScarMix

Hello love the idea of this mod

I just have a problem getting it working, I get this error:
Database Error
Unknown column 'mem.first_login' in 'field list'
File: /home/scarmix/public_html/Sources/Load.php
Line: 990


Hope that you will help me

Thanks in advance 

Bulakbol

@Sunking
Thanks for the compliment. Check out the new package. I added additional info that might interest admins.

@Nfanthr33 and ScarMix
What version of SMF? You have to extract the tli20x.php (Beta 4) or the tli11x.php (1.1.7) from the package and then upload the file to your root directory. Run it by typing http://www.your_site/tli11x.php if you are using version 1.1.7 or til20x.php if you are using version 2.0 Beta 4.

@PLAYBOY
Most theme uses the default/Profile.template.php. If your custom theme has its own Profile.template.php then you have to manually edit it to make this mod work.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Advertisement: