ComicPress Options Revamp (part 4 - done, need testing)

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-11-22 22:33:29 -08:00
parent 299d373301
commit 886b27a310
12 changed files with 238 additions and 246 deletions

View File

@ -41,15 +41,6 @@ function comicpress_admin() {
update_option('comicpress_options',$comicpress_options);
}
if ($_REQUEST['action'] == 'comicpress_save_archivesearch') {
$comicpress_options['archive_display_order'] = $_REQUEST['archive_display_order'];
$comicpress_options['excerpt_or_content_archive'] = $_REQUEST['excerpt_or_content_archive'];
$comicpress_options['excerpt_or_content_search'] = $_REQUEST['excerpt_or_content_search'];
$comicpress_options['category_thumbnail_postcount'] = $_REQUEST['category_thumbnail_postcount'];
$tab = 'archivesearch';
update_option('comicpress_options',$comicpress_options);
}
if ($_REQUEST['action'] == 'comicpress_save_general') {
$comicpress_options['disable_page_restraints'] = (bool)( $_REQUEST['disable_page_restraints'] == 1 ? true : false );
$comicpress_options['rascal_says'] = (bool)($_REQUEST['rascal_says'] == 1 ? true : false );
@ -66,75 +57,96 @@ function comicpress_admin() {
update_option('comicpress_options',$comicpress_options);
}
if ($_REQUEST['action'] == 'comicpress_save_index') {
$comicpress_options['disable_comic_frontpage'] = (bool)($_REQUEST['disable_comic_frontpage'] == 1 ? true : false );
$comicpress_options['disable_comic_blog_frontpage'] = (bool)($_REQUEST['disable_comic_blog_frontpage'] == 1 ? true : false );
$comicpress_options['disable_comic_blog_single'] = (bool)($_REQUEST['disable_comic_blog_single'] == 1 ? true : false );
$comicpress_options['disable_blog_frontpage'] = (bool)($_REQUEST['disable_blog_frontpage'] == 1 ? true : false );
$comicpress_options['disable_blog_frontpage'] = (bool)($_REQUEST['disable_blog_frontpage'] == 1 ? true : false );
$tab = 'index';
update_option('comicpress_options',$comicpress_options);
}
/*
$comicpress_options['disable_page_titles'] = (bool)($_REQUEST['disable_page_titles'] == 1 ? true : false );
$comicpress_options['static_blog'] = (bool)($_REQUEST['static_blog'] == 1 ? true : false );
if ($_REQUEST['action'] == 'comicpress_save_post') {
$comicpress_options['transcript_in_posts'] = (bool)($_REQUEST['transcript_in_posts'] == 1 ? true : false );
$comicpress_options['enable_custom_image_header'] = (bool)($_REQUEST['enable_custom_image_header'] == 1 ? true : false );
$comicpress_options['custom_image_header_width'] = wp_filter_nohtml_kses('980');
$comicpress_options['custom_image_header_height'] = wp_filter_nohtml_kses('120');
$comicpress_options['enable_related_comics'] = (bool)($_REQUEST['enable_related_comics'] == 1 ? true : false );
$comicpress_options['enable_related_posts'] = (bool)($_REQUEST['enable_related_posts'] == 1 ? true : false );
$comicpress_options['enable_post_calendar'] = (bool)($_REQUEST['enable_post_calendar'] == 1 ? true : false );
$comicpress_options['enable_post_author_gravatar'] = (bool)($_REQUEST['enable_post_author_gravatar'] == 1 ? true : false );
$comicpress_options['enable_comic_post_calendar'] = (bool)($_REQUEST['enable_comic_post_calendar'] == 1 ? true : false );
$comicpress_options['enable_comic_post_author_gravatar'] = (bool)($_REQUEST['enable_comic_post_author_gravatar'] == 1 ? true : false );
$comicpress_options['disable_tags_in_posts'] = (bool)($_REQUEST['disable_tags_in_posts'] == 1 ? true : false );
$comicpress_options['disable_categories_in_posts'] = (bool)($_REQUEST['disable_categories_in_posts'] == 1 ? true : false );
$comicpress_options['blogposts_with_comic'] = (bool)($_REQUEST['blogposts_with_comic'] == 1 ? true : false );
$comicpress_options['remove_wptexturize'] = (bool)($_REQUEST['remove_wptexturize'] == 1 ? true : false );
$comicpress_options['moods_directory'] = 'default';
$comicpress_options['calendar_directory'] = 'none';
$comicpress_options['avatar_directory'] = 'none';
$comicpress_options['split_column_in_two'] = (bool)($_REQUEST['split_column_in_two'] == 1 ? true : false );
$comicpress_options['author_column_one'] = wp_filter_nohtml_kses($_REQUEST['author_column_one']);
$comicpress_options['author_column_two'] = wp_filter_nohtml_kses($_REQUEST['author_column_two']);
$comicpress_options['enable_comic_post_author_gravatar'] = (bool)($_REQUEST['enable_comic_post_author_gravatar'] == 1 ? true : false );
$comicpress_options['enable_post_author_gravatar'] = (bool)($_REQUEST['enable_post_author_gravatar'] == 1 ? true : false );
$comicpress_options['avatar_directory'] = wp_filter_nohtml_kses($_REQUEST['avatar_directory']);
$comicpress_options['moods_directory'] = wp_filter_nohtml_kses($_REQUEST['moods_directory']);
$comicpress_options['calendar_directory'] = wp_filter_nohtml_kses($_REQUEST['calendar_directory']);
$comicpress_options['enable_comic_post_calendar'] = (bool)($_REQUEST['enable_comic_post_calendar'] == 1 ? true : false );
$comicpress_options['enable_post_calendar'] = (bool)($_REQUEST['enable_post_calendar'] == 1 ? true : false );
$comicpress_options['disable_tags_in_posts'] = (bool)($_REQUEST['disable_tags_in_posts'] == 1 ? true : false );
$comicpress_options['disable_categories_in_posts'] = (bool)($_REQUEST['disable_categories_in_posts'] == 1 ? true : false );
$comicpress_options['blogposts_with_comic'] = (bool)($_REQUEST['blogposts_with_comic'] == 1 ? true : false );
$comicpress_options['static_blog'] = (bool)($_REQUEST['static_blog'] == 1 ? true : false );
$comicpress_options['disable_page_titles'] = (bool)($_REQUEST['disable_page_titles'] == 1 ? true : false );
$tab = 'post';
update_option('comicpress_options',$comicpress_options);
}
if ($_REQUEST['action'] == 'comicpress_save_archivesearch') {
$comicpress_options['archive_display_order'] = $_REQUEST['archive_display_order'];
$comicpress_options['excerpt_or_content_archive'] = $_REQUEST['excerpt_or_content_archive'];
$comicpress_options['excerpt_or_content_search'] = $_REQUEST['excerpt_or_content_search'];
$comicpress_options['category_thumbnail_postcount'] = $_REQUEST['category_thumbnail_postcount'];
$tab = 'archivesearch';
update_option('comicpress_options',$comicpress_options);
}
if ($_REQUEST['action'] == 'comicpress_save_menubar') {
$comicpress_options['enable_search_in_menubar'] = (bool)($_REQUEST['enable_search_in_menubar'] == 1 ? true : false );
$comicpress_options['enable_rss_in_menubar'] = (bool)($_REQUEST['enable_rss_in_menubar'] == 1 ? true : false );
$comicpress_options['enable_navigation_in_menubar'] = (bool)($_REQUEST['enable_navigation_in_menubar'] == 1 ? true : false );
$comicpress_options['contact_in_menubar'] = (bool)($_REQUEST['contact_in_menubar'] == 1 ? true : false );
$comicpress_options['disable_dynamic_menubar_links'] = (bool)($_REQUEST['disable_dynamic_menubar_links'] == 1 ? true : false );
$comicpress_options['disable_default_menubar'] = (bool)($_REQUEST['disable_default_menubar'] == 1 ? true : false );
$comicpress_options['members_post_category'] = '';
$comicpress_options['split_column_in_two'] = (bool)($_REQUEST['split_column_in_two'] == 1 ? true : false );
$comicpress_options['author_column_one'] = '';
$comicpress_options['author_column_two'] = '';
$comicpress_options['buy_print_email'] = 'philip@frumph.net';
$comicpress_options['buy_print_url'] = '/shop/';
$comicpress_options['buy_print_us_amount'] = '24.95';
$comicpress_options['buy_print_int_amount'] = '29.95';
$comicpress_options['disable_default_menubar'] = (bool)($_REQUEST['disable_default_menubar'] == 1 ? true : false );
$tab = 'menubar';
update_option('comicpress_options',$comicpress_options);
}
if ($_REQUEST['action'] == 'comicpress_save_customheader') {
$comicpress_options['enable_custom_image_header'] = (bool)($_REQUEST['enable_custom_image_header'] == 1 ? true : false );
$comicpress_options['custom_image_header_width'] = wp_filter_nohtml_kses($_REQUEST['custom_image_header_width']);
$comicpress_options['custom_image_header_height'] = wp_filter_nohtml_kses($_REQUEST['custom_image_header_height']);
$tab = 'customheader';
update_option('comicpress_options',$comicpress_options);
}
if ($_REQUEST['action'] == 'comicpress_save_buyprint') {
$comicpress_options['buy_print_email'] = wp_filter_nohtml_kses($_REQUEST['buy_print_email']);
$comicpress_options['buy_print_url'] = wp_filter_nohtml_kses($_REQUEST['buy_print_url']);
$comicpress_options['buy_print_us_amount'] = wp_filter_nohtml_kses($_REQUEST['buy_print_us_amount']);
$comicpress_options['buy_print_int_amount'] = wp_filter_nohtml_kses($_REQUEST['buy_print_int_amount']);
$comicpress_options['buy_print_add_shipping'] = (bool)($_REQUEST['buy_print_add_shipping'] == 1 ? true : false );
$comicpress_options['buy_print_us_ship'] = '4.95';
$comicpress_options['buy_print_int_ship'] = '9.95';
*/
// update_option('comicpress_options',$comicpress_options);
$comicpress_options['buy_print_us_ship'] = wp_filter_nohtml_kses($_REQUEST['buy_print_us_ship']);
$comicpress_options['buy_print_int_ship'] = wp_filter_nohtml_kses($_REQUEST['buy_print_int_ship']);
$tab = 'buyprint';
update_option('comicpress_options',$comicpress_options);
}
if ($_REQUEST['action'] == 'comicpress_save_members') {
$comicpress_options['members_post_category'] = wp_filter_nohtml_kses($_REQUEST['members_post_category']);
$tab = 'members';
update_option('comicpress_options',$comicpress_options);
}
if ($tab) {
?>
<div id="message" class="update fade"><p><strong><?php _e('ComicPress Settings SAVED!','comicpress'); ?></strong></p></div>
<div id="message" class="updated fade"><p><strong><?php _e('ComicPress Settings SAVED!','comicpress'); ?></strong></p></div>
<script>function hidemessage() { document.getElementById('message').style.display = 'none'; }</script>
<?php } ?>
<?php }
<?php }
}
if ('comicpress_reset' == $_REQUEST['action']) { ?>
<div id="message" class="updated fade"><p><strong><?php _e('ComicPress Settings RESET!','comicpress'); ?></strong></p></div>
<script>function hidemessage() { document.getElementById('message').style.display = 'none'; }</script>
@ -146,15 +158,15 @@ function comicpress_admin() {
<div id="poststuff" class="metabox-holder">
<div id="cpadmin" onclick="hidemessage();">
<div class="on" title="themestyle"><span><?php _e('Layout','comicpress'); ?></span></div>
<div class="off" title="generaloptions"><span><?php _e('General','comicpress'); ?></span></div>
<div class="off" title="indexoptions"><span><?php _e('Home Page','comicpress'); ?></span></div>
<div class="off" title="postoptions"><span><?php _e('Posts &amp; Pages','comicpress'); ?></span></div>
<div class="off" title="archivesearch"><span><?php _e('Archive &amp; Search','comicpress'); ?></span></div>
<div class="off" title="menubaroptions"><span><?php _e('Menubar','comicpress'); ?></span></div>
<div class="off" title="customheader"><span><?php _e('Custom Header','comicpress'); ?></span></div>
<div class="off" title="buyprintoptions"><span><?php _e('Buy Print','comicpress'); ?></span></div>
<div class="off" title="membersoptions"><span><?php _e('Members','comicpress'); ?></span></div>
<div class="<?php if ($tab == 'themestyle' || empty($tab)) { ?>on<?php } else { ?>off<?php } ?>" title="themestyle"><span><?php _e('Layout','comicpress'); ?></span></div>
<div class="<?php if ($tab == 'general') { ?>on<?php } else { ?>off<?php } ?>" title="generaloptions"><span><?php _e('General','comicpress'); ?></span></div>
<div class="<?php if ($tab == 'index') { ?>on<?php } else { ?>off<?php } ?>" title="indexoptions"><span><?php _e('Home Page','comicpress'); ?></span></div>
<div class="<?php if ($tab == 'post') { ?>on<?php } else { ?>off<?php } ?>" title="postoptions"><span><?php _e('Posts &amp; Pages','comicpress'); ?></span></div>
<div class="<?php if ($tab == 'archivesearch') { ?>on<?php } else { ?>off<?php } ?>" title="archivesearch"><span><?php _e('Archive &amp; Search','comicpress'); ?></span></div>
<div class="<?php if ($tab == 'menubar') { ?>on<?php } else { ?>off<?php } ?>" title="menubaroptions"><span><?php _e('Menubar','comicpress'); ?></span></div>
<div class="<?php if ($tab == 'customheader') { ?>on<?php } else { ?>off<?php } ?>" title="customheader"><span><?php _e('Custom Header','comicpress'); ?></span></div>
<div class="<?php if ($tab == 'buyprint') { ?>on<?php } else { ?>off<?php } ?>" title="buyprintoptions"><span><?php _e('Buy Print','comicpress'); ?></span></div>
<div class="<?php if ($tab == 'members') { ?>on<?php } else { ?>off<?php } ?>" title="membersoptions"><span><?php _e('Members','comicpress'); ?></span></div>
</div>
<?php include(get_template_directory() . '/options/themestyle.php'); ?>
<?php include(get_template_directory() . '/options/generaloptions.php'); ?>

View File

@ -1,7 +1,7 @@
<?php
global $comicpress_options;
if ($comicpress_options['enable_custom_image_header'] == 'yes') {
$comicpress_options = comicpress_load_options();
if ($comicpress_options['enable_custom_image_header']) {
// Custom Image Header
define('HEADER_TEXTCOLOR', '000');

View File

@ -26,7 +26,7 @@ Author URI: http://lesterchan.net
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
global $comicpress_options;
$comicpress_options = comicpress_load_options();
if ($comicpress_options['enable_numbered_pagination']) {
### Function: Page Navigation: Boxed Style Paging

View File

@ -1,4 +1,4 @@
<div id="archivesearch" class="hide">
<div id="archivesearch" class="<?php if ($tab == 'archivesearch') { ?>show<?php } else { ?>hide<?php } ?>">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>

View File

@ -1,103 +1,94 @@
<div id="buyprintoptions" class="hide">
<div class="inside">
<div id="buyprintoptions" class="<?php if ($tab == 'buyprint') { ?>show<?php } else { ?>hide<?php } ?>">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<?php
foreach ($comicpress_options as $value) {
switch ( $value['type'] ) {
case "buy_print_email": ?>
<tr>
<th scope="row"><b><?php _e('Paypal Email Address','comicpress'); ?></b><span style="color: #ff0000;">*</span><br /><br /><?php _e('The Email address you registered with Paypal and that your store is associated with.','comicpress'); ?></th>
<td valign="top">
<label>
<input type="text" size="45" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br />
<span style="color: #ff0000;"><?php _e('* This must be correct, you do not want other people getting your money.','comicpress'); ?></span>
</label>
</td>
</tr>
<?php break;
case "buy_print_url": ?>
<tr>
<th scope="row"><b><?php _e('Url Page of the Template','comicpress'); ?></b><span style="color: #ff0000;">*</span><br /><br /><?php _e('The URL address to which you associated the buy print template.','comicpress'); ?></th>
<td valign="top">
<label>
<input type="text" size="45" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br />
<div class="stuffbox" style="background: #ebf8ff;">
<h3>Custom Header Options</h3>
<table class="form-table" style="width: auto;">
<tr>
<th scope="row">
<?php _e('Paypal Email Address','comicpress'); ?><br />
<input type="text" size="25" name="buy_print_email" id="buy_print_email" value="<?php echo $comicpress_options['buy_print_email']; ?>" />
</th>
<td valign="top" colspan="2">
<span style="color: #ff0000;"><?php _e('* This must be correct, you do not want other people getting your money.','comicpress'); ?></span><br />
<?php _e('The Email address you registered with Paypal and that your store is associated with.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row">
<?php _e('Url Page of the Template','comicpress'); ?><br />
<input type="text" size="25" name="buy_print_url" id="buy_print_url" value="<?php echo $comicpress_options['buy_print_url']; ?>" />
</th>
<td valign="top" colspan="2">
<span style="color: #ff0000;"><?php _e('* This must be correct, the form needs some place to go.','comicpress'); ?></span><br />
<b><?php _e('Examples','comicpress'); ?></b>:<br />
<?php _e('The URL address to which you associated the buy print template.','comicpress'); ?><br />
<?php _e('Examples"','comicpress'); ?><br />
http://yourdomain.com/?p=233<br />
http://yourdomain.com/shop/<br />
/?p=233<br />
/shop/<br />
</label>
</td>
</tr>
<?php break;
case "buy_print_add_shipping": ?>
<tr>
<th scope="row"><strong><?php _e('Add shipping to each item?','comicpress'); ?></strong><br /><br /><?php _e('Enabling this option will make it so that shipping costs will be added to each item purchased.','comicpress'); ?></th>
<td valign="top" width="100">
<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>
&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 valign="top">
</td>
</tr>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Add shipping to each item?','comicpress'); ?></th>
<td valign="top">
<input name="buy_print_add_shipping" type="checkbox" value="1" <?php checked(true, $comicpress_options['buy_print_add_shipping']); ?> />
</td>
<td valign="top">
<?php _e('Enabling this option will make it so that shipping costs will be added to each item purchased.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Print Cost (US/Canada)','comicpress'); ?></th>
<td valign="top">
<label>
<input type="text" size="7" name="buy_print_us_amount" id="buy_print_us_amount" value="<?php echo $comicpress_options['buy_print_us_amount']; ?>" />
</label>
</td>
<td valign="top">
<?php _e('How much does a print cost for people in the United States and Canada?','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Shipping Cost (US/Canada)','comicpress'); ?></th>
<td valign="top">
<label>
<input type="text" size="7" name="buy_print_us_ship" id="buy_print_us_ship" value="<?php echo $comicpress_options['buy_print_us_ship']; ?>" />
</label>
</td>
</tr>
<?php break;
case "buy_print_us_amount": ?>
<tr>
<th scope="row"><b><?php _e('Print Cost (US/Canada)','comicpress'); ?></b><br /><br /><?php _e('How much does a print cost for people in the United States and Canada?','comicpress'); ?></th>
<td valign="top">$
<label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Print Cost (International)','comicpress'); ?></th>
<td valign="top">
<label>
<input type="text" size="7" name="buy_print_int_amount" id="buy_print_int_amount" value="<?php echo $comicpress_options['buy_print_int_amount']; ?>" />
</label>
</td>
<td valign="top">
<?php _e('How much does a print cost for people *NOT* in the United States and Canada (International)','comicpress'); ?>
</td>
</tr>
<?php break;
case "buy_print_us_ship": ?>
<tr>
<th scope="row"><b><?php _e('Shipping Cost (US/Canada)','comicpress'); ?></b><br /><br /></th>
<td valign="top">$
<label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label>
</td>
</tr>
<?php break;
case "buy_print_int_amount": ?>
<tr>
<th scope="row"><b><?php _e('Print Cost (International)','comicpress'); ?></b><br /><br /><?php _e('How much does a print cost for people *NOT* in the United States and Canada (International)','comicpress'); ?></th>
<td valign="top">$
<label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label>
</td>
</tr>
<?php break;
case "buy_print_int_ship": ?>
<tr>
<th scope="row"><b><?php _e('Shipping Cost (International)','comicpress'); ?></b><br /><br /></th>
<td valign="top">$
<label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label>
</td>
</tr>
<?php break;
}
}
?>
<tr>
<th scope="row"><?php _e('Shipping Cost (International)','comicpress'); ?></th>
<td valign="top">
<label>
<input type="text" size="7" name="buy_print_int_ship" id="buy_print_int_ship" value="<?php echo $comicpress_options['buy_print_int_ship']; ?>" />
</label>
</td>
</tr>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
<input name="comicpress_save_buyprint" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save_buyprint" />
</form>
</div>

View File

@ -1,60 +1,49 @@
<div id="customheader" class="hide">
<div class="inside">
<div id="customheader" class="<?php if ($tab == 'customheader') { ?>show<?php } else { ?>hide<?php } ?>">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<?php
foreach ($comicpress_options as $value) {
switch ( $value['type'] ) {
case "enable_custom_image_header": ?>
<tr>
<th scope="row"><strong><?php _e('Use Custom Header?','comicpress'); ?></strong><br /><?php _e('Adds Custom Header option under Dashboard -> Appearance.','comicpress'); ?><br /></th>
<td valign="top" width="100">
<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>
&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 valign="top">
<?php _e('Allows you to add your own header image and customize or hide the default text.','comicpress'); ?>
</td>
</tr>
<div class="stuffbox" style="background: #ebf8ff;">
<h3>Custom Header Options</h3>
<table class="form-table" style="width: auto;">
<tr>
<th scope="row"><?php _e('Use Custom Header?','comicpress'); ?></th>
<td valign="top" width="100">
<input name="enable_custom_image_header" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_custom_image_header']); ?> />
</td>
<td valign="top">
<?php _e('Adds Custom Header option under Dashboard -> Appearance. Allows you to add your own header image and customize or hide the default text.','comicpress'); ?>
</td>
</tr>
<?php break;
case "custom_image_header_width": ?>
<tr>
<th scope="row"><b><?php _e('Width','comicpress'); ?></b><br /><?php _e('Sets the <b>width</b> of the image you want to use for Custom Header.','comicpress'); ?><br /></th>
<td valign="top">
<label>
<input type="text" size="5" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br />
</label>
</td>
<td valign="top" rowspawn="5">
<?php _e('Defaults widths are <b>780px</b> or <b>980px</b> depending on the layout. Refer to the width of the layout you chose and any custom changes you have made to site width in the CSS.','comicpress'); ?>
</td>
</tr>
<?php break;
case "custom_image_header_height": ?>
<tr>
<th scope="row"><b><?php _e('Height','comicpress'); ?></b><br /><?php _e('Sets the <b>height</b> of the image you want to use for Custom Header.','comicpress'); ?><br /><br /></th>
<td valign="top">
<label>
<input type="text" size="5" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br />
</label>
</td>
<td valign="top">
<?php _e('Recommended maximum height is <b>120px</b>, but if your logo/image demands it you can set it higher.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Width','comicpress'); ?></th>
<td valign="top">
<label>
<input type="text" size="5" name="custom_image_header_width" id="custom_image_header_width" value="<?php echo $comicpress_options['custom_image_header_width']; ?>" /><br />
</label>
</td>
<td valign="top" rowspawn="5">
<?php _e('Sets the <b>width</b> of the image you want to use for Custom Header. Defaults widths are <b>780px</b> or <b>980px</b> depending on the layout. Refer to the width of the layout you chose and any custom changes you have made to site width in the CSS.','comicpress'); ?>
</td>
</tr>
<?php break;
}
}
?>
<tr>
<th scope="row"><?php _e('Height','comicpress'); ?></th>
<td valign="top">
<label>
<input type="text" size="5" name="custom_image_header_height" id="custom_image_header_height" value="<?php echo $comicpress_options['custom_image_header_height']; ?>" />
</label>
</td>
<td valign="top">
<?php _e('Sets the <b>height</b> of the image you want to use for Custom Header. Recommended maximum height is <b>120px</b>, but if your logo/image demands it you can set it higher.','comicpress'); ?>
</td>
</tr>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
<input name="comicpress_save_customheader" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save_customheader" />
</form>
</div>

View File

@ -1,4 +1,4 @@
<div id="generaloptions" class="hide">
<div id="generaloptions" class="<?php if ($tab == 'general') { ?>show<?php } else { ?>hide<?php } ?>">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>

View File

@ -1,4 +1,4 @@
<div id="indexoptions" class="hide">
<div id="indexoptions" class="<?php if ($tab == 'index') { ?>show<?php } else { ?>hide<?php } ?>">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
@ -59,7 +59,7 @@
</table>
</div>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
<input name="comicpress_save_index" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save_index" />
</form>
</div>

View File

@ -1,4 +1,4 @@
<div id="membersoptions" class="hide">
<div id="membersoptions" class="<?php if ($tab == 'members') { ?>show<?php } else { ?>hide<?php } ?>">
<h3>Main</h3>
<div class="stuffbox" style="background: #ebf8ff;">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
@ -6,22 +6,22 @@
<table class="form-table" style="width: auto;">
<tr>
<th scope="row">Members Category</th>
<td valign="top">
<label>
<?php
$select = wp_dropdown_categories('show_option_none=Select category&show_count=0&orderby=name&echo=0&selected='.$comicpress_options['members_post_category']);
$select = preg_replace('#<select([^>]*)>#', '<select name="members_post_category" id="members_post_category">', $select);
echo $select;
?>
</label>
</td>
<td valign="top">
The category that is designated to show members only content.
</td>
</tr>
<tr>
<th scope="row">Members Category</th>
<td valign="top">
<label>
<?php
$select = wp_dropdown_categories('show_option_none=Select category&show_count=0&orderby=name&echo=0&selected='.$comicpress_options['members_post_category']);
$select = preg_replace('#<select([^>]*)>#', '<select name="members_post_category" id="members_post_category">', $select);
echo $select;
?>
</label>
</td>
<td valign="top">
The category that is designated to show members only content.
</td>
</tr>
</table>
</div>
@ -33,7 +33,7 @@
<p>This will make it so that that category is only seen as blogposts inside that area and not anywhere else on the site unless the user has the members flag.</p>
<br />
</div>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
<input name="comicpress_save_members" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save_members" />
</form>
</div>

View File

@ -1,4 +1,4 @@
<div id="menubaroptions" class="hide">
<div id="menubaroptions" class="<?php if ($tab == 'menubar') { ?>show<?php } else { ?>hide<?php } ?>">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
@ -69,7 +69,7 @@
</table>
</div>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
<input name="comicpress_save_menubar" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save_menubar" />
</form>
</div>

View File

@ -1,4 +1,4 @@
<div id="postoptions" class="hide">
<div id="postoptions" class="<?php if ($tab == 'post') { ?>show<?php } else { ?>hide<?php } ?>">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
@ -305,7 +305,7 @@
</table>
</div>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
<input name="comicpress_save_post" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save_post" />
</form>
</div>

View File

@ -6,7 +6,7 @@
}
</script>
<div id="themestyle" class="show">
<div id="themestyle" class="<?php if ($tab == 'themestyle' || empty($tab)) { ?>show<?php } else { ?>hide<?php } ?>">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>