Display comment count on profiles.
This commit is contained in:
parent
97d2965d7d
commit
13d99a70a4
2 changed files with 19 additions and 1 deletions
|
@ -61,7 +61,12 @@ switch ($mode) {
|
||||||
SELECT COUNT(`change_id`)
|
SELECT COUNT(`change_id`)
|
||||||
FROM `msz_changelog_changes`
|
FROM `msz_changelog_changes`
|
||||||
WHERE `user_id` = u.`user_id`
|
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
|
FROM `msz_users` as u
|
||||||
LEFT JOIN `msz_roles` as r
|
LEFT JOIN `msz_roles` as r
|
||||||
ON r.`role_id` = u.`display_role`
|
ON r.`role_id` = u.`display_role`
|
||||||
|
|
|
@ -133,6 +133,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if profile.comments_count > 0 %}
|
||||||
|
<div class="profile__info__block">
|
||||||
|
<div class="profile__info__row">
|
||||||
|
<div class="profile__info__column profile__info__column--heading">
|
||||||
|
Comments
|
||||||
|
</div>
|
||||||
|
<div class="profile__info__column profile__info__column--numeric">
|
||||||
|
{{ profile.comments_count|number_format }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if profile.changelog_count > 0 %}
|
{% if profile.changelog_count > 0 %}
|
||||||
<div class="profile__info__block">
|
<div class="profile__info__block">
|
||||||
<a class="profile__info__row profile__info__row--link" href="/changelog.php?u={{ profile.user_id }}">
|
<a class="profile__info__row profile__info__row--link" href="/changelog.php?u={{ profile.user_id }}">
|
||||||
|
|
Loading…
Add table
Reference in a new issue