diff --git a/src/inc/locales/de.json b/src/inc/locales/de.json index 80db4b0..d0fb8e7 100644 --- a/src/inc/locales/de.json +++ b/src/inc/locales/de.json @@ -176,10 +176,8 @@ "font_default": "Standard", "theme": "Thema", "flash_section": "Flash", - "flash_bg": "Flash im Hintergrund abspielen", "flash_bg_hint": "Verhindert, dass Ruffle pausiert, wenn der Tab verlassen wird", - "notifications_section": "Benachrichtigungseinstellungen", "receive_system_notifications": "Systembenachrichtigungen erhalten", "receive_system_notifications_hint": "Benachrichtigungen über Erfolg/Fehler bei Hintergrund-Uploads umschalten. Kritische Moderationsaktionen werden immer angezeigt.", @@ -444,6 +442,8 @@ "stat_sfw": "SFW-Inhalte", "stat_nsfw": "NSFW-Inhalte", "stat_deleted": "Gelöscht", + "stat_comments": "Gesamt Kommentare", + "stat_favs": "Gesamt Favoriten", "most_favorited": "Meiste Favs", "favs": "Favs", "top_xd": "Top xD-Score" @@ -692,4 +692,4 @@ "replying_to": "Antwort an {user}", "reply": "Antworten" } -} +} \ No newline at end of file diff --git a/src/inc/locales/en.json b/src/inc/locales/en.json index 2021e94..93ec2f1 100644 --- a/src/inc/locales/en.json +++ b/src/inc/locales/en.json @@ -448,6 +448,8 @@ "stat_sfw": "SFW content", "stat_nsfw": "NSFW content", "stat_deleted": "Deleted", + "stat_comments": "Total Comments", + "stat_favs": "Total Favorites", "most_favorited": "Most Favorited", "favs": "favs", "top_xd": "Top xD Scores" diff --git a/src/inc/locales/nl.json b/src/inc/locales/nl.json index bfc465c..44d6956 100644 --- a/src/inc/locales/nl.json +++ b/src/inc/locales/nl.json @@ -444,6 +444,8 @@ "stat_sfw": "SFW-inhoud", "stat_nsfw": "NSFW-inhoud", "stat_deleted": "Verwijderd", + "stat_comments": "Totaal aantal reacties", + "stat_favs": "Totaal aantal favorieten", "most_favorited": "Meest Gefavoriet", "favs": "favorieten", "top_xd": "Top xD-scores" diff --git a/src/inc/locales/zange.json b/src/inc/locales/zange.json index 635f62f..ff44bac 100644 --- a/src/inc/locales/zange.json +++ b/src/inc/locales/zange.json @@ -446,6 +446,8 @@ "stat_sfw": "SFW-Inhalt", "stat_nsfw": "NSFW-Inhalt", "stat_deleted": "Gelöscht", + "stat_comments": "Gesamtanzahl Kommentare", + "stat_favs": "Gesamtanzahl Favoriten", "most_favorited": "Am häufigsten favorisiert", "favs": "Favoriten", "top_xd": "Beste xD-Punktestände" diff --git a/src/inc/routes/ranking.mjs b/src/inc/routes/ranking.mjs index b45244f..108ccde 100644 --- a/src/inc/routes/ranking.mjs +++ b/src/inc/routes/ranking.mjs @@ -22,6 +22,20 @@ export default (router, tpl) => { `; const stats = await lib.countf0cks(); + const totalComments = +(await db` + select count(*) as total + from comments + join items on comments.item_id = items.id + where comments.is_deleted = false and items.active = true + `)[0].total; + + const totalFavs = +(await db` + select count(*) as total + from favorites + join items on favorites.item_id = items.id + where items.active = true + `)[0].total; + const hoster = await db` with t as ( select @@ -77,6 +91,8 @@ export default (router, tpl) => { hoster, favotop, xdtop, + totalComments, + totalFavs, tmp: null, session: (req.session && req.session.user) ? { ...req.session } : false, page_meta: { diff --git a/views/ranking.html b/views/ranking.html index c784ec0..fe868ac 100644 --- a/views/ranking.html +++ b/views/ranking.html @@ -72,6 +72,8 @@
| {{ t('ranking.stat_total') }} | {{ stats.total }} |
| {{ t('ranking.stat_comments') }} | {{ totalComments }} |
| {{ t('ranking.stat_favs') }} | {{ totalFavs }} |
| {{ t('ranking.stat_tagged') }} | {{ stats.tagged }} |
| {{ t('ranking.stat_untagged') }} | {{ stats.untagged }} |
| {{ t('ranking.stat_sfw') }} | {{ stats.sfw }} |