Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: Acans - tammikuu 22, 2009, 09:01:39 AP

Otsikko: Local Moderators
Kirjoitti: Acans - tammikuu 22, 2009, 09:01:39 AP
Hello, I would like to disable people being shown as local moderators inside certain boards but still show them as moderators in the board index, EG, instead of showing them as moderator with the default stars i want their primary membergroup to be show

Note, i only want this for certain boards
Otsikko: Re: Local Moderators
Kirjoitti: Kermit - tammikuu 22, 2009, 09:18:30 AP
Perhaps you want sth. like that  ::)

Lainaa
Sources/Load.php

Koodi (find) [Valitse]
// By popular demand, don't show admins or global moderators as moderators.
         if ($user_profile[$id]['ID_GROUP'] != 1 && $user_profile[$id]['ID_GROUP'] != 2)
            $user_profile[$id]['member_group'] = $row['member_group'];

         // If the Moderator group has no color or stars, but their group does... don't overwrite.
         if (!empty($row['stars']))
            $user_profile[$id]['stars'] = $row['stars'];
         if (!empty($row['member_group_color']))
            $user_profile[$id]['member_group_color'] = $row['member_group_color'];




Koodi (replace with) [Valitse]
         // By popular demand, don't show admins or global moderators as moderators.
         if ($user_profile[$id]['ID_GROUP'] != 1 && $user_profile[$id]['ID_GROUP'] != 2 &&  $user_profile[$id]['ID_GROUP'] != 3) {
            $user_profile[$id]['member_group'] = $row['member_group'];

            // If the Moderator group has no color or stars, but their group does... don't overwrite.
            if (!empty($row['stars']))
               $user_profile[$id]['stars'] = $row['stars'];
            if (!empty($row['member_group_color']))
               $user_profile[$id]['member_group_color'] = $row['member_group_color'];
         }
         //Above the Color Fix by DIN1031, it's possible it will be insert sometime!


Let me know,if that works
Otsikko: Re: Local Moderators
Kirjoitti: Acans - tammikuu 22, 2009, 09:41:09 AP
it works, thanks
Otsikko: Re: Local Moderators
Kirjoitti: Acans - helmikuu 02, 2009, 05:37:45 AP
Lainaus käyttäjältä: α¢αηѕ - tammikuu 22, 2009, 09:41:09 AP
it works, thanks

I made a mistake with my group i was testing, the id was 2 so that works, the one i change from 3 to the required id was 17 but it doesnt work.
Otsikko: Re: Local Moderators
Kirjoitti: Kermit - helmikuu 02, 2009, 05:43:50 AP
You can add to the related if-expression as much groups as you wish

         // By popular demand, don't show admins or global moderators as moderators.
         if ($user_profile[$id]['ID_GROUP'] != 1 && $user_profile[$id]['ID_GROUP'] != 2 &&  $user_profile[$id]['ID_GROUP'] != 3 && $user_profile[$id]['ID_GROUP'] != x && $user_profile[$id]['ID_GROUP'] != y ) {


x & y should be replaced with the related group_ids
Otsikko: Re: Local Moderators
Kirjoitti: Acans - helmikuu 02, 2009, 05:59:56 AP
nope, I tryed it, and deleted my cathe after it, but still doesnt work
Otsikko: Re: Local Moderators
Kirjoitti: Kermit - helmikuu 02, 2009, 06:09:42 AP
But it should,there is no other way to achieve that !

You make probably something wrong with the group_id's
Otsikko: Re: Local Moderators
Kirjoitti: Acans - helmikuu 02, 2009, 06:12:19 AP
mines set like this

// By popular demand, don't show admins or global moderators as moderators.
         if ($user_profile[$id]['ID_GROUP'] != 1 && $user_profile[$id]['ID_GROUP'] != 2 &&  $user_profile[$id]['ID_GROUP'] != 17 ) {
Otsikko: Re: Local Moderators
Kirjoitti: Kermit - helmikuu 02, 2009, 06:29:17 AP
What kinda group is that ? Also with ID 17-  Maybe post-based ?
Otsikko: Re: Local Moderators
Kirjoitti: Acans - helmikuu 02, 2009, 06:34:03 AP
requestable
Otsikko: Re: Local Moderators
Kirjoitti: Kermit - helmikuu 02, 2009, 06:38:09 AP
Can you take a screenshot from your membergroup list,is that possible ?
Otsikko: Re: Local Moderators
Kirjoitti: Acans - helmikuu 02, 2009, 05:36:53 IP
the membergroup index, or the edit page for the group im trying not to show as a local
Otsikko: Re: Local Moderators
Kirjoitti: Rumbaar - helmikuu 11, 2009, 08:03:02 IP
Is that membergroup (ID17) their primary membergroup?
Otsikko: Re: Local Moderators
Kirjoitti: Acans - helmikuu 11, 2009, 11:18:05 IP
Lainaus käyttäjältä: α¢αηѕ - helmikuu 02, 2009, 05:36:53 IP
the membergroup index, or the edit page for the group im trying not to show as a local

yes, and they have no addionatly membergroups
Otsikko: Re: Local Moderators
Kirjoitti: Rumbaar - helmikuu 12, 2009, 02:14:26 AP
Well it should work.  Try to delete all the stars from the Moderator member group.  It will then default to the normal Post Count group stars and have the defined Primary Membergroup.
Otsikko: Re: Local Moderators
Kirjoitti: Acans - helmikuu 12, 2009, 02:28:14 AP
Lainaus käyttäjältä: Rumbaar - helmikuu 12, 2009, 02:14:26 AP
Well it should work.  Try to delete all the stars from the Moderator member group.  It will then default to the normal Post Count group stars and have the defined Primary Membergroup.

Didn't work, I went into the load.php file tho and the dev's have added this

// If the Moderator group has no color or stars, but their group does... don't overwrite.
if (!empty($row['stars']))
$user_profile[$id]['stars'] = $row['stars'];
if (!empty($row['member_group_color']))
$user_profile[$id]['member_group_color'] = $row['member_group_color'];


Once i removed the local mod colour it worked, thanks for your help Rumbaar