News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Correct Number of Stars not shown for Post Count Based Member Group.

Started by dsmclaughlin22, April 28, 2015, 08:30:57 AM

Previous topic - Next topic

dsmclaughlin22

Hi Folks,

I've been trying to understand the post based member groups, but in spite of searching in this support forum and on google, I couldn't find someone with the same problem, I'm hoping someone here can help.

The problem I have is to do with displaying the correct number of stars for a given post count. As an example when a member has made 10 posts I want to give them 2 stars, 100 posts 3 stars, etc.

So I've created a post based group which has the required posts set to 10 and the number of stars set to 2, however, when a user that is in that post based group makes a post in a thread, it still only shows the default value of one star next to their name. See the image attached.

Can anyone suggest why this might be?

Thanks!

~Drew

Illori

if a user is a group other then regular members, the badge/stars for that group will show instead of the post count group ones. that user is in the club members group so it shows that groups stars instead.

dsmclaughlin22

Hi Illori,

Thanks for your reply.

So as I understand it the Regular group is overriding the stars for the post count based group (and not the other way round as I expected it).

However, I'm not sure what the solution to my problem is, can you suggest how I should structure they groups so I get the functionality I want?

~Drew

Illori

put the group as additional in their profile so it does not show, then the post count stars/badges will show. otherwise there is no fix for this.

dsmclaughlin22

sorry, I dont follow

"put the group" - by group do you mean the post count based group or the regular group?

"as additional" - what do you mean by as additional? this may be some form of configuration I'm not familiar with, I'm still pretty much a SMF noob.

Thanks for your help!

~Drew

Kindred

1- there are primary groups and secondary groups.
the primary group displays as the title and badge -- and will replace any post-count based badge display.
the secondary group(s) do not display, but will grant all permissions.

2- there are mods that will allow for multiple group badges to be displayed.


3- I suggest that you read the wiki/manual on groups...
Сл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."

dsmclaughlin22

Hi Kindred,

Thanks I will look up that documentation and read it.

Although, I'm just slightly confused as awarding users stars based on post count seems (to me) like a fairly run of the mill thing to want to do, I though I was just missing something obvious.

Surely it should be easy to increase the number of stars based on post count for a primary group? If I could configure the number of stars based on the post count without having post count based groups that would be fine to.

I just cant quite see how to do it, if there is a simple way, I would be very keen to hear how.

Otherwise maybe the docs will help!

Cheers!

~Drew

Kindred

no...   post count groups are separate and not associated to the "regular" groups...  there is no connection between the two
Сл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."

dsmclaughlin22

Hi,

Thanks to those of you above who have tried to help thus far, but I'm still stuck, even after reading this documentation http://wiki.simplemachines.org/smf/SMF2.0:Membergroups

So, I've gone back to basics. If you look at the attached image you will see that I have my Regular member-groups and just one Post Count based group.

I want to achieve the following:

1) The users have one set of stars displayed in the colour appropriate to their Regular members-group (see attached for the colours selected in the Regular Groups)

2) The number of stars displayed is as follows:

1 - 9 posts = 1 star
10 - 99 posts = 2 stars
100 - 249 posts = 3 stars
250 - 499 posts = 4 stars
500 + = 5 stars

How can I achieve this? Creating post count based groups doesn't seem to be the solution as if I create a different post count based group for each colour of star (i.e. each Regular Member Group) the post count based groups over ride each-other, there doesn't seem to be a way to diffcratinate as to which post count based group is appropriate for a particular user based on their Regular Member Group.

I would be really grateful if someone could point me in the correct direction.

Thanks again!

~Drew


Kindred

Сл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."

dsmclaughlin22

Ahh ok well at least I know what I'm trying to do is impossible.

So... next question: what are my options?

Illori


dsmclaughlin22

so if I want the number of stars to go up in relation to post count all the stars have to be the same colour? Or is that not even a possibility?

My aim now is to understand what other things I could do within SMF to give similar functionality?

Kindred

for membergroups, post-count or otherwise, you define the image you want used (star/badge/whatever you want to call it) and the number of times that single image is repeated.

So for EVERY membergroup, the repeated image will be THE SAME... 

You can NOT:
1- have a different color star for each rank.
2- have a different variation of the post-count ranks based on the "non-post-count" group that the user belongs to.

You COULD:
create an image with 1-blue star for post-count group 1
create an image with 1-blue and 1-green star for post count group 2
etc

that is your only option.
Сл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."

dsmclaughlin22

OK! :) I thought I was trying to do something very simple when in fact it was not.

Thanks for the help!!

dsmclaughlin22

I found a solution to this problem:

1) Remove all stars from Regular Groups

2) Set up post count based groups with the same star colour as the "lowest level" user.

3) Check for the member group and substitute in the correct star colour in Load. php


if ($user_profile[$user]['id_group'] == 1) //Web Admin
$profile['stars'] = str_replace('star.gif', 'staradmin.gif', $profile['stars']);

        if ($user_profile[$user]['id_group'] == 11) //Committee
$profile['stars'] = str_replace('star.gif', 'stargmod.gif', $profile['stars']);

        if ($user_profile[$user]['id_group'] == 12) //Committee Membership Sec
$profile['stars'] = str_replace('star.gif', 'stargmod.gif', $profile['stars']);

        if ($user_profile[$user]['id_group'] == 18) //Club Members
$profile['stars'] = str_replace('star.gif', 'starmod.gif', $profile['stars']);


The original solution is posted here:

http://www.simplemachines.org/community/index.php?topic=376047.0

Advertisement: