From c2d66995464f05fbbee949800ed2e5c72e02a7ae Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Mon, 7 Nov 2005 16:22:02 +0000 Subject: [PATCH] patch #1347639 --- docs/NEWS | 3 +++ .../serendipity_event_statistics.php | 21 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/NEWS b/docs/NEWS index e93a609..c92c4c3 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -14,6 +14,9 @@ Version 1.0 () Version 0.9.1 () ------------------------------------------------------------------------ + * Statistics plugin now contains entries per author. Patch #1347639 + by SvOlli + * Fix thumbnail generation for imageMagick when target image is smaller than the target size, it should not be blown up (garvinhicking) diff --git a/plugins/serendipity_event_statistics/serendipity_event_statistics.php b/plugins/serendipity_event_statistics/serendipity_event_statistics.php index 58d30c5..c49b32a 100644 --- a/plugins/serendipity_event_statistics/serendipity_event_statistics.php +++ b/plugins/serendipity_event_statistics/serendipity_event_statistics.php @@ -15,6 +15,7 @@ if (file_exists($probelang)) { @define('PLUGIN_EVENT_STATISTICS_OUT_ENTRIES', 'entries'); @define('PLUGIN_EVENT_STATISTICS_OUT_TOTAL_PUBLIC', ' ... public'); @define('PLUGIN_EVENT_STATISTICS_OUT_TOTAL_DRAFTS', ' ... drafts'); +@define('PLUGIN_EVENT_STATISTICS_OUT_PER_AUTHOR', 'Entries per user'); @define('PLUGIN_EVENT_STATISTICS_OUT_CATEGORIES', 'Categories'); @define('PLUGIN_EVENT_STATISTICS_OUT_CATEGORIES2', 'categories'); @define('PLUGIN_EVENT_STATISTICS_OUT_DISTRIBUTION_CATEGORIES', 'Distribution of entries'); @@ -85,7 +86,7 @@ class serendipity_event_statistics extends serendipity_event $propbag->add('description', PLUGIN_EVENT_STATISTICS_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking, Fredrik Sandberg'); - $propbag->add('version', '1.22'); + $propbag->add('version', '1.23'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -200,6 +201,7 @@ class serendipity_event_statistics extends serendipity_event $total_count = serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}entries", true); $draft_count = serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}entries WHERE isdraft = 'true'", true); $publish_count = serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}entries WHERE isdraft = 'false'", true); + $author_rows = serendipity_db_query("SELECT author, count(author) as entries FROM {$serendipity['dbPrefix']}entries GROUP BY author ORDER BY author"); $category_count = serendipity_db_query("SELECT count(categoryid) FROM {$serendipity['dbPrefix']}category", true); $cat_sql = "SELECT c.category_name, count(e.id) as postings FROM {$serendipity['dbPrefix']}entrycat ec, @@ -284,6 +286,23 @@ class serendipity_event_statistics extends serendipity_event


+
+
+
+ $author_stat) { +?> +
+
+ +
+
+
+
-- 2.39.5