Centralizing options into single array - part 1.

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-11-22 10:06:19 -08:00
parent 5d40653f72
commit e1207a38be
39 changed files with 598 additions and 799 deletions

View File

@ -78,7 +78,7 @@ $month['12'] = array('month' => __('December','comicpress'), 'days' => '31');
</div>
<?php } ?>
<?php } ?>
<?php if ($disable_page_titles != 'yes') { ?>
<?php if (!$comicpress_options['disable_page_titles']) { ?>
<h2 class="pagetitle"><?php the_title() ?> <span class="page-archive-year"> <?php echo $archive_year; ?></span></h2>
<?php } ?>
<div class="entry">
@ -95,7 +95,7 @@ foreach ( $years as $year ) {
</div>
<div class="cpcal-cals">
<?php $i=1; while($i<=12) {
$calendar_directory = get_option('comicpress-calendar_directory');
$calendar_directory = $comicpress_calendar['calendar_directory'];
if (!empty($calendar_directory) && $calendar_directory != 'none') { ?>
<div class="cpcal-month" style="height: 257px;" id="<?php echo $month[$i]['month'] ?>">
<?php if (file_exists(get_stylesheet_directory() . '/images/cal') && $calendar_directory != 'default') { ?>

View File

@ -17,7 +17,7 @@ Template Name: Month at a glance
</div>
<?php } ?>
<?php } ?>
<?php if ($disable_page_titles != 'yes') { ?>
<?php if (!$comicpress_options['disable_page_titles']) { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<div class="entry">

View File

@ -17,7 +17,7 @@ Template Name: Comic Storyline with Thumbs
</div>
<?php } ?>
<?php } ?>
<?php if ($disable_page_titles != 'yes') { ?>
<?php if (!$comicpress_options['disable_page_titles']) { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<div class="entry">

View File

@ -17,7 +17,7 @@ Template Name: Comic Storyline Archive
</div>
<?php } ?>
<?php } ?>
<?php if ($disable_page_titles != 'yes') { ?>
<?php if (!$comicpress_options['disable_page_titles']) { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<div class="entry">

View File

@ -28,7 +28,7 @@ if (empty($archive_year) || $archive_year == '') $archive_year = date('Y');
</div>
<?php } ?>
<?php } ?>
<?php if ($disable_page_titles != 'yes') { ?>
<?php if (!$comicpress_options['disable_page_titles']) { ?>
<h2 class="pagetitle"><?php the_title() ?> <span class="page-archive-year"> <?php echo $archive_year; ?></span></h2>
<?php } ?>
<div class="entry">

View File

@ -17,7 +17,7 @@ Template Name: Comic Archive
</div>
<?php } ?>
<?php } ?>
<?php if ($disable_page_titles != 'yes') { ?>
<?php if (!$comicpress_options['disable_page_titles']) { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<div class="entry">

View File

@ -1,10 +1,9 @@
<?php
get_header(); global $category_thumbnail_postcount;
get_header();
remove_filter('pre_get_posts','comicpress_members_filter');
include(get_template_directory() . '/layout-head.php');
global $archive_display_order;
if (empty($archive_display_order)) $archive_display_order = 'desc';
$category_thumbnail_postcount = $comicpress_options['category_thumbnail_postcount'];
$archive_display_order = $comicpress_options['archive_display_order'];
$tmp_search = new WP_Query($query_string.'&order='.$archive_display_order.'&show_posts=-1&posts_per_page=-1');
$count = $tmp_search->post_count;
@ -61,11 +60,11 @@
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">
<?php if ($enable_comic_post_author_gravatar == 'yes') { ?>
<?php if ($comicpress_options['enable_comic_post_author_gravatar']) { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_comic_post_calendar == 'yes') { ?>
<?php if ($comicpress_options['enable_comic_post_calendar']) { ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
@ -76,7 +75,7 @@
<?php if (get_option('comicpress-enable-storyline-support') == 1) { ?>
<ul class="storyline-cats"><li class="storyline-root"><?php the_category(' &raquo; </li><li>', multiple) ?></li></ul>
<?php } else { ?>
<?php if ($disable_categories_in_posts != 'yes') { ?>
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
<small> <?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></small><br />
<?php } ?>
<?php } ?>
@ -95,11 +94,11 @@
<div class="post-head"></div>
<div <?php post_class(); ?>>
<div class="post-info">
<?php if ($enable_post_author_gravatar == 'yes') { ?>
<?php if ($comicpress_options['enable_post_author_gravatar']) { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_post_calendar == 'yes') { ?>
<?php if ($comicpress_options['enable_post_calendar']) { ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
@ -107,15 +106,15 @@
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Permanent Link to','comicpress'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> <?php _e('By','comicpress'); ?> <?php the_author_posts_link(); ?> <?php _e('on','comicpress'); ?> <?php the_time('F jS, Y'); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></small><br />
<?php if ($disable_categories_in_posts != 'yes') { ?>
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
<small> <?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></small><br />
<?php } ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
</div>
<div class="clear"></div>
</div>
<?php global $excerpt_or_content_archive;
if ($excerpt_or_content_archive != 'excerpt') {
<?php
if ($comicpress_options['excerpt_or_content_archive'] != 'excerpt') {
the_content(__('&darr; Read the rest of this entry...','comicpress'));
} else {
the_excerpt();

View File

@ -7,7 +7,7 @@ Template Name: Blog
<?php include(get_template_directory() . '/layout-head.php'); ?>
<?php global $blog_postcount;
if ($split_column_in_two != 'yes') {
if (!$comicpress['split_column_in_two']) {
$blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
$posts = query_posts($blog_query);

View File

@ -28,7 +28,7 @@ Template Version: 2.14
</div>
<?php } ?>
<?php } ?>
<?php if ($disable_page_titles != 'yes') { ?>
<?php if (!$comicpress_options['disable_page_titles']) { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<?php _e('Comic ID','comicpress'); ?> - #<?php echo $comicnum; ?><br />
@ -53,16 +53,16 @@ Template Version: 2.14
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>">
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>">
<input type="hidden" name="amount" value="<?php echo $buy_print_us_amount; ?>">
<input type="hidden" name="amount" value="<?php echo $comicpress_options['buy_print_us_amount']; ?>">
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo the_title(); ?>">
<input type="hidden" name="business" value="<?php echo $buy_print_email; ?>">
<?php if ($buy_print_add_shipping == 'yes') { ?>
<input type="hidden" name="shipping" value="<?php echo $buy_print_us_ship; ?>">
<input type="hidden" name="business" value="<?php echo $comicpress_options['buy_print_email']; ?>">
<?php if ($comicpress_options['buy_print_add_shipping']) { ?>
<input type="hidden" name="shipping" value="<?php echo $comicpress_options['buy_print_us_ship']; ?>">
US/Canada<br>
$<?php echo $buy_print_us_amount; ?> + $<?php echo $buy_print_us_ship; ?> <?php _e('shipping','comicpress'); ?><br />
$<?php echo $comicpress_options['buy_print_us_amount']; ?> + $<?php echo $comicpress_options['buy_print_us_ship']; ?> <?php _e('shipping','comicpress'); ?><br />
<?php } else { ?>
US/Canada<br>
$<?php echo $buy_print_us_amount; ?><br />
$<?php echo $comicpress_options['buy_print_us_amount']; ?><br />
<?php } ?>
<input type="image" src="<?php echo get_template_directory_uri(); ?>/images/buynow_paypal.png" name="submit32" alt="<?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?>" />
</form>
@ -75,16 +75,16 @@ Template Version: 2.14
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>">
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>">
<input type="hidden" name="amount" value="<?php echo $buy_print_int_amount; ?>">
<input type="hidden" name="amount" value="<?php echo $comicpress_options['buy_print_int_amount']; ?>">
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo the_title(); ?>">
<input type="hidden" name="business" value="<?php echo $buy_print_email; ?>">
<?php if ($buy_print_add_shipping == 'yes') { ?>
<input type="hidden" name="business" value="<?php echo $comicpress_options['buy_print_email']; ?>">
<?php if ($comicpress_options['buy_print_add_shipping']) { ?>
<input type="hidden" name="shipping" value="<?php echo $buy_print_int_ship; ?>">
International<br>
$<?php echo $buy_print_int_amount; ?> + $<?php echo $buy_print_int_ship; ?> <?php _e('shipping','comicpress'); ?><br />
$<?php echo $comicpress_options['buy_print_int_amount']; ?> + $<?php echo $comicpress_options['buy_print_int_ship']; ?> <?php _e('shipping','comicpress'); ?><br />
<?php } else { ?>
International<br>
$<?php echo $buy_print_int_amount; ?><br />
$<?php echo $comicpress_options['buy_print_int_amount']; ?><br />
<?php } ?>
<input type="image" src="<?php echo get_template_directory_uri(); ?>/images/buynow_paypal.png" name="submit32" alt="<?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?>" />
</form>

View File

@ -1,305 +0,0 @@
<?php
// theme options
$options = array (
array("type" => "open"),
array(
"id" => "comicpress-cp_theme_layout",
"default" => "standard",
"type" => "comicpress-cp_theme_layout"),
array(
"id" => "comicpress-disable_page_restraints",
"default" => "no",
"type" => "comicpress-disable_page_restraints"),
array(
"id" => "comicpress-rascal_says",
"default" => "no",
"type" => "comicpress-rascal_says"),
array(
"id" => "comicpress-disable_comment_note",
"default" => "no",
"type" => "comicpress-disable_comment_note"),
array(
"id" => "comicpress-disable_css_style_editor",
"default" => "no",
"type" => "comicpress-disable_css_style_editor"),
array(
"id" => "comicpress-custom_css",
"default" => "",
"type" => "comicpress-custom_css"),
array(
"id" => "comicpress-disable_extended_comments",
"default" => "no",
"type" => "comicpress-disable_extended_comments"),
array(
"id" => "comicpress-enable_numbered_pagination",
"default" => "yes",
"type" => "comicpress-enable_numbered_pagination"),
array(
"id" => "comicpress-comic_clicks_next",
"default" => "no",
"type" => "comicpress-comic_clicks_next"),
array(
"id" => "comicpress-graphicnav_directory",
"default" => "default",
"type" => "comicpress-graphicnav_directory"),
array(
"id" => "comicpress-disable_default_comic_nav",
"default" => "no",
"type" => "comicpress-disable_default_comic_nav"),
array(
"id" => "comicpress-disable_lrsidebars_frontpage",
"default" => "no",
"type" => "comicpress-disable_lrsidebars_frontpage"),
array(
"id" => "comicpress-enable_widgetarea_use_sidebar_css",
"default" => "no",
"type" => "comicpress-enable_widgetarea_use_sidebar_css"),
array(
"id" => "comicpress-disable_footer_text",
"default" => "no",
"type" => "comicpress-disable_footer_text"),
array(
"id" => "comicpress-disable_comic_frontpage",
"default" => "no",
"type" => "comicpress-disable_comic_frontpage"),
array(
"id" => "comicpress-disable_comic_blog_frontpage",
"default" => "no",
"type" => "comicpress-disable_comic_blog_frontpage"),
array(
"id" => "comicpress-disable_comic_blog_single",
"default" => "no",
"type" => "comicpress-disable_comic_blog_single"),
array(
"id" => "comicpress-disable_blog_frontpage",
"default" => "no",
"type" => "comicpress-disable_blog_frontpage"),
array(
"id" => "comicpress-disable_blogheader",
"default" => "no",
"type" => "comicpress-disable_blogheader"),
array(
"id" => "comicpress-transcript_in_posts",
"default" => "no",
"type" => "comicpress-transcript_in_posts"),
array(
"id" => "comicpress-enable_related_comics",
"default" => "no",
"type" => "comicpress-enable_related_comics"),
array(
"id" => "comicpress-enable_related_posts",
"default" => "no",
"type" => "comicpress-enable_related_posts"),
array(
"id" => "comicpress-remove_wptexturize",
"default" => "no",
"type" => "comicpress-remove_wptexturize"),
array(
"id" => "comicpress-split_column_in_two",
"default" => "no",
"type" => "comicpress-split_column_in_two"),
array(
"id" => "comicpress-author_column_one",
"default" => "1",
"type" => "comicpress-author_column_one"),
array(
"id" => "comicpress-author_column_two",
"default" => "1",
"type" => "comicpress-author_column_two"),
array(
"id" => "comicpress-enable_comic_post_author_gravatar",
"default" => "no",
"type" => "comicpress-enable_comic_post_author_gravatar"),
array(
"id" => "comicpress-enable_post_author_gravatar",
"default" => "no",
"type" => "comicpress-enable_post_author_gravatar"),
array(
"id" => "comicpress-avatar_directory",
"default" => "default",
"type" => "comicpress-avatar_directory"),
array(
"id" => "comicpress-moods_directory",
"default" => "default",
"type" => "comicpress-moods_directory"),
array(
"id" => "comicpress-calendar_directory",
"default" => "default",
"type" => "comicpress-calendar_directory"),
array(
"id" => "comicpress-enable_comic_post_calendar",
"default" => "no",
"type" => "comicpress-enable_comic_post_calendar"),
array(
"id" => "comicpress-enable_post_calendar",
"default" => "no",
"type" => "comicpress-enable_post_calendar"),
array(
"id" => "comicpress-disable_tags_in_posts",
"default" => "no",
"type" => "comicpress-disable_tags_in_posts"),
array(
"id" => "comicpress-disable_categories_in_posts",
"default" => "no",
"type" => "comicpress-disable_categories_in_posts"),
array(
"id" => "comicpress-blogposts_with_comic",
"default" => "no",
"type" => "comicpress-blogposts_with_comic"),
array(
"id" => "comicpress-static_blog",
"default" => "no",
"type" => "comicpress-static_blog"),
array(
"id" => "comicpress-disable_page_titles",
"default" => "no",
"type" => "comicpress-disable_page_titles"),
array(
"id" => "comicpress-archive_display_order",
"default" => "desc",
"type" => "comicpress-archive_display_order"),
array(
"id" => "comicpress-excerpt_or_content_archive",
"default" => "excerpt",
"type" => "comicpress-excerpt_or_content_archive"),
array(
"id" => "comicpress-excerpt_or_content_search",
"default" => "excerpt",
"type" => "comicpress-excerpt_or_content_search"),
array(
"id" => "comicpress-category_thumbnail_postcount",
"default" => "30",
"type" => "comicpress-category_thumbnail_postcount"),
array(
"id" => "comicpress-contact_in_menubar",
"default" => "no",
"type" => "comicpress-contact_in_menubar"),
array(
"id" => "comicpress-enable_search_in_menubar",
"default" => "no",
"type" => "comicpress-enable_search_in_menubar"),
array(
"id" => "comicpress-enable_rss_in_menubar",
"default" => "no",
"type" => "comicpress-enable_rss_in_menubar"),
array(
"id" => "comicpress-enable_navigation_in_menubar",
"default" => "yes",
"type" => "comicpress-enable_navigation_in_menubar"),
array(
"id" => "comicpress-disable_dynamic_menubar_links",
"default" => "no",
"type" => "comicpress-disable_dynamic_menubar_links"),
array(
"id" => "comicpress-disable_default_menubar",
"default" => "no",
"type" => "comicpress-disable_default_menubar"),
array(
"id" => "comicpress-enable_custom_image_header",
"default" => "no",
"type" => "comicpress-enable_custom_image_header"),
array(
"id" => "comicpress-custom_image_header_width",
"default" => "780",
"type" => "comicpress-custom_image_header_width"),
array(
"id" => "comicpress-custom_image_header_height",
"default" => "120",
"type" => "comicpress-custom_image_header_height"),
array(
"id" => "comicpress-buy_print_email",
"default" => "youremail@youremail.com",
"type" => "comicpress-buy_print_email"),
array(
"id" => "comicpress-buy_print_url",
"default" => "/shop/",
"type" => "comicpress-buy_print_url"),
array(
"id" => "comicpress-buy_print_us_amount",
"default" => "19.95",
"type" => "comicpress-buy_print_us_amount"),
array(
"id" => "comicpress-buy_print_int_amount",
"default" => "29.95",
"type" => "comicpress-buy_print_int_amount"),
array(
"id" => "comicpress-buy_print_add_shipping",
"default" => "yes",
"type" => "comicpress-buy_print_add_shipping"),
array(
"id" => "comicpress-buy_print_us_ship",
"default" => "4.95",
"type" => "comicpress-buy_print_us_ship"),
array(
"id" => "comicpress-buy_print_int_ship",
"default" => "9.95",
"type" => "comicpress-buy_print_int_ship"),
array(
"id" => "comicpress-members_post_category",
"default" => "",
"type" => "comicpress-members_post_category"),
array("type" => "close")
);
?>

View File

@ -1,7 +1,5 @@
<?php
@include(get_template_directory() . '/comicpress-options-config.php');
function options() {
$pagehook = add_submenu_page('themes.php','comicpress', __('ComicPress Options','comicpress'), 10, 'comicpress-options', 'comicpress_admin');
add_action('admin_head-'.$pagehook, 'comicpress_admin_page_head');
@ -25,7 +23,8 @@ function comicpress_admin_page_head() { ?>
<?php }
function comicpress_admin() {
global $options, $upload_path, $blogcat, $moods_directory, $calendar_directory, $graphicnav_directory; ?>
global $upload_path, $blogcat;
$comicpress_options = get_option('comicpress_options'); ?>
<div class="wrap">
@ -33,12 +32,93 @@ function comicpress_admin() {
<h2 class="alignleft"><?php _e('ComicPress Options','comicpress'); ?></h2>
<div class="clear"></div>
<?php
$tab = 'themestyle';
if ( wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) {
if ('comicpress_save' == $_REQUEST['action']) {
foreach ($options as $value) {
if( !isset( $_REQUEST[ $value['id'] ] ) ) { } else { update_option( $value['id'], stripslashes($_REQUEST[ $value['id']])); } } ?>
<div id="message" class="updated fade"><p><strong><?php _e('ComicPress Settings SAVED!','comicpress'); ?></strong></p></div>
if ($_REQUEST['action'] == 'comicpress_save_layout') {
$comicpress_options['cp_theme_layout'] = $_REQUEST['cp_theme_layout'];
$tab = 'themestyle';
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_someother') {
$comicpress_options['disable_comic_frontpage'] = (bool)$_REQUEST['disable_comic_frontpage'];
$comicpress_options['disable_comic_blog_frontpage'] = (bool)$_REQUEST['disable_comic_blog_frontpage'];
$comicpress_options['disable_comic_blog_single'] = (bool)$_REQUEST['disable_comic_blog_single'];
$comicpress_options['disable_blog_frontpage'] = (bool)$_REQUEST['disable_blog_frontpage'];
$comicpress_options['disable_lrsidebars_frontpage'] = (bool)$_REQUEST['disable_lrsidebars_frontpage'];
$comicpress_options['disable_footer_text'] = (bool)$_REQUEST['disable_footer_text'];
$comicpress_options['disable_blogheader'] = (bool)$_REQUEST['disable_blogheader'];
$comicpress_options['disable_page_titles'] = (bool)$_REQUEST['disable_page_titles'];
$comicpress_options['static_blog'] = (bool)$_REQUEST['static_blog'];
$comicpress_options['disable_default_comic_nav'] = (bool)$_REQUEST['disable_default_comic_nav'];
$comicpress_options['transcript_in_posts'] = (bool)$_REQUEST['transcript_in_posts'];
$comicpress_options['enable_widgetarea_use_sidebar_css'] = (bool)$_REQUEST['enable_widgetarea_use_sidebar_css'];
$comicpress_options['enable_custom_image_header'] = (bool)$_REQUEST['enable_custom_image_header'];
$comicpress_options['custom_image_header_width'] = '980';
$comicpress_options['custom_image_header_height'] = '120';
$comicpress_options['enable_numbered_pagination'] = (bool)$_REQUEST['enable_numbered_pagination'];
$comicpress_options['disable_page_restraints'] = (bool)$_REQUEST['disable_page_restraints'];
$comicpress_options['enable_related_comics'] = (bool)$_REQUEST['enable_related_comics'];
$comicpress_options['enable_related_posts'] = (bool)$_REQUEST['enable_related_posts'];
$comicpress_options['comic_clicks_next'] = (bool)$_REQUEST['comic_clicks_next'];
$comicpress_options['rascal_says'] = (bool)$_REQUEST['rascal_says'];
$comicpress_options['enable_post_calendar'] = (bool)$_REQUEST['enable_post_calendar'];
$comicpress_options['enable_post_author_gravatar'] = (bool)$_REQUEST['enable_post_author_gravatar'];
$comicpress_options['enable_comic_post_calendar'] = (bool)$_REQUEST['enable_comic_post_calendar'];
$comicpress_options['enable_comic_post_author_gravatar'] = (bool)$_REQUEST['enable_comic_post_author_gravatar'];
$comicpress_options['disable_tags_in_posts'] = (bool)$_REQUEST['disable_tags_in_posts'];
$comicpress_options['disable_categories_in_posts'] = (bool)$_REQUEST['disable_categories_in_posts'];
$comicpress_options['disable_comment_note'] = (bool)$_REQUEST['disable_comment_note'];
$comicpress_options['blogposts_with_comic'] = (bool)$_REQUEST['blogposts_with_comic'];
$comicpress_options['remove_wptexturize'] = (bool)$_REQUEST['remove_wptexturize'];
$comicpress_options['moods_directory'] = 'default';
$comicpress_options['graphicnav_directory'] = 'default';
$comicpress_options['calendar_directory'] = 'none';
$comicpress_options['avatar_directory'] = 'none';
$comicpress_options['enable_search_in_menubar'] = (bool)$_REQUEST['enable_search_in_menubar'];
$comicpress_options['enable_rss_in_menubar'] = (bool)$_REQUEST['enable_rss_in_menubar'];
$comicpress_options['enable_navigation_in_menubar'] = (bool)$_REQUEST['enable_navigation_in_menubar'];
$comicpress_options['contact_in_menubar'] = (bool)$_REQUEST['contact_in_menubar'];
$comicpress_options['disable_dynamic_menubar_links'] = (bool)$_REQUEST['disable_dynamic_menubar_links'];
$comicpress_options['disable_default_menubar'] = (bool)$_REQUEST['disable_default_menubar'];
$comicpress_options['members_post_category'] = '';
$comicpress_options['split_column_in_two'] = (bool)$_REQUEST['split_column_in_two'];
$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['buy_print_add_shipping'] = (bool)$_REQUEST['buy_print_add_shipping'];
$comicpress_options['buy_print_us_ship'] = '4.95';
$comicpress_options['buy_print_int_ship'] = '9.95';
update_option('comicpress_options',$comicpress_options);
?>
<div id="message" class="update fade"><p><strong><?php _e('ComicPress Settings SAVED!','comicpress'); ?></strong></p></div>
<script>function hidemessage() { document.getElementById('message').style.display = 'none'; }</script>
<?php }
@ -52,16 +132,6 @@ function comicpress_admin() {
}
}
// set default options
foreach ($options as $default) {
if(get_option($default['id'])=="") {
update_option($default['id'],$default['default']);
}
}
@require(get_template_directory() . '/comicpress-config.php');
?>
<div id="poststuff" class="metabox-holder">

View File

@ -21,6 +21,9 @@ function __comicpress_widgets_init() {
}
function __comicpress_init() {
global $comicpress_options;
// Check if the $comicpress_options exist, if not set defaults
$comicpress_options = comicpress_load_options();
// xili-language plugin check
if (class_exists('xili_language')) {
define('THEME_TEXTDOMAIN','comicpress');
@ -41,8 +44,6 @@ function __comicpress_init() {
add_action('widgets_init', '__comicpress_widgets_init');
add_action('init', '__comicpress_init');
$comicpress_version = '2.9.0.0';
global $wpmu_version;
if (!empty($wpmu_version)) {
@ -70,6 +71,89 @@ if (!empty($wpmu_version)) {
require(get_template_directory() . '/comicpress-config.php');
}
function comicpress_load_options() {
global $comicpress_options;
$comicpress_options = get_option('comicpress_options');
if (empty($comicpress_options)) {
$comicpress_options['comicpress_version'] = '2.9.0.1';
$comicpress_options['disable_comic_frontpage'] = false;
$comicpress_options['disable_comic_blog_frontpage'] = false;
$comicpress_options['disable_comic_blog_single'] = false;
$comicpress_options['disable_blog_frontpage'] = false;
$comicpress_options['disable_lrsidebars_frontpage'] = false;
$comicpress_options['disable_footer_text'] = false;
$comicpress_options['disable_blogheader'] = false;
$comicpress_options['disable_page_titles'] = false;
$comicpress_options['static_blog'] = false;
$comicpress_options['disable_default_comic_nav'] = false;
$comicpress_options['cp_theme_layout'] = 'standard';
$comicpress_options['transcript_in_posts'] = false;
$comicpress_options['enable_widgetarea_use_sidebar_css'] = false;
$comicpress_options['enable_custom_image_header'] = false;
$comicpress_options['custom_image_header_width'] = '980';
$comicpress_options['custom_image_header_height'] = '120';
$comicpress_options['enable_numbered_pagination'] = false;
$comicpress_options['disable_page_restraints'] = false;
$comicpress_options['enable_related_comics'] = false;
$comicpress_options['enable_related_posts'] = false;
$comicpress_options['comic_clicks_next'] = false;
$comicpress_options['rascal_says'] = false;
$comicpress_options['enable_post_calendar'] = false;
$comicpress_options['enable_post_author_gravatar'] = false;
$comicpress_options['enable_comic_post_calendar'] = false;
$comicpress_options['enable_comic_post_author_gravatar'] = false;
$comicpress_options['disable_tags_in_posts'] = false;
$comicpress_options['disable_categories_in_posts'] = false;
$comicpress_options['disable_comment_note'] = false;
$comicpress_options['blogposts_with_comic'] = false;
$comicpress_options['remove_wptexturize'] = false;
$comicpress_options['moods_directory'] = 'default';
$comicpress_options['graphicnav_directory'] = 'default';
$comicpress_options['calendar_directory'] = 'none';
$comicpress_options['avatar_directory'] = 'none';
$comicpress_options['enable_search_in_menubar'] = false;
$comicpress_options['enable_rss_in_menubar'] = true;
$comicpress_options['enable_navigation_in_menubar'] = true;
$comicpress_options['contact_in_menubar'] = false;
$comicpress_options['disable_dynamic_menubar_links'] = false;
$comicpress_options['disable_default_menubar'] = false;
$comicpress_options['archive_display_order'] = 'desc';
$comicpress_options['excerpt_or_content_archive'] = 'content';
$comicpress_options['excerpt_or_content_search'] = 'excerpt';
$comicpress_options['category_thumbnail_postcount'] = '-1';
$comicpress_options['members_post_category'] = '';
$comicpress_options['split_column_in_two'] = 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['buy_print_add_shipping'] = false;
$comicpress_options['buy_print_us_ship'] = '4.95';
$comicpress_options['buy_print_int_ship'] = '9.95';
add_option('comicpress_options', $comicpress_options, '', 'yes');
// update_option('comicpress_options', $comicpress_options);
}
$comicpress_options['comicpress_version'] = '2.9.0.1';
update_option('comicpress_options', $comicpress_options);
return $comicpress_options;
}
if (get_option('upload_path') !== false) {
$variables_to_extract = array();
@ -78,6 +162,7 @@ if (get_option('upload_path') !== false) {
'disable_comic_blog_frontpage' => 'disable_comic_blog_frontpage',
'disable_comic_blog_single' => 'disable_comic_blog_single',
'disable_blog_frontpage' => 'disable_blog_frontpage',
'buy_print_email' => 'buy_print_email',
'buy_print_url' => 'buy_print_url',
'buy_print_us_amount' => 'buy_print_us_amount',
@ -85,6 +170,7 @@ if (get_option('upload_path') !== false) {
'buy_print_add_shipping' => 'buy_print_add_shipping',
'buy_print_us_ship' => 'buy_print_us_ship',
'buy_print_int_ship' => 'buy_print_int_ship',
'cp_theme_layout' => 'cp_theme_layout',
'transcript_in_posts' => 'transcript_in_posts',
'enable_widgetarea_use_sidebar_css' => 'enable_widgetarea_use_sidebar_css',
@ -119,6 +205,7 @@ if (get_option('upload_path') !== false) {
'excerpt_or_content_archive' => 'excerpt_or_content_archive',
'excerpt_or_content_search' => 'excerpt_or_content_search',
'category_thumbnail_postcount' => 'category_thumbnail_postcount',
'members_post_category' => 'members_post_category',
'blogposts_with_comic' => 'blogposts_with_comic',
'split_column_in_two' => 'split_column_in_two',
@ -143,12 +230,11 @@ if (empty($calendar_directory)) $calendar_directory = 'default';
if (empty($cp_theme_layout)) $cp_theme_layout='standard';
function is_cp_theme_layout($choices) {
global $cp_theme_layout;
if (empty($cp_theme_layout)) $cp_theme_layout='standard';
global $comicpress_options;
$choices = explode(",", $choices);
foreach ($choices as $choice) {
if ($choice == $cp_theme_layout) {
if ($choice == $comicpress_options['cp_theme_layout']) {
return true;
}
}
@ -897,11 +983,11 @@ function rss_count_comments(){
add_action('the_title_rss','rss_count_comments');
function comicpress_gnav_display_css() {
global $graphicnav_directory;
if (file_exists(get_stylesheet_directory() . '/images/nav/' . $graphicnav_directory . '/navstyle.css')) { ?>
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/images/nav/<?php echo $graphicnav_directory; ?>/navstyle.css" type="text/css" media="screen" />
<?php } elseif (file_exists(get_template_directory() . '/images/nav/' .$graphicnav_directory. '/navstyle.css')) { ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/images/nav/<?php echo $graphicnav_directory; ?>/navstyle.css" type="text/css" media="screen" />
global $comicpress_options;
if (file_exists(get_stylesheet_directory() . '/images/nav/' . $comicpress_options['graphicnav_directory'] . '/navstyle.css')) { ?>
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/images/nav/<?php echo $comicpress_options['graphicnav_directory']; ?>/navstyle.css" type="text/css" media="screen" />
<?php } elseif (file_exists(get_template_directory() . '/images/nav/' .$comicpress_options['graphicnav_directory']. '/navstyle.css')) { ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/images/nav/<?php echo $comicpress_options['graphicnav_directory']; ?>/navstyle.css" type="text/css" media="screen" />
<?php }
}

View File

@ -11,7 +11,7 @@
* @return string <img> tag for the user's avatar
*/
function comicpress_get_avatar( $id_or_email, $size = '64', $alt = false) {
global $avatar_directory;
global $comicpress_options;
if ( ! get_option('show_avatars') )
return false;
@ -45,7 +45,7 @@ function comicpress_get_avatar( $id_or_email, $size = '64', $alt = false) {
$email = $id_or_email;
}
if ($avatar_directory != 'none' || empty($default)) $default = comicpress_random_default_avatar((string)$id_or_email);
if ($comicpress_options['avatar_directory'] != 'none' || empty($default)) $default = comicpress_random_default_avatar((string)$id_or_email);
if ( empty($default) ) {
$avatar_default = get_option('avatar_default');
@ -87,7 +87,8 @@ function comicpress_get_avatar( $id_or_email, $size = '64', $alt = false) {
}
function comicpress_random_default_avatar($id_or_email = '') {
$current_avatar_directory = get_option('comicpress-avatar_directory');
global $comicpress_options;
$current_avatar_directory = $comicpress_options['avatar_directory'];
if (empty($current_avatar_directory)) $current_avatar_directory = 'default';
if (file_exists(get_stylesheet_directory() . '/images/avatars/' . $current_avatar_directory)) {

View File

@ -18,7 +18,7 @@
add_filter('body_class','comicpress_body_class');
function comicpress_body_class($classes = '') {
global $current_user, $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $post, $wp_query, $cp_theme_layout;
global $current_user, $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $post, $wp_query, $comicpress_options;
if (!empty($current_user)) {
$user_login = addslashes($current_user->user_login);
@ -86,7 +86,7 @@ function comicpress_body_class($classes = '') {
endforeach;
}
$classes[] = 'layout-'.$cp_theme_layout;
$classes[] = 'layout-'.$comicpress_options['cp_theme_layout'];
return $classes;
}

View File

@ -1,13 +1,13 @@
<?php
global $enable_custom_image_header;
if ($enable_custom_image_header == 'yes') {
global $comicpress_options;
if ($comicpress_options['enable_custom_image_header'] == 'yes') {
// Custom Image Header
define('HEADER_TEXTCOLOR', '000');
define('HEADER_IMAGE', '%s/images/header-blank.png'); // %s is theme dir
define('HEADER_IMAGE_WIDTH', $custom_image_header_width);
define('HEADER_IMAGE_HEIGHT', $custom_image_header_height);
define('HEADER_IMAGE_WIDTH', $comicpress_options['custom_image_header_width']);
define('HEADER_IMAGE_HEIGHT', $comicpress_options['custom_image_header_height']);
function theme_admin_header_style() {
?>

View File

@ -7,7 +7,7 @@
*/
function display_blog_post() {
global $post, $wp_query, $authordata, $enable_related_posts, $enable_post_author_gravatar, $enable_post_calendar, $disable_categories_in_posts, $disable_tags_in_posts; ?>
global $post, $wp_query, $authordata, $comicpress_options; ?>
<?php if (is_single()) { ?>
<div class="blognav">
<div class="nav-single">
@ -21,11 +21,11 @@ function display_blog_post() {
<div class="post-head"></div>
<div class="post" id="post-<?php the_ID() ?>">
<div class="post-info">
<?php if ($enable_post_author_gravatar == 'yes') { ?>
<?php if ($comicpress_options['enable_post_author_gravatar']) { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_post_calendar == 'yes') { ?>
<?php if ($comicpress_options['enable_post_calendar']) { ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
@ -43,7 +43,7 @@ function display_blog_post() {
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php } ?>
<div class="post-author"> <?php the_time('F jS, Y'); ?> <span class="pipe">|</span> by <?php the_author_posts_link(); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></div>
<?php if ($disable_categories_in_posts != 'yes') { ?>
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
<div class="post-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div>
<?php } ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
@ -57,7 +57,7 @@ function display_blog_post() {
<div class="clear"></div>
</div>
<div class="post-extras">
<?php if ($disable_tags_in_posts != 'yes') { ?>
<?php if (!$comicpress_options['disable_tags_in_posts']) { ?>
<div class="post-tags">
<?php the_tags(__('&#9492; Tags: ','comicpress'), ', ', '<br />'); ?>
</div>
@ -70,7 +70,7 @@ function display_blog_post() {
}
?>
<div class="clear"></div>
<?php if ($enable_related_posts == 'yes') echo related_posts_shortcode(); ?>
<?php if ($comicpress_options['enable_related_posts']) echo related_posts_shortcode(); ?>
</div>
</div>
<div class="post-foot"></div>

View File

@ -7,7 +7,7 @@
*/
function display_comic() {
global $post, $wp_query, $rascal_says, $comic_clicks_next, $comic_filename_filters;
global $post, $wp_query, $rascal_says, $comicpress_options, $comic_filename_filters;
$next_comic = get_next_comic_permalink();
$comic = explode(".", the_comic_filename());
if ($comic[1] == 'swf') { ?>
@ -26,16 +26,16 @@ function display_comic() {
</div>
<!--[if !IE]>--></object><!--<![endif]--></object>
<?php } else {
if ($comic_clicks_next == 'yes') {
if ($comicpress_options['comic_clicks_next']) {
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
if ($rascal_says == 'yes' && !empty($hovertext)) { ?>
if ($comicpress_options['rascal_says'] && !empty($hovertext)) { ?>
<a href="<?php echo $next_comic; ?>" class="tt"><span class="tooltip"><span class="top"></span><span class="middle"><?php the_hovertext() ?></span><span class="bottom"></span></span><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_title(); ?>" /></a>
<?php } else { ?>
<a href="<?php echo $next_comic; ?>"><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a>
<?php } ?>
<?php } else {
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
if ($rascal_says == 'yes' && !empty($hovertext)) { ?>
if ($comicpress_options['rascal_says'] && !empty($hovertext)) { ?>
<a href="#" class="tt"><span class="tooltip"><span class="top"></span><span class="middle"><?php the_hovertext() ?></span><span class="bottom"></span></span><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_title(); ?>" /></a>
<?php } else { ?>
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" class="instant itiltleft icolorFFFCE9 ishadow40 historical" />

View File

@ -7,7 +7,7 @@
*/
function display_comic_post() {
global $post, $wp_query, $authordata, $enable_related_comics, $enable_comic_post_author_gravatar, $enable_comic_post_calendar, $disable_categories_in_posts, $disable_tags_in_posts;
global $post, $wp_query, $authordata, $comicpress_options;
$first_comic = get_first_comic_permalink(); $last_comic = get_last_comic_permalink();
?>
<div class="nav">
@ -20,11 +20,11 @@ function display_comic_post() {
<div class="post-comic-head"></div>
<div class="post-comic" id="post-comic-<?php the_ID() ?>">
<div class="post-comic-info">
<?php if ($enable_comic_post_author_gravatar == 'yes') { ?>
<?php if ($comicpress_options['enable_comic_post_author_gravatar']) { ?>
<div class="post-comic-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_comic_post_calendar == 'yes') { ?>
<?php if ($comicpress_options['enable_comic_post_calendar']) { ?>
<div class="post-comic-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
@ -45,7 +45,7 @@ function display_comic_post() {
<?php if (get_option('comicpress-enable-storyline-support') == 1) { ?>
<ul class="storyline-cats"><li class="storyline-root"><?php the_category(' &raquo; </li><li>', multiple) ?></li></ul>
<?php } else { ?>
<?php if ($disable_categories_in_posts != 'yes') { ?>
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
<div class="post-comic-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div>
<?php } ?>
<?php } ?>
@ -59,7 +59,7 @@ function display_comic_post() {
<div class="clear"></div>
</div>
<div class="post-comic-extras">
<?php if ($disable_tags_in_posts != 'yes') { ?>
<?php if (!$comicpress_options['disable_tags_in_posts']) { ?>
<div class="post-comic-tags">
<?php the_tags(__('&#9492; Tags: ','comicpress'), ', ', '<br />'); ?>
</div>
@ -72,7 +72,7 @@ function display_comic_post() {
}
?>
<div class="clear"></div>
<?php if ($enable_related_comics == 'yes') echo related_comics_shortcode(); ?>
<?php if ($comicpress_options['enable_related_comics']) echo related_comics_shortcode(); ?>
</div>
</div>
<div class="post-comic-foot"></div>

View File

@ -1,11 +1,11 @@
<?php
function comicpress_dual_columns() {
global $author_column_one, $author_column_two, $blog_postcount; ?>
global $comicpress_options, $blog_postcount; ?>
<div id="dualcolumns">
<div class="column_one">
<div class="column_one_header"></div>
<?php $blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&author='.$author_column_one.'&paged='.$paged;
<?php $blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&author='.$comicpress_options['author_column_one'].'&paged='.$paged;
$posts = query_posts($blog_query);
if (have_posts()) {
while (have_posts()) : the_post();
@ -16,7 +16,7 @@ function comicpress_dual_columns() {
</div>
<div class="column_two">
<div class="column_two_header"></div>
<?php $blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&author='.$author_column_two;
<?php $blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&author='.$comicpress_options['author_column_two'];
$posts = query_posts($blog_query);
if (have_posts()) {
while (have_posts()) : the_post();

View File

@ -24,7 +24,8 @@ add_action('profile_update', 'comicpress_profile_members_only_save');
add_filter('pre_get_posts','comicpress_members_filter');
function comicpress_members_filter($query) {
global $members_post_category, $current_user;
global $comicpress_options, $current_user;
$members_post_category = $comicpress_options['members_post_category'];
if ($members_post_category != 'none' && !empty($members_post_category) && !$query->is_search && !$query->is_page && !$query->is_archive) {
$oldset = $query->get('cat');
$is_member = '';
@ -100,8 +101,8 @@ function comicpress_profile_members_only_save() {
* Return true if the current post is in the members category.
*/
function in_members_category() {
global $post, $category_tree, $members_post_category;
global $post, $category_tree, $comicpress_options;
$members_post_category = $comicpress_options['members_post_category'];
$members_post_category_array = array();
$members_post_category_array = explode($members_post_category);

View File

@ -16,8 +16,8 @@
*/
function comicpress_show_mood_in_post() {
global $post;
$moods_directory = get_option('comicpress-moods_directory');
global $post, $comicpress_options;
$moods_directory = $comicpress_options['moods_directory'];
if (!empty($moods_directory) && $moods_directory != 'none') {
$mood_file = get_post_meta( get_the_ID(), "mood", true );
if (!empty($mood_file) && $mood_file != '') {
@ -33,8 +33,8 @@ function comicpress_show_mood_in_post() {
}
function comicpress_showmood_edit_post() {
global $post;
$moods_directory = get_option('comicpress-moods_directory');
global $post, $comicpress_options;
$moods_directory = $comicpress_options['moods_directory'];
if (!empty($moods_directory) && $moods_directory != 'none') { ?>
<div class="inside" style="overflow: hidden">
<?php _e('Available Moods, you can set which mood images to use in the comicpress Options.','comicpress'); ?><br />
@ -89,7 +89,8 @@ function comicpress_showmood_edit_post() {
function comicpress_handle_edit_post_mood_save($post_id) {
$moods_directory = get_option('comicpress-moods_directory');
global $comicpress_options;
$moods_directory = $comicpress_options['moods_directory'];
if (!empty($moods_directory) && $moods_directory != 'none') {
if (empty($_POST['postmood']) || $_POST['postmood'] == 'none') {
$postmood = 'none';

View File

@ -26,8 +26,8 @@ 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 $enable_numbered_pagination;
if ($enable_numbered_pagination == 'yes') {
global $comicpress_options;
if ($comicpress_options['enable_numbered_pagination']) {
### Function: Page Navigation: Boxed Style Paging
function wp_pagenavi($before = '', $after = '') {

View File

@ -1,3 +1,4 @@
<?php global $comicpress_options; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
@ -21,11 +22,11 @@
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name') ?> RSS2 Feed" href="<?php bloginfo('rss2_url') ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name') ?> Atom Feed" href="<?php bloginfo('atom_url') ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url') ?>" />
<meta name="ComicPress" content="<?php global $comicpress_version; echo $comicpress_version; ?>" />
<meta name="ComicPress" content="<?php echo $comicpress_options['comicpress_version']; ?>" />
<!--[if lt IE 7]>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/ie6submenus.js"></script>
<![endif]-->
<?php wp_head(); global $disable_page_restraints; ?>
<?php wp_head(); ?>
</head>
<body <?php if (function_exists('body_class')) { body_class(); } ?>>
@ -35,7 +36,7 @@
<div id="page-head"></div>
<?php if ($disable_page_restraints != 'yes') {
<?php if (!$comicpress_options['disable_page_restraints']) {
if (is_cp_theme_layout('standard,v')) { ?>
<div id="page-wrap"><!-- Wraps outside the site width -->
<div id="page"><!-- Defines entire site width - Ends in Footer -->

View File

@ -12,7 +12,7 @@
</div>
<?php } ?>
<?php } ?>
<?php if ($disable_page_titles != 'yes') { ?>
<?php if (!$comicpress_options['disable_page_titles']) { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<br class="clear-margins" />

View File

@ -1,5 +1,4 @@
<?php get_header(); ?>
<div id="content-wrapper-head"></div>
<div id="content-wrapper">
@ -16,7 +15,7 @@
<?php if (!(is_paged())) { ?>
<?php if ($disable_comic_frontpage != 'yes') { ?>
<?php if (!$comicpress_options['disable_comic_frontpage']) { ?>
<?php $wp_query ->in_the_loop = true; $comicFrontpage = new WP_Query(); $comicFrontpage->query('showposts=1&cat='.get_all_comic_categories_as_cat_string());
while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post() ?>
<?php if (comicpress_check_child_file('partials/displaycomic') == false) { ?>
@ -59,7 +58,7 @@
get_sidebar('blog');
if ($disable_comic_frontpage != 'yes' && $disable_comic_blog_frontpage != 'yes' && !is_paged() ) { ?>
if (!$comicpress_options['disable_comic_frontpage'] && !$comicpress_options['disable_comic_blog_frontpage'] && !is_paged() ) { ?>
<?php while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post();
display_comic_post();
$comicFrontPage->is_single = true;
@ -67,18 +66,17 @@ if ($disable_comic_frontpage != 'yes' && $disable_comic_blog_frontpage != 'yes'
endwhile; ?>
<?php } ?>
<?php if ($disable_blogheader != 'yes') { ?>
<?php if (!$comicpress_options['disable_blogheader']) { ?>
<div id="blogheader"><!-- This area can be used for a heading above your main page blog posts --></div>
<?php } ?>
<?php if ($disable_blog_frontpage != 'yes') {
global $blog_postcount; ?>
<?php
if ($split_column_in_two != 'yes') {
<?php if (!$comicpress_options[disable_blog_frontpage]) {
global $blog_postcount;
if (!$comicpress_options['split_column_in_two']) {
$blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
$posts = query_posts($blog_query);
if (have_posts()) { ?>
if (have_posts()) { ?>
<div class="blogindex-head"></div>
<div class="blogindex">
<?php while (have_posts()) : the_post();

View File

@ -23,7 +23,7 @@ Template Name: Links
</div>
<?php } ?>
<?php } ?>
<?php if ($disable_page_titles != 'yes') { ?>
<?php if (!$comicpress_options['disable_page_titles']) { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<div id="linkspage">

View File

@ -1,75 +1,63 @@
<div id="archivesearch" class="hide">
<div id="archivesearch" 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 ($options as $value) {
switch ( $value['type'] ) {
case "comicpress-excerpt_or_content_archive": ?>
<tr>
<th scope="row"><strong><?php _e('Archive Viewing','comicpress'); ?></strong><br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-content" type="radio" value="content"<?php if ( get_option( $value['id'] ) == "content") { echo " checked"; } ?> />Full Content</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-excerpt" type="radio" value="excerpt"<?php if ( get_option( $value['id'] ) == "excerpt") { echo " checked"; } ?> />Excerpt</label>
</td>
<td valign="top">
<?php _e('Would you like to have users see the <b>full content</b> or just an <b>excerpt</b> when viewing the archives?','comicpress'); ?>
</td>
</tr>
<?php break;
case "comicpress-excerpt_or_content_search": ?>
<tr>
<th scope="row"><strong><?php _e('Searching','comicpress'); ?></strong><br /><br /></th>
<td valign="top" width="160">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-content" type="radio" value="content"<?php if ( get_option( $value['id'] ) == "content") { echo " checked"; } ?> />Full Content</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-excerpt" type="radio" value="excerpt"<?php if ( get_option( $value['id'] ) == "excerpt") { echo " checked"; } ?> />Excerpt</label>
<tr>
<th scope="row"><strong><?php _e('Archive Viewing','comicpress'); ?></strong><br /><br /></th>
<td valign="top">
<label><input name="excerpt_or_content_archive" id="excerpt_or_content_archive" type="radio" value="content"<?php if ( $comicpress_options['excerpt_or_content_archive'] == "content") { echo " checked"; } ?> />Full Content</label>
&nbsp;&nbsp;
<label><input name="excerpt_or_content_archive" id="excerpt_or_content_archive" type="radio" value="excerpt"<?php if ( $comicpress_options['excerpt_or_content_archive'] == "excerpt") { echo " checked"; } ?> />Excerpt</label>
</td>
<td valign="top">
<?php _e('Would you like to have users see the <b>full content</b> or just an <b>excerpt</b> when viewing the archives?','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><strong><?php _e('Searching','comicpress'); ?></strong><br /><br /></th>
<td valign="top" width="160">
<label><input name="excerpt_or_content_search" id="excerpt_or_content_search" type="radio" value="content"<?php if ( $comicpress_options['excerpt_or_content_search'] == "content") { echo " checked"; } ?> />Full Content</label>
&nbsp;&nbsp;
<label><input name="excerpt_or_content_search" id="excerpt_or_content_search" type="radio" value="excerpt"<?php if ( $comicpress_options['excerpt_or_content_search'] == "excerpt") { echo " checked"; } ?> />Excerpt</label>
</td>
<td valign="top">
<?php _e('Would you like to have users see the <b>full content</b> or just an <b>excerpt</b> when searching?','comicpress'); ?>
</td>
</tr>
</td>
<td valign="top">
<?php _e('Would you like to have users see the <b>full content</b> or just an <b>excerpt</b> when searching?','comicpress'); ?>
</td>
</tr>
<?php break;
case "comicpress-archive_display_order": ?>
<tr>
<th scope="row"><strong><?php _e('Archive Display Order','comicpress'); ?></strong><br /><br /><?php _e('Sets the display order of your archives.','comicpress'); ?><br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="asc" <?php if (get_option($value['id']) == "asc") { ?>selected="selected"<?php } ?>>Oldest to Newest</option>
<option class="level-0" value="desc" <?php if (get_option($value['id']) == "desc") { ?>selected="selected"<?php } ?>>Newest to Oldest</option>
</select>
</label>
</td>
<td valign="top">
<?php _e('<b>Newest to Oldest</b> will display your posts starting with the most recent. <b>Oldest to Newest</b> will start with the first entry in the category, tag, or date range (e.g., Selecting May 20XX will start with May 1, not May 31st.)','comicpress'); ?>
</td>
</tr>
<?php break;
case "comicpress-category_thumbnail_postcount": ?>
<tr>
<th scope="row"><b><?php _e('Number of archived comics to display','comicpress'); ?></b><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('How many images in the comic category would you like to see in the archive page?','comicpress'); ?>
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
<tr>
<th scope="row"><strong><?php _e('Archive Display Order','comicpress'); ?></strong><br /><br /><?php _e('Sets the display order of your archives.','comicpress'); ?><br /></th>
<td valign="top">
<label>
<select name="archive_display_order" id="archive_display_order">
<option class="level-0" value="asc" <?php if ($comicpress_options['archive_display_order'] == "asc") { ?>selected="selected"<?php } ?>>Oldest to Newest</option>
<option class="level-0" value="desc" <?php if ($comicpress_options['archive_display_order'] == "desc") { ?>selected="selected"<?php } ?>>Newest to Oldest</option>
</select>
</label>
</td>
<td valign="top">
<?php _e('<b>Newest to Oldest</b> will display your posts starting with the most recent. <b>Oldest to Newest</b> will start with the first entry in the category, tag, or date range (e.g., Selecting May 20XX will start with May 1, not May 31st.)','comicpress'); ?>
</td>
</tr>
<tr>
<th scope="row"><b><?php _e('Number of archived comics to display','comicpress'); ?></b><br /><br /></th>
<td valign="top">
<label>
<input type="text" size="5" name="category_thumbnail_postcount" id="category_thumbnail_postcount" value="<?php echo $comicpress_options['category_thumbnail_postcount']; ?>" /><br />
</label>
</td>
<td valign="top">
<?php _e('How many images in the comic category would you like to see in the archive page?','comicpress'); ?>
</td>
</tr>
</table>
<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

@ -5,9 +5,9 @@
<table class="form-table" style="width: auto">
<?php
foreach ($options as $value) {
foreach ($comicpress_options as $value) {
switch ( $value['type'] ) {
case "comicpress-buy_print_email": ?>
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">
@ -19,7 +19,7 @@
</tr>
<?php break;
case "comicpress-buy_print_url": ?>
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">
@ -36,7 +36,7 @@
</tr>
<?php break;
case "comicpress-buy_print_add_shipping": ?>
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">
@ -49,7 +49,7 @@
</tr>
<?php break;
case "comicpress-buy_print_us_amount": ?>
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">$
@ -60,7 +60,7 @@
</tr>
<?php break;
case "comicpress-buy_print_us_ship": ?>
case "buy_print_us_ship": ?>
<tr>
<th scope="row"><b><?php _e('Shipping Cost (US/Canada)','comicpress'); ?></b><br /><br /></th>
<td valign="top">$
@ -71,7 +71,7 @@
</tr>
<?php break;
case "comicpress-buy_print_int_amount": ?>
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">$
@ -82,7 +82,7 @@
</tr>
<?php break;
case "comicpress-buy_print_int_ship": ?>
case "buy_print_int_ship": ?>
<tr>
<th scope="row"><b><?php _e('Shipping Cost (International)','comicpress'); ?></b><br /><br /></th>
<td valign="top">$

View File

@ -4,9 +4,9 @@
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<?php
foreach ($options as $value) {
foreach ($comicpress_options as $value) {
switch ( $value['type'] ) {
case "comicpress-enable_custom_image_header": ?>
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">
@ -20,7 +20,7 @@
</tr>
<?php break;
case "comicpress-custom_image_header_width": ?>
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">
@ -34,7 +34,7 @@
</tr>
<?php break;
case "comicpress-custom_image_header_height": ?>
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">

View File

@ -7,9 +7,9 @@
<tr><td><h2>- Main -</h2></td></tr>
<?php
foreach ($options as $value) {
foreach ($comicpress_options as $value) {
switch ( $value['type'] ) {
case "comicpress-disable_page_restraints": ?>
case "disable_page_restraints": ?>
<tr>
<th scope="row"><strong><?php _e('Dynamic or Fixed width site?','comicpress'); ?></strong><br /><?php _e('Allows the width of your site to either be <b>Dynamic</b> (fills browser window) or <b>Fixed</b> (width is specified, e.g., 980px, 780px, etc.)','comicpress'); ?><br /></th>
<td valign="top">
@ -26,7 +26,7 @@
<?php break;
case "comicpress-rascal_says": ?>
case "rascal_says": ?>
<tr>
<th scope="row"><strong><?php _e('Enable Rascal the ComicPress Mascot?','comicpress'); ?></strong><br /><?php _e('Enable this option to make a comic bubble appear over the comic and write out what you put in the hovertext, along with a friendly face.','comicpress'); ?><br /></th>
<td valign="top">
@ -43,7 +43,7 @@
<?php break;
case "comicpress-disable_comment_note": ?>
case "disable_comment_note": ?>
<tr>
<th scope="row"><strong><?php _e('Disable the comment notes?','comicpress'); ?></strong><br /><?php _e('Disabling this will remove the note text that displays with more options for adding to comments (html).','comicpress'); ?><br /></th>
<td valign="top">
@ -61,7 +61,7 @@
<?php break;
case "comicpress-enable_numbered_pagination": ?>
case "enable_numbered_pagination": ?>
<tr>
<th scope="row"><strong><?php _e('Enable numbered pagination?','comicpress'); ?></strong><br /><?php _e('Previous Entries and Next Entries buttons are replaced by a bar of numbered pages.','comicpress'); ?><br /></th>
<td valign="top">
@ -74,7 +74,7 @@
</td>
</tr>
<?php break;
case "comicpress-comic_clicks_next": ?>
case "comic_clicks_next": ?>
<tr>
<th scope="row"><strong><?php _e('Click comic to go next?','comicpress'); ?></strong><br /><?php _e('Allows users to click the comic itself to go to the next comic (unless on the latest comic).','comicpress'); ?><br /></th>
<td valign="top">
@ -88,7 +88,7 @@
</tr>
<?php break;
case "comicpress-disable_default_comic_nav": ?>
case "disable_default_comic_nav": ?>
<tr>
<th scope="row"><strong><?php _e('Disable the default comic post navigation?','comicpress'); ?></strong><br /><?php _e('Previous Entries and Next Entries buttons are replaced by a bar of numbered pages.','comicpress'); ?><br /></th>
<td valign="top">
@ -101,7 +101,7 @@
</td>
</tr>
<?php break;
case "comicpress-graphicnav_directory":
case "graphicnav_directory":
$current_gnav_directory = get_option($value['id']);
if (empty($current_gnav_directory)) $current_gnav_directory = 'default';
$dirs_to_search = array_unique(array(get_template_directory(),get_stylesheet_directory()));
@ -139,7 +139,7 @@
<?php break;
case "comicpress-enable_widgetarea_use_sidebar_css": ?>
case "enable_widgetarea_use_sidebar_css": ?>
<tr>
<th scope="row"><strong><?php _e('Enable main Sidebar CSS for all sidebars?','comicpress'); ?></strong><br /><?php _e('Uses default CSS styling of the sidebars for all sidebar areas.','comicpress'); ?><br /></th>
<td valign="top">
@ -154,7 +154,7 @@
<?php break;
case "comicpress-disable_lrsidebars_frontpage": ?>
case "disable_lrsidebars_frontpage": ?>
<tr>
<th scope="row"><strong><?php _e('Disable home page sidebars?','comicpress'); ?></strong><br /><?php _e('Your home page will not display the default left/right sidebars.','comicpress'); ?><br /></th>
<td valign="top">
@ -172,7 +172,7 @@
<?php break;
case "comicpress-disable_footer_text": ?>
case "disable_footer_text": ?>
<tr>
<th scope="row"><strong><?php _e('Disable the default text in the footer?','comicpress'); ?></strong><br /><?php _e('Default text in the footer will not display.','comicpress'); ?><br /><br /></th>
<td valign="top" width="100">

View File

@ -4,9 +4,9 @@
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<?php
foreach ($options as $value) {
foreach ($comicpress_options as $value) {
switch ( $value['type'] ) {
case "comicpress-disable_comic_frontpage": ?>
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">
@ -18,14 +18,8 @@
<?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 "comicpress-disable_comic_blog_frontpage": ?>
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">
@ -37,15 +31,8 @@
<?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 "comicpress-disable_comic_blog_single": ?>
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">
@ -56,15 +43,8 @@
<td valign="top">
</td>
</tr>
<?php break;
case "comicpress-disable_blog_frontpage": ?>
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">
@ -76,17 +56,8 @@
<?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 "comicpress-disable_blogheader": ?>
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">

View File

@ -4,9 +4,9 @@
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<?php
foreach ($options as $value) {
foreach ($comicpress_options as $value) {
switch ( $value['type'] ) {
case "comicpress-members_post_category": ?>
case "members_post_category": ?>
<tr>
<th scope="row"><strong>Members Category</strong><br /><br />The category that is designated to show members only content.<br /><br /></th>
<td valign="top">

View File

@ -4,9 +4,9 @@
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<?php
foreach ($options as $value) {
foreach ($comicpress_options as $value) {
switch ( $value['type'] ) {
case "comicpress-disable_default_menubar": ?>
case "disable_default_menubar": ?>
<tr>
<th scope="row"><strong><?php _e('Disable default Menubar?','comicpress'); ?></strong><br /><br /></th>
<td valign="top" width="100">
@ -20,7 +20,7 @@
</tr>
<?php break;
case "comicpress-enable_search_in_menubar": ?>
case "enable_search_in_menubar": ?>
<tr>
<th scope="row"><strong><?php _e('Enable Search Form?','comicpress'); ?></strong><br /></th>
<td valign="top" width="100">
@ -34,7 +34,7 @@
</tr>
<?php break;
case "comicpress-enable_rss_in_menubar": ?>
case "enable_rss_in_menubar": ?>
<tr>
<th scope="row"><strong><?php _e('Enable RSS Link?','comicpress'); ?></strong><br /></th>
<td valign="top">
@ -48,7 +48,7 @@
</tr>
<?php break;
case "comicpress-enable_navigation_in_menubar": ?>
case "enable_navigation_in_menubar": ?>
<tr>
<th scope="row"><strong><?Php _e('Enable mini navigation','comicpress'); ?></strong><br /></th>
<td valign="top">
@ -62,7 +62,7 @@
</tr>
<?php break;
case "comicpress-contact_in_menubar": ?>
case "contact_in_menubar": ?>
<tr>
<th scope="row"><strong><?php _e('Enable Contact/custom links?','comicpress'); ?></strong><br /><br /></th>
<td valign="top">
@ -76,7 +76,7 @@
</tr>
<?php break;
case "comicpress-disable_dynamic_menubar_links": ?>
case "disable_dynamic_menubar_links": ?>
<tr>
<th scope="row"><strong><?php _e('Disable auto-generated WordPress links?','comicpress'); ?></strong><br /><br /></th>
<td valign="top">

View File

@ -7,10 +7,9 @@
<tr><td><h2>- Main -</h2></td></tr>
<?php
global $split_column_in_two, $author_column_one, $author_column_two;
foreach ($options as $value) {
foreach ($comicpress_options as $value) {
switch ( $value['type'] ) {
case "comicpress-transcript_in_posts": ?>
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">
@ -24,7 +23,7 @@
</tr>
<?php break;
case "comicpress-enable_related_comics": ?>
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">
@ -38,7 +37,7 @@
</tr>
<?php break;
case "comicpress-enable_related_posts": ?>
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">
@ -52,7 +51,7 @@
</tr>
<?php break;
case "comicpress-remove_wptexturize": ?>
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">
@ -68,7 +67,7 @@
<tr><td><h2>- Authors/Avatars/Moods -</h2></td></tr>
<?php break;
case "comicpress-split_column_in_two": ?>
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">
@ -81,7 +80,7 @@
</tr>
<?php break;
case "comicpress-author_column_one": ?>
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">
@ -100,7 +99,7 @@
</tr>
<?php break;
case "comicpress-author_column_two": ?>
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">
@ -119,13 +118,13 @@
</tr>
<?php break;
case "comicpress-enable_comic_post_author_gravatar":
case "comicpress-enable_post_author_gravatar":
case "enable_comic_post_author_gravatar":
case "enable_post_author_gravatar":
switch ($value['type']) {
case "comicpress-enable_comic_post_author_gravatar":
case "enable_comic_post_author_gravatar":
$label = __('Comic post author Gravatar?','comicpress');
break;
case "comicpress-enable_post_author_gravatar":
case "enable_post_author_gravatar":
$label = __('Blog post author Gravatar?','comicpress');
break;
} ?>
@ -141,7 +140,7 @@
</td>
</tr><?php
break;
case "comicpress-avatar_directory":
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()));
@ -171,7 +170,7 @@
</td>
</tr>
<?php break;
case "comicpress-moods_directory":
case "moods_directory":
$current_directory = get_option($value['id']);
if (empty($current_directory)) $current_directory = 'default';
@ -205,7 +204,7 @@
<?php break;
case "comicpress-calendar_directory":
case "calendar_directory":
$current_cal_directory = get_option($value['id']);
if (empty($current_cal_directory)) $current_cal_directory = 'default';
@ -237,7 +236,7 @@
</td>
</tr>
<?php break;
case "comicpress-enable_comic_post_calendar": ?>
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">
@ -250,7 +249,7 @@
</td>
</tr>
<?php break;
case "comicpress-enable_post_calendar": ?>
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">
@ -266,7 +265,7 @@
<tr><td><h2>- Tags/Categories -</h2></td></tr>
<?php break;
case "comicpress-disable_tags_in_posts": ?>
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">
@ -280,7 +279,7 @@
</tr>
<?php break;
case "comicpress-disable_categories_in_posts": ?>
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">
@ -296,7 +295,7 @@
<tr><td><h2>- Pages & Blog Loop -</h2></td></tr>
<?php break;
case "comicpress-blogposts_with_comic": ?>
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">
@ -310,7 +309,7 @@
</tr>
<?php break;
case "comicpress-static_blog": ?>
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">
@ -324,7 +323,7 @@
</tr>
<?php break;
case "comicpress-disable_page_titles": ?>
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">

View File

@ -1,54 +1,43 @@
<script language="javascript">
function showimage(sel,pic)
{
if (!document.images)
return
document.getElementById(pic).src = '<?php echo get_template_directory_uri(); ?>/images/options/'+sel.options[sel.selectedIndex].value+'.png'
}
</script>
<div id="themestyle" class="show">
<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 ($options as $value) {
switch ( $value['type'] ) {
case "comicpress-cp_theme_layout": ?>
<tr>
<th scope="row"><strong><?php _e('Choose Layout','comicpress'); ?></strong><br /><br /><?php _e('This is the layout in which your theme will be presented.'); ?><br /><br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" class="code" onchange="showimage(this,'cpthemestyle')">
<option class="level-0" value="standard" <?php if (get_option($value['id'])=='standard') { ?>selected="selected" <?php } ?>><?php _e('2 Column (Standard)','comicpress'); ?></option>
<option class="level-0" value="3c" <?php if (get_option($value['id'])=='3c') { ?>selected="selected" <?php } ?>><?php _e('3 Column ','comicpress'); ?></option>
<option class="level-0" value="3c2r" <?php if (get_option($value['id'])=='3c2r') { ?>selected="selected" <?php } ?>><?php _e('3 Column: Sidebars Right','comicpress'); ?></option>
<option class="level-0" value="v" <?php if (get_option($value['id'])=='v') { ?>selected="selected" <?php } ?>><?php _e('Single Panel (Vertical)','comicpress'); ?></option>
<option class="level-0" value="v3c" <?php if (get_option($value['id'])=='v3c') { ?>selected="selected" <?php } ?>><?php _e('Single Panel (Vertical) 3 Column','comicpress'); ?></option>
<option class="level-0" value="gn" <?php if (get_option($value['id'])=='gn') { ?>selected="selected" <?php } ?>><?php _e('Graphic Novel: Sidebar Left','comicpress'); ?></option>
<option class="level-0" value="rgn" <?php if (get_option($value['id'])=='rgn') { ?>selected="selected" <?php } ?>><?php _e('Graphic Novel: Sidebar Right','comicpress'); ?></option>
</select>
</label>
</td>
<td valign="top">
<img id="cpthemestyle" src="<?php echo get_template_directory_uri(); ?>/images/options/<?php echo get_option($value['id']); ?>.png" alt="ComicPress Theme Style" />
</td>
<td valign="top">
<i>Comic Strip - 2 Column</i> and <i>Single Panel - 2 Column</i> themes default width: <b>780px</b>.
<br/><br/>
<i>Comic Strip - 3 Column</i>, <i>Single Panel - 3 Column</i>, and <i>Graphic Novel</i> themes default width: <b>980px</b>.
</td>
</tr>
<?php break;
}
<script language="javascript">
function showimage(sel,pic) {
if (!document.images)
return
document.getElementById(pic).src = '<?php echo get_template_directory_uri(); ?>/images/options/'+sel.options[sel.selectedIndex].value+'.png'
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Layout" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</script>
<div id="themestyle" class="show">
<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">
<tr>
<th scope="row"><strong><?php _e('Choose Layout','comicpress'); ?></strong><br /><br /><?php _e('This is the layout in which your theme will be presented.'); ?><br /><br /></th>
<td valign="top">
<label>
<select name="cp_theme_layout" id="cp_theme_layout" class="code" onchange="showimage(this,'cpthemestyle')">
<option class="level-0" value="standard" <?php if ($comicpress_options['cp_theme_layout'] == 'standard') { ?>selected="selected" <?php } ?>><?php _e('2 Column (Standard)','comicpress'); ?></option>
<option class="level-0" value="3c" <?php if ($comicpress_options['cp_theme_layout'] =='3c') { ?>selected="selected" <?php } ?>><?php _e('3 Column ','comicpress'); ?></option>
<option class="level-0" value="3c2r" <?php if ($comicpress_options['cp_theme_layout'] =='3c2r') { ?>selected="selected" <?php } ?>><?php _e('3 Column: Sidebars Right','comicpress'); ?></option>
<option class="level-0" value="v" <?php if ($comicpress_options['cp_theme_layout'] =='v') { ?>selected="selected" <?php } ?>><?php _e('Single Panel (Vertical)','comicpress'); ?></option>
<option class="level-0" value="v3c" <?php if ($comicpress_options['cp_theme_layout'] =='v3c') { ?>selected="selected" <?php } ?>><?php _e('Single Panel (Vertical) 3 Column','comicpress'); ?></option>
<option class="level-0" value="gn" <?php if ($comicpress_options['cp_theme_layout'] =='gn') { ?>selected="selected" <?php } ?>><?php _e('Graphic Novel: Sidebar Left','comicpress'); ?></option>
<option class="level-0" value="rgn" <?php if ($comicpress_options['cp_theme_layout'] =='rgn') { ?>selected="selected" <?php } ?>><?php _e('Graphic Novel: Sidebar Right','comicpress'); ?></option>
</select>
</label>
</td>
<td valign="top">
<img id="cpthemestyle" src="<?php echo get_template_directory_uri(); ?>/images/options/<?php echo $comicpress_options['cp_theme_layout']; ?>.png" alt="ComicPress Theme Style" />
</td>
<td valign="top">
<i>Comic Strip - 2 Column</i> and <i>Single Panel - 2 Column</i> themes default width: <b>780px</b>.
<br/><br/>
<i>Comic Strip - 3 Column</i>, <i>Single Panel - 3 Column</i>, and <i>Graphic Novel</i> themes default width: <b>980px</b>.
</td>
</tr>
</table>
<input name="comicpress_save_layout" type="submit" class="button-primary" value="Save Layout" />
<input type="hidden" name="action" value="comicpress_save_layout" />
</form>
</div>
</div>

View File

@ -12,7 +12,7 @@
</div>
<?php } ?>
<?php } ?>
<?php if ($disable_page_titles != 'yes') { ?>
<?php if (!$comicpress_options['disable_page_titles']) { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<div class="entry">

View File

@ -19,11 +19,11 @@ $count = $tmp_search->post_count;
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">
<?php if ($enable_comic_post_author_gravatar == 'yes') { ?>
<?php if ($comicpress_options['enable_comic_post_author_gravatar']) { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_comic_post_calendar == 'yes') { ?>
<?php if ($comicpress_options['enable_comic_post_calendar']) { ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
@ -51,11 +51,11 @@ $count = $tmp_search->post_count;
<div class="post-head"></div>
<div <?php post_class(); ?>>
<div class="post-info">
<?php if ($enable_post_author_gravatar == 'yes') { ?>
<?php if ($comicpress_options['enable_post_author_gravatar']) { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_post_calendar == 'yes') { ?>
<?php if ($comicpress_options['enable_post_calendar']) { ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
@ -63,7 +63,7 @@ $count = $tmp_search->post_count;
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> By <?php the_author_posts_link(); ?> on <?php the_time('F jS, Y'); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></small><br />
<?php if ($disable_categories_in_posts != 'yes') { ?>
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
<small><?php _e('Posted In:','comicpress'); ?><?php the_category(','); ?></small><br />
<?php } ?>
</div>

View File

@ -22,11 +22,11 @@
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">
<?php if ($enable_comic_post_author_gravatar == 'yes') { ?>
<?php if ($comicpress_options['enable_comic_post_author_gravatar']) { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_comic_post_calendar == 'yes') { ?>
<?php if ($comicpress_options['enable_comic_post_calendar']) { ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
@ -60,11 +60,11 @@
<div class="post-head"></div>
<div <?php post_class(); ?>>
<div class="post-info">
<?php if ($enable_post_author_gravatar == 'yes') { ?>
<?php if ($comicpress_options['enable_post_author_gravatar']) { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_post_calendar == 'yes') { ?>
<?php if ($comicpress_options['enable_post_calendar']) { ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
@ -72,7 +72,7 @@
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> <?php _e('By','comicpress'); ?> <?php the_author_posts_link(); ?> <?php _e('on','comicpress'); ?> <?php the_time('F jS, Y'); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></small><br />
<?php if ($disable_categories_in_posts != 'yes') { ?>
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
<?php if ($post->post_type == 'page') { ?>
<small><?php _e('This is a page.','comicpress'); ?></small><br />
<?php } else { ?>
@ -83,8 +83,8 @@
</div>
<div class="clear"></div>
</div>
<?php global $excerpt_or_content_search;
if ($excerpt_or_content_search != 'excerpt') {
<?php
if ($comicpress_options['excerpt_or_content_search'] != 'excerpt') {
the_content(__('&darr; Read the rest of this entry...','comicpress'));
} else {
the_excerpt();