Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2418
Modified Files:
Tag: branch-smarty
serendipity_admin_plugins.inc.php
Log Message:
- Don't hack config variables to implement 'info', use a function instead.
If that function is defined - it will be run to display an example of the plugin as defined within the plugin
INFO: Might need tweaking, but we need to get the 'info' thing out of CVS ASAP :)
Index: serendipity_admin_plugins.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_plugins.inc.php,v
retrieving revision 1.44.2.1
retrieving revision 1.44.2.2
diff -u -d -r1.44.2.1 -r1.44.2.2
--- serendipity_admin_plugins.inc.php 8 Oct 2004 12:05:04 -0000 1.44.2.1
+++ serendipity_admin_plugins.inc.php 9 Oct 2004 19:04:40 -0000 1.44.2.2
@@ -510,10 +510,6 @@
case 'hidden':
?><tr><td colspan="2"><input type="hidden" name="serendipity[plugin][<?php echo $config_item; ?>]" value="<?php echo $cbag->get('value'); ?>" /></td></tr><?php
break;
-
- case 'info':
- ?><tr><td colspan="2"><?php echo $cbag->get('description'); ?></td></tr><?php
- break;
}
}
?>
@@ -521,12 +517,24 @@
<br />
<div style="padding-left: 20px">
<input type="submit" name="SAVECONF" value="<?php echo SAVE; ?>" />
- </div>
-</form>
<?php
if (isset($_POST['SAVECONF'])) {
echo '<span class="serendipity_msg_notice">' . DONE . ': '. $statusMsg .'</span>';
}
+?>
+ </div>
+<?php
+ if (method_exists($plugin, 'example') ) {
+?>
+ <div>
+ <?php echo $plugin->example() ?>
+ </div>
+<?php
+ }
+?>
+ </div>
+</form>
+<?php
} else {
/* show general plugin list */
|