Exemplo n.º 1
0
/**
 * Display the oik-lib options page
 *
 * 
 */
function oik_lib_options_do_page()
{
    bw_context("textdomain", "oik-lib");
    oik_menu_header("library management");
    oik_box(null, null, "Options", "oik_lib_options");
    oik_box(null, null, "Registered libraries", "oik_lib_display_libraries");
    oik_menu_footer();
    bw_flush();
}
/**
 * Nivo slider settings page
 */
function oik_nivo_options_do_page()
{
    oik_menu_header("Nivo slider options", "w50pc");
    oik_box(NULL, NULL, "Default slider options", "oik_nivo_slider_options");
    ecolumn();
    scolumn("w50pc");
    oik_box(NULL, NULL, "Usage notes", "oik_nivo_slider_usage");
    oik_menu_footer();
    bw_flush();
}
Exemplo n.º 3
0
 /**
  * oik plugins settings page 
  *
  * Processing depends on the button that was pressed. There should only be one!
  * 
  * Selection                     |  Validate? | Perform action         | Display check | Display add  | Display edit | Display select list
  * ----------------------------- | --------   |-------------------     |-------------  | ------------ | ------------ | -------------------
  * check_plugin                  |  No        | n/a                    | Yes           | -            | -            | -
  * delete_plugin                 |  No        | delete selected plugin | -             | -            | -            | Yes
  * edit_plugin                   |  No        | n/a                    | -             | -            | Yes          | Yes
  * _oik_plugins_edit_settings    |  Yes       | update selected plugin | -             | -            | Yes          | Yes
  * _oik_plugins_add_plugin			 |	No				| n/a										 | -						 | Yes          | - 					 | ?
  * _oik_plugins_add_settings		 |	Yes				| add selected plugin		 | -						 | -						| - 					 | ?
  * 
  */
 function oik_lazy_plugins_server_settings()
 {
     bw_trace2();
     bw_backtrace();
     oik_menu_header("plugin server settings", "w100pc");
     $validated = false;
     $check_plugin = bw_array_get($_REQUEST, "check_plugin", null);
     $delete_plugin = bw_array_get($_REQUEST, "delete_plugin", null);
     $edit_plugin = bw_array_get($_REQUEST, "edit_plugin", null);
     /** These plugins override the ones from the list... but why do we need to do it? 
      * Do we have to receive the others in the $_REQUEST **?**
      *
      */
     $oik_plugins_edit_settings = bw_array_get($_REQUEST, "_oik_plugins_edit_settings", null);
     $oik_plugins_add_settings = bw_array_get($_REQUEST, "_oik_plugins_add_settings", null);
     $oik_plugins_add_plugin = bw_array_get($_REQUEST, "_oik_plugins_add_plugin", null);
     if ($oik_plugins_add_plugin || $oik_plugins_add_settings) {
         $check_plugin = null;
         $delete_plugin = null;
         $edit_plugin = null;
     }
     if ($check_plugin) {
         oik_box(NULL, NULL, "Check", "oik_plugins_check");
     }
     if ($delete_plugin) {
         _oik_plugins_delete_settings($delete_plugin);
     }
     if ($edit_plugin) {
         global $bw_plugin;
         $bw_plugins = get_option("bw_plugins");
         $bw_plugin = bw_array_get($bw_plugins, $edit_plugin, null);
         if ($bw_plugin == null) {
             $bw_plugin['server'] = null;
             $bw_plugin['apikey'] = null;
         }
         $bw_plugin['plugin'] = $edit_plugin;
         bw_trace2($bw_plugin);
     }
     if ($oik_plugins_edit_settings) {
         $validated = _oik_plugins_settings_validate(false);
     }
     if ($oik_plugins_add_settings) {
         $validated = _oik_plugins_settings_validate(true);
     }
     if ($oik_plugins_add_plugin || $oik_plugins_add_settings && !$validated) {
         oik_box(NULL, NULL, "Add new", "oik_plugins_add_settings");
     }
     if ($edit_plugin || $oik_plugins_edit_settings || $validated) {
         oik_box(null, null, "Edit plugin", "oik_plugins_edit_settings");
     }
     oik_box(NULL, NULL, "Settings", "oik_plugins_settings");
     oik_menu_footer();
     bw_flush();
 }
Exemplo n.º 4
0
/**
 * Implement "oik_menu_box" action for oik-ms
 */
function oik_ms_menu_box()
{
    if (is_multisite()) {
        oik_box(NULL, NULL, "oik multi-site settings", "oik_ms_settings");
    }
}