/**
 * Settings for the jQuery Nivo slider  
 *
 * Extract from jQuery Nivo slider below
 * The setting selection field has been set for each line marked with an 'x' 

      x	effect: 'random',
      x	slices: 15,
      x	boxCols: 8,
      x	boxRows: 4,
      x animSpeed: 500,
      x	pauseTime: 3000,
      	startSlide: 0,
      x	directionNav: true,
      x	directionNavHide: true,
      x	controlNav: true,
      x	controlNavThumbs: false,
        controlNavThumbsFromRel: false,
      	controlNavThumbsSearch: '.jpg',
      	controlNavThumbsReplace: '_thumb.jpg',
      	keyboardNav: true,
      x	pauseOnHover: true,
      x	manualAdvance: false,
      x	captionOpacity: 0.8,
      	prevText: 'Prev',
      	nextText: 'Next',
      	randomStart: false,
      	beforeChange: function(){},
      	afterChange: function(){},
      	slideshowEnd: function(){},
        lastSlide: function(){},
        afterLoad: function(){}
*/
function oik_nivo_slider_options()
{
    bw_form("options.php");
    $option = "bw_nivo_slider";
    $options = get_option($option);
    stag('table class="form-table"');
    bw_flush();
    settings_fields('oik_nivo_options');
    $effect_options = array('random', 'sliceDownRight', 'sliceDownLeft', 'sliceUpRight', 'sliceUpLeft', 'sliceUpDown', 'sliceUpDownLeft', 'fold', 'fade', 'boxRandom', 'boxRain', 'boxRainReverse', 'boxRainGrow', 'boxRainGrowReverse', 'slideInLeft', 'slideInRight');
    $effect_options_assoc = bw_assoc($effect_options);
    bw_select_arr($option, "Effect (effect=<i>effect</i>)", $options, 'effect', array("#options" => $effect_options_assoc));
    bw_textfield_arr($option, "Slices", $options, 'slices', 2);
    bw_textfield_arr($option, "Box cols", $options, 'boxCols', 2);
    bw_textfield_arr($option, "Box rows", $options, 'boxRows', 2);
    bw_textfield_arr($option, "Anim speed", $options, 'animSpeed', 4);
    bw_textfield_arr($option, "Pause time (pause=<i>nnnn</i>)", $options, 'pauseTime', 4);
    bw_checkbox_arr($option, "Control nav (nav=n|y)", $options, 'controlNav');
    bw_checkbox_arr($option, "Control nav thumbs (thumbs=n|y)", $options, 'controlNavThumbs');
    //bw_textfield_arr( $option, "Control nav thumbs search", $options, 'controlNavThumbsSearch', 20 );
    //bw_textfield_arr( $option, "Control nav thumbs replace", $options, 'controlNavThumbsReplace', 20 );
    bw_checkbox_arr($option, "Direction nav", $options, 'directionNav');
    bw_checkbox_arr($option, "Direction nav hide", $options, 'directionNavHide');
    bw_checkbox_arr($option, "Pause on hover", $options, 'pauseOnHover');
    bw_checkbox_arr($option, "Manual advance (manual=n|y)", $options, 'manualAdvance');
    bw_textfield_arr($option, "Caption opacity", $options, 'captionOpacity', 4);
    //bw_tablerow( array( "", "<input type=\"submit\" name=\"ok\" value=\"Save changes\" class=\"button-primary\"/>") );
    etag("table");
    e(isubmit("ok", __("Save changes", "oik"), null, "button-primary"));
    etag("form");
    bw_flush();
}
Пример #2
0
 /**
 * Add a honeypot field to a form 
 *
 * We need to display an input field that is hidden from the normal user by display: none;
 * This may be completed by the spam bot since it thinks it's a field to complete.
 
 		<p class="th_rh_name_field">
 			<label for="th_rh_name"><?php _e( 'Only fill in if you are not human', 'registration-honeypot' ); ?></label><br />
 			<input type="text" name="th_rh_name" id="th_rh_name" class="input" value="" size="25" autocomplete="off" /></label>
 		</p>
 */
 function oik_honeypot_add_honeypot()
 {
     $field_name = oik_honeypot_field_name();
     //span( "label $field_name" );
     //e( "Humans leave this blank" );
     //epan();
     stag("div", null, null, kv("style", "display:none"));
     bw_textfield($field_name, 10, "Humans leave this blank", "");
     etag("div");
 }
