Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: xB420WA - heinäkuu 15, 2014, 05:51:59 IP

Otsikko: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 15, 2014, 05:51:59 IP
Hello can some one tell me how to remove mod From admin EX

if admin is mod of any board in post it show his Group text and Group stars not "Moderator" or not stars but only for admins!
Otsikko: Re: help
Kirjoitti: Arantor - heinäkuu 15, 2014, 05:53:43 IP
You know you don't need to set up admins as moderators in each board, right?
Otsikko: Re: help
Kirjoitti: xB420WA - heinäkuu 15, 2014, 05:59:49 IP
Like this

I am mod of this board
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi58.tinypic.com%2F29bfzpg.png&hash=1ca7ed62c76654e569dcf7bc570b03b38fe147ae)

and i want like this only for admins!
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi60.tinypic.com%2F2wm03g1.png&hash=388a3bac9d64ed0479d2f71bb765a14c0cc9903c)
Otsikko: Re: help
Kirjoitti: xB420WA - heinäkuu 15, 2014, 06:00:22 IP
yes
Lainaus käyttäjältä: ‽ - heinäkuu 15, 2014, 05:53:43 IP
You know you don't need to set up admins as moderators in each board, right?
Otsikko: Re: help
Kirjoitti: Arantor - heinäkuu 15, 2014, 06:02:38 IP
So if you're the administrator, why have you explicitly listed yourself as moderator too? You really don't need to since admins can always do everything. (And it's faster not to, as well)
Otsikko: Re: help
Kirjoitti: xB420WA - heinäkuu 15, 2014, 06:05:34 IP
but i want just tell me how it will. ................
Otsikko: Re: help
Kirjoitti: Arantor - heinäkuu 15, 2014, 06:06:53 IP
The only way is to alter some of the code buried in the heart of SMF. Honestly, don't make an admin user a moderator of a board.
Otsikko: Re: help
Kirjoitti: xB420WA - heinäkuu 15, 2014, 06:09:23 IP
do you going to help me or not?
Otsikko: Re: help
Kirjoitti: Arantor - heinäkuu 15, 2014, 06:13:06 IP
I have been trying to help you by telling you the *best* route to dealing with this because SMF wasn't designed to work the way you want it to!

If you truly must insist on messing with the code because you won't take the best (faster, smarter, more reliable) solution for this problem, find this code in the middle of Sources/Load.php:
foreach ($temp_mods as $id)
{
// 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'];
}


And change it:
foreach ($temp_mods as $id)
{
// 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]['id_group'] != 1 && $user_profile[$id]['id_group'] != 2)
$user_profile[$id]['stars'] = $row['stars'];
if (!empty($row['member_group_color']) && $user_profile[$id]['id_group'] != 1 && $user_profile[$id]['id_group'] != 2)
$user_profile[$id]['member_group_color'] = $row['member_group_color'];
}
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 15, 2014, 06:28:18 IP
in which file index.css              ?
Otsikko: Re: Remove moderator from board
Kirjoitti: Antechinus - heinäkuu 15, 2014, 06:30:12 IP
I can see this ending well. :D
Otsikko: Re: Remove moderator from board
Kirjoitti: Arantor - heinäkuu 15, 2014, 06:32:36 IP
Lainaus käyttäjältä: Antechinus - heinäkuu 15, 2014, 06:30:12 IP
I can see this ending well. :D

This is precisely I didn't want to go down this road.

Lainaus käyttäjältä: Tisot - heinäkuu 15, 2014, 06:28:18 IP
in which file index.css              ?

No, it is in Sources/Load.php. It is not part of your theme and cannot be edited from anywhere in the admin panel. If you want to change it, you have to do it via your host's control panel or downloading the file to your computer to change it, only to reupload it.

Trust me, I do have some idea what I'm talking about on this point. I wouldn't have 60,000 posts here if I didn't.
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 15, 2014, 06:42:41 IP
i have four Admins groups but its removed for Default Administrator not for other!
Otsikko: Re: Remove moderator from board
Kirjoitti: Arantor - heinäkuu 15, 2014, 06:44:10 IP
You didn't tell me that before, so I'm supposed to read your mind?

Good luck getting help, I'm out.
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 15, 2014, 06:46:15 IP
srsly sorry no one is here plz help me
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 15, 2014, 07:07:05 IP
omg i didn't tell me about this i put this 4 times with Member group id
if ($user_profile[$id]['id_group'] != 1 && $user_profile[$id]['id_group'] != 1)
if ($user_profile[$id]['id_group'] != 1 && $user_profile[$id]['id_group'] != 9)
if ($user_profile[$id]['id_group'] != 1 && $user_profile[$id]['id_group'] != 10)
if ($user_profile[$id]['id_group'] != 1 && $user_profile[$id]['id_group'] != 11)

now php bugged plz help me for god sake
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi62.tinypic.com%2F2iuvyb6.png&hash=aae2016ba6f6b35fed6761332aff769d5573ba9f)
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 15, 2014, 07:17:36 IP
Help me brOOO
Otsikko: Re: Remove moderator from board
Kirjoitti: Kindred - heinäkuu 15, 2014, 07:21:27 IP
1-, that is not proper php code at all.

2- do not bump your posts like that... Especially not after only 10 minutes... That is just plain rude.

3- you wasted what little goodwill you had from the expert.

Basically... Undo what you did and follow the original instructions... Don't make an admin into a moderator.  That solves all of the problems without any code change.  Admins already have all permissions, so there is no reason to do it In The first place
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 15, 2014, 08:20:06 IP
ik but i have senior administrator to mod of Other main board that why i am saying
Otsikko: Re: Remove moderator from board
Kirjoitti: Kindred - heinäkuu 15, 2014, 09:02:29 IP
So?

If they have admin powers, there is no need to make them a moderator. Period.
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 16, 2014, 06:58:32 AP
kinderd i know just leave it and tell me the code
Otsikko: Re: Remove moderator from board
Kirjoitti: kat - heinäkuu 16, 2014, 07:44:41 AP
Tisot... You're not listening...

What you want to do is pointless, other than a tiny bit of eye-candy, for you, perhaps.

It's also likely to break things, which is why you're being advised not to do it.

Which is why, too, people aren't telling you how.

If you REALLY want to break everything, go ahead. But, do you really expect us to help you to do it (Knowing you'll only come back and ask someone to fix it)? I doubt that's gonna happen...

It's rather like you saying "I've found this yellow stuff. If I put it on my face, it'll look great! Help me, would you?" and, even though we know it's sulphuric acid, we paint it on.

Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 16, 2014, 06:01:16 IP
first of all i already say sorry to him because i didn't knew that it code will only apply for "Default Administrator" i thought it will apply for all Primary Groups after i put wrong coding in load then its damaged and i getting php errors in my forums it doesn't work then i get new load file from SMF 2.0.8 and put in "Source" then it working good! but i want that "if any Primary Group is Mod of any board then don't show "Moderator" group name or "Stars" just show group Name or Stars, i just want coding cuz haven't know about php coding i am just know bit of web designing! not this!!!!! so plz it is request to you Kinderd help me, before this post you help me very much once again i thanks you.
Otsikko: Re: Remove moderator from board
Kirjoitti: Kindred - heinäkuu 17, 2014, 01:15:10 AP
Lainaus käyttäjältä: Kindred - heinäkuu 15, 2014, 09:02:29 IP
If they have admin powers, there is no need to make them a moderator. Period.
Otsikko: Re: Remove moderator from board
Kirjoitti: Justyne - heinäkuu 17, 2014, 04:50:27 AP
This might not be entirely what you want, but you can put the mod stars and badges on and make the admin stars/bar one that is always shown. That way it would bouble with moderator and you'd at least be able to see both rather than just one.

I get why you want the admin as mod. Sometimes its useful to make a public assignment of responsibility for members to see so they know who to contact on a particular matter.

Just offering this as it might be a compromise for you.

If you want a screenshot of what that can look like I can grab one from my community.
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 17, 2014, 10:10:58 AP
sure
Otsikko: Re: Remove moderator from board
Kirjoitti: Justyne - heinäkuu 17, 2014, 10:19:02 AP
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.magical-hogwarts.org%2Favatars%2Fadminmods.png&hash=61b9a34382ec809be80691d7b1bdccc76a8c5c0e) (http://www.magical-hogwarts.org/avatars/adminmods.png)

Click to enlarge.

And a mod who is also an admin versus a regular mod. We have our admins show with their name instead of something saying "admin" but I am sure you get the idea.
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 17, 2014, 12:35:27 IP
nah not like this
Lainaus käyttäjältä: Tisot - heinäkuu 15, 2014, 05:59:49 IP
Like this

I am mod of this board
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi58.tinypic.com%2F29bfzpg.png&hash=1ca7ed62c76654e569dcf7bc570b03b38fe147ae)

and i want like this only for admins!
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi60.tinypic.com%2F2wm03g1.png&hash=388a3bac9d64ed0479d2f71bb765a14c0cc9903c)
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 17, 2014, 12:36:18 IP
i can say my group ids to remove moderator name and stars from there but if any one help me!
Otsikko: Re: Remove moderator from board
Kirjoitti: Justyne - heinäkuu 17, 2014, 12:37:53 IP
I understand what you want, but quite frankly without major editing that is not possible as it just doesn't work with the way SMF is built.

I was trying to offer you something that might achieve similar functionality without having to rip apart your board's guts.

Truth is, if you can't code this yourself its unlikely anybody else will as its a lot of code to write for a minor cosmetical thing that most users of the software will never encounter.
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 17, 2014, 07:18:07 IP
look at this:
Lainaus käyttäjältä: ‽ - heinäkuu 15, 2014, 06:13:06 IP
I have been trying to help you by telling you the *best* route to dealing with this because SMF wasn't designed to work the way you want it to!

If you truly must insist on messing with the code because you won't take the best (faster, smarter, more reliable) solution for this problem, find this code in the middle of Sources/Load.php:
foreach ($temp_mods as $id)
{
// 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'];
}


And change it:
foreach ($temp_mods as $id)
{
// 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]['id_group'] != 1 && $user_profile[$id]['id_group'] != 2)
$user_profile[$id]['stars'] = $row['stars'];
if (!empty($row['member_group_color']) && $user_profile[$id]['id_group'] != 1 && $user_profile[$id]['id_group'] != 2)
$user_profile[$id]['member_group_color'] = $row['member_group_color'];
}


but its Apply for Default Administrator not other Groups if think that it possible to make then ask me to tell my SMF Forums Primary Group ID
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 19, 2014, 10:15:02 AP
sO you guys not going to help me k not problem
Otsikko: Re: Remove moderator from board
Kirjoitti: kat - heinäkuu 19, 2014, 10:21:12 AP
It's the weekend... A lot of people aren't here, much, over the weekend.

Patience is a virtue and all that... ;)
Otsikko: Re: Remove moderator from board
Kirjoitti: Arantor - heinäkuu 19, 2014, 01:15:06 IP
Not just that but we have a serious refusal to help when the person doesn't want to listen to what's being suggested even when multiple SMF experts are saying the same thing.
Otsikko: Re: Remove moderator from board
Kirjoitti: xB420WA - heinäkuu 20, 2014, 04:36:48 IP
sO?
Otsikko: Re: Remove moderator from board
Kirjoitti: Burke ♞ Knight - heinäkuu 20, 2014, 04:43:43 IP
Lainaus käyttäjältä: K@ - heinäkuu 19, 2014, 10:21:12 AP
It's the weekend... A lot of people aren't here, much, over the weekend.

Patience is a virtue and all that... ;)

Lainaus käyttäjältä: ‽ - heinäkuu 19, 2014, 01:15:06 IP
Not just that but we have a serious refusal to help when the person doesn't want to listen to what's being suggested even when multiple SMF experts are saying the same thing.