$propbag->add('description', PLUGIN_EVENT_STATISTICS_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Arnan de Gans, Garvin Hicking, Fredrik Sandberg');
- $propbag->add('version', '1.42');
+ $propbag->add('version', '1.43');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
foreach($author_rows AS $author => $author_stat) {
?>
<dt><strong><?php echo $author_stat['author']; ?></strong></dt>
- <dd><?php echo $author_stat['entries']; ?> <?php echo PLUGIN_EVENT_STATISTICS_OUT_ENTRIES; ?></dd>
+ <dd><?php echo $author_stat['entries']; ?> <?php echo PLUGIN_EVENT_STATISTICS_OUT_ENTRIES; ?> (<?php echo 100*round($author_stat['entries'] / max($total_count[0], 1), 3); ?>%)</dd>
<?php
}
}
$propbag->add('description', PLUGIN_HISTORY_DESC);
$propbag->add('stackable', true);
$propbag->add('author', 'Jannis Hermanns');
- $propbag->add('version', '1.1');
+ $propbag->add('version', '1.2');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
'full',
'amount',
'displaydate',
+ 'displayauthor',
'dateformat'));
}
$propbag->add('select_values', array('false','true'));
$propbag->add('default', 'true');
break;
+ case 'displayauthor':
+ $propbag->add('type', 'select');
+ $propbag->add('name', PLUGIN_HISTORY_DISPLAYAUTHOR);
+ $propbag->add('description', '');
+ $propbag->add('select_values', array('false','true'));
+ $propbag->add('default', 'false');
+ break;
case 'dateformat':
$propbag->add('type', 'string');
$propbag->add('name', GENERAL_PLUGIN_DATEFORMAT);
$displaydate = $this->get_config('displaydate', 'true');
$dateformat = $this->get_config('dateformat');
$full = ($this->get_config('full', 'false') != 'true') ? false : true;
+ $displayauthor = serendipity_db_bool($this->get_config('displayauthor', false));
if (!is_numeric($min_age) || $min_age < 0 || $specialage == 'year') {
$min_age = 365 + date('L', serendipity_serverOffsetHour());
true,
array('timestamp' => $e[$x]['timestamp'])
);
- $date = ($displaydate=='0') ? '' : serendipity_strftime($dateformat,$e[$x]['timestamp']);
+ $date = ($displaydate=='0') ? '' : serendipity_strftime($dateformat,$e[$x]['timestamp']);
+ $author = ($displayauthor) ? $e[$x]['author'] . ': ' : '';
$t = ($maxlength==0 || strlen($e[$x]['title'])<=$maxlength) ?
$e[$x]['title'] :
(trim(serendipity_mb('substr', $e[$x]['title'], 0, $maxlength-3)).' [...]');
- echo $date . "<a href='$url' title='".str_replace("'", '`', $e[$x][title])."'>".$t."</a> " .
+ echo $author . $date . "<a href='$url' title='".str_replace("'", '`', $e[$x][title])."'>".$t."</a> " .
strip_tags($e[$x]['body']) . '<br />';
}
echo $outro;