Пример #3
0
/**
 * Display a blog option or shortcode
 * 
 */
function bw_display_blog_field($shortcode, $tag = "div", $use_shortcode = true)
{
    stag($tag);
    if ($use_shortcode) {
        e(do_shortcode("[{$shortcode}]"));
    } else {
        bw_get_option($shortcode);
        e($shortcode);
    }
    etag("e{$tag}");
}
Пример #4
0
/** 
 * Display/process the Copy options form
 */
function oik_ms_settings()
{
    p("Use this form to copy oik options values from a site of your choice.");
    p("You should only need to do this once per new site.");
    oik_ms_copy_site_settings();
    bw_form();
    stag("table", "widefat");
    $sites = oik_ms_site_list();
    bw_select("oik_ms_site", "Source site", null, array("#options" => $sites));
    $alts = array(0 => "options", 1 => "more options (alt=1)", 2 => "more options 2 ( alt=2)");
    bw_select("oik_ms_alt_source", "Source options set", null, array("#options" => $alts));
    bw_select("oik_ms_alt_target", "Target options set", null, array("#options" => $alts));
    etag("table");
    p(isubmit("_oik_ms_copy_options", "Copy options from site", null, "button-secondary"));
    etag("form");
}
Пример #5
0
/**
* Display the registered libraries
*
* Nothing fancy here as we cannot alter the settings
* So we just convert each OIK_lib in the OIK_libs class to an array of fields
* 
* We can display $oik_libs->libraries, $oik_libs->loaded_libraries and $oik_libs->checked_libraries
*
* If deps is an assoc array then we only get the '*' - so we copy the value of args['deps']
* which we know is set

*
	                   [library] => oik_boot
                   [src] => C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\oik_boot.php
                   [deps] => 
                   [version] => 2.6
                   [init_function] => 
                   [args] => Array
*
*/
function oik_lib_display_libraries()
{
    p("Registered libraries, showing the versions and dependencies.");
    $oik_libs = oik_libs();
    //bw_trace2( $oik_libs, "oik_libs" );
    //$oik_libs->display_libs();
    $libraries = $oik_libs->libraries;
    stag("table", "wide-fat");
    $labels = bw_as_array(__("Library,Source,Dependencies,Version,Args", 'oik-lib'));
    bw_tablerow($labels, "tr", "th");
    foreach ($libraries as $lib => $data) {
        //print_r( $lib );
        //bw_trace2( $data, "data" );
        //$data->deps();
        $data->deps = $data->args['deps'];
        unset($data->error);
        bw_tablerow($data);
    }
    etag("table");
}
Пример #6
0
 function bw_form_start($option, $settings, $action = "options.php")
 {
     bw_form($action);
     $options = get_option($option);
     stag('table', "form-table");
     bw_flush();
     settings_fields($settings);
     return $options;
 }
Пример #7
0
 /**
  * Produce a cite tag
  * 
  * Renamed from cite() which has been deprecated
  */
 function _bw_cite($text, $class = NULL, $id = NULL)
 {
     stag("cite", $class, $id);
     e($text);
     etag("cite");
 }
Пример #8
0
 /**
  * Display the edit settings form
  */
 function oik_plugins_edit_settings()
 {
     global $bw_plugin;
     bw_form();
     stag("table", "wide-fat");
     bw_tablerow(array("plugin", $bw_plugin['plugin'] . ihidden('plugin', $bw_plugin['plugin'])));
     bw_textfield("server", 100, "server", stripslashes($bw_plugin['server']));
     bw_textfield("apikey", 26, "apikey?", $bw_plugin["apikey"]);
     etag("table");
     p(isubmit("_oik_plugins_edit_settings", "Change plugin", null, "button-primary"));
     etag("form");
 }
Пример #9
0
/**
 * Produce a hex dump of the generated HTML
 * 
 * @param string $content
 */
function trac_29608_dump($content)
{
    oik_require("includes/hexdump.php", "trac29608");
    $dump = hexdump($content);
    stag("code");
    e($dump);
    etag("code");
}