diff --git a/public/profile.php b/public/profile.php index cc3317bb..50dd5fda 100644 --- a/public/profile.php +++ b/public/profile.php @@ -61,7 +61,12 @@ switch ($mode) { SELECT COUNT(`change_id`) FROM `msz_changelog_changes` WHERE `user_id` = u.`user_id` - ) as `changelog_count` + ) as `changelog_count`, + ( + SELECT COUNT(`comment_id`) + FROM `msz_comments_posts` + WHERE `user_id` = u.`user_id` + ) as `comments_count` FROM `msz_users` as u LEFT JOIN `msz_roles` as r ON r.`role_id` = u.`display_role` diff --git a/views/mio/user/view.twig b/views/mio/user/view.twig index bfcc58dd..22cb0f09 100644 --- a/views/mio/user/view.twig +++ b/views/mio/user/view.twig @@ -133,6 +133,19 @@ + {% if profile.comments_count > 0 %} +
+
+
+ Comments +
+
+ {{ profile.comments_count|number_format }} +
+
+
+ {% endif %} + {% if profile.changelog_count > 0 %}