1

Topic: moderation

hi smile

is it possible to give the rights of moderation of a forum to somebody without it being able to see the IPs and to have the other privilege of the moderators ?!
if yes how ?

thank's a lot

Re: moderation

Find this in viewtopic.php?

        if ($pun_user['g_id'] < PUN_GUEST)
        {
            $user_info[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a>';

            if ($cur_post['admin_note'] != '')
                $user_info[] = '<dd>'.$lang_topic['Note'].': <strong>'.pun_htmlspecialchars($cur_post['admin_note']).'</strong>';
        }

?and replace it with something like this:

        if ($pun_user['g_id'] == PUN_ADMIN) // mod
            $user_info[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a>';
        if ($pun_user['g_id'] < PUN_GUEST && $cur_post['admin_note'] != '')
            $user_info[] = '<dd>'.$lang_topic['Note'].': <strong>'.pun_htmlspecialchars($cur_post['admin_note']).'</strong>';

Re: moderation

Note that guardian34's code will mean no moderators can see IPs via viewtopic.php (it doesn't stop them from going directly to moderate.php or admin_users.php though). If you only want to exclude one or two moderators, you can include a reference to their IDs in the if statement

4

Re: moderation

no use

the moderater can use admin_user.php to view ip

5 (edited by kurudil 2006-11-28 03:00)

Re: moderation

Smartys wrote:

you can include a reference to their IDs in the if statement

can you write an examle please?
I have tried with

if ($pun_user['g_id'] < PUN_GUEST) && !$pun_user['id'] == '3'

but it seems i have an error in this way.... just seeing white screen in post-windows under this user.

6 (edited by Smartys 2006-11-28 03:57)

Re: moderation

i think your getting an error because you have a ')' after PUN_GUEST when it should be placed at the end?

if ($pun_user['g_id'] < PUN_GUEST && $pun_user['id'] != '3')

Edited by Smartys - That code should work fine

Re: moderation

Yeah, thanks a lot, you were right about the brackets, but the final code is:

if ($pun_user['g_id'] < PUN_GUEST && $pun_user['id'] !== '3')

(that is for future searchers smile ). Trying to study php smile

Re: moderation

You just need !=, !== is only useful if you want to be strict about type checking (which is irrelevant here)

Re: moderation

OK, changed to your variant, though they are working the same in practise. wink