https://www.icyphoenix.com/viewtopic.php?f=28&t=7215
-----------------------------------
TopoMotoV3X
Mon 28 Jun, 2010 18:52

[MOD] Moderate Ajax Chat Permissions For Moderators
-----------------------------------
I share this change made on [url=http://www.icyphoenix.it/ajax-chat-dare-permessi-di-moderatore-ai-moderatori-vp31893.html#p31893]IcyPhoenix Italy 


Go to: [b][i]root/includes/[/i][/b]

File: [b][i]ajax_shoutbox_inc.php[/i][/b]

Search:
[code linenumbers=false]	// Code for Deleting Data
	elseif ($action == 'del')
	{
		if(($userdata['user_level'] == ADMIN) && ($userdata['session_logged_in']))
		{
			$shout_id = intval($_POST['sh']);

			$sql = 'DELETE FROM ' . AJAX_SHOUTBOX_TABLE . '
					WHERE shout_id =' . $shout_id;

			if(!($result = $db->sql_query($sql)))
			{
				$error = AJAX_SHOUTBOX_ERROR;
				$error_msg = $lang['Shoutbox_unable'];
			}
		}
	}[/code]

Replace with: 

[code linenumbers=false]	// Code for Deleting Data
	elseif ($action == 'del')
	{
		if(($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD) && ($userdata['session_logged_in']))
		{
			$shout_id = intval($_POST['sh']);

			$sql = 'DELETE FROM ' . AJAX_SHOUTBOX_TABLE . '
					WHERE shout_id =' . $shout_id;

			if(!($result = $db->sql_query($sql)))
			{
				$error = AJAX_SHOUTBOX_ERROR;
				$error_msg = $lang['Shoutbox_unable'];
			}
		}
	}
	pseudo_die($error, $error_msg);
}[/code]


Search: 		[code linenumbers=false]//message_die(GENERAL_MESSAGE, $lang['Shoutbox_no_auth']);
		pseudo_die(GENERAL_MESSAGE, $lang['Shoutbox_no_auth']);
	}
}

$template->assign_block_vars('view_shoutbox.onload', array());

if($userdata['user_level'] == ADMIN)
{
	$template->assign_block_vars('view_shoutbox.user_is_admin', array());
}
[/code]

Replace with: 		   [code linenumbers=false]    //message_die(GENERAL_MESSAGE, $lang['Shoutbox_no_auth']);
        pseudo_die(GENERAL_MESSAGE, $lang['Shoutbox_no_auth']);
    }
}

$template->assign_block_vars('view_shoutbox.onload', array());


if($userdata['user_level'] == MOD || ($userdata['user_level'] == ADMIN ))
{

    $template->assign_block_vars('view_shoutbox.user_is_admin', array());
}[/code]

Enjoy!  8)


