That's Great ! It works with 1.7.7 quit well
!
many thanks to TheOracle
..
I've seen some people asking about some stuff in this MOD , and I've not seen answers !
So, I decide to register here and help them
..
I don't have much of experience in PHP , but I'm gonna do my best ..
First matter, how can I make the [MOD] go back to the same image after reporting instead of going to the category?
That's a good question, because going back to the category doesn't make sense to me
.. I think it is better if it comes back to the same image.
Here is the way how we can do that ..
Open this file :
report_pic.php , then find :
$redirect = "<meta http-equiv=\"refresh\" content=\"2; url=".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".(isset($cat_id)), "&")."\">";
Replace it with:
$redirect = "<meta http-equiv=\"refresh\" content=\"2; url=".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id , "&")."\">";
That's it
One more thing .. and I've seen this question in this thread many times .. with no answer
How can I make guests report images as well ?!
this is how we make it .. and by the way .. I'm not quit sure if this is the perfect way to do it .. I've told u that I'm not that good with PHP
..
anyway .. this works fine with me .. so try it and tell me if it works with u
Open
report_pic.php file .. now find :
if ($user_info['user_level'] == GUEST && !ereg("details.php", $url)) {
$msg = ($lang['report_failed_comments']) ? $lang['report_failed_comments'] : "";
$site_template->register_vars(array(
"lang_report_title" => ($lang['report_pic_title']) ? $lang['report_pic_title'] : "",
"msg" => $msg
));
$site_template->print_template($site_template->parse_template("report_pic_failed"));
$redirect = "<meta http-equiv=\"refresh\" content=\"2; url=".$site_sess->url(ROOT_PATH."index.php", "&")."\">";
echo $redirect;
unset ($redirect);
exit;
}
Delete it all ..
Yes I'm sure .. Delete it all
.. this IF statement restrict guest ability to report images ..
Now open
includes/functions.php , find:
$lightbox_button = "<img src=\"".get_gallery_image("lightbox_off.gif")."\" border=\"0\" alt=\"\" />";
}
Below this, add:
if ($user_info['user_level'] != GUEST) {
$report_url = ($config['report_image_status'] == 0 && $user_info['user_level'] >= USER) ? $site_sess->url(ROOT_PATH."report_pic.php?".URL_CAT_ID."=".$image_row['cat_id']."&cat_name=".$image_row['cat_name']."&".URL_IMAGE_ID."=".$image_row['image_id']."&image_name=".$image_row['image_name']) : "";
}
else {
$report_url = "".$site_sess->url(ROOT_PATH."report_pic.php?").URL_CAT_ID."=".$image_row['cat_id']."&cat_name=".$image_row['cat_name']."&".URL_IMAGE_ID."=".$image_row['image_id']."&image_name=".$image_row['image_name']."";
}
That's it
..
Note : allowing guests to report could cause spamming emails from guests and bots. so, be careful.I hope I helped a little .. and keep up guys the good work ..