MyBB Community Forums

Full Version: Group Promotions - Display User Group
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
The group promotions are working like a charm.
The only thing i am trying to figger out is to have it also change the "new display user group" to match the new group he is promoted to.

In this case, a user is bumped up from newbie group to members group.
[Image: 23wlaid.jpg]

It does add them to the members group, but does not change their "new display user group"

When you view them on the board, they may be a member, but it does not display that in the postbit. It confuses them.

Here are my setting i use.
[Image: 5k3qk4.jpg]

Can someone help me please?

Thanks!
I suggest that in the settings for the user, you set 'Display User Group' to 'Use Primary User Group'. This means that the promotion will change their primary group, which will then show in their profile. Then keep the second screenshot and if my logic is correct it should work as you want it.
You may need a plugin to accomplish this properly.
Thanks Matt, The first pic you see is what its like after the promotion has did it thing on a user.
I have to make it correct after the promotion when viewing the promotion logs. I need to always edit their profile.

The second pic is my settings

So.. not sure what you are getting at bro..
Wow.. really? Why is it not like this to begin with? Thats crazy!
Who would want to give someone a promotion .. but hide it from the board? LMAO!

I don't see a point in not showing a users proper group rank on the board.
Quote:Who would want to give someone a promotion .. but hide it from the board? LMAO!

You're not hiding it. It's a users choice. They can go into their usercp and alter their own display group if you allow it. If you want the promotion to automatically overwrite the display group you will need a plugin.

I realize that there COULD be a setting there to "make it display group" but ...it's not there. So to deal with that you either have to convince mybb to add it next version (1.6x) or create a plugin that does it. Those are your realistic choices.
Oh I see what you mean now, nevermind then Smile
I understand labrocca

I will need a plugin then, we have it set so users can not change their display group.
For our board, this works best so we can fast keep an eye on who's in what group.

If someone can make this plugin, that would be great.

I am sure others will want it to Wink

I am not going to bother the mybb team with my suggestions.
I would need this asap. Not the next big update. Would be nice to see it added thou.
Uh Oh...no hooks in the promotions task file (or any task file).

Inside inc/tasks/promotions.php this line is there twice:


$db->update_query("users", array('usergroup' => $promotion['newusergroup']), "uid IN(".implode(",", $uids).")");


Try changing it to this:


$db->update_query("users", array('usergroup' => $promotion['newusergroup'], 'displaygroup' => $promotion['newusergroup']), "uid IN(".implode(",", $uids).")");

Now after this line:

join_usergroup($user['uid'], $promotion['newusergroup']);

Add this:

$db->update_query("users", array('displaygroup' => $promotion['newusergroup']), "uid='". $user['uid']."'");



I have not tested that but it's close as long as I haven't any typos. TEST IT.
ok, thank you labrocca
I don't see any setting change.. so ..
The next time it does it's thing, i will check it to see if it worked.


I will let you know in this thread.

Then others can use this to if it works!
ok, it's confirmed.. the code change does work!

Thanks again labrocca
Pages: 1 2