diff --git a/contrib/rating/main.php b/contrib/rating/main.php
index 755590b3..92c26af2 100644
--- a/contrib/rating/main.php
+++ b/contrib/rating/main.php
@@ -144,6 +144,15 @@ class Ratings implements Extension {
return $set;
}
+ public static function rating_to_human($rating) {
+ switch($rating) {
+ case "s": return "Safe";
+ case "q": return "Questionable";
+ case "e": return "Explicit";
+ default: return "Unknown";
+ }
+ }
+
// FIXME: this is a bit ugly and guessey, should have proper options
private function can_rate() {
global $config, $user;
diff --git a/themes/danbooru/comment.theme.php b/themes/danbooru/comment.theme.php
index c961f7db..ff728eac 100644
--- a/themes/danbooru/comment.theme.php
+++ b/themes/danbooru/comment.theme.php
@@ -40,7 +40,8 @@ class CustomCommentListTheme extends CommentListTheme {
}
$p = autodate($image->posted);
- $comment_html = "Date $p $s User $un
Tags $t
";
+ $r = class_exists("Ratings") ? "Rating ".Ratings::rating_to_human($image->rating) : "";
+ $comment_html = "Date $p $s User $un $s $r
Tags $t
"; $comment_limit = $config->get_int("comment_list_count", 10); $comment_count = count($comments); if($comment_limit > 0 && $comment_count > $comment_limit) { @@ -103,12 +104,12 @@ class CustomCommentListTheme extends CommentListTheme { "href='".make_link("comment/delete/$i_comment_id/$i_image_id")."'>Del)" : ""; $h_imagelink = $trim ? ">>>\n" : ""; if($trim) { - return "
$h_userlink $h_dellink
Posted $h_posted
$h_comment
$h_userlink $h_dellink
$h_posted
$h_comment
$h_userlink Posted $h_posted$h_dellink |
+ $h_userlink $h_posted$h_dellink |
$h_comment |