diff --git a/contrib/report_image/main.php b/contrib/report_image/main.php index 873396b8..215ccc0c 100755 --- a/contrib/report_image/main.php +++ b/contrib/report_image/main.php @@ -1,11 +1,12 @@ get_arg(0) == "remove") { if(isset($_POST['id'])) { - if($event->user->is_admin()) { + if($user->is_admin()) { send_event(new RemoveReportedImageEvent($_POST['id'])); global $page; $page->set_mode("redirect"); @@ -68,7 +69,7 @@ class report_image extends Extension { } } else if($event->get_arg(0) == "list") { - if($event->user->is_admin()) { + if($user->is_admin()) { global $page; $this->theme->display_reported_images($page, $this->get_reported_images()); } diff --git a/contrib/report_image/report_image.js b/contrib/report_image/report_image.js index 3fec3d27..015d985a 100755 --- a/contrib/report_image/report_image.js +++ b/contrib/report_image/report_image.js @@ -4,7 +4,7 @@ * Link: http://atravelinggeek.com/ * License: GPLv2 * Description: Report images as dupes/illegal/etc - * Version 0.3 - See changelog in main.php + * Version 0.3a - See changelog in main.php * November 06, 2007 */ diff --git a/contrib/report_image/theme.php b/contrib/report_image/theme.php index 1ef3c783..f93ef88d 100755 --- a/contrib/report_image/theme.php +++ b/contrib/report_image/theme.php @@ -6,8 +6,11 @@ * Link: http://atravelinggeek.com/ * License: GPLv2 * Description: Report images as dupes/illegal/etc - * Version 0.3 - See changelog in main.php + * Version 0.3a - See changelog in main.php * November 06, 2007 + * + * NOTE: This is for Shimmie2 SVN Trunk. Use the other theme.php.use... for Shimmie2 RCx. + * */ class ReportImageTheme extends Themelet { @@ -30,7 +33,7 @@ class ReportImageTheme extends Themelet { $h_reportedimages .= " - {$image_link}{$image_reported_thumb_html} + {$image_link} {$userlink} {$reportedimage['reason_type']} {$reason} diff --git a/contrib/report_image/theme.php.use.this.for.rcX.and.remove.the.other.theme.php.file b/contrib/report_image/theme.php.use.this.for.rcX.and.remove.the.other.theme.php.file new file mode 100755 index 00000000..825daac5 --- /dev/null +++ b/contrib/report_image/theme.php.use.this.for.rcX.and.remove.the.other.theme.php.file @@ -0,0 +1,99 @@ +".$reportedimage['reason'].""; + $reason .= $this->make_thumbnail_html($reportedimage['reason']); + } else { + $reason = $reportedimage['reason']; + } + + $image_link = "".$reportedimage['image_id'].""; + $image_link .= $this->make_thumbnail_html($reportedimage['image_id']); + $userlink = "{$reportedimage['reporter_name']}"; + + $h_reportedimages .= " + + {$image_link} + {$userlink} + {$reportedimage['reason_type']} + {$reason} + +
+ + +
+ + + "; + } + $html = " + + + $h_reportedimages +
ImageReporterReason TypeReason / Image IDAction
+ "; + + $page->set_title("Reported Images"); + $page->set_heading("Reported Images"); + $page->add_block(new NavBlock()); + $page->add_block(new Block("Reported Images", $html)); + + } + + protected function make_thumbnail_html($image_id) { + global $config; + global $database; + + if($config->get_bool('report_image_show_thumbs')) { + + $image_obj_reported = $database->get_image($image_id); + return "
" . build_thumb_html($image_obj_reported); + } + } + + public function display_image_banner($page, $image) { + + global $config; + + $page->add_header(""); + + $i_image = int_escape($image); + $html = " +
+ + + + +
+ "; + $page->add_block(new Block("Report Image", $html, "left")); + + } +} +?> \ No newline at end of file