]> git.mjollnir.org Git - s9y.git/commitdiff
Allow configuration of title for archives plugin.
authors_bergmann <s_bergmann>
Fri, 13 Oct 2006 12:25:09 +0000 (12:25 +0000)
committers_bergmann <s_bergmann>
Fri, 13 Oct 2006 12:25:09 +0000 (12:25 +0000)
include/plugin_internal.inc.php

index bb40e1ac5b334cbb8bfee704d4f6ee5eb6718b2e..d94c0f01b59c8931895ce61591e76ceebce77089 100644 (file)
@@ -367,13 +367,20 @@ class serendipity_archives_plugin extends serendipity_plugin {
         $propbag->add('stackable',     true);
         $propbag->add('author',        'Serendipity Team');
         $propbag->add('version',       '1.0');
-        $propbag->add('configuration', array('frequency', 'count', 'show_count'));
+        $propbag->add('configuration', array('title', 'frequency', 'count', 'show_count'));
         $propbag->add('groups',        array('FRONTEND_VIEWS'));
     }
 
     function introspect_config_item($name, &$propbag)
     {
         switch($name) {
+            case 'title':
+                $propbag->add('type',        'string');
+                $propbag->add('name',        TITLE);
+                $propbag->add('description', TITLE_FOR_NUGGET);
+                $propbag->add('default',     ARCHIVES);
+                break;
+
             case 'count' :
                 $propbag->add('type', 'string');
                 $propbag->add('name', ARCHIVE_COUNT);
@@ -406,7 +413,7 @@ class serendipity_archives_plugin extends serendipity_plugin {
     {
         global $serendipity;
 
-        $title = $this->title;
+        $title = $this->get_config('title', $this->title);
 
         $ts = mktime(0, 0, 0, date('m'), 1);