Advertisement:

Author Topic: Time Logged-In  (Read 35960 times)

Offline Bulakbol

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,220
  • Gender: Male
  • JohnyB
Time Logged-In
« on: December 06, 2008, 07:43:00 AM »
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.
« Last Edit: February 19, 2009, 12:09:48 AM by Bulakbol »
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,532
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Re: Time Logged-In
« Reply #1 on: December 06, 2008, 10:20:14 AM »
nice
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Offline fords8

  • Jr. Member
  • **
  • Posts: 185
  • Gender: Male
  • SMF: Endless Possibilities!
    • Forum Cloud
Re: Time Logged-In
« Reply #2 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!


Offline villasg

  • Full Member
  • ***
  • Posts: 481
Re: Time Logged-In
« Reply #3 on: December 06, 2008, 12:38:11 PM »
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

Offline senyorito

  • Jr. Member
  • **
  • Posts: 108
  • Gender: Male
  • Pinoy Ako!
Re: Time Logged-In
« Reply #4 on: December 06, 2008, 02:03:00 PM »
Hey bro Bulakbol!  Nice MOD here huh!  I definitely need it to my board... heheh.

Thanks bro!
« Last Edit: December 06, 2008, 02:32:36 PM by senyorito »

Offline Bulakbol

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,220
  • Gender: Male
  • JohnyB
Re: Time Logged-In
« Reply #5 on: December 06, 2008, 04:10:44 PM »
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

Offline fords8

  • Jr. Member
  • **
  • Posts: 185
  • Gender: Male
  • SMF: Endless Possibilities!
    • Forum Cloud
Re: Time Logged-In
« Reply #6 on: December 06, 2008, 04:11:37 PM »
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!

Offline TW1ST3D

  • Jr. Member
  • **
  • Posts: 178
    • The Georgia LX Club
Re: Time Logged-In
« Reply #7 on: December 06, 2008, 04:14:58 PM »
Great Mod !!  Installed Flawlessly on my Heavily Modded Forum !!

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

Offline Bulakbol

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,220
  • Gender: Male
  • JohnyB
Re: Time Logged-In
« Reply #8 on: December 06, 2008, 04:25:53 PM »
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
Code: [Select]
if ($context['user']['is_admin'])
If you want to show only to Admins and Global Moderators, you can try using
Code: [Select]
if (allowedTo('moderate_forum'))
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Offline Sudhakar Arjunan

  • Sophist Member
  • *****
  • Posts: 1,226
  • Gender: Male
  • SMF is the best forum tool
    • IT Acumens - Webdesigning & Webhositing services in Chennai
Re: Time Logged-In
« Reply #9 on: December 06, 2008, 09:03:26 PM »
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

Offline senyorito

  • Jr. Member
  • **
  • Posts: 108
  • Gender: Male
  • Pinoy Ako!
Re: Time Logged-In
« Reply #10 on: December 06, 2008, 11:35:08 PM »
@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.

Offline villasg

  • Full Member
  • ***
  • Posts: 481
Re: Time Logged-In
« Reply #11 on: December 07, 2008, 03:19:39 AM »
Translate for greek-utf8

Code: [Select]
$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'] = ' λεπτά'
« Last Edit: December 07, 2008, 03:23:03 AM by villasg »

Offline Alpay

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 3,594
  • Gender: Male
  • test
    • Personal Web Page
Re: Time Logged-In
« Reply #12 on: December 07, 2008, 06:12:20 AM »
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.';
« Last Edit: December 08, 2008, 03:12:24 AM by Alpay »

Offline [unplugged]

  • Sophist Member
  • *****
  • Posts: 1,312
  • Gender: Male
  • I know just enough to get me in trouble...
    • Empire of the Sun
Re: Time Logged-In
« Reply #13 on: December 07, 2008, 11:06:45 PM »
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 »


Offline Bulakbol

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,220
  • Gender: Male
  • JohnyB
Re: Time Logged-In
« Reply #14 on: December 08, 2008, 07:53:12 PM »
@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>
« Last Edit: December 08, 2008, 07:58:52 PM by Bulakbol »
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Offline [unplugged]

  • Sophist Member
  • *****
  • Posts: 1,312
  • Gender: Male
  • I know just enough to get me in trouble...
    • Empire of the Sun
Re: Time Logged-In
« Reply #15 on: December 08, 2008, 09:15:13 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 »


Offline tyhgdgh

  • Jr. Member
  • **
  • Posts: 284
  • Gender: Male
  • thismany
    • VGRecordist
Re: Time Logged-In
« Reply #16 on: December 10, 2008, 12:29:17 AM »
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

Offline PLAYBOY

  • SMF Hero
  • ******
  • Posts: 2,019
  • Livephotoshop.com & Lullabyabc.com
    • Lullabies and Us
Re: Time Logged-In
« Reply #17 on: December 10, 2008, 06:54:45 AM »
I wish it was more "Theme Friendly"
Anyway, good mod. Thx.

Offline ScarMix

  • Semi-Newbie
  • *
  • Posts: 36
Re: Time Logged-In
« Reply #18 on: December 10, 2008, 11:46:07 AM »
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 

Offline Bulakbol

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,220
  • Gender: Male
  • JohnyB
Re: Time Logged-In
« Reply #19 on: December 10, 2008, 04:25:54 PM »
@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