ComicPress Options part 3 ? or is it 4

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-11-22 20:38:49 -08:00
parent 609c5dbfa0
commit 299d373301
2 changed files with 65 additions and 91 deletions

View File

@ -21,7 +21,7 @@
</table> </table>
</div> </div>
<div class="stuffbox" style="background: #ebf8ff;"> <div class="stuffbox" style="background: #edffeb;">
<h3>Comic</h3> <h3>Comic</h3>
<table class="form-table" style="width: auto;"> <table class="form-table" style="width: auto;">

View File

@ -1,101 +1,75 @@
<div id="menubaroptions" class="hide"> <div id="menubaroptions" class="hide">
<div class="inside">
<form method="post" id="myForm" name="template" enctype="multipart/form-data"> <form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?> <?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<?php <div class="stuffbox" style="background: #ebf8ff;">
foreach ($comicpress_options as $value) { <h3>Main</h3>
switch ( $value['type'] ) { <table class="form-table" style="width: auto;">
case "disable_default_menubar": ?>
<tr> <tr>
<th scope="row"><strong><?php _e('Disable default Menubar?','comicpress'); ?></strong><br /><br /></th> <th scope="row"><?php _e('Disable default Menubar?','comicpress'); ?></th>
<td valign="top" width="100"> <td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> /><?php _e('Yes','comicpress'); ?></label> <input name="disable_default_menubar" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_default_menubar']); ?> />
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> /><?php _e('No','comicpress'); ?></label>
</td> </td>
<td valign="top"> <td valign="top">
<?php _e('Allows you to customize the location of the Menubar via Widgets.','comicpress'); ?> <?php _e('Allows you to customize the location of the Menubar via Widgets.','comicpress'); ?>
</td> </td>
</tr> </tr>
<?php break;
case "enable_search_in_menubar": ?>
<tr> <tr>
<th scope="row"><strong><?php _e('Enable Search Form?','comicpress'); ?></strong><br /></th> <th scope="row"><?php _e('Enable Search Form?','comicpress'); ?></th>
<td valign="top" width="100"> <td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> /><?php _e('Yes','comicpress'); ?></label> <input name="enable_search_in_menubar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_search_in_menubar']); ?> />
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> /><?php _e('No','comicpress'); ?></label>
</td> </td>
<td valign="top"> <td valign="top">
<?php _e('Searchforms can be fun when you have something to search for.','comicpress'); ?> <?php _e('Searchforms can be fun when you have something to search for.','comicpress'); ?>
</td> </td>
</tr> </tr>
<?php break;
case "enable_rss_in_menubar": ?>
<tr> <tr>
<th scope="row"><strong><?php _e('Enable RSS Link?','comicpress'); ?></strong><br /></th> <th scope="row"><?php _e('Enable RSS Link?','comicpress'); ?></th>
<td valign="top"> <td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> /><?php _e('Yes','comicpress'); ?></label> <input name="enable_rss_in_menubar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_rss_in_menubar']); ?> />
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> /><?php _e('No','comicpress'); ?></label>
</td> </td>
<td valign="top"> <td valign="top">
<?php _e('Adds an RSS link icon to your menubar on the right side.','comicpress'); ?> <?php _e('Adds an RSS link icon to your menubar on the right side.','comicpress'); ?>
</td> </td>
</tr> </tr>
<?php break;
case "enable_navigation_in_menubar": ?>
<tr> <tr>
<th scope="row"><strong><?Php _e('Enable mini navigation','comicpress'); ?></strong><br /></th> <th scope="row"><?Php _e('Enable mini navigation','comicpress'); ?></th>
<td valign="top"> <td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> /><?php _e('Yes','comicpress'); ?></label> <input name="enable_navigation_in_menubar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_navigation_in_menubar']); ?> />
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> /><?php _e('No','comicpress'); ?></label>
</td> </td>
<td valign="top"> <td valign="top">
<?php _e('Mini Navigation adds small previous and next arrows arrow to the right side of your Menubar.','comicpress'); ?> <?php _e('Mini Navigation adds small previous and next arrows arrow to the right side of your Menubar.','comicpress'); ?>
</td> </td>
</tr> </tr>
<?php break;
case "contact_in_menubar": ?>
<tr> <tr>
<th scope="row"><strong><?php _e('Enable Contact/custom links?','comicpress'); ?></strong><br /><br /></th> <th scope="row"><?php _e('Enable Contact/custom links?','comicpress'); ?></th>
<td valign="top"> <td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> /><?php _e('Yes','comicpress'); ?></label> <input name="contact_in_menubar" type="checkbox" value="1" <?php checked(true, $comicpress_options['contact_in_menubar']); ?> />
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> /><?php _e('No','comicpress'); ?></label>
</td> </td>
<td valign="top"> <td valign="top">
<?php _e('Adds a <b>Contact</b> button to the Menubar associated with your admin email. You can also create a links category called <i>Menubar</i> and whatever links you add to that will appear in the Menubar.','comicpress'); ?> <?php _e('Adds a <b>Contact</b> button to the Menubar associated with your admin email. You can also create a links category called <i>Menubar</i> and whatever links you add to that will appear in the Menubar.','comicpress'); ?>
</td> </td>
</tr> </tr>
<?php break;
case "disable_dynamic_menubar_links": ?>
<tr> <tr>
<th scope="row"><strong><?php _e('Disable auto-generated WordPress links?','comicpress'); ?></strong><br /><br /></th> <th scope="row"><?php _e('Disable auto-generated WordPress links?','comicpress'); ?></th>
<td valign="top"> <td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> /><?php _e('Yes','comicpress'); ?></label> <input name="disable_dynamic_menubar_links" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_dynamic_menubar_links']); ?> />
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> /><?php _e('No','comicpress'); ?></label>
</td> </td>
<td valign="top"> <td valign="top">
<?php _e('Allows you to use the links category <i>menulinks</i> (you will need to create this category if it does not already exist) to create custom links on the Menubar (mostly used for making graphic images as links). Otherwise, ALL published pages will appear automatically.','comicpress'); ?> <?php _e('Allows you to use the links category <i>menubar</i> (you will need to create this category if it does not already exist) to create custom links on the Menubar (mostly used for making graphic images as links). Otherwise, ALL published pages will appear automatically.','comicpress'); ?>
</td> </td>
</tr> </tr>
<?php break;
}
}
?>
</table> </table>
</div>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" /> <input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" /> <input type="hidden" name="action" value="comicpress_save" />
</form> </form>
</div> </div>
</div>