comicpress options revamp part 3

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-11-22 14:44:03 -08:00
parent 2fa0c4d25d
commit 062a9c9c88
8 changed files with 389 additions and 430 deletions

View File

@ -60,17 +60,22 @@ function comicpress_admin() {
$comicpress_options['graphicnav_directory'] = wp_filter_nohtml_kses($_REQUEST['graphicnav_directory']);
$comicpress_options['enable_widgetarea_use_sidebar_css'] = (bool)($_REQUEST['enable_widgetarea_use_sidebar_css'] == 1 ? true : false );
$comicpress_options['disable_lrsidebars_frontpage'] = (bool)($_REQUEST['disable_lrsidebars_frontpage'] == 1 ? true : false );
$comicpress_options['disable_footer_text'] = (bool)($_REQUEST['disable_footer_text'] == 1 ? true : false );
$comicpress_options['disable_footer_text'] = (bool)($_REQUEST['disable_footer_text'] == 1 ? true : false );
$comicpress_options['disable_blogheader'] = (bool)($_REQUEST['disable_blogheader'] == 1 ? true : false );
$tab = 'general';
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_blogheader'] = (bool)($_REQUEST['disable_blogheader'] == 1 ? true : false );
$comicpress_options['disable_blog_frontpage'] = (bool)($_REQUEST['disable_blog_frontpage'] == 1 ? true : false );
}
/*
$comicpress_options['disable_page_titles'] = (bool)($_REQUEST['disable_page_titles'] == 1 ? true : false );
$comicpress_options['static_blog'] = (bool)($_REQUEST['static_blog'] == 1 ? true : false );

View File

@ -64,5 +64,4 @@
<input name="comicpress_save_archivesearch" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save_archivesearch" />
</form>
</div>
</div>

View File

@ -100,5 +100,4 @@
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
</div>

View File

@ -57,5 +57,4 @@
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
</div>

View File

@ -36,6 +36,17 @@
<?php _e('Disabling this will remove the note text that displays with more options for adding to comments (html).','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Disable blog header?','comicpress'); ?></th>
<td valign="top">
<input name="disable_blogheader" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blogheader']); ?> />
</td>
<td valign="top">
<?php _e('Checkmark this and your site will not display the contents of #blogheader.','comicpress'); ?>
</td>
</tr>
</table>
</div>
@ -128,10 +139,12 @@
<td valign="top">
<?php _e('Your home page will not display the default left/right sidebars. Minimalists dream. WARNING: Not recommended for use with Graphic Novel layouts.','comicpress'); ?>
</td>
</tr>
</tr>
</table>
</div>
<div class="stuffbox" style="background: #edffeb;">
<h3>Footer</h3>
<table class="form-table" style="width: auto">
@ -152,6 +165,5 @@
<input name="comicpress_save_general" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save_general" />
</form>
</div>
</div>

View File

@ -1,79 +1,65 @@
<div id="indexoptions" class="hide">
<div class="inside">
<div id="indexoptions" class="hide">
<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 "disable_comic_frontpage": ?>
<tr>
<th scope="row"><strong><?php _e('Disable comic on Home page?','comicpress'); ?></strong><br /><br /><?php _e('Set to <b>Yes</b> and the comic will not display on the home page of your site.','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><br />
</td>
<td valign="top" width="400">
<?php _e('You can use the Latest Thumbnail widget to display your comic in a sidebar. Make sure you set the archive-thumbnail size to under 200px. Note: Turning this off and using the Graphic Novel style turns ComicPress into a blog only.','comicpress'); ?>
</td>
</tr>
<?php break;
case "disable_comic_blog_frontpage": ?>
<tr>
<th scope="row"><strong><?php _e('Disable the comic blog on Home page?','comicpress'); ?></strong><br /><br /><?php _e('Select <b>Yes</b> and the comic blog will not display on the Home Page.','comicpress'); ?><br /></th>
<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>
&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><br />
</td>
<td valign="top">
<?php _e('Enabling this allows you to either not have a comic blog at all, or you can place it where you want using the comic blog post widget. If there is no content in the post it will not display regardless.','comicpress'); ?>
</td>
</tr>
<?php break;
case "disable_comic_blog_single": ?>
<tr>
<th scope="row"><strong><?php _e('Disable the comic blog on the single pages?','comicpress'); ?></strong><br /><br /><?php _e('Select <b>Yes</b> and the blog portion of the comic will not display on the single/archive pages of your site.','comicpress'); ?><br /></th>
<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>
&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><br />
</td>
<td valign="top">
</td>
</tr>
<?php break;
case "disable_blog_frontpage": ?>
<tr>
<th scope="row"><strong><?php _e('Disable the blog on the Home page?','comicpress'); ?></strong><br /><br /><?php _e('Select <b>Yes</b> and the blog will not display on the Home page of your site. ','comicpress'); ?><br /></th>
<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>
&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><br />
</td>
<td valign="top">
<?php _e('The features allows to either not have a blog at all, or, if you place a menu link to your blog page, you can maintain your blog within the same site without readers having to see it when they are just trying to read your comic.','comicpress'); ?>
</td>
</tr>
<?php break;
case "disable_blogheader": ?>
<tr>
<th scope="row"><strong><?php _e('Disable blog header on the Home page?','comicpress'); ?></strong><br /><br /><?php _e('Select <b>Yes</b> and the home page of your site will not display the contents of #blogheader.','comicpress'); ?><br /></th>
<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>
&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><br />
</td>
</tr>
<?php break;
}
}
?>
</table>
<div class="stuffbox" style="background: #ebf8ff;">
<h3>Post</h3>
<table class="form-table" style="width: auto;">
<tr>
<th scope="row"><?php _e('Disable the blog on the Home page?','comicpress'); ?></th>
<td valign="top">
<input name="disable_blog_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blog_frontpage']); ?> />
</td>
<td valign="top">
<?php _e('Checkmark this and the blog will not display on the Home page of your site. The features allows to either not have a blog at all, or, if you place a menu link to your blog page, you can maintain your blog within the same site without readers having to see it when they are just trying to read your comic.','comicpress'); ?>
</td>
</tr>
</table>
</div>
<div class="stuffbox" style="background: #ebf8ff;">
<h3>Comic</h3>
<table class="form-table" style="width: auto;">
<tr>
<th scope="row"><?php _e('Disable comic on Home page?','comicpress'); ?></th>
<td valign="top">
<input name="disable_comic_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_frontpage']); ?> />
</td>
<td valign="top">
<?php _e('Checkmark this and the comic will not display on the home page of your site. You can use the Latest Thumbnail widget to display your comic in a sidebar. Make sure you set the archive-thumbnail size to under 200px. Note: Turning this off and using the Graphic Novel style turns ComicPress into a blog only.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Disable the comic blog on Home page?','comicpress'); ?></th>
<td valign="top">
<input name="disable_comic_blog_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_blog_frontpage']); ?> />
</td>
<td valign="top">
<?php _e('Checkmark this and the comic blog will not display on the Home Page. Enabling this allows you to either not have a comic blog at all, or you can place it where you want using the comic blog post widget. If there is no content in the post it will not display regardless.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Disable the comic blog on the single pages?','comicpress'); ?></th>
<td valign="top">
<input name="disable_comic_blog_single" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_blog_single']); ?> />
</td>
<td valign="top">
<?php _e('Checkmark this and the blog portion of the comic will not display on the single/archive pages of your site.','comicpress'); ?>
</td>
</tr>
</table>
</div>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
</div>

View File

@ -1,42 +1,37 @@
<div id="membersoptions" class="hide">
<div class="inside">
<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 "members_post_category": ?>
<h3>Main</h3>
<div class="stuffbox" style="background: #ebf8ff;">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto;">
<tr>
<th scope="row"><strong>Members Category</strong><br /><br />The category that is designated to show members only content.<br /><br /></th>
<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='.get_option( $value['id'] ));
$select = preg_replace('#<select([^>]*)>#', '<select name="'.$value['id'].'" id="'.$value['id'].'">', $select);
$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>
<?php break;
}
}
?>
</table>
</div>
<div class="inside">
Usage:<p>Edit the user with <b>Dashboard -> Users -> Authors & Users</b> and flag the user you want to be a member with the option at the bottom.</p>
<p>
Inside posts, add [members] content you only want members to see [/members]</p>
<p>
When setting a 'members' category, you *cannot* use an existing comic category, uncategorized, or blog category!</p>
<p>
You MUST create a whole new category and called it "members", then you select that category here and create a page called "Members" or something equivelant and associate the Member's Only template to it.</p>
<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 />
Usage:<p>Edit the user with <b>Dashboard -> Users -> Authors & Users</b> and flag the user you want to be a member with the option at the bottom.</p>
<p>Inside posts, add [members] content you only want members to see [/members]</p>
<p>When setting a 'members' category, you *cannot* use an existing comic category, uncategorized, or blog category!</p>
<p>You MUST create a whole new category and called it "members", then you select that category here and create a page called "Members" or something equivelant and associate the Member's Only template to it.</p>
<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" />

View File

@ -1,347 +1,311 @@
<div id="postoptions" class="hide">
<div class="inside">
<div id="postoptions" class="hide">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<tr><td><h2>- Main -</h2></td></tr>
<div class="stuffbox" style="background: #ebf8ff;">
<h3>Post</h3>
<table class="form-table" style="width: auto;">
<?php
foreach ($comicpress_options as $value) {
switch ( $value['type'] ) {
case "transcript_in_posts": ?>
<tr>
<th scope="row"><strong><?php _e('Show transcript in post area?','comicpress'); ?></strong><br /><br /><?php _e('When enabled, if the comic has a transcript, the transcript will be displayed inside the comic post.','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">
<?php _e('The transcript is text that that you can have of the dialog in your comic.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Show transcript in post area?','comicpress'); ?></th>
<td valign="top">
<input name="transcript_in_posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['transcript_in_posts']); ?> />
</td>
<td valign="top">
<?php _e('When enabled, if the comic has a transcript, the transcript will be displayed inside the comic post. The transcript is text that that you can have of the dialog in your comic.','comicpress'); ?>
</td>
</tr>
<?php break;
case "enable_related_comics": ?>
<tr>
<th scope="row"><strong><?php _e('Put Related Comics in comic posts?','comicpress'); ?></strong><br /><br /><?php _e('Comics will be related by "tags" that you create for each comic post.','comicpress'); ?></th>
<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>
&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('When creating tags for your comics, include *only* the subject material and possibly cast. Do not use tags that can relate to the entire archive or storyline the post is in.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Put Related Comics in comic posts?','comicpress'); ?></th>
<td valign="top">
<input name="enable_related_comics" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_related_comics']); ?> />
</td>
<td valign="top">
<?php _e('Comics will be related by "tags" that you create for each comic post. When creating tags for your comics, include *only* the subject material and possibly cast. Do not use tags that can relate to the entire archive or storyline the post is in.','comicpress'); ?>
</td>
</tr>
<?php break;
case "enable_related_posts": ?>
<tr>
<th scope="row"><strong><?php _e('Put Related Posts in blog posts?','comicpress'); ?></strong><br /><?php _e('Blog posts will be related by "tags" that you create for each blog post.','comicpress'); ?><br /></th>
<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>
&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('Like the related posts for comics, the related posts for blog post checks with other blog posts comparing the tags. Try to only use 1-5 tags total; the less the better.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Put Related Posts in blog posts?','comicpress'); ?></th>
<td valign="top">
<input name="enable_related_posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_related_posts']); ?> />
</td>
<td valign="top">
<?php _e('Blog posts will be related by "tags" that you create for each blog post. Like the related posts for comics, the related posts for blog post checks with other blog posts comparing the tags. Try to only use 1-5 tags total; the less the better.','comicpress'); ?>
</td>
</tr>
<?php break;
case "remove_wptexturize": ?>
<tr>
<th scope="row"><strong><?php _e('Disable WordPress default content formatting?','comicpress'); ?></strong><br /><?php _e('Prevents WordPress from reformatting any specially formatted content you may add.','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('Generally, you want to leave the WordPress formatting enabled, but it some special cases you may prefer to preserve non-WP formatting.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Disable WordPress default content formatting?','comicpress'); ?></th>
<td valign="top">
<input name="remove_wptexturize" type="checkbox" value="1" <?php checked(true, $comicpress_options['remove_wptexturize']); ?> />
</td>
<td valign="top">
<?php _e('Prevents WordPress from reformatting any specially formatted content you may add. Generally, you want to leave the WordPress formatting enabled, but it some special cases you may prefer to preserve non-WP formatting.','comicpress'); ?>
</td>
</tr>
</table>
</div>
<tr><td><h2>- Authors/Avatars/Moods -</h2></td></tr>
<div class="stuffbox" style="background: #edffeb;">
<h3>Authors/Avatars/Moods</h3>
<table class="form-table" style="width: auto;">
<?php break;
case "split_column_in_two": ?>
<tr>
<th scope="row"><strong><?php _e('Two author blog? ','comicpress'); ?></strong><br /><?php _e('When enabled, it will make 2 seperate columns to have two seperate columns available to two different post authors.','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">
</td>
</tr>
<tr>
<th scope="row"><?php _e('Two author blog? ','comicpress'); ?></th>
<td valign="top">
<input name="split_column_in_two" type="checkbox" value="1" <?php checked(true, $comicpress_options['split_column_in_two']); ?> />
</td>
<td valign="top">
<?php _e('When enabled, it will make 2 seperate columns to have two seperate columns available to two different post authors.','comicpress'); ?>
</td>
</tr>
<?php break;
case "author_column_one": ?>
<tr>
<th scope="row"><strong><?php _e('Author for Column one?','comicpress'); ?></strong><br /><br /><?php _e('If column is split in two.','comicpress'); ?></th>
<td valign="top" width="100">
<label>
<?php
$args = array('echo' => '0', 'show' => 'display_name', 'selected' => $author_column_one);
$selected = wp_dropdown_users($args);
$selected = preg_replace('#<select([^>]*)>#', '<select name="'.$value['id'].'" id="'.$value['id'].'">', $selected);
echo $selected;
?>
</label>
</td>
<td valign="top">
</td>
</tr>
<?php break;
case "author_column_two": ?>
<tr>
<th scope="row"><strong><?php _e('Author for Column two?','comicpress'); ?></strong><br /><br /><?php _e('If column is split in two.','comicpress'); ?></th>
<td valign="top" width="100">
<label>
<?php
$args = array('echo' => '0', 'show' => 'display_name', 'selected' => $author_column_two);
$selected = wp_dropdown_users($args);
$selected = preg_replace('#<select([^>]*)>#', '<select name="'.$value['id'].'" id="'.$value['id'].'">', $selected);
echo $selected;
?>
</label>
</td>
<td valign="top">
</td>
</tr>
<?php break;
case "enable_comic_post_author_gravatar":
case "enable_post_author_gravatar":
switch ($value['type']) {
case "enable_comic_post_author_gravatar":
$label = __('Comic post author Gravatar?','comicpress');
break;
case "enable_post_author_gravatar":
$label = __('Blog post author Gravatar?','comicpress');
break;
} ?>
<tr>
<th scope="row"><strong><?php echo esc_html($label); ?></strong><br /><br /><?php _e('Enabling this option will show a gravatar of the post author based on the author email address.','comicpress'); ?></th>
<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>
&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('Gravatars are associated by your email address and you can create them at','comicpress'); ?> <a href="http://gravatar.com/">http://gravatar.com</a>. <?php _e('They are pictures of you, your cat of whatever you want to be your representation on your posts and comments.','comicpress'); ?>
</td>
</tr><?php
break;
case "avatar_directory":
$current_avatar_directory = get_option($value['id']);
if (empty($current_avatar_directory)) $current_avatar_directory = 'default';
$dirs_to_search = array_unique(array(get_template_directory(),get_stylesheet_directory()));
$avatar_directories = array();
foreach ($dirs_to_search as $dir) { $avatar_directories = array_merge($avatar_directories,glob("${dir}/images/avatars/*")); }
?>
<tr>
<th scope="row"><strong><?php _e('Avatar (no Gravatar) Directory','comicpress'); ?></strong><br /><br /><?php _e('Choose a directory to get the avatars for default gravatars if someone does not have one. ','comicpress'); ?><br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="none" <?php if ($current_cal_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<tr>
<th scope="row"><?php _e('Author for Column one?','comicpress'); ?><br />
<br />
<label>
<?php
foreach ($avatar_directories as $avatar_dirs) {
if (is_dir($avatar_dirs)) {
$avatar_dir_name = basename($avatar_dirs); ?>
<option class="level-0" value="<?php echo $avatar_dir_name; ?>" <?php if ($current_avatar_directory == $avatar_dir_name) { ?>selected="selected"<?php } ?>><?php echo $avatar_dir_name; ?></option>
<?php }
}
$args = array('echo' => '0', 'show' => 'display_name', 'selected' => $comicpress_options['author_column_one']);
$selected = wp_dropdown_users($args);
$selected = preg_replace('#<select([^>]*)>#', '<select name="author_column_one" id="author_column_one">', $selected);
echo $selected;
?>
</select>
</label>
</td>
<td valign="top">
<?php _e('Choose directory for avatars to display with non-Gravatar users. You will have to make these images yourself, or download them from avatar providers. Then make a new directory on your site server to upload them to and select that directory here.','comicpress'); ?><br />
<br />
</td>
</tr>
<?php break;
case "moods_directory":
$current_directory = get_option($value['id']);
if (empty($current_directory)) $current_directory = 'default';
</label>
</th>
<td></td>
<td valign="top">
<?php _e('If column is split in two.','comicpress'); ?>
</td>
</tr>
$dirs_to_search = array_unique(array(get_template_directory(),get_stylesheet_directory()));
$mood_directories = array();
foreach ($dirs_to_search as $dir) { $mood_directories = array_merge($mood_directories,glob("${dir}/images/moods/*")); }
?>
<tr>
<th scope="row"><strong><?php _e('Moods Directory','comicpress'); ?></strong><br /><br /><?php _e('Choose a directory to get the post moods from.','comicpress'); ?><br /><br /><?php _e('Set this to "none" to turn off use.','comicpress'); ?><br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="none" <?php if ($current_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($mood_directories as $mood_dirs) {
if (is_dir($mood_dirs)) {
$mood_dir_name = basename($mood_dirs); ?>
<option class="level-0" value="<?php echo $mood_dir_name; ?>" <?php if ($current_directory == $mood_dir_name) { ?>selected="selected"<?php } ?>><?php echo $mood_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
<td valign="top">
<?php _e('Select "none" to turn off. Mood directories are found in your theme directory/images/moods/* to create your own custom moods just create a directory under images/moods/ and place ONLY image files inside of it. The name of the image file represents what the mood is.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Author for Column two?','comicpress'); ?><br />
<br />
<label>
<?php
$args = array('echo' => '0', 'show' => 'display_name', 'selected' => $comicpress_options['author_column_two']);
$selected = wp_dropdown_users($args);
$selected = preg_replace('#<select([^>]*)>#', '<select name="author_column_two" id="author_column_two">', $selected);
<tr><td><h2>- Calendar -</h2></td></tr>
echo $selected;
?>
</label>
</th>
<td></td>
<td valign="top">
<?php _e('If column is split in two. This is the name of the author for the 2nd column.','comicpress'); ?>
</td>
</tr>
<?php break;
case "calendar_directory":
$current_cal_directory = get_option($value['id']);
if (empty($current_cal_directory)) $current_cal_directory = 'default';
$dirs_to_search = array_unique(array(get_template_directory(),get_stylesheet_directory()));
$cal_directories = array();
foreach ($dirs_to_search as $dir) { $cal_directories = array_merge($cal_directories,glob("${dir}/images/cal/*")); }
?>
<tr>
<th scope="row"><strong><?php _e('Calendar Directory','comicpress'); ?></strong><br /><br /><?php _e('Choose a directory to get the Archive Calendar styling from.','comicpress'); ?><br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<tr>
<th scope="row"><?php _e('Comic post author Gravatar?','comicpress'); ?></th>
<td valign="top">
<input name="enable_comic_post_author_gravatar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_comic_post_author_gravatar']); ?> />
</td>
<td valign="top">
<?php _e('Enabling this option will show a gravatar of the comic post author based on the author email address. Gravatars are associated by your email address and you can create them at','comicpress'); ?> <a href="http://gravatar.com/">http://gravatar.com</a>.
</td>
</tr>
<tr>
<th scope="row"><?php _e('Blog post author Gravatar?','comicpress'); ?></th>
<td valign="top">
<input name="enable_post_author_gravatar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_post_author_gravatar']); ?> />
</td>
<td valign="top">
<?php _e('Enabling this option will show a gravatar of the post author based on the author email address. Gravatars are associated by your email address and you can create them at','comicpress'); ?> <a href="http://gravatar.com/">http://gravatar.com</a>.
</td>
</tr>
<?php
$current_avatar_directory = $comicpress_options['avatar_directory'];
if (empty($current_avatar_directory)) $current_avatar_directory = 'default';
$dirs_to_search = array_unique(array(get_template_directory(),get_stylesheet_directory()));
$avatar_directories = array();
foreach ($dirs_to_search as $dir) { $avatar_directories = array_merge($avatar_directories,glob("${dir}/images/avatars/*")); }
?>
<tr>
<th scope="row"><?php _e('Avatar (no Gravatar) Directory','comicpress'); ?><br />
<br />
<label>
<select name="avatar_directory" id="avatar_directory">
<option class="level-0" value="none" <?php if ($current_cal_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($cal_directories as $cal_dirs) {
if (is_dir($cal_dirs)) {
$cal_dir_name = basename($cal_dirs); ?>
<option class="level-0" value="<?php echo $cal_dir_name; ?>" <?php if ($current_cal_directory == $cal_dir_name) { ?>selected="selected"<?php } ?>><?php echo $cal_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
<td valign="top">
<?php _e('To not have calendar graphics, set this as "none".','comicpress'); ?><br />
<br />
<?php _e('To not have calendar graphics, select "none". Calendar directories are found in your theme directory/images/cal/* to create your own custom archive calendar images just create a directory under images/cal/ and place your image files inside of it.','comicpress'); ?>
</td>
</tr>
<?php break;
case "enable_comic_post_calendar": ?>
<tr>
<th scope="row"><strong><?php _e('Add graphic calendar to comic posts?','comicpress'); ?></strong><br /><br /><?php _e('Enabling this option will display a calendar image on your comic posts.','comicpress'); ?></th>
<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>
&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('The graphic calendar is an image that has the date of the comic blog post overlayed on top of it.','comicpress'); ?>
</td>
</tr>
<?php break;
case "enable_post_calendar": ?>
<tr>
<th scope="row"><strong><?php _e('Add graphic calendar to blog posts?','comicpress'); ?></strong><br /><br /><?php _e('Enabling this option will display a calendar image on your blog posts.','comicpress'); ?></th>
<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>
&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('The graphic calendar is an image that has the date of the blog post overlayed on top of it.','comicpress'); ?>
</td>
</tr>
<?php
foreach ($avatar_directories as $avatar_dirs) {
if (is_dir($avatar_dirs)) {
$avatar_dir_name = basename($avatar_dirs); ?>
<option class="level-0" value="<?php echo $avatar_dir_name; ?>" <?php if ($current_avatar_directory == $avatar_dir_name) { ?>selected="selected"<?php } ?>><?php echo $avatar_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</th>
<td></td>
<td valign="top">
<?php _e('Choose a directory to get the avatars for default gravatars if someone does not have one. You will have to make these images yourself, or download them from avatar providers. Then make a new directory on your site server to upload them to and select that directory here.','comicpress'); ?><br />
</td>
</tr>
<?php
$current_directory = $comicpres_options['moods_directory'];
if (empty($current_directory)) $current_directory = 'default';
<tr><td><h2>- Tags/Categories -</h2></td></tr>
$dirs_to_search = array_unique(array(get_template_directory(),get_stylesheet_directory()));
$mood_directories = array();
foreach ($dirs_to_search as $dir) { $mood_directories = array_merge($mood_directories,glob("${dir}/images/moods/*")); }
?>
<tr>
<th scope="row"><?php _e('Moods Directory','comicpress'); ?><br />
<br />
<label>
<select name="moods_directory" id="moods_directory">
<option class="level-0" value="none" <?php if ($current_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($mood_directories as $mood_dirs) {
if (is_dir($mood_dirs)) {
$mood_dir_name = basename($mood_dirs); ?>
<option class="level-0" value="<?php echo $mood_dir_name; ?>" <?php if ($current_directory == $mood_dir_name) { ?>selected="selected"<?php } ?>><?php echo $mood_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</th>
<td></td>
<td valign="top">
<?php _e('Choose a directory to get the post moods from. Set this to "none" to turn off use. Mood directories are found in your theme directory/images/moods/* to create your own custom moods just create a directory under images/moods/ and place ONLY image files inside of it. The name of the image file represents what the mood is.','comicpress'); ?>
</td>
</tr>
</table>
</div>
<div class="stuffbox" style="background: #ebf8ff;">
<h3>Calendar</h3>
<table class="form-table" style="width: auto;">
<?php
$current_cal_directory = $comicpress_options['calendar_directory'];
if (empty($current_cal_directory)) $current_cal_directory = 'default';
<?php break;
case "disable_tags_in_posts": ?>
<tr>
<th scope="row"><strong><?php _e('Disable display of tags in posts?','comicpress'); ?></strong><br /><br /><?php _e('Tags are "descriptive keywords" of content in a post.','comicpress'); ?></th>
<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>
&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('Tags != Categories','comicpress'); ?>
</td>
</tr>
$dirs_to_search = array_unique(array(get_template_directory(),get_stylesheet_directory()));
$cal_directories = array();
foreach ($dirs_to_search as $dir) { $cal_directories = array_merge($cal_directories,glob("${dir}/images/cal/*")); }
?>
<tr>
<th scope="row"><?php _e('Calendar Directory','comicpress'); ?><br />
<br />
<label>
<select name="calendar_directory" id="calendar_directory">
<option class="level-0" value="none" <?php if ($current_cal_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($cal_directories as $cal_dirs) {
if (is_dir($cal_dirs)) {
$cal_dir_name = basename($cal_dirs); ?>
<option class="level-0" value="<?php echo $cal_dir_name; ?>" <?php if ($current_cal_directory == $cal_dir_name) { ?>selected="selected"<?php } ?>><?php echo $cal_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</th>
<td></td>
<td valign="top">
<?php _e('Choose a directory to get the Archive Calendar styling from. To not have calendar graphics, select "none". Calendar directories are found in your theme directory/images/cal/* to create your own custom archive calendar images just create a directory under images/cal/ and place your image files inside of it.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Add graphic calendar to comic posts?','comicpress'); ?></th>
<td valign="top">
<input name="enable_comic_post_calendar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_comic_post_calendar']); ?> />
</td>
<td valign="top">
<?php _e('The graphic calendar is an image that has the date of the comic blog post overlayed on top of it.','comicpress'); ?>
</td>
</tr>
<?php break;
case "disable_categories_in_posts": ?>
<tr>
<th scope="row"><strong><?php _e('Disable display of categories in posts?','comicpress'); ?></strong><br /><br /><?php _e('The categories that are shown by default are the ones the post in set to.','comicpress'); ?></th>
<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>
&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('Categories != Tags','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Add graphic calendar to blog posts?','comicpress'); ?></th>
<td valign="top">
<input name="enable_post_calendar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_post_calendar']); ?> />
</td>
<td valign="top">
<?php _e('Enabling this option will display a calendar image on your blog posts. The graphic calendar is an image that has the date of the blog post overlayed on top of it.','comicpress'); ?>
</td>
</tr>
</table>
</div>
<tr><td><h2>- Pages & Blog Loop -</h2></td></tr>
<div class="stuffbox" style="background: #edffeb;">
<h3>Tags/Categories</h3>
<table class="form-table" style="width: auto;">
<?php break;
case "blogposts_with_comic": ?>
<tr>
<th scope="row"><strong><?php _e('Show all blog posts up until the next comic post on single pages?','comicpress'); ?></strong><br /></th>
<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>
&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">
<tr>
<th scope="row"><?php _e('Disable display of tags in posts?','comicpress'); ?><br /><br /></th>
<td valign="top">
<input name="disable_tags_in_posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_tags_in_posts']); ?> />
</td>
<td valign="top">
<?php _e('Tags != Categories, Tags are "descriptive keywords" of content in a post.','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Disable display of categories in posts?','comicpress'); ?></th>
<td valign="top">
<input name="disable_categories_in_posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_categories_in_posts']); ?> />
</td>
<td valign="top">
<?php _e('Categories != Tags, The categories that are shown by default are the ones the post in set to.','comicpress'); ?>
</td>
</tr>
</table>
</div>
<div class="stuffbox" style="background: #ebf8ff;">
<h3>Pages & Blog Loop</h3>
<table class="form-table" style="width: auto;">
<tr>
<th scope="row"><?php _e('Show all blog posts up until the next comic post on single pages?','comicpress'); ?></th>
<td valign="top">
<input name="blogposts_with_comic" type="checkbox" value="1" <?php checked(true, $comicpress_options['blogposts_with_comic']); ?> />
</td>
<td valign="top">
<?php _e('All the blog posts that are on the same day and greater to the next comic post on the comic your viewing will appear.','comicpress'); ?>
</td>
</tr>
<?php break;
case "static_blog": ?>
<tr>
<th scope="row"><strong><?php _e('Blog loop stays with all the single pages?','comicpress'); ?></strong><br /></th>
<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>
&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>
<tr>
<th scope="row"><?php _e('Blog loop stays with all the single pages?','comicpress'); ?></th>
<td valign="top">
<input name="static_blog" type="checkbox" value="1" <?php checked(true, $comicpress_options['static_blog']); ?> />
</td>
<td valign="top">
<?php _e('Blog will stay with the single pages, good to use with comments disabled in the settings.','comicpress'); ?>
</td>
</tr>
<?php break;
case "disable_page_titles": ?>
<tr>
<th scope="row"><strong><?php _e('Disable the titles on pages?','comicpress'); ?></strong><br /><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><br />
</td>
<td valign="top">
</td>
</tr>
<tr>
<th scope="row"><?php _e('Disable the titles on pages?','comicpress'); ?><br /><br /></th>
<td valign="top">
<input name="disable_page_titles" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_page_titles']); ?> />
</td>
<td valign="top">
<?php _e('If you disable the titles no pages you can add a post-page-image in the page editor.','comicpress'); ?>
</td>
</tr>
<?php break;
}
}
?>
</table>
</td>
</tr>
</table>
</div>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
</div>