PLUGIN_ACTIVE, 'eventh' => PLUGIN_INACTIVE ); global $serendipity; $sql_filter = ''; if (is_array($sidebars)) { foreach($sidebars AS $sidebar) { $up = strtoupper($sidebar); if ($sidebar == 'hide') { $opts[$sidebar] = HIDDEN; } elseif (defined('SIDEBAR_' . $up)) { $opts[$sidebar] = constant('SIDEBAR_' . $up); } elseif (defined($up)) { $opts[$sidebar] = constant($up); } 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; } } $eyecandy = !isset($serendipity['eyecandy']) || serendipity_db_bool($serendipity['eyecandy']); if (!$eyecandy) { echo '
LEFT, 'right' => RIGHT, 'hide' => HIDDEN ); } static $event_opts = array( 'event' => PLUGIN_ACTIVE, 'eventh' => PLUGIN_INACTIVE, ); if ($is_event) { $gopts =& $event_opts; } else { $gopts =& $opts; } $x = "\n\n"; } /** * Show a placement box on where to move a sidebar plugin to * * @access public * @param object A plugin object * @param object The plugins property bag object * @param string The name of the plugin * @param string The description of the plugin * @param array The property bag 'configuration' array, holding the array of config items. * @param boolean Shows the surrounding HTML table? * @param boolean Shows the FORM submit button? * @param boolean Shows a plugin's "example" method output? * @param boolean Spawn a plugins' configuration WYSIWYG items? * @param string The array index name of POSTed values ($serendipity['POST'][xxx]) * @return boolean */ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_names, $showTable = true, $showSubmit = true, $showExample = true, $spawnNuggets = true, $postKey = 'plugin') { global $serendipity; if ($showTable) { ?>
|
|
|
$radio_value) {
$id = htmlspecialchars($config_item . $radio_value);
$counter++;
$checked = "";
if ($radio_value == 'true' && ($hvalue === '1' || $hvalue === 'true')) {
$checked = " checked";
} elseif ($radio_value == 'false' && ($hvalue === '' || $hvalue === 'false')) {
$checked = " checked";
} elseif ($radio_value == $hvalue) {
$checked = " checked";
}
if ($counter == 1) {
?>
title="" />
|
|
|
|
|
get('default'); ?> | |
get('custom'); ?> | |
$cname
$cdesc |
|
|
$media_link_text |