<?php echo $description_debug; ?> </b> </div> </div> </td> <?php if ($javascript_is_allowed) { ?> <td valign="center" align="center" width="0%"> <a href="#<?php echo $element_help_text_debug; ?> " title="Info"><img src="<?php echo MCW_get_url('info'); ?> " onClick="Effect.toggle('<?php echo $element_help_text_debug; ?> ', 'slide', {duration:0.5}); return false;"></a> </td> <?php } ?> </tr> </table> </p> </form> </fieldset> <div width="100%" align="right">
/** * Creates the edit form for the widget. * */ function form($instance) { global $mcw_prefix; global $mcw_path; //if (!empty($instance)){ include_once MCW_get_url('style'); //} //Defaults $defaults = MCW_get_default_options(); $instance = wp_parse_args((array) $instance, array('title' => '', 'kind' => $defaults['std_kind'], 'name' => $this->id, 'filter-all' => 1)); $title = htmlspecialchars($instance['title']); echo '<div class="mcw-row-"><label for="' . $this->get_field_name('title') . '"><input type="text" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" size="13" ></label></div>'; echo '<div class="mcw-row-small"><nobr><label for="' . $this->get_field_name('kind') . '_php"><input type="radio" id="' . $this->get_field_id('kind') . '_php" name="' . $this->get_field_name('kind') . '" value="php" checked="checked"> PHP</label></nobr>'; echo '<nobr><label for="' . $this->get_field_name('kind') . '_html"><input type="radio" id="' . $this->get_field_id('kind') . '_html" name="' . $this->get_field_name('kind') . '" value="html"' . MCW_check($instance['kind'], "html") . '> HTML</label></nobr></div><br>'; //echo '<div class="mcw-row">'.MCW_get_input_code($instance, $this).'</div>'; echo '<div class="mcw-row"><textarea cols="60" id="' . $this->get_field_id('code') . '" name="' . $this->get_field_name('code') . '" style="height:' . MCW_get_option('code_height') . 'px; font-family:Courier, Monaco, monospace;" >' . stripslashes($instance["code"]) . '</textarea><br></div>'; //echo '<div class="mcw-row-small">'.MCW_get_input_filters($instance, $this).'</div>'; $myfilteroptions = MCW_get_option('filters'); // get all filters if (empty($myfilteroptions)) { $myfilteroptions = array('all' => '1'); } $max = count($myfilteroptions); echo '<div class="mcw-row-small">'; for ($i = 0; $i < $max; ++$i) { echo '<nobr><label for="' . $this->get_field_id('filter' . '-' . $myfilteroptions[$i][0]) . '">'; echo '<input type="checkbox" id="' . $this->get_field_id('filter' . '-' . $myfilteroptions[$i][0]) . '" name="' . $this->get_field_name('filter' . '-' . $myfilteroptions[$i][0]) . '" value="1" '; echo MCW_check($instance['filter-' . $myfilteroptions[$i][0]], "1"); //active or not echo '> ' . $myfilteroptions[$i][0] . ' </label></nobr>'; } echo '</div>'; }
function MCW_include_theme_page() { global $mcw_prefix; global $mcw_widgetsoption; add_option($mcw_prefix . $mcw_widgetsoption, array(), "IndexOption for MyCustomWidgets", true); include MCW_get_url('style'); //echo "<h2>My Custom Widget - test1</h2>"; include "my_custom_widget_options.php"; }
function MCW_get_official_form($name) { global $mcw_officialform_tooltip; global $mcw_custag_tooltip; include MCW_get_url('style'); $MyWidget = MCW_get_mywidget_by_name($name); $outsidecall = '<!--' . $name . '-->'; echo '<a href="' . get_option('siteurl') . '/wp-admin/themes.php?page=' . MCW_get_mainfile_name() . '">» Click here to configure Widget'; echo '</a>'; // had to be deactivated because cannot be handled by firefox // echo '<script type="text/javascript" src="'.MCW_get_url('js_tooltip').'"></script>'; // thanks to http://www.walterzorn.de/tooltip/tooltip.htm echo '<br><div style ="margin-left: 20px; margin-top: 5px;" onmouseover="Tip('' . $mcw_custag_tooltip . '')" onmouseout="UnTip()"><input type="text" value="' . $outsidecall . '" size="' . strlen($outsidecall) . '" class="mcw_readonly" readonly="readonly"></div><br>'; echo '<div class="mcw_maint_display" onmouseover="Tip('' . $mcw_officialform_tooltip . '')" onmouseout="UnTip()">'; MCW_get_widget_maintenance($MyWidget, '', '', true); echo '</div>'; }