Update of /cvsroot/php-blog/serendipity/plugins/serendipity_event_statistics
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3877/plugins/serendipity_event_statistics
Added Files:
serendipity_event_statistics.php
Log Message:
Added a statistics panel.
NOT TESTED ON POSTGRESQL. I bet it won't work without some tweaks.
This integration is mostly a "proof of concept" to show how event plugins
can be used to output specific contents by being embeded inside the s9y
admin panel.
--- NEW FILE: serendipity_event_statistics.php ---
<?php # $Id: serendipity_event_statistics.php,v 1.1 2004/03/26 16:47:22 garvinhicking Exp $
switch ($serendipity['lang']) {
case 'de':
@define('PLUGIN_EVENT_STATISTICS_NAME', 'Statistiken');
@define('PLUGIN_EVENT_STATISTICS_DESC', 'Zeigt einen Link zu Statistiken in der Autorenoberfläche');
@define('PLUGIN_EVENT_OUT_STATISTICS', 'Statistik');
@define('PLUGIN_EVENT_OUT_FIRST_ENTRY', 'Erster Eintrag');
@define('PLUGIN_EVENT_OUT_LAST_ENTRY', 'Letzter Eintrag');
@define('PLUGIN_EVENT_OUT_TOTAL_ENTRIES', 'Insgesamt verfasste Artikel');
@define('PLUGIN_EVENT_OUT_ENTRIES', 'Artikel');
@define('PLUGIN_EVENT_OUT_TOTAL_PUBLIC', ' ... davon öffentlich');
@define('PLUGIN_EVENT_OUT_TOTAL_DRAFTS', ' ... davon Entwürfe');
@define('PLUGIN_EVENT_OUT_CATEGORIES', 'Vorhandene Kategorien');
@define('PLUGIN_EVENT_OUT_CATEGORIES2', 'Kategorie(n)');
@define('PLUGIN_EVENT_OUT_DISTRIBUTION_CATEGORIES', 'Verteilung der Artikel auf Kategorien');
@define('PLUGIN_EVENT_OUT_DISTRIBUTION_CATEGORIES2', 'eingetragene(r) Artikel');
@define('PLUGIN_EVENT_OUT_UPLOADED_IMAGES', 'Hochgeladene Bilder');
@define('PLUGIN_EVENT_OUT_UPLOADED_IMAGES2', 'Bild(er)');
@define('PLUGIN_EVENT_OUT_DISTRIBUTION_IMAGES', 'Verteilung der Bild-Dateitypen');
@define('PLUGIN_EVENT_OUT_DISTRIBUTION_IMAGES2', 'vorhandene Datei(en)');
@define('PLUGIN_EVENT_OUT_COMMENTS', 'Erhaltene Kommentare');
@define('PLUGIN_EVENT_OUT_COMMENTS2', 'Kommentar(e)');
@define('PLUGIN_EVENT_OUT_COMMENTS3', 'Top kommentierte Artikel');
@define('PLUGIN_EVENT_OUT_TOPCOMMENTS', 'Top Kommentatoren');
@define('PLUGIN_EVENT_OUT_LINK', 'Link');
@define('PLUGIN_EVENT_OUT_SUBSCRIBERS', 'Abonnenten');
@define('PLUGIN_EVENT_OUT_SUBSCRIBERS2', 'Abonnent(en)');
@define('PLUGIN_EVENT_OUT_TOPSUBSCRIBERS', 'Top abonnierte Artikel');
@define('PLUGIN_EVENT_OUT_TOPSUBSCRIBERS2', 'eingetragene(r) Abonnent(en)');
@define('PLUGIN_EVENT_OUT_TRACKBACKS', 'Erhaltene Trackbacks');
@define('PLUGIN_EVENT_OUT_TRACKBACKS2', 'Trackback(s)');
@define('PLUGIN_EVENT_OUT_TOPTRACKBACK', 'Top Trackback-Artikel');
@define('PLUGIN_EVENT_OUT_TOPTRACKBACK2', 'eingetragene(r) Trackback(s)');
@define('PLUGIN_EVENT_OUT_TOPTRACKBACKS3', 'Top Trackbacker');
@define('PLUGIN_EVENT_OUT_COMMENTS_PER_ARTICLE', 'Durchschnittliche Kommentare pro Artikel');
@define('PLUGIN_EVENT_OUT_TRACKBACKS_PER_ARTICLE', 'Durchschnittliche Trackbacks pro Artikel');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_DAY', 'Durchschnittliche Artikel pro Tag');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_WEEK', 'Durchschnittliche Artikel pro Woche');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_MONTH', 'Durchschnittliche Artikel pro Monat');
@define('PLUGIN_EVENT_OUT_COMMENTS_PER_ARTICLE2', 'Kommentare/Artikel');
@define('PLUGIN_EVENT_OUT_TRACKBACKS_PER_ARTICLE2', 'Trackbacks/Artikel');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_DAY2', 'Artikel/Tag');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_WEEK2', 'Artikel/Woche');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_MONTH2', 'Artikel/Monat');
@define('PLUGIN_EVENT_OUT_CHARS', 'Menge der verfassten Zeichen');
@define('PLUGIN_EVENT_OUT_CHARS2', 'Zeichen');
@define('PLUGIN_EVENT_OUT_CHARS_PER_ARTICLE', 'Zeichen pro Artikel');
@define('PLUGIN_EVENT_OUT_CHARS_PER_ARTICLE2', 'Zeichen/Artikel');
@define('PLUGIN_EVENT_OUT_LONGEST_ARTICLES', 'Die %s längsten Artikel');
break;
case 'en':
case 'es':
default:
@define('PLUGIN_EVENT_STATISTICS_NAME', 'Statistics');
@define('PLUGIN_EVENT_STATISTICS_DESC', 'Display a link to statistics in entries-panel');
@define('PLUGIN_EVENT_OUT_STATISTICS', 'Statistics');
@define('PLUGIN_EVENT_OUT_FIRST_ENTRY', 'First entry');
@define('PLUGIN_EVENT_OUT_LAST_ENTRY', 'Last entry');
@define('PLUGIN_EVENT_OUT_TOTAL_ENTRIES', 'Total entries');
@define('PLUGIN_EVENT_OUT_ENTRIES', 'entries');
@define('PLUGIN_EVENT_OUT_TOTAL_PUBLIC', ' ... public');
@define('PLUGIN_EVENT_OUT_TOTAL_DRAFTS', ' ... drafts');
@define('PLUGIN_EVENT_OUT_CATEGORIES', 'Categories');
@define('PLUGIN_EVENT_OUT_CATEGORIES2', 'categories');
@define('PLUGIN_EVENT_OUT_DISTRIBUTION_CATEGORIES', 'Distribution of entries');
@define('PLUGIN_EVENT_OUT_DISTRIBUTION_CATEGORIES2', 'entry');
@define('PLUGIN_EVENT_OUT_UPLOADED_IMAGES', 'Uploaded images');
@define('PLUGIN_EVENT_OUT_UPLOADED_IMAGES2', 'image(s)');
@define('PLUGIN_EVENT_OUT_DISTRIBUTION_IMAGES', 'Distribution of image types');
@define('PLUGIN_EVENT_OUT_DISTRIBUTION_IMAGES2', 'file(s)');
@define('PLUGIN_EVENT_OUT_COMMENTS', 'Received comments');
@define('PLUGIN_EVENT_OUT_COMMENTS2', 'comment(s)');
@define('PLUGIN_EVENT_OUT_COMMENTS3', 'Most frequently commented entries');
@define('PLUGIN_EVENT_OUT_TOPCOMMENTS', 'Most frequently commenting people');
@define('PLUGIN_EVENT_OUT_LINK', 'link');
@define('PLUGIN_EVENT_OUT_SUBSCRIBERS', 'Subscribers');
@define('PLUGIN_EVENT_OUT_SUBSCRIBERS2', 'subscriber(s)');
@define('PLUGIN_EVENT_OUT_TOPSUBSCRIBERS', 'Most frequently subscribed entries');
@define('PLUGIN_EVENT_OUT_TOPSUBSCRIBERS2', 'subscriber(s)');
@define('PLUGIN_EVENT_OUT_TRACKBACKS', 'Received trackbacks');
@define('PLUGIN_EVENT_OUT_TRACKBACKS2', 'trackback(s)');
@define('PLUGIN_EVENT_OUT_TOPTRACKBACK', 'Most frequently trackbacked entires');
@define('PLUGIN_EVENT_OUT_TOPTRACKBACK2', 'trackback(s)');
@define('PLUGIN_EVENT_OUT_TOPTRACKBACKS3', 'Most frequently trackbacking people');
@define('PLUGIN_EVENT_OUT_COMMENTS_PER_ARTICLE', 'estimated comments per entry');
@define('PLUGIN_EVENT_OUT_TRACKBACKS_PER_ARTICLE', 'estimated trackbacks per entry');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_DAY', 'estimated entries per day');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_WEEK', 'estimated entries per week');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_MONTH', 'estimated entries per month');
@define('PLUGIN_EVENT_OUT_COMMENTS_PER_ARTICLE2', 'comments/entries');
@define('PLUGIN_EVENT_OUT_TRACKBACKS_PER_ARTICLE2', 'trackbacks/entry');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_DAY2', 'entries/day');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_WEEK2', 'entries/week');
@define('PLUGIN_EVENT_OUT_ARTICLES_PER_MONTH2', 'entries/month');
@define('PLUGIN_EVENT_OUT_CHARS', 'Total amount of characters');
@define('PLUGIN_EVENT_OUT_CHARS2', 'characters');
@define('PLUGIN_EVENT_OUT_CHARS_PER_ARTICLE', 'Characters per entry');
@define('PLUGIN_EVENT_OUT_CHARS_PER_ARTICLE2', 'chars/entry');
@define('PLUGIN_EVENT_OUT_LONGEST_ARTICLES', 'The %s longest entries');
break;
}
class serendipity_event_statistics extends serendipity_event
{
function introspect(&$propbag)
{
global $serendipity;
$propbag->add('name', PLUGIN_EVENT_STATISTICS_NAME);
$propbag->add('description', PLUGIN_EVENT_STATISTICS_DESC);
$propbag->add('event_hooks', array(
'backend_sidebar_entries' => true,
'backend_sidebar_entries_event_display_statistics' => true
));
}
function introspect_config_item($name, &$propbag)
{
return true;
}
function generate_content(&$title) {
$title = PLUGIN_EVENT_STATISTICS_NAME;
}
function event_hook($event, &$bag, &$eventData) {
global $serendipity;
$hooks = &$bag->get('event_hooks');
if (isset($hooks[$event])) {
switch($event) {
case 'backend_sidebar_entries':
if ($serendipity['serendipityUserlevel'] >= USERLEVEL_EDITOR) {
?>
• <a href="?serendipity[adminModule]=event_display&serendipity[adminAction]=statistics"><?php echo PLUGIN_EVENT_STATISTICS_NAME; ?></a><br />
<?php
}
break;
case 'backend_sidebar_entries_event_display_statistics':
$first_entry = serendipity_db_query("SELECT timestamp FROM {$serendipity['dbPrefix']}entries ORDER BY timestamp ASC limit 1", true);
$last_entry = serendipity_db_query("SELECT timestamp FROM {$serendipity['dbPrefix']}entries ORDER BY timestamp DESC limit 1", true);
$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);
$category_count = serendipity_db_query("SELECT count(categoryid) FROM {$serendipity['dbPrefix']}category", true);
$category_rows = serendipity_db_query("SELECT c.category_name, count(e.id) as postings
FROM {$serendipity['dbPrefix']}category c,
{$serendipity['dbPrefix']}entries e
WHERE e.categoryid = c.categoryid
GROUP BY e.categoryid
ORDER BY postings DESC");
$image_count = serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}images", true);
$image_rows = serendipity_db_query("SELECT extension, count(id) AS images FROM {$serendipity['dbPrefix']}images GROUP BY extension ORDER BY images DESC");
$subscriber_count = count(serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}comments WHERE type = 'NORMAL' AND subscribed = 'true' GROUP BY email"));
$subscriber_rows = serendipity_db_query("SELECT e.id, e.title, count(c.id) as postings
FROM {$serendipity['dbPrefix']}comments c,
{$serendipity['dbPrefix']}entries e
WHERE e.id = c.entry_id AND type = 'NORMAL' AND subscribed = 'true'
GROUP BY e.id, c.email
ORDER BY postings DESC");
$comment_count = serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}comments WHERE type = 'NORMAL'", true);
$comment_rows = serendipity_db_query("SELECT e.id, e.title, count(c.id) as postings
FROM {$serendipity['dbPrefix']}comments c,
{$serendipity['dbPrefix']}entries e
WHERE e.id = c.entry_id AND type = 'NORMAL'
GROUP BY e.id
ORDER BY postings DESC");
$commentor_rows = serendipity_db_query("SELECT author, email, url, count(id) as postings
FROM {$serendipity['dbPrefix']}comments c
WHERE type = 'NORMAL'
GROUP BY author
ORDER BY postings DESC");
$tb_count = serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}comments WHERE type = 'TRACKBACK'", true);
$tb_rows = serendipity_db_query("SELECT e.id, e.title, count(c.id) as postings
FROM {$serendipity['dbPrefix']}comments c,
{$serendipity['dbPrefix']}entries e
WHERE e.id = c.entry_id AND type = 'TRACKBACK'
GROUP BY e.id
ORDER BY postings DESC");
$tbr_rows = serendipity_db_query("SELECT author, email, url, count(id) as postings
FROM {$serendipity['dbPrefix']}comments c
WHERE type = 'TRACKBACK'
GROUP BY author
ORDER BY postings DESC");
$length = serendipity_db_query("SELECT SUM(LENGTH(body) + LENGTH(extended)) FROM {$serendipity['dbPrefix']}entries", true);
$length_rows = serendipity_db_query("SELECT id, title, (LENGTH(body) + LENGTH(extended)) as full_length FROM {$serendipity['dbPrefix']}entries ORDER BY full_length DESC LIMIT 5");
?>
<h3><?php echo PLUGIN_EVENT_OUT_STATISTICS; ?></h3>
<div style="margin: 5px; padding: 5px">
<dl>
<dt><strong><?php echo PLUGIN_EVENT_OUT_FIRST_ENTRY; ?></strong></dt>
<dd><?php echo ucfirst(strftime(DATE_FORMAT_ENTRY . ' %H:%m', $first_entry[0])); ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_LAST_ENTRY; ?></strong></dt>
<dd><?php echo ucfirst(strftime(DATE_FORMAT_ENTRY . ' %H:%m', $last_entry[0])); ?></dd>
<br />
<hr />
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_TOTAL_ENTRIES; ?></strong></dt>
<dd><?php echo $total_count[0]; ?> <?php echo PLUGIN_EVENT_OUT_ENTRIES; ?></dd>
<br />
<dl>
<dt><strong><?php echo PLUGIN_EVENT_OUT_TOTAL_PUBLIC; ?></strong></dt>
<dd><?php echo $publish_count[0]; ?> <?php echo PLUGIN_EVENT_OUT_ENTRIES; ?></dd>
<dt><strong><?php echo PLUGIN_EVENT_OUT_TOTAL_DRAFTS; ?></strong></dt>
<dd><?php echo $draft_count[0]; ?> <?php echo PLUGIN_EVENT_OUT_ENTRIES; ?></dd>
</dl>
<br />
<hr />
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_CATEGORIES; ?></strong></dt>
<dd><?php echo $category_count[0]; ?> <?php echo PLUGIN_EVENT_OUT_CATEGORIES2; ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_DISTRIBUTION_CATEGORIES; ?></strong></dt>
<dl>
<?php
if (is_array($category_rows)) {
foreach($category_rows AS $category => $cat_stat) {
?>
<dt><strong><?php echo $cat_stat['category_name']; ?></strong></dt>
<dd><?php echo $cat_stat['postings']; ?> <?php echo PLUGIN_EVENT_OUT_DISTRIBUTION_CATEGORIES2; ?></dd>
<?php
}
}
?>
</dl>
<br />
<hr />
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_UPLOADED_IMAGES; ?></strong></dt>
<dd><?php echo $image_count[0]; ?> <?php echo PLUGIN_EVENT_OUT_UPLOADED_IMAGES2; ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_DISTRIBUTION_IMAGES; ?></strong></dt>
<dl>
<?php
if (is_array($image_rows)) {
foreach($image_rows AS $image => $image_stat) {
?>
<dt><strong><?php echo $image_stat['extension']; ?></strong></dt>
<dd><?php echo $image_stat['images']; ?> <?php echo PLUGIN_EVENT_OUT_DISTRIBUTION_IMAGES2; ?></dd>
<?php
}
}
?>
</dl>
<br />
<hr />
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_COMMENTS; ?></strong></dt>
<dd><?php echo $comment_count[0]; ?> <?php echo PLUGIN_EVENT_OUT_COMMENTS2; ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_COMMENTS3; ?></strong></dt>
<dl>
<?php
if (is_array($comment_rows)) {
foreach($comment_rows AS $comment => $com_stat) {
?>
<dt><strong><a href="<?php echo serendipity_archiveURL($com_stat['id'], $com_stat['title'], 'serendipityHTTPPath'); ?>"><?php echo $com_stat['title']; ?></a></strong></dt>
<dd><?php echo $com_stat['postings']; ?> <?php echo PLUGIN_EVENT_OUT_COMMENTS2; ?></dd>
<?php
}
}
?>
</dl>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_TOPCOMMENTS; ?></strong></dt>
<dl>
<?php
if (is_array($commentor_rows)) {
foreach($commentor_rows AS $comment => $com_stat) {
?>
<dt><strong><a href="mailto:<?php echo $com_stat['email']; ?>"><?php echo $com_stat['author']; ?></a> (<a href="<?php echo $com_stat['url']; ?>"><?php echo PLUGIN_EVENT_OUT_LINK; ?></a>)</strong></dt>
<dd><?php echo $com_stat['postings']; ?> <?php echo PLUGIN_EVENT_OUT_COMMENTS2; ?></dd>
<?php
}
}
?>
</dl>
<br />
<hr />
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_SUBSCRIBERS; ?></strong></dt>
<dd><?php echo $subscriber_count; ?> <?php echo PLUGIN_EVENT_OUT_SUBSCRIBERS2; ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_TOPSUBSCRIBERS; ?></strong></dt>
<dl>
<?php
if (is_array($subscriber_rows)) {
foreach($subscriber_rows AS $subscriber => $subscriber_stat) {
?>
<dt><strong><a href="<?php echo serendipity_archiveURL($subscriber_stat['id'], $subscriber_stat['title'], 'serendipityHTTPPath'); ?>"><?php echo $subscriber_stat['title']; ?></a></strong></dt>
<dd><?php echo $subscriber_stat['postings']; ?> <?php echo PLUGIN_EVENT_OUT_TOPSUBSCRIBERS2; ?></dd>
<?php
}
}
?>
</dl>
<br />
<hr />
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_TRACKBACKS; ?></strong></dt>
<dd><?php echo $tb_count[0]; ?> <?php echo PLUGIN_EVENT_OUT_TRACKBACKS2; ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_TOPTRACKBACK; ?></strong></dt>
<dl>
<?php
if (is_array($tb_rows)) {
foreach($tb_rows AS $tb => $tb_stat) {
?>
<dt><strong><a href="<?php echo serendipity_archiveURL($tb_stat['id'], $tb_stat['title'], 'serendipityHTTPPath'); ?>"><?php echo $tb_stat['title']; ?></a></strong></dt>
<dd><?php echo $tb_stat['postings']; ?> <?php echo PLUGIN_EVENT_OUT_TOPTRACKBACK2; ?></dd>
<?php
}
}
?>
</dl>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_TOPTRACKBACKS3; ?></strong></dt>
<dl>
<?php
if (is_array($tbr_rows)) {
foreach($tbr_rows AS $tb => $tb_stat) {
?>
<dt><strong><a href="mailto:<?php echo $tb_stat['email']; ?>"><?php echo $tb_stat['author']; ?></a> (<a href="<?php echo $tb_stat['url']; ?>">Link</a>)</strong></dt>
<dd><?php echo $tb_stat['postings']; ?> <?php echo PLUGIN_EVENT_OUT_TRACKBACK2; ?></dd>
<?php
}
}
?>
</dl>
<br />
<hr />
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_COMMENTS_PER_ARTICLE; ?></strong></dt>
<dd><?php echo round($comment_count[0] / $publish_count[0], 2); ?> <?php echo PLUGIN_EVENT_OUT_COMMENTS_PER_ARTICLE;2 ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_TRACKBACKS_PER_ARTICLE; ?></strong></dt>
<dd><?php echo round($tb_count[0] / $publish_count[0], 2); ?> <?php echo PLUGIN_EVENT_OUT_TRACKBACKS_PER_ARTICLE2; ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_ARTICLES_PER_DAY; ?></strong></dt>
<dd><?php echo round($publish_count[0] / ((time() - $first_entry[0]) / (60*60*24)), 2);?> <?php echo PLUGIN_EVENT_OUT_ARTICLES_PER_DAY2; ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_ARTICLES_PER_WEEK; ?></strong></dt>
<dd><?php echo round($publish_count[0] / ((time() - $first_entry[0]) / (60*60*24*7)), 2);?> <?php echo PLUGIN_EVENT_OUT_ARTICLES_PER_WEEK2; ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_ARTICLES_PER_MONTH; ?></strong></dt>
<dd><?php echo round($publish_count[0] / ((time() - $first_entry[0]) / (60*60*24*7*31)), 2);?> <?php echo PLUGIN_EVENT_OUT_ARTICLES_PER_MONTH2; ?></dd>
<br />
<hr />
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_CHARS; ?></strong></dt>
<dd><?php echo $length[0]; ?> <?php echo PLUGIN_EVENT_OUT_CHARS2; ?></dd>
<br />
<dt><strong><?php echo PLUGIN_EVENT_OUT_CHARS_PER_ARTICLE; ?></strong></dt>
<dd><?php echo round($length[0] / $publish_count[0], 2); ?> <?php echo PLUGIN_EVENT_OUT_CHARS_PER_ARTICLE2; ?></dd>
<br />
<dt><strong><?php printf(PLUGIN_EVENT_OUT_LONGEST_ARTICLES, 5); ?></strong></dt>
<br />
<dl>
<?php
if (is_array($length_rows)) {
foreach($length_rows AS $tb => $length_stat) {
?>
<dt><strong><a href="<?php echo serendipity_archiveURL($length_stat['id'], $length_stat['title'], 'serendipityHTTPPath'); ?>"><?php echo $length_stat['title']; ?></a></strong></dt>
<dd><?php echo $length_stat['full_length']; ?> <?php echo PLUGIN_EVENT_OUT_CHARS2; ?></dd>
<?php
}
}
?>
</dl>
</dl>
</div>
<?php
return true;
break;
default:
return false;
break;
}
} else {
return false;
}
}
}
/* vim: set sts=4 ts=4 expandtab : */
?>
|