/* Load the new plugin */
$plugin = &serendipity_plugin_api::load_plugin($inst);
if (!is_object($plugin)) {
- echo "DEBUG: Plugin $inst not an object: " . print_r($plugin, true) . ".<br />Input: " . print_r($serendipity['GET'], true) . ".<br /><br />\n\nPlease report this bug. This error can happen if a plugin was not properly downloaded (check your plugins directory if the requested plugin was downloaded) or the inclusion of a file failed (permissions?)<br />\n";
+ echo "DEBUG: Plugin $inst not an object: " . print_r($plugin, true) . ".<br />Input: " . print_r($serendipity['GET'], true) . ".<br /><br />\n\nThis error can happen if a plugin was not properly downloaded (check your plugins directory if the requested plugin was downloaded) or the inclusion of a file failed (permissions?)<br />\n";
echo "Backtrace:<br />\n" . implode("<br />\n", $serendipity['debug']['pluginload']) . "<br />";
}
$bag = new serendipity_property_bag;
global $serendipity;
+ $sql_filter = '';
if (is_array($sidebars)) {
foreach($sidebars AS $sidebar) {
$up = strtoupper($sidebar);
} else {
$opts[$sidebar] = $up;
}
+ $sql_filter .= "AND placement != '" . serendipity_db_escape_string($sidebar) . "' ";
+ }
+ }
+
+ if (!$event_only) {
+ $sql = "SELECT * from {$serendipity['dbPrefix']}plugins
+ WHERE placement != 'event'
+ AND placement != 'eventh'
+ " . $sql_filter;
+ $invisible_plugins = serendipity_db_query($sql);
+ if (is_array($invisible_plugins)) {
+ $sidebars[] = 'NONE';
+ $opts['NONE'] = NONE;
}
}
$total = 0;
foreach ($plugin_placements as $plugin_placement) {
+ if (!$event_only && $plugin_placement == 'NONE') {
+ $is_invisible = true;
+ } else {
+ $is_invisible = false;
+ }
+ $ptitle = $opts[$plugin_placement];
+ $pid = $plugin_placement;
+
echo '<td class="pluginmanager_side">';
- echo '<div class="heading">' . $opts[$plugin_placement] . '</div>';
- echo '<ol id="' . $plugin_placement . '_col" class="pluginmanager_container">';
- $plugins = serendipity_plugin_api::enum_plugins($plugin_placement);
+ echo '<div class="heading">' . $ptitle . '</div>';
+ echo '<ol id="' . $pid . '_col" class="pluginmanager_container">';
+ if ($is_invisible) {
+ $plugins = $invisible_plugins;
+ } else {
+ $plugins = serendipity_plugin_api::enum_plugins($plugin_placement);
+ }
if (!is_array($plugins)) {
continue;