Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post
Post [MOD] Moderate Ajax Chat Permissions For Moderators 
 
I share this change made on IcyPhoenix Italy


Go to: root/includes/

File: ajax_shoutbox_inc.php

Search:
Code: [Download] [Hide] [Select]
    // 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'];
            }
        }
    }


Replace with:

Code: [Download] [Hide] [Select]
    // 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);
}



Search:         
Code: [Download] [Hide] [Select]
//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());
}


Replace with:           
Code: [Download] [Hide] [Select]
    //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());
}


Enjoy!  
 




____________
IP Version: 1.3.0.53b
Server: Linux
 
TopoMotoV3XSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron