From: garvinhicking Date: Mon, 18 Apr 2005 09:19:47 +0000 (+0000) Subject: comments plugin can have custom title X-Git-Tag: 0.8.1~30^2~33 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6c2aa8cec434a8cef809263332784b36ff22b80a;p=s9y.git comments plugin can have custom title --- diff --git a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php index 06c7cda..87be615 100644 --- a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php +++ b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php @@ -40,6 +40,8 @@ class serendipity_plugin_comments extends serendipity_plugin { global $serendipity; + $this->title = $this->get_config('title', $this->title); + $propbag->add('name', COMMENTS); $propbag->add('description', PLUGIN_COMMENTS_BLAHBLAH); $propbag->add('stackable', true); @@ -51,6 +53,7 @@ class serendipity_plugin_comments extends serendipity_plugin 'php' => '4.1.0' )); $propbag->add('configuration', array( + 'title', 'wordwrap', 'max_chars', 'max_entries', @@ -60,12 +63,18 @@ class serendipity_plugin_comments extends serendipity_plugin function introspect_config_item($name, &$propbag) { switch($name) { + case 'title': + $propbag->add('type', 'string'); + $propbag->add('name', TITLE); + $propbag->add('description', ''); + $propbag->add('default', COMMENTS); + break; + case 'wordwrap': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_COMMENTS_WORDWRAP); $propbag->add('description', PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH); $propbag->add('default', 30); - break; case 'max_chars': @@ -98,7 +107,7 @@ class serendipity_plugin_comments extends serendipity_plugin function generate_content(&$title) { global $serendipity; - $title = $this->title; + $title = $this->get_config('title', $this->title); $max_entries = $this->get_config('max_entries'); $max_chars = $this->get_config('max_chars'); $wordwrap = $this->get_config('wordwrap');