Update of /cvsroot/php-blog/serendipity/include/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20610/include/admin
Modified Files:
plugins.inc.php
Log Message:
- Add a small configure icon next to plugins that can be configured (since some users didn't know they could configure plugins)
Index: plugins.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/plugins.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- plugins.inc.php 28 Jan 2005 13:42:29 -0000 1.18
+++ plugins.inc.php 1 Feb 2005 17:05:09 -0000 1.19
@@ -24,7 +24,7 @@
<form action="?serendipity[adminModule]=plugins" method="post">
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
- <td> </td>
+ <td colspan="2"> </td>
<td><strong><?php echo TITLE; ?></strong></td>
<td><strong><?php echo PERMISSIONS; ?></strong></td>
<?php
@@ -77,9 +77,9 @@
$title = serendipity_plugin_api::get_plugin_title($plugin, '[' . $name . ']');
if ($bag->is_set('configuration') && ($plugin->protected === FALSE || $plugin_data['authorid'] == '0' || $plugin_data['authorid'] == $serendipity['authorid'] || $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN)) {
- $url = '?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . $key;
- $name = '<a href="' . $url . '">' . $name . '</a>';
- $title = '<a href="' . $url . '">' . $title . '</a>';
+ $can_configure = true;
+ } else {
+ $can_configure = false;
}
}
@@ -114,19 +114,24 @@
<?php } ?>
</div>
</td>
-
- <td style="border-bottom: 1px solid #000000"><strong><?php echo $title; ?></strong><br /><div style="font-size: 8pt"><?php echo $desc; ?></div></td>
- <td style="border-bottom: 1px solid #000000" nowrap="nowrap">
- <div>
- <?php
- ownership($plugin_data['authorid'], $plugin_data['name'], $is_plugin_owner);
- ?>
- </div>
+ <td style="border-bottom: 1px solid #000000" width="16">
+ <?php if ( $can_configure ) { ?>
+ <a href="?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=<?php echo $key ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/configure.png') ?>" style="border: 0; vertical-align: bottom;"></a>
+ <?php } else { ?>
+
+ <?php } ?>
</td>
- <?php if ( !$event_only ) { ?>
- <td style="border-bottom: 1px solid #000000" nowrap="nowrap">
- <div><?php echo $place ?></div>
+ <td style="border-bottom: 1px solid #000000"><strong>
+ <?php if ( $can_configure ) { ?>
+ <a href="?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=<?php echo $key ?>"><?php echo $title; ?></a>
+ <?php } else { ?>
+ <?php echo $title; ?>
+ <?php } ?></strong><br />
+ <div style="font-size: 8pt"><?php echo $desc; ?></div>
</td>
+ <td style="border-bottom: 1px solid #000000" nowrap="nowrap"><?php ownership($plugin_data['authorid'], $plugin_data['name'], $is_plugin_owner); ?></td>
+ <?php if ( !$event_only ) { ?>
+ <td style="border-bottom: 1px solid #000000" nowrap="nowrap"><?php echo $place ?></td>
<?php } ?>
<td style="border-bottom: 1px solid #000000"><?php echo $moveup ?></td>
<td style="border-bottom: 1px solid #000000"><?php echo $movedown ?></td>
@@ -628,15 +633,15 @@
$fetchplugin_data = array('GET' => &$serendipity['GET'],
'install' => true);
serendipity_plugin_api::hook_event('backend_plugins_fetchplugin', $fetchplugin_data);
-
+
if ($fetchplugin_data['install']) {
$inst = serendipity_plugin_api::create_plugin_instance($serendipity['GET']['install_plugin'], null, (serendipity_plugin_api::is_event_plugin($serendipity['GET']['install_plugin']) ? 'event': 'right'), $authorid, serendipity_db_escape_string($serendipity['GET']['pluginPath']));
-
+
/* Load the new plugin */
$plugin = &serendipity_plugin_api::load_plugin($inst);
$bag = new serendipity_property_bag;
$plugin->introspect($bag);
-
+
/* Only play with the plugin if there is something to play with */
if ($bag->is_set('configuration')) {
echo '<script type="text/javascript">location.href = \'' . $serendipity['baseurl'] . '?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . $inst . '\';</script>';
|