4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: bacterio on October 14, 2008, 11:40:51 PM
-
Hello.
As a user could avoid making comments.
I must add that online detail.php?
Greetings :?:
-
I'm sorry, I didn't understand your question...
-
Yes... for example:
if user is number xxx go to error
In detail.php:
//-----------------------------------------------------
//--- Save Comment ------------------------------------
//-----------------------------------------------------
$error = 0;
if ($action == "postcomment" && isset($HTTP_POST_VARS[URL_ID])) {
$id = intval($HTTP_POST_VARS[URL_ID]);
$sql = "SELECT cat_id, image_allow_comments
FROM ".IMAGES_TABLE."
WHERE image_id = $id";
$row = $site_db->query_firstrow($sql);
if ($row['image_allow_comments'] == 0 || !check_permission("auth_postcomment", $row['cat_id']) || !$row) {
$msg = $lang['comments_deactivated'];
}
else if ( $user_info['user_id'] == 200 ) {
show_error_page($lang['Not posible']);
}
For example..... but this does not work for me .... This is not my php code ....
-
In details.php find: unset($random_cat_image);
Insert below:
$ids = array(200); //user ids who you don't want allow post comments
if (in_array($user_info['user_id'], $ids))
{
$cat_cache[$cat_id]['auth_postcomment'] = AUTH_ADMIN;
}
You can add as many user_id as you wish, separate them with comma.
-
Thank you very much, it works fine. I'd like to leave a text diciedo (You can not make comments) ... I will see if it do so.
Greetings!