News:

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

Main Menu

show hidden users to a certain group

Started by SleePy, December 28, 2005, 05:28:50 PM

Previous topic - Next topic

SleePy

how would i show the hidden users to a group? the group doesn't have global moderator. but most of them got moderator to 1 or 2 boards.
I have looked around display.template.php and i can't find nothing or when i look in the permissions thing for that group there is nothing telling me to allow this group to view hidden users.

Thanks.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Dannii

I think you need to give the group the manage_members permission, although I'm not sure.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

SleePy

i thought i could some were in the BoardIndex.template.php i could add it in to allow them to view it.
i see the place were it shows the hidden users but i see no if statements on it that let admins and global mods see them.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Dannii

BoardIndex.php
elseif (empty($row['showOnline']) && !allowedTo('moderate_forum'))I think if you modified that line so that it will only be true if empty($row[etc && !allowedTo(etc and not in the group you want to be able to view hidden members.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

SleePy

yea i found that. how would i get it to only do it if they are in a group? or additional groups would this work?

elseif (empty($row['showOnline']) && !allowedTo('moderate_forum') && !$context['member']['group'] == '3')

i dont know how to find out what group the user is in or those additional groups.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Dannii

You won't be able to test for group 3 (moderators).

But for other groups:
Quote from: [Unknown] on August 13, 2004, 07:27:04 AMif (in_array(##, $GLOBALS['user_info'][groups']))

Where ## is the ID_GROUP of the group you're checking for - 4 is Newbie, 1 is Administrator, etc.

-[Unknown]
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

SleePy

theres and error in tht i had to fix
$GLOBALS['user_info'][groups']
should be
$GLOBALS['user_info']['groups']

but it did not work...  :(

elseif (empty($row['showOnline']) && !allowedTo('moderate_forum') && $GLOBALS['user_info']['groups'] != '16')
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Dannii

Hmmm does $context['user_info']['groups'] work? That was an old post of [Unknown] so the code would have changed.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Advertisement: