News:

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

Main Menu

Progress bar on the memberlist

Started by durangod, December 18, 2023, 02:13:55 AM

Previous topic - Next topic

durangod

 Hi,   just curious what the progress bar on the memberlist under POST column is for?

You cannot view this attachment.
My name is short for durango dave (i am not a god lol)

Aleksi "Lex" Kilpinen

I'm not actually 100% sure, but it looks like it could be a relative score compared to the highest post count group limit perhaps.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

durangod

Well the next group is 50 posts, not sure about that.   Looks like it around 60 percent of something.
My name is short for durango dave (i am not a god lol)

Aleksi "Lex" Kilpinen

Not the next group, the highest group. And I'm only guessing based on how that looks on this forum currently, haven't been experimenting or checking the code to verify.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

durangod

oh ok ill check that out...

in the console the html shows div class generic_bar and then div class bar and shows 69%

ok ill be back if i figure it out for sure... thanks :)
My name is short for durango dave (i am not a god lol)

durangod

Here is the code in Memberlist.template.php


    if (!isset($context['disabled_fields']['posts']))
    {
        echo '
              <td class="post_count centertext">';

              if (!empty($member['posts']))
              echo '
                    <div class="generic_bar">
                    <div class="bar" style="width: ', $member['post_percent'], '%;"></div>
                      <span>', $member['posts'], '</span>
                    </div>';

          echo '
              </td>';
    }




ok so i looked up post_percent and it shows this is how its created

$context['members'][$member]['post_percent'] = round(($context['members'][$member]['real_posts'] * 100) / $most_posts);



so it looks like its the percent compared to the most posts, admin would have the mosts posts so that would mean 69% compared to the number of posts admin has. 

Seems thats right? 
My name is short for durango dave (i am not a god lol)

Kindred

#6
admin does not always have the most posts (e.g. here, Arantor has the most and I have the second most, by several thousand posts)

but yes... if you look here, my total is a percentage based against Arantor's max - as is everyone else - which means that most people are less than 1% :D

(Top 30 posters here are all current and former team members, [unknown] the original admin is 4th on the list of posters and user 1 is an automated/team account.)
Сл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."

Steve

My pet rock is not feeling well. I think it's stoned.

Advertisement: