Topic: moderation
hi
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
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 discussion → moderation
hi
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
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>';
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
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.
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
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 ). Trying to study php
You just need !=, !== is only useful if you want to be strict about type checking (which is irrelevant here)
OK, changed to your variant, though they are working the same in practise.
PunBB Forums → PunBB 1.2 discussion → moderation
Powered by PunBB, supported by Informer Technologies, Inc.