diff --git a/ext/rating/main.php b/ext/rating/main.php index 17fa8b0d..8345b74b 100644 --- a/ext/rating/main.php +++ b/ext/rating/main.php @@ -103,9 +103,7 @@ class Ratings extends Extension { } public function onImageInfoBoxBuilding(ImageInfoBoxBuildingEvent $event) { - if($this->can_rate()) { - $event->add_part($this->theme->get_rater_html($event->image->id, $event->image->rating), 80); - } + $event->add_part($this->theme->get_rater_html($event->image->id, $event->image->rating, $this->can_rate()), 80); } public function onImageInfoSet(ImageInfoSetEvent $event) { diff --git a/ext/rating/theme.php b/ext/rating/theme.php index 889988d6..d3836c5d 100644 --- a/ext/rating/theme.php +++ b/ext/rating/theme.php @@ -6,17 +6,25 @@ class RatingsTheme extends Themelet { * @param string $rating * @return string */ - public function get_rater_html(/*int*/ $image_id, /*string*/ $rating) { + public function get_rater_html(/*int*/ $image_id, /*string*/ $rating, /*bool*/ $can_rate) { $s_checked = $rating == 's' ? " checked" : ""; $q_checked = $rating == 'q' ? " checked" : ""; $e_checked = $rating == 'e' ? " checked" : ""; + $human_rating = Ratings::rating_to_human($rating); $html = " Rating - - - + ".($can_rate ? " + $human_rating + + + + + + " : " + $human_rating + ")." "; diff --git a/ext/relatationships/theme.php b/ext/relatationships/theme.php index abc4302e..c53483c1 100644 --- a/ext/relatationships/theme.php +++ b/ext/relatationships/theme.php @@ -30,7 +30,7 @@ class RelationshipsTheme extends Themelet { global $user; $h_parent_id = $image->parent_id; - $s_parent_id = $h_parent_id ?: "None."; + $s_parent_id = $h_parent_id ?: "None"; $html = "\n". " Parent\n".