Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_history
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18942/plugins/serendipity_plugin_history
Modified Files:
serendipity_plugin_history.php
Log Message:
Added the possibility to enter an outro...
Index: serendipity_plugin_history.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_history/serendipity_plugin_history.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- serendipity_plugin_history.php 7 Jul 2004 21:52:42 -0000 1.6
+++ serendipity_plugin_history.php 7 Jul 2004 22:07:50 -0000 1.7
@@ -15,6 +15,8 @@
@define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Nicht nur Überschriften, sondern ganze Einträge anzeigen.');
@define('PLUGIN_HISTORY_INTRO', 'Intro');
@define('PLUGIN_HISTORY_INTRO_DESC', 'Text, der vor den Einträgen angezeigt werden soll');
+ @define('PLUGIN_HISTORY_OUTRO', 'Outro');
+ @define('PLUGIN_HISTORY_OUTRO_DESC', 'Text, der hinter den Einträgen angezeigt werden soll');
@define('PLUGIN_HISTORY_DISPLAYDATE', 'Datum anzeigen');
@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Vor jedem Eintrag das Datum anzeigen?');
@define('PLUGIN_HISTORY_SPECIALAGE', 'Vorgefertigter Zeitrahmen');
@@ -39,6 +41,8 @@
'linked headlines.');
@define('PLUGIN_HISTORY_INTRO', 'Intro');
@define('PLUGIN_HISTORY_INTRO_DESC', 'A short intro like \'One year ago I said:\'.');
+ @define('PLUGIN_HISTORY_OUTRO', 'Outro');
+ @define('PLUGIN_HISTORY_OUTRO_DESC', 'A short Outro like \'Nice, eh?\'.');
@define('PLUGIN_HISTORY_DISPLAYDATE', 'Display date');
@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Display the date of each entry?');
@define('PLUGIN_HISTORY_SPECIALAGE', 'Ready-made age?');
@@ -61,6 +65,7 @@
$propbag->add('configuration', array('title',
'intro',
+ 'outro',
'specialage',
'min_age',
'max_age',
@@ -86,6 +91,12 @@
$propbag->add('description', PLUGIN_HISTORY_INTRO_DESC);
$propbag->add('default', '');
break;
+ case 'outro':
+ $propbag->add('type', 'string');
+ $propbag->add('name', PLUGIN_HISTORY_OUTRO);
+ $propbag->add('description', PLUGIN_HISTORY_OUTRO_DESC);
+ $propbag->add('default', '');
+ break;
case 'specialage':
$propbag->add('type', 'select');
$propbag->add('name', PLUGIN_HISTORY_SPECIALAGE);
@@ -142,6 +153,7 @@
global $serendipity;
$title = $this->get_config('title', PLUGIN_HISTORY_NAME);
$intro = $this->get_config('intro');
+ $outro = $this->get_config('outro');
$max_entries = $this->get_config('max_entries');
$min_age = $this->get_config('min_age');
$max_age = $this->get_config('max_age');
@@ -170,7 +182,7 @@
$maxts = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
$e = serendipity_fetchEntries(array(($maxts-$max_age*86400),
($mints-$min_age*86400)), $full, 15);
- echo $intro . '<br />';
+ echo (empty($intro)) ? '' : "$intro<br />";
$e_c = @count($e);
for($x=0; $x < $e_c; $x++) {
@@ -183,6 +195,7 @@
echo $date . "<a href='$url'>{$e[$x]['title']}</a> " .
strip_tags($e[$x]['body']) . '<br />';
}
+ echo $outro;
}
}
|