Ranks Based on Time Online

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

Previous topic - Next topic

Brettflan

It sounds like you've got the right idea. You could probably do it with a customized block, though it's been a while since I messed with Simple Portal or any other SMF portal addons.

twig/al

Thanks for the reply... I don't have a clue as how to write a custom block... I guess the best thing to do is make a post on the Simple Portal Forum and hope for an answer... I am beginning to think I might have picked the wrong portal to use as there has not been much activity there since 2.0 Final/Gold was released... Again Thanks...

Franz921

Quote from: Brettflan on March 31, 2010, 02:23:25 AM

You're using SMF 1.x, then?

Yeah, pretty simple. Edit the modification_1x.xml file in the package. Replace all instances of "totalTimeLoggedIn" with the appropriate other column name, "DateRegistered" in your case.
Then, find this line:
WHEN DateRegistered >= ' . ($min_hours * 3600) . (!empty($lastMin) ? ' AND DateRegistered <= ' . ($lastMin * 3600) : '') . ' THEN ' . $id;


Modify it as needed, something like this:
WHEN (' . time() . ' - DateRegistered) >= ' . ($min_hours * 3600) . (!empty($lastMin) ? ' AND (' . time() . ' - DateRegistered) <= ' . ($lastMin * 3600) : '') . ' THEN ' . $id;


That's untested by me, but should work. You could of course replace "$min_hours * 3600" (an hour being 3600 seconds) with "$min_hours * 86400" to have it count by days instead of hours (86400 seconds in a day), or whatever timeframe you're interested in. You could also of course rename all instances of "$min_hours" appropriately for code clarity.
Specifying by actual months could be a bit trickier to code though, since months have varying number of days (28-31). Simpler and more fair to just specify something like "30 days" instead, I'd think.

I have a question. For version 2.01, the modifications for time elapsed since registration are the same?
I saw the parameter DateRegistered is date_registered now, but otherwise will it work the same?

Brettflan

I don't really have time to look into it, but I'd think that's pretty much it.

GodKnightX

Is it possible to use time with posts?
So groups based on two things: post and time online

Brettflan

Quote from: GodKnightX on October 21, 2012, 07:59:52 AM
Is it possible to use time with posts?
So groups based on two things: post and time online
That would require reworking the system to have two requirements for each stat-based group instead of just one. Doesn't seem practical for the effort involved, but it would be possible for someone who really knew what they were doing and had the time to work on it.

samimikawi

hello all,

i install this mod on my forum everything OK but the stars is not showing because on the configuration it shows that there is a stars but these stars is not appearing on the profile post.

i would like to request a code to be added on the display.template.php so it can be display on post under the avatar picture

i would be really appreciate it.
i hope i explain it in the right way

Brettflan

Quote from: samimikawi on January 25, 2017, 09:44:50 AM
hello all,

i install this mod on my forum everything OK but the stars is not showing because on the configuration it shows that there is a stars but these stars is not appearing on the profile post.

i would like to request a code to be added on the display.template.php so it can be display on post under the avatar picture

i would be really appreciate it.
i hope i explain it in the right way
This mod package doesn't change anything about how the rank images (stars or whatever you choose) are shown, it only changes what those ranks are based on. If they're not showing properly for you, it's a problem with something other than this mod package.

samimikawi

is show me the newbie and the other ranks but i just want to add the stars icons under it

von Corax

We've been using this mod since SMF 1.1, long before I became Administrator. I've just upgraded to SMF 2.1.4 and the mod no longer works.

Do you have any plans to upgrade this mod to work with 2.1.x?

Doug Heffernan

Quote from: von Corax on September 03, 2023, 12:46:41 PMDo you have any plans to upgrade this mod to work with 2.1.x?

The author hasn't been online here for 2 years now. The chances of that happening are slim to none imo.


zedd151

Time online is not a good way to rank members.
Many members use "auto refresh" browser plugins to effectively stay online.
One particular member here for example is ALWAYS online.  ::) Which of course, is actually impossible for them to actually be online 24/7, otherwise.
My two cents.

von Corax

Quote from: zedd151 on September 08, 2023, 10:15:20 AMTime online is not a good way to rank members.
Many members use "auto refresh" browser plugins to effectively stay online.
One particular member here for example is ALWAYS online.  ::) Which of course, is actually impossible for them to actually be online 24/7, otherwise.
My two cents.

We had one user who did that. He got caught and demoted.

We've found that time-based ranks eliminate one reason to spam-post and encourage people actually reading what's already been posted.

Kindred

Rotfl... you have a very skewed concept of how forums (and people) work
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: