diff --git a/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php b/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php index 1329d16d..e8b5f021 100644 --- a/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php +++ b/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php @@ -14,9 +14,10 @@ class serendipity_plugin_plug extends serendipity_plugin $propbag->add('description', ADVERTISES_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.2'); + $propbag->add('version', '1.3'); $propbag->add('configuration', array( 'image', + 'image2', 'text')); $propbag->add('groups', array('FRONTEND_VIEWS')); } @@ -26,7 +27,14 @@ class serendipity_plugin_plug extends serendipity_plugin switch($name) { case 'image': $propbag->add('type', 'boolean'); - $propbag->add('name', POWERED_BY_SHOW_IMAGE); + $propbag->add('name', POWERED_BY_SHOW_IMAGE . ' 1'); + $propbag->add('description', POWERED_BY_SHOW_IMAGE_DESC); + $propbag->add('default', 'false'); + break; + + case 'image2': + $propbag->add('type', 'boolean'); + $propbag->add('name', POWERED_BY_SHOW_IMAGE . ' 2'); $propbag->add('description', POWERED_BY_SHOW_IMAGE_DESC); $propbag->add('default', 'false'); break; @@ -44,6 +52,23 @@ class serendipity_plugin_plug extends serendipity_plugin return true; } + function example() + { + global $serendipity; + + $s = ''; + $s .= "\n"; + $s = '<div class="configuration_group odd">'; + $s .= POWERED_BY_SHOW_IMAGE; + $s .= '1: <img src="' . serendipity_getTemplateFile('img/s9y_banner_small.png') . '" alt="Serendipity PHP Weblog" title="' . POWERED_BY . ' Serendipity" /> '; + $s .= "</div>\n"; + $s .= '<div class="configuration_group even">'; + $s .= POWERED_BY_SHOW_IMAGE; + $s .= '2: <img src="' . $serendipity['serendipityHTTPPath'] . $serendipity['templatePath'] . 's9y_banner_small.png" alt="Serendipity PHP Weblog" title="' . POWERED_BY . ' Serendipity" />'; + $s .= "<div>\n"; + return $s; + } + function generate_content(&$title) { global $serendipity; @@ -51,10 +76,13 @@ class serendipity_plugin_plug extends serendipity_plugin $title = $this->title; ?> <div class="serendipityPlug"> -<?php if (serendipity_db_bool($this->get_config('image', 'true'))) { ?> +<?php if (serendipity_db_bool($this->get_config('image', 'false'))) { ?> <a title="<?php echo $title ?> Serendipity" href="http://www.s9y.org/"><img src="<?php echo serendipity_getTemplateFile('img/s9y_banner_small.png') ?>" alt="Serendipity PHP Weblog" style="border: 0px" /></a> <?php } ?> -<?php if (serendipity_db_bool($this->get_config('text', 'false'))) { ?> +<?php if (serendipity_db_bool($this->get_config('image2', 'false'))) { ?> + <a title="<?php echo $title ?> Serendipity" href="http://www.s9y.org/"><img src="<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['templatePath'] . 's9y_banner_small.png'; ?>" alt="Serendipity PHP Weblog" style="border: 0px" /></a> +<?php } ?> +<?php if (serendipity_db_bool($this->get_config('text', 'true'))) { ?> <div> <a title="<?php echo $title ?> Serendipity" href="http://www.s9y.org/">Serendipity PHP Weblog</a> </div> diff --git a/templates/s9y_banner_small.png b/templates/s9y_banner_small.png new file mode 100644 index 00000000..2ec3c0e2 Binary files /dev/null and b/templates/s9y_banner_small.png differ