Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20637
Modified Files:
NEWS serendipity_sidebar_items.php
Log Message:
Allow users to toggle the display of the Serendipity Logo in the "Powered by" plugin, also added ability to replace it with text, or show both
Shortened the text for the XHTML cleanup plugin, it was breaking layout
Index: serendipity_sidebar_items.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- serendipity_sidebar_items.php 22 Jun 2004 13:45:42 -0000 1.67
+++ serendipity_sidebar_items.php 1 Jul 2004 18:35:17 -0000 1.68
@@ -471,8 +471,33 @@
class serendipity_plug_plugin extends serendipity_plugin {
function introspect(&$propbag)
{
- $propbag->add('name', POWERED_BY);
- $propbag->add('description', ADVERTISES_BLAHBLAH);
+ $propbag->add('name', POWERED_BY);
+ $propbag->add('description', ADVERTISES_BLAHBLAH);
+ $propbag->add('configuration', array(
+ 'image',
+ 'text'));
+ }
+
+ function introspect_config_item($name, &$propbag)
+ {
+ switch($name) {
+ case 'image':
+ $propbag->add('type', 'boolean');
+ $propbag->add('name', POWERED_BY_SHOW_IMAGE);
+ $propbag->add('description', POWERED_BY_SHOW_IMAGE_DESC);
+ $propbag->add('default', 'true');
+ break;
+
+ case 'text':
+ $propbag->add('type', 'boolean');
+ $propbag->add('name', POWERED_BY_SHOW_TEXT);
+ $propbag->add('description', POWERED_BY_SHOW_TEXT_DESC);
+ $propbag->add('default', 'false');
+ break;
+ default:
+ return false;
+ }
+ return true;
}
function generate_content(&$title)
@@ -482,7 +507,14 @@
$title = POWERED_BY . ":";
?>
<div class="serendipityPlug">
- <a title=":serendipity" href="http://www.s9y.org/"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/s9y_banner_tiny.png" alt=":serendipity" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> /></a>
+<?php if ( $this->get_config('image', 'true') == 'true' ) { ?>
+ <a title="<?php echo $title ?> Serendipity" href="http://www.s9y.org/"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/s9y_banner_tiny.png" alt=":serendipity" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> /></a>
+<?php } ?>
+<?php if ( $this->get_config('text', 'false') == 'true' ) { ?>
+ <div>
+ <a title="<?php echo $title ?> Serendipity" href="http://www.s9y.org/">Serendipity Weblog</a>
+ </div>
+<?php } ?>
</div>
<?php
}
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -d -r1.162 -r1.163
--- NEWS 1 Jul 2004 11:43:07 -0000 1.162
+++ NEWS 1 Jul 2004 18:35:17 -0000 1.163
@@ -3,6 +3,12 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Added the ability to toggle the display of the Serendipity logo and
+ text in the "Powered by" plugin (tomsommer)
+
+ * Fixed problem with booleans not checking the correct radiobuttons in
+ the plugin manager (tomsommer)
+
* Fixed bug #983242: Missing entity encoding for blogtitle/subtitle
for RSS feeds, thanks to Christian Wenz!
|