[AP] Activity/Longevity Meters

[AP] Activity/Longevity Meters 1.2.1

No permission to download
Interesting! How is the longevity portion computed?

Ray
During setup it fetches the registration date of the very first account registered (user_id 1), and stores that in SimpleCache.
The meter is then calculated by dividing a users registration date by the value we stored in SimpleCache.

Here is the specific bit of template code if you are curious:
Code:
<xf:set var="$forum_start" value="{{$xf.time - $xf.simpleCache.getSet('apathy/ActLong').forum_start }}" />
<xf:set var="$user_date" value="{{($xf.time - {$user.register_date})}}" />
<xf:set var="$longevity_percentage" value="{{ ($user_date / $forum_start) * 100 }}" />
 
So this will work for a week and then will Reset ?
Activity meters will reset weekly yes, longevity meters will not. You can disable the cron job that handles that if you want it to be an indication of a users overall activity
 
Seems very nice, can you add that we define activity reset period? Let's say, we want to have that set to a month, a year, or a day, 3 days, etc.

Also, it would be nice if users get information about activity, something like Make X posts in X days for 100% active. It could be hover phrase in postbit, and in profile it could be as an explanation below (more room there).
 
Seems very nice, can you add that we define activity reset period? Let's say, we want to have that set to a month, a year, or a day, 3 days, etc.
You can do this already, just not within the addons options: Tools -> Cron entries -> [AP] Activity/Longevity Meters: Reset activity meters.

Also, it would be nice if users get information about activity, something like Make X posts in X days for 100% active. It could be hover phrase in postbit, and in profile it could be as an explanation below (more room there).
If you mean changing the current tooltip from just being a percentage to saying something like "User has completed 86% of 25 posts in 7 days" then sure, I'd totally be able to add that.
 
Yes, thank you.

But, tooltip then should respect settings for the cron task, i.e. if we change it to month, then we need to edit phrase. Maybe at least give quick access to phrase? Or consider that someone who knows how to change cron task, should know how to find and edit phrase.
 
I am translating this awesome add-on, but I could not translate "of" and "month"!
screenshot--2021.07.22-03_14_37.webp

Also, It would be nice to adjust the gap here and make it equal to the the other bar.
screenshot-www.e-dewan.com-2021.07.22-03_17_20.webp
 
I am translating this awesome add-on, but I could not translate "of" and "month"!
View attachment 255054

Also, It would be nice to adjust the gap here and make it equal to the the other bar.
View attachment 255055
Good catch on those missing phrases, they're currently hardcoded so I'll have this sorted for the next update.

As for the gap, this works as expected on forums with text aligned on the left. I can't really test this for myself as a result, so I would suggest navigating to ap_actlong_progress_bar.less and comment out .ap-activity class at the bottom of the template like so:
Code:
/*.ap-activity {
     padding-right: 17px;
}*/

Or maybe changing it to padding-left instead.

Is there an option to show only the activity meter and hide the longevity one?
As of now no, but I'll add options to disable either meter in the next update. You might be able to do hide it with some clever CSS but the only methods I can think of would probably only hide it for every 2nd poster.
 
Back
Top Bottom