News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Ranks Based on Time Online

Started by Brettflan, June 29, 2009, 07:42:28 PM

Previous topic - Next topic

Brettflan

Link to Mod

This mod will swap SMF's postcount based groups to instead be based on the user's "total time logged in". Users will therefore be ranked based on how many hours they have spent on the forum. This "total time logged in" value in SMF only tracks when the user is actively browsing or posting, not for instance if they just leave a browser window open.

The purpose of this mod is to give users much less reason to post spam since that will no longer affect their ranking, and perhaps a reason to spend more time on the forum actually reading things.

IMPORTANT NOTE: after installing, you need to go to the Membergroups section in the Admin panel. You should see that instead of "Required posts" it is now "Required hours online". You'll probably want to modify each group to a more appropriate time requirement, as it uses the same values you had previously set for "Required posts".
You will also need to edit one of the affected rank Membergroups and save it (no need to actually change anything). This is required in order to force SMF to recalculate the rank of all members, since it (sadly) can't be done during package installation.

Changelog
version 1.06:

  • added proper support for UTF8 English language files
  • minor: support for installing on SMF 2.0 Final
version 1.05:

  • minor: support for SMF 1.1.12 and 2.0 RC4
version 1.04:

  • minor: installation support for SMF 2.0 RC3
version 1.03:

  • minor: installation support for SMF 1.1.11
version 1.02:

  • minor: installation support for SMF 2.0 RC2
version 1.01:

  • minor: installation support for SMF 1.1.10 and 2.0 RC1.2
version 1.0:

  • initial public release.

heavyccasey

Ooh, looks interesting. Link to mod please?

Here it is.

Sudhakar Arjunan

Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

franklinrony

http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

heavyccasey

This mod is great! It should be pretty easy to use karma instead of time online, right? I know a lot of people, including me, have been begging for this feature.

Brettflan

Quote from: heavyccasey on June 30, 2009, 04:17:46 AM
This mod is great! It should be pretty easy to use karma instead of time online, right? I know a lot of people, including me, have been begging for this feature.

Yeah, that should be fairly simple. For SMF 2.0 RC1-1 (what I'm using currently), you would basically just change it to reference the karma_good and karma_bad columns instead of the total_time_logged_in column and change the calculation it uses.

Brettflan

Minor update: installation support for SMF 1.1.10 and 2.0RC1.2.
See the mod link in the first post.

akguide

I like the idea of this mod but a forum member at my site asked a question....  is it possible to display both post counts and time?

thanks in advance.


Brettflan

As 2 separate ranking systems both shown? Sorry, no.
If you're just referring to the actual stats, they can been seen within a user's profile on the statistics page.

Brettflan

Version 1.02 is now released, officially supporting SMF 2.0 RC2. No other changes.

Yoca

I like the idea of this mod, thank you very much!

Is it possible to later change that back to postcount by just changing the code in ./Sources/Subs.php or do you have to change something in the database as well? I don't know much about changing things in the database...  :-[

I'm using 1.1.10

Brettflan

Quote from: Yoca on November 30, 2009, 04:41:59 AM
I like the idea of this mod, thank you very much!

Is it possible to later change that back to postcount by just changing the code in ./Sources/Subs.php or do you have to change something in the database as well? I don't know much about changing things in the database...  :-[

I'm using 1.1.10

Uninstalling it works fine, as does reversing the changes it you manually installed it. You'll just want to check back over the postcount requirements for each group. Also, the group membership won't update properly for all of your users without a little help; just go to edit one of the postcount groups in the Admin panel and save your changes (whether or not you made any). That causes SMF to reassign all postcount based groups and make sure everybody is in the right one.


Yoca


Brettflan

Released version 1.03:

  • minor: installation support for SMF 1.1.11

In other words, not a necessary download unless you're installing on 1.1.11.

Yoca

Hi Brettflan! I'm sorry to ask you again and I don't mind if you won't look at it, but... I'm using this mod http://custom.simplemachines.org/mods/index.php?mod=1268 and is it possible to have something similar for your mod? That it shows me how many hours the user has to be online to reach the next level?

Brettflan

Just from glancing at it, it looks like you could change that mod just a bit and have it work. It would entail switching it from checking the user's postcount to their time spent online (available in the same user data), and then change how it calculates the required remaining amount accordingly and how it displays it (hours vs. posts, perhaps also formatting to indicate days/months etc. as well).

I don't have time to fiddle with it now myself, though.

Yoca

No problem. Thanks a lot for looking at it!  :)

I'm not nearly that good to find out what and how to do.  :-[
But that doesn't matter because it's not a "must have"!
The "weird" thing is, that it shows the correct time for a completely new user (in my case 24 hours) but for a user that was nearly 14 hours in the forum it should show 10 hours but it shows 261.  ::)

DoctorMalboro

excelent MOD, it's awsome!!!!

i leave you a spanish translation

// Ranking basado en tiempo online en vez de post
$txt['membergroups_post'] = 'Grupos basados en el tiempo online';
$txt['membergroups_edit_post_group'] = 'Este grupo esta basado en el tiempo online';
$txt['membergroups_min_posts'] = 'Horas online requeridas';


Thanks!!!!  ;D

Yoca

Maybe a german translation?  :)


// Mod "Mitgliedergruppen basierend auf der Onlinezeit anstatt der Beitragszahl"
$txt['membergroups_post'] = 'Mitgliedergruppen basierend auf der Onlinezeit';
$txt['membergroups_edit_post_group'] = 'Diese Mitgliedergruppe basiert auf der Onlinezeit';
$txt['membergroups_min_posts'] = 'Stunden online';

Advertisement: