smartified plugins.nc.php
This commit is contained in:
parent
12aad7b9d1
commit
38104f37e2
@ -10,6 +10,8 @@ if (!serendipity_checkPermission('adminPlugins')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$data = array();
|
||||
|
||||
include_once S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php';
|
||||
include_once S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php';
|
||||
include_once S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php';
|
||||
@ -63,7 +65,8 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
if (!($plugin->protected === FALSE || $plugin->serendipity_owner == '0' || $plugin->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
$data['plugin_to_conf'] = true;
|
||||
|
||||
$bag = new serendipity_property_bag;
|
||||
$plugin->introspect($bag);
|
||||
|
||||
@ -120,78 +123,44 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
|
||||
$plugin->cleanup();
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ( isset($save_errors) && is_array($save_errors) && count($save_errors) > 0 ) { ?>
|
||||
<div class="serendipityAdminMsgError">
|
||||
<img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_error.png'); ?>" alt="" />
|
||||
<?php
|
||||
echo ERROR . ":<br />\n";
|
||||
echo "<ul>\n";
|
||||
foreach($save_errors AS $save_error) {
|
||||
echo '<li>' . $save_error . "</li>\n";
|
||||
if ( isset($save_errors) && is_array($save_errors) && count($save_errors) > 0 ) {
|
||||
$data['save_errors'] = $save_errors;
|
||||
} elseif ( isset($_POST['SAVECONF'])) {
|
||||
$data['saveconf'] = true;
|
||||
$data['timestamp'] = serendipity_strftime('%H:%M:%S');
|
||||
}
|
||||
$data['formToken'] = serendipity_setFormToken();
|
||||
$data['name'] = $name;
|
||||
$data['class'] = get_class($plugin);
|
||||
$data['desc'] = $desc;
|
||||
$data['documentation'] = $documentation;
|
||||
$data['plugin'] = $plugin;
|
||||
|
||||
if (@file_exists(dirname($plugin->pluginFile) . '/ChangeLog')) {
|
||||
$data['changelog'] = true;
|
||||
}
|
||||
echo "</ul>\n";
|
||||
?>
|
||||
</div>
|
||||
<?php } elseif ( isset($_POST['SAVECONF'])) { ?>
|
||||
<div class="serendipityAdminMsgSuccess"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_success.png'); ?>" alt="" /><?php echo DONE .': '. sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S')); ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<form method="post" name="serendipityPluginConfigure">
|
||||
<?php echo serendipity_setFormToken(); ?>
|
||||
<table cellpadding="5" style="border: 1px dashed" width="90%" align="center">
|
||||
<tr>
|
||||
<th width="100"><?php echo NAME; ?></th>
|
||||
<td><?php echo $name; ?> (<em><?php echo get_class($plugin); ?></em>)</td>
|
||||
</tr>
|
||||
if (@file_exists(dirname($plugin->pluginFile) . '/documentation_' . $serendipity['lang'] . '.html')) {
|
||||
$data['documentation_local'] = '/documentation_' . $serendipity['lang'] . '.html';
|
||||
} elseif (@file_exists(dirname($plugin->pluginFile) . '/documentation_en.html')) {
|
||||
$data['documentation_local'] = '/documentation_en.html';
|
||||
} elseif (@file_exists(dirname($plugin->pluginFile) . '/documentation.html')) {
|
||||
$data['documentation_local'] = '/documentation.html';
|
||||
} elseif (@file_exists(dirname($plugin->pluginFile) . '/README')) {
|
||||
$data['documentation_local'] = '/README';
|
||||
}
|
||||
|
||||
<tr>
|
||||
<th style="vertical-align: top"><?php echo DESCRIPTION; ?></th>
|
||||
<td>
|
||||
<?php
|
||||
echo $desc;
|
||||
if (!empty($documentation)) {
|
||||
echo '<br /><a href="' . htmlspecialchars($documentation) . '">' . PLUGIN_DOCUMENTATION . '</a>';
|
||||
}
|
||||
|
||||
if (@file_exists(dirname($plugin->pluginFile) . '/ChangeLog')) {
|
||||
echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/ChangeLog">' . PLUGIN_DOCUMENTATION_CHANGELOG . '</a>';
|
||||
}
|
||||
|
||||
if (@file_exists(dirname($plugin->pluginFile) . '/documentation_' . $serendipity['lang'] . '.html')) {
|
||||
echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/documentation_' . $serendipity['lang'] . '.html">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>';
|
||||
} elseif (@file_exists(dirname($plugin->pluginFile) . '/documentation_en.html')) {
|
||||
echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/documentation_en.html">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>';
|
||||
} elseif (@file_exists(dirname($plugin->pluginFile) . '/documentation.html')) {
|
||||
echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/documentation.html">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>';
|
||||
} elseif (@file_exists(dirname($plugin->pluginFile) . '/README')) {
|
||||
echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/README">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (!empty($license)) {
|
||||
echo '<tr><th>'.MEDIA_PROPERTY_COPYRIGHT.'</th><td>'.$license.'</td></tr>';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<?php serendipity_plugin_config($plugin, $bag, $name, $desc, $config_names, true, true, true, true, 'plugin', $config_groups); ?>
|
||||
</form>
|
||||
<?php
|
||||
$data['license'] = $license;
|
||||
ob_start();
|
||||
serendipity_plugin_config($plugin, $bag, $name, $desc, $config_names, true, true, true, true, 'plugin', $config_groups);
|
||||
$data['config'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
} elseif ( $serendipity['GET']['adminAction'] == 'addnew' ) {
|
||||
?>
|
||||
<?php if ( $serendipity['GET']['type'] == 'event' ) { ?>
|
||||
<h2><?php echo EVENT_PLUGINS ?></h2>
|
||||
<?php } else { ?>
|
||||
<h2><?php echo SIDEBAR_PLUGINS ?></h2>
|
||||
<?php } ?>
|
||||
<br />
|
||||
<?php
|
||||
$data['adminAction'] = 'addnew';
|
||||
$data['type'] = $serendipity['GET']['type'];
|
||||
|
||||
$foreignPlugins = $pluginstack = $errorstack = array();
|
||||
serendipity_plugin_api::hook_event('backend_plugins_fetchlist', $foreignPlugins);
|
||||
$pluginstack = array_merge((array)$foreignPlugins['pluginstack'], $pluginstack);
|
||||
@ -276,157 +245,49 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
}
|
||||
ksort($pluggroups);
|
||||
|
||||
foreach($errorstack as $e_idx => $e_name) {
|
||||
echo ERROR . ': ' . $e_name . '<br />';
|
||||
}
|
||||
$data['errorstack'] = $errorstack;
|
||||
|
||||
if ($serendipity['GET']['only_group'] == 'UPGRADE') {
|
||||
serendipity_plugin_api::hook_event('backend_pluginlisting_header_upgrade', $pluggroups);
|
||||
}
|
||||
?>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<?php
|
||||
|
||||
$available_groups = array_keys($pluggroups);
|
||||
$data['available_groups'] = $available_groups;
|
||||
$groupnames = array();
|
||||
foreach($available_groups as $available_group) {
|
||||
$groupnames[$available_name] = serendipity_groupname($available_group);
|
||||
}
|
||||
$data['groupnames'] = $groupnames;
|
||||
$data['pluggroups'] = $pluggroups;
|
||||
$data['formToken'] = $formToken;
|
||||
$data['only_group'] = $serendipity['GET']['only_group'];
|
||||
$requirement_failures = array();
|
||||
|
||||
foreach($pluggroups AS $pluggroup => $groupstack) {
|
||||
if (empty($pluggroup)) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" class="serendipity_pluginlist_header">
|
||||
<form action="serendipity_admin.php" method="get">
|
||||
<?php echo serendipity_setFormToken(); ?>
|
||||
<input type="hidden" name="serendipity[adminModule]" value="plugins" />
|
||||
<input type="hidden" name="serendipity[adminAction]" value="addnew" />
|
||||
<input type="hidden" name="serendipity[type]" value="<?php echo htmlspecialchars($serendipity['GET']['type']); ?>" />
|
||||
<?php echo FILTERS; ?>: <select name="serendipity[only_group]">
|
||||
<?php foreach((array)$available_groups AS $available_group) {
|
||||
?>
|
||||
<option value="<?php echo $available_group; ?>" <?php echo ($serendipity['GET']['only_group'] == $available_group ? 'selected="selected"' : ''); ?>><?php echo serendipity_groupname($available_group); ?>
|
||||
<?php } ?>
|
||||
<option value="ALL" <?php echo ($serendipity['GET']['only_group'] == 'ALL' ? 'selected="selected"' : ''); ?>><?php echo ALL_CATEGORIES; ?>
|
||||
<option value="UPGRADE" <?php echo ($serendipity['GET']['only_group'] == 'UPGRADE' ? 'selected="selected"' : ''); ?>><?php echo WORD_NEW; ?>
|
||||
</select>
|
||||
<input class="serendipityPrettyButton input_button" type="submit" value="<?php echo GO; ?>" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (!empty($serendipity['GET']['only_group'])) {
|
||||
continue;
|
||||
}
|
||||
} elseif (!empty($serendipity['GET']['only_group']) && $pluggroup != $serendipity['GET']['only_group']) {
|
||||
continue;
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" class="serendipity_pluginlist_section"><strong><?php echo serendipity_groupname($pluggroup); ?></strong></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><strong>Plugin</strong></td>
|
||||
<td width="100" align="center"><strong>Action</strong></td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($groupstack as $plug) {
|
||||
$jsLine = " onmouseout=\"document.getElementById('serendipity_plugin_". $plug['class_name'] ."').className='';\"";
|
||||
$jsLine .= " onmouseover=\"document.getElementById('serendipity_plugin_". $plug['class_name'] ."').className='serendipity_PluginAdminHighlight';\"";
|
||||
|
||||
$pluginInfo = $notice = array();
|
||||
|
||||
if (!empty($plug['author'])) {
|
||||
$pluginInfo[] = AUTHOR . ': ' . $plug['author'];
|
||||
}
|
||||
|
||||
if (!empty($plug['version'])) {
|
||||
$pluginInfo[] = VERSION . ': ' . $plug['version'];
|
||||
}
|
||||
|
||||
if (!empty($plug['website'])) {
|
||||
$pluginInfo[] = '<a href="' . htmlspecialchars($plug['website']) . '">' . PLUGIN_DOCUMENTATION . '</a>';
|
||||
}
|
||||
|
||||
if (!empty($plug['local_documentation'])) {
|
||||
$pluginInfo[] = '<a href="' . htmlspecialchars($plug['local_documentation']) . '">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>';
|
||||
}
|
||||
|
||||
if (!empty($plug['changelog'])) {
|
||||
$pluginInfo[] = '<a href="' . htmlspecialchars($plug['changelog']) . '">' . PLUGIN_DOCUMENTATION_CHANGELOG . '</a>';
|
||||
}
|
||||
|
||||
if (!empty($plug['upgrade_version']) && $plug['upgrade_version'] != $plug['version']) {
|
||||
$pluginInfo[] = sprintf(UPGRADE_TO_VERSION, $plug['upgrade_version']);
|
||||
}
|
||||
|
||||
if (!empty($plug['pluginlocation']) && $plug['pluginlocation'] != 'local') {
|
||||
$pluginInfo[] = '(' . htmlspecialchars($plug['pluginlocation']) . ')';
|
||||
$installimage = serendipity_getTemplateFile('admin/img/install_now_' . strtolower($plug['pluginlocation']) . '.png');
|
||||
} else {
|
||||
$installimage = serendipity_getTemplateFile('admin/img/install_now.png');
|
||||
}
|
||||
|
||||
if (!isset($plug['customURI'])) {
|
||||
$plug['customURI'] = '';
|
||||
}
|
||||
|
||||
if ( !empty($plug['requirements']['serendipity']) && version_compare($plug['requirements']['serendipity'], serendipity_getCoreVersion($serendipity['version']), '>') ) {
|
||||
$notice['requirements_failures'][] = 's9y ' . $plug['requirements']['serendipity'];
|
||||
$requirement_failures[$plug['class_name']] = array("s9y" => true);
|
||||
}
|
||||
|
||||
if ( !empty($plug['requirements']['php']) && version_compare($plug['requirements']['php'], phpversion(), '>') ) {
|
||||
$notice['requirements_failures'][] = 'PHP ' . $plug['requirements']['php'];
|
||||
if (isset($requirement_failures[$plug['class_name']])) {
|
||||
$requirement_failures[$plug['class_name']] = array_merge($requirement_failures[$plug['class_name']] , array("php" => true));
|
||||
} else {
|
||||
$requirement_failures[$plug['class_name']] = array("php" => true);
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable after Smarty 2.6.7 upgrade.
|
||||
* TODO: How can we get current Smarty version here? $smarty is not created!
|
||||
if ( !empty($plug['requirements']['smarty']) && version_compare($plug['requirements']['smarty'], '2.6.7', '>') ) {
|
||||
$notice['requirements_failures'][] = 'Smarty: ' . $plug['requirements']['smarty'];
|
||||
if (isset($requirement_failures[$plug['class_name']])) {
|
||||
$requirement_failures[$plug['class_name']] = array_merge($requirement_failures[$plug['class_name']] , array("smarty" => true));
|
||||
} else {
|
||||
$requirement_failures[$plug['class_name']] = array("smarty" => true);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (count($notice['requirements_failures']) > 0) {
|
||||
$plug['requirements_fail'] = true;
|
||||
}
|
||||
|
||||
?>
|
||||
<tr id="serendipity_plugin_<?php echo $plug['class_name']; ?>">
|
||||
<td colspan="2" <?php echo $jsLine ?>>
|
||||
<table width="100%" cellpadding="3" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><strong><?php echo $plug['name'] ?></strong></td>
|
||||
<td width="100" align="center" valign="middle" rowspan="3">
|
||||
<?php if ( $plug['requirements_fail'] == true ) { ?>
|
||||
<span style="color: #cccccc"><?php printf(UNMET_REQUIREMENTS, implode(', ', $notice['requirements_failures'])); ?></span>
|
||||
<?php } elseif ( $plug['upgradable'] == true ) { ?>
|
||||
<a href="?serendipity[adminModule]=plugins&serendipity[pluginPath]=<?php echo $plug['pluginPath']; ?>&serendipity[install_plugin]=<?php echo $plug['plugin_class'] . $plug['customURI'] ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/upgrade_now.png') ?>" title="<?php echo UPGRADE ?>" alt="<?php echo UPGRADE ?>" border="0" /></a>
|
||||
<?php } elseif ($plug['installable'] == true) { ?>
|
||||
<a href="?serendipity[adminModule]=plugins&serendipity[pluginPath]=<?php echo $plug['pluginPath']; ?>&serendipity[install_plugin]=<?php echo $plug['plugin_class'] . $plug['customURI'] ?>"><img src="<?php echo $installimage ?>" title="<?php echo INSTALL ?>" alt="<?php echo INSTALL ?>" border="0" /></a>
|
||||
<?php } else { ?>
|
||||
<span style="color: #cccccc"><?php echo ALREADY_INSTALLED ?></span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 10px"><?php echo $plug['description'] ?></td>
|
||||
</tr>
|
||||
<?php if (count($pluginInfo) > 0) { ?>
|
||||
<tr>
|
||||
<td style="padding-left: 10px; font-size: x-small">(<?php echo $plug['class_name']; ?>) <?php echo implode('; ', $pluginInfo); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><?php printf(PLUGIN_AVAILABLE_COUNT, count($pluginstack)); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
$data['requirements_failues'] = $requirement_failures;
|
||||
} else {
|
||||
/* show general plugin list */
|
||||
|
||||
@ -542,42 +403,46 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
if (isset($_POST['SAVE'])) {
|
||||
$data['save'] = true;
|
||||
$data['timestamp'] = serendipity_strftime('%H:%M:%S');
|
||||
}
|
||||
|
||||
<?php if (isset($_POST['SAVE'])) { ?>
|
||||
<div class="serendipityAdminMsgSuccess"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_success.png'); ?>" alt="" /><?php echo DONE .': '. sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S')); ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<div><?php echo BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS ?></div>
|
||||
<?php
|
||||
if (!isset($serendipity['eyecandy']) || serendipity_db_bool($serendipity['eyecandy'])) {
|
||||
echo '<script src="' . serendipity_getTemplateFile('dragdrop.js') . '" type="text/javascript"></script>';
|
||||
echo '<div class="warning js_warning"><em>' . PREFERENCE_USE_JS_WARNING . '</em></div>';
|
||||
$data['eyecandy'] = true;
|
||||
}
|
||||
|
||||
serendipity_plugin_api::hook_event('backend_pluginlisting_header', $serendipity['eyecandy']);
|
||||
?>
|
||||
<br />
|
||||
serendipity_plugin_api::hook_event("backend_pluginlisting_header" ,$eyecandy);
|
||||
|
||||
<h3><?php echo SIDEBAR_PLUGINS ?></h3>
|
||||
<a href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/install.png') ?>" style="border: 0px none ; vertical-align: middle; display: inline;" alt="" /><?php echo sprintf(CLICK_HERE_TO_INSTALL_PLUGIN, SIDEBAR_PLUGIN) ?></a>
|
||||
<?php serendipity_plugin_api::hook_event('backend_plugins_sidebar_header', $serendipity); ?>
|
||||
<?php show_plugins(false, $sidebars); ?>
|
||||
ob_start();
|
||||
serendipity_plugin_api::hook_event('backend_plugins_sidebar_header', $serendipity);
|
||||
$data['backend_plugins_sidebar_header'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
ob_start();
|
||||
show_plugins(false, $sidebars);
|
||||
$data['sidebar_plugins'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
<br />
|
||||
<br />
|
||||
ob_start();
|
||||
$data['backend_plugins_event_header'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
ob_start();
|
||||
show_plugins(true);
|
||||
$data['event_plugins'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
<h3><?php echo EVENT_PLUGINS ?></h3>
|
||||
<a href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[type]=event" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/install.png') ?>" style="border: 0px none ; vertical-align: middle; display: inline;" alt="" /><?php echo sprintf(CLICK_HERE_TO_INSTALL_PLUGIN, EVENT_PLUGIN) ?></a>
|
||||
<?php serendipity_plugin_api::hook_event('backend_plugins_event_header', $serendipity); ?>
|
||||
<?php show_plugins(true); ?>
|
||||
|
||||
<?php if (count($serendipity['memSnaps']) > 0) { ?>
|
||||
<h3>Memory Usage</h3>
|
||||
<div>
|
||||
<pre><?php print_r($serendipity['memSnaps']); ?></pre>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (count($serendipity['memSnaps']) > 0) {
|
||||
$data['$memsnaps'] = $serendipity['memSnaps'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!is_object($serendipity['smarty'])) {
|
||||
serendipity_smarty_init();
|
||||
}
|
||||
|
||||
$serendipity['smarty']->assign($data);
|
||||
$tfile = dirname(__FILE__) . "/tpl/plugins.inc.tpl";
|
||||
$content = $serendipity['smarty']->fetch('file:'. $tfile);
|
||||
echo $content;
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
|
210
include/admin/tpl/plugins.inc.tpl
Normal file
210
include/admin/tpl/plugins.inc.tpl
Normal file
@ -0,0 +1,210 @@
|
||||
{if $plugin_to_conf}
|
||||
{if is_array($save_errors)}
|
||||
<div class="serendipityAdminMsgError">
|
||||
<img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />
|
||||
{$CONST.ERROR}:<br />
|
||||
<ul>
|
||||
{foreach $save_errors as $save_error}
|
||||
<li> $save_error </li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{elseif $saveconf}
|
||||
<div class="serendipityAdminMsgSuccess">
|
||||
<img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
|
||||
{$CONST.DONE}: {{$CONST.SETTINGS_SAVED_AT}|sprintf:"{$timestamp}"}
|
||||
</div>
|
||||
{/if}
|
||||
<form method="post" name="serendipityPluginConfigure">
|
||||
{$formToken}
|
||||
<table cellpadding="5" style="border: 1px dashed" width="90%" align="center">
|
||||
<tr>
|
||||
<th width="100">{$CONST.NAME}</th>
|
||||
<td>{$name} (<em>{$class}</em>)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style="vertical-align: top">{$CONST.DESCRIPTION}</th>
|
||||
<td>
|
||||
{$desc}
|
||||
{if ! empty($documentation) }
|
||||
<br /><a href="{$documentation|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION}</a>
|
||||
{/if}
|
||||
{if $changelog}
|
||||
<br /><a href="plugins/{$plugin->act_pluginPath}/ChangeLog">{$CONST.PLUGIN_DOCUMENTATION_CHANGELOG}</a>
|
||||
{/if}
|
||||
{if $documentation_local}
|
||||
<br /><a href="plugins/{$plugin->act_pluginPath}{$documentation}">{$CONST.PLUGIN_DOCUMENTATION_LOCAL}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if !empty($license)}
|
||||
<tr>
|
||||
<th>{$CONST.MEDIA_PROPERTY_COPYRIGHT}</th>
|
||||
<td>{$license}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
<br />
|
||||
{$config}
|
||||
</form>
|
||||
|
||||
{elseif $adminAction == "addnew"}
|
||||
{if $type == "event"}
|
||||
<h2>{$CONST.EVENT_PLUGINS}</h2>
|
||||
{else}
|
||||
<h2>{$CONST.SIDEBAR_PLUGINS}</h2>
|
||||
{/if}
|
||||
<br />
|
||||
{foreach $errorstack as $e_idx => $e_name}
|
||||
{$CONST.ERROR}: {$e_name}<br />
|
||||
{/foreach}
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
{foreach $pluggroups AS $pluggroup => $groupstack}
|
||||
{if empty($pluggroup)}
|
||||
<tr>
|
||||
<td colspan="2" class="serendipity_pluginlist_header">
|
||||
<form action="serendipity_admin.php" method="get">
|
||||
{$formToken}
|
||||
<input type="hidden" name="serendipity[adminModule]" value="plugins" />
|
||||
<input type="hidden" name="serendipity[adminAction]" value="addnew" />
|
||||
<input type="hidden" name="serendipity[type]" value="{$type|escape:"html"}" />
|
||||
{$CONST.FILTERS}
|
||||
<select name="serendipity[only_group]">
|
||||
{foreach available_groups as $available_group}
|
||||
<option value="{$available_group}" {if $only_group == $available_group} selected="selected"{/if}>{$groupnames.{$available_group}}</option>
|
||||
{/foreach}
|
||||
<option value="ALL" {if $only_group == ALL} selected="selected"{/if}>{$CONST.ALL_CATEGORIES}</option>
|
||||
<option value="UPGRADE" {if $only_group == UPGRADE} selected="selected"{/if}>{$CONST.WORD_NEW}</option>
|
||||
</select>
|
||||
<input class="serendipityPrettyButton input_button" type="submit" value="{$CONST.GO}" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{if !empty($only_group)}
|
||||
{continue}
|
||||
{/if}
|
||||
{elseif ! empty($only_group) && $pluggroup != $only_group}
|
||||
{continue}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="2" class="serendipity_pluginlist_section"><strong>{$groupnames.{$available_group}}</strong></td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td><strong>Plugin</strong></td>
|
||||
<td width="100" align="center"><strong>Action</strong></td>
|
||||
</tr>
|
||||
{foreach $groupstack as $plug}
|
||||
<tr id="serendipity_plugin_{$plug.class_name}">
|
||||
<td colspan="2" onmouseout="document.getElementById('serendipity_plugin_{$plug.class_name}').className='';" onmouseover="document.getElementById('serendipity_plugin_{$plug.class_name}').className='serendipity_PluginAdminHighlight';">
|
||||
<table width="100%" cellpadding="3" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><strong>{$plug.name}</strong></td>
|
||||
<td width="100" align="center" valign="middle" rowspan="3">
|
||||
{if isset($requirements_failures.{$plug.class_name})}
|
||||
<span style="color: #cccccc">
|
||||
{$CONST.UNMET_REQUIREMENTS|sprintf:"{if $requirements_failures.{$plug.class_name}.s9y}s9y $plug.requirements..serendipity,{/if} {if $requirements_failures.{$plug.class_name}.php}PHP $plug.requirements.php,{/if} {if $requirements_failures.{$plug.class_name}.smarty}Smarty $plug.requirements.smarty{/if}"}
|
||||
</span>
|
||||
{elseif $plug['upgradable'] == true}
|
||||
<a href="?serendipity[adminModule]=plugins&serendipity[pluginPath]={$plug.pluginPath}&serendipity[install_plugin]={$plug.plugin_class}{if isset($plug['customURI'])}{$plug.customURI}{/if}">
|
||||
<img src="{serendipity_getFile file="admin/img/upgrade_now.png"}" title="{$CONST.UPGRADE}" alt="{$CONST.UPGRADE}" border="0" />
|
||||
</a>
|
||||
{elseif $plug.installable == true}
|
||||
<a href="?serendipity[adminModule]=plugins&serendipity[pluginPath]={$plug.pluginPath}&serendipity[install_plugin]={$plug.plugin_class}{if isset($plug.customURI)}{$plug.customURL}{/if}">
|
||||
<img src="{if !empty($plug.pluginlocation) && $plug.pluginlocation != 'local'} {serendipity_getFile file="admin/img/install_now_{$plug.pluginlocation|lower}.png"}{else}{serendipity_getFile file="admin/img/install_now.png"}{/if}" title="{$CONST.INSTALL}" alt="{$CONST.INSTALL}" border="0" />
|
||||
</a>
|
||||
{else}
|
||||
<span style="color: #cccccc">{$CONST.ALREADY_INSTALLED}</span>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 10px">{$plug.description}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 10px; font-size: x-small">({$plug.class_name})
|
||||
{if ! empty($plug.author)}
|
||||
{$CONST.AUTHOR}: {$plug.author}
|
||||
{/if}
|
||||
|
||||
{if ! empty($plug.version)}
|
||||
{$CONST.VERSION}: {$plug.version}
|
||||
{/if}
|
||||
|
||||
{if ! empty($plug.website)}
|
||||
<a href="{$plug.website|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION}</a>
|
||||
{/if}
|
||||
|
||||
{if ! empty($plug.local_documentation)}
|
||||
<a href="{$plug.local_documentation|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION_LOCAL}</a>
|
||||
{/if}
|
||||
|
||||
{if ! empty($plug.changelog)}
|
||||
<a href="{$plug.changelog|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION_CHANGELOG}</a>
|
||||
{/if}
|
||||
|
||||
{if ! empty({$plug.upgrade_version}) && $plug.upgrade_version != $plug.version}
|
||||
{$CONST.UPGRADE_TO_VERSION|sprintf:"{$plug.upgrade_version}"}
|
||||
{/if}
|
||||
|
||||
{if ! empty($plug.pluginlocation) && $plug.pluginlocation != 'local'}
|
||||
({$plug.pluginlocation|escape:"html"})
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
<tr>
|
||||
<td colspan="2" align="right">{$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:"count({$pluginstack})"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else}
|
||||
{if $save}
|
||||
<div class="serendipityAdminMsgSuccess">
|
||||
<img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
|
||||
{$CONST.DONE}:{$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"}</div>
|
||||
{/if}
|
||||
<div>{$CONST.BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS}</div>
|
||||
{if $eyecandy}
|
||||
<script src="{serendipity_getFile file="dragdrop.js"}" type="text/javascript"></script>
|
||||
<div class="warning js_warning"><em>{$CONST.PREFERENCE_USE_JS_WARNING}</em></div>
|
||||
{/if}
|
||||
<br />
|
||||
|
||||
|
||||
<h3>{$CONST.SIDEBAR_PLUGINS}</h3>
|
||||
<a href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew" class="serendipityIconLink">
|
||||
<img src="{serendipity_getFile file="admin/img/install.png"}" style="border: 0px none ; vertical-align: middle; display: inline;" alt="" />
|
||||
{$CONST.CLICK_HERE_TO_INSTALL_PLUGIN|sprintf:"{$CONST.SIDEBAR_PLUGIN}"}
|
||||
</a>
|
||||
{$backend_plugins_sidebar_header}
|
||||
{$sidebar_plugins}
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<h3>{$CONST.EVENT_PLUGINS}</h3>
|
||||
<a href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[type]=event" class="serendipityIconLink">
|
||||
<img src="{serendipity_getFile file="admin/img/install.png"}" style="border: 0px none ; vertical-align: middle; display: inline;" alt="" />
|
||||
{{$CONST.CLICK_HERE_TO_INSTALL_PLUGIN}|sprintf:"{$CONST.EVENT_PLUGIN}"}
|
||||
</a>
|
||||
{$backend_plugins_event_header}
|
||||
{$event_plugins}
|
||||
|
||||
{if $memsnaps}
|
||||
<h3>Memory Usage</h3>
|
||||
<div>
|
||||
<pre>{$memSnaps|print_r}</pre>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
class Serendipity_Smarty_Security_Policy extends Smarty_Security
|
||||
{
|
||||
// these are the allowed functions only. - default as is
|
||||
public $php_functions = array('isset', 'empty', 'count', 'sizeof', 'in_array', 'is_array', 'time', 'nl2br', 'serendipity_categoryURL', 'serendipity_archiveURL');
|
||||
public $php_functions = array('isset', 'empty', 'count', 'sizeof', 'in_array', 'is_array', 'time', 'nl2br', 'serendipity_categoryURL', 'serendipity_archiveURL', 'serendipity_groupname');
|
||||
// to disable all PHP functions
|
||||
#public $php_functions = null;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user