Permalink
Browse files

added easels disable sidebars on page options

moved some data placement around to try to optimize usage
archive/search display count is now exclusively handled by wp-admin - settings - reading now because of wordpress limitations with paging
removed page restraint removal option, better done with CSS via  #page, #page-wide - width: auto;  instead
added new option to enable the -foot and -head elements instead of having them always active for those who don't use them

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
  • Loading branch information...
1 parent ef3f21a commit 916a8b612cc3f4d11ebe309f7dafa57ba232069f Philip M. Hofer (Frumph) committed Feb 11, 2011
View
@@ -1,13 +1,13 @@
<?php get_header(); ?>
<div class="post post-page post-404">
- <div class="post-head"></div>
+<?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<h2 class="pagetitle"><?php _e('Page Not Found','comicpress'); ?></h2>
<p><a href="<?php echo home_url(); ?>"><?php _e('Click here to return to the home page','comicpress'); ?></a> <?php _e('or try a search:','comicpress'); ?></p>
<p><?php get_search_form(); ?></p>
</div>
- <div class="post-foot"></div>
+<?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php get_footer() ?>
@@ -73,7 +73,7 @@ function leapYear($yr) {
?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+<?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="post-info">
<div class="post-text">
@@ -159,7 +159,7 @@ function leapYear($yr) {
</div>
<div class="clear"></div>
</div>
- <div class="post-foot"></div>
+<?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php get_footer() ?>
View
@@ -20,7 +20,7 @@ function filter_where($where = '') {
?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+<?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="post-info">
<div class="post-text">
@@ -38,7 +38,7 @@ function filter_where($where = '') {
<?php endwhile; endif; ?>
<div class="clear"></div>
</div>
- <div class="post-foot"></div>
+<?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php get_footer() ?>
@@ -5,7 +5,7 @@
get_header();
?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="post-info">
<div class="post-text">
@@ -62,7 +62,7 @@
</ul>
<div class="clear"></div>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php get_footer() ?>
@@ -5,7 +5,7 @@
get_header();
?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="post-info">
<div class="post-text">
@@ -61,7 +61,7 @@
</ul>
<div class="clear"></div>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php get_footer() ?>
View
@@ -22,7 +22,7 @@
<div <?php post_class(); ?>>
<?php comicpress_display_post_thumbnail($is_comic); ?>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="post-info">
<div class="post-text">
@@ -37,15 +37,15 @@
<?php wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">'.__('Pages:','comicpress').'</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
<?php edit_post_link(__('Edit this page.','comicpress'), '', ''); ?>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php
endwhile;
?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="archive-yearlist">|
@@ -69,7 +69,7 @@
</table>
<div class="clear"></div>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php
UnProtect();
View
@@ -5,22 +5,23 @@
get_header();
?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="post-info">
<div class="post-text">
<h2 class="page-title"><?php the_title(); ?></h2>
</div>
</div>
</div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php
$years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date DESC");
foreach ( $years as $year ) {
if ($year != (0) ) {
?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="post-info">
<div class="post-text">
@@ -35,7 +36,7 @@
</table>
<div class="clear"></div>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php }
} ?>
View
@@ -10,24 +10,13 @@
if (isset($wp_query->query_vars['cat'])) $theCatID = (int)$wp_query->query_vars['cat'];
}
-$category_thumbnail_postcount = comicpress_themeinfo('category_thumbnail_postcount');
$archive_display_order = comicpress_themeinfo('archive_display_order');
if (empty($archive_display_order)) $archive_display_order = 'DESC';
if (!empty($theCatID) && comicpress_in_comic_category($theCatID)) $is_comic = true;
-if ($is_comic && comicpress_themeinfo('display_archive_as_text_links')) $category_thumbnail_postcount = '-1';
-
-$order = '&order='.$archive_display_order;
-
-if (comicpress_themeinfo('display_archive_as_links')) {
- $post_count = '&showposts=-1&posts_per_page=-1';
-}
-
$order = '&order='.$archive_display_order;
-if ($is_comic) $post_count = '&showposts='.$category_thumbnail_postcount.'&posts_per_page='.$category_thumbnail_postcount;
-
Protect();
$tmp_search = new WP_Query($query_string.'&showposts=-1&posts_per_page=-1');
if (isset($tmp_search->post_count)) {
@@ -77,19 +66,19 @@
<?php
if (comicpress_themeinfo('display_archive_as_text_links') && !($is_comic && comicpress_themeinfo('archive_display_comic_thumbs_in_order'))) { ?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="entry">
<table class="archive-table">
<?php while (have_posts()) : the_post(); ?>
<tr><td class="archive-date"><?php the_time('M d, Y') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="<?php _e('Permanent Link:','comicpress'); ?> <?php the_title() ?>"><?php the_title() ?></a></td></tr>
<?php endwhile; ?>
</table>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php } elseif (comicpress_themeinfo('archive_display_comic_thumbs_in_order') && ($is_comic)) { ?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<?php while (have_posts()) : the_post(); ?>
<div class="comicthumbwrap">
@@ -102,7 +91,7 @@
<?php endwhile; ?>
<div class="clear"></div>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php } else {
while (have_posts()) : the_post();
View
@@ -6,7 +6,7 @@
?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="post-info">
<div class="post-text">
@@ -19,19 +19,19 @@
</div>
<div class="clear"></div>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div id="archivepage">
<h2><?php _e('Archives by Subject:','comicpress'); ?></h2>
<ul><?php wp_list_categories() ?></ul>
</div>
<div class="clear"></div>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php get_footer() ?>
View
@@ -10,7 +10,7 @@
<h2><?php _e('No such author.','comicpress'); ?></h2>
<?php } else { ?>
<div <?php post_class(); ?>>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="userpage-avatar">
<?php echo str_replace('photo', 'photo instant nocorner itxtalt', get_avatar($curauth->user_email, 64, comicpress_random_default_avatar($curauth->user_email), esc_attr($curauth->display_name, 1))); ?>
@@ -60,7 +60,7 @@
<?php } ?>
</div>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php } ?>
View
@@ -49,7 +49,7 @@
?>
<div <?php post_class(); ?>>
<?php comicpress_display_post_thumbnail(); ?>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<div class="post-url-back">
<a href="<?php echo $post->guid; ?>">&lt;-- Return to Comic</a>
@@ -142,7 +142,7 @@
</div>
<div class="clear"></div>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php
@@ -154,7 +154,7 @@
<div <?php post_class(); ?>>
<?php comicpress_display_post_thumbnail(); ?>
- <div class="post-head"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
<div class="post-content">
<?php if (!comicpress_themeinfo('disable_page_titles')) { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
@@ -165,7 +165,7 @@
<div class="clear"></div>
<?php edit_post_link(__('Edit this page.','comicpress'), '', '') ?>
</div>
- <div class="post-foot"></div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
<?php
View
@@ -6,6 +6,9 @@ displaying category list properly now, instead of multiple
removed trailingslashit from around $comic in displaycomic.php line #350, thanks @nismorack
added easels disable sidebars on page options
moved some data placement around to try to optimize usage
+archive/search display count is now exclusively handled by wp-admin - settings - reading now because of wordpress limitations with paging
+removed page restraint removal option, better done with CSS via #page, #page-wide - width: auto; instead
+added new option to enable the -foot and -head elements instead of having them always active for those who don't use them
2.9.2.29.1
$is_comic needed to be set in the archive.php before hand, was giving notice
View
@@ -42,14 +42,21 @@ function comicpress_admin_options() {
if ($_REQUEST['action'] == 'comicpress_save_layout') {
$comicpress_options['cp_theme_layout'] = wp_filter_nohtml_kses($_REQUEST['cp_theme_layout']);
+
+ foreach (array(
+ 'enable_caps'
+ ) as $key) {
+ if (!isset($_REQUEST[$key])) $_REQUEST[$key] = 0;
+ $comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
+ }
+
$tab = 'themestyle';
update_option('comicpress-options',$comicpress_options);
}
if ($_REQUEST['action'] == 'comicpress_save_general') {
foreach (array(
- 'disable_page_restraints',
'rascal_says',
'disable_comment_note',
'enable_comment_javascript',
@@ -147,8 +154,7 @@ function comicpress_admin_options() {
foreach (array(
'archive_display_order',
'excerpt_or_content_archive',
- 'excerpt_or_content_search',
- 'category_thumbnail_postcount'
+ 'excerpt_or_content_search'
) as $key) {
if (isset($_REQUEST[$key]))
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
View
@@ -9,7 +9,7 @@
}
?>
-<div id="comment-wrapper-head"></div>
+<?php if (comicpress_themeinfo('enable_caps')) { ?><div id="comment-wrapper-head"></div><?php } ?>
<div id="comment-wrapper">
<?php if ( have_comments() ) : ?>
@@ -147,5 +147,4 @@
<?php endif; ?>
</div>
-
-<div id="comment-wrapper-foot"></div>
+<?php if (comicpress_themeinfo('enable_caps')) { ?><div id="comment-wrapper-foot"></div><?php } ?>
View
@@ -1,5 +1,5 @@
<?php get_template_part('layout', 'foot'); ?>
-<div id="footer">
+ <div id="footer">
<?php
if (is_active_sidebar('the-footer')) get_sidebar('footer');
@@ -12,14 +12,10 @@
<?php } else { ?>
<!-- <?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds. //-->
<?php } ?>
-</div>
-<?php
-
-if (!comicpress_themeinfo('disable_page_restraints')) { ?>
+ </div><!-- Ends #footer -->
</div><!-- Ends "page/page-wide" -->
</div><!-- Ends "page-wrap" -->
-<?php } ?>
-<div id="page-foot"></div>
+<?php if (comicpress_themeinfo('enable_caps')) { ?><div id="page-foot"></div><?php } ?>
<?php wp_footer(); ?>
</body>
Oops, something went wrong.

0 comments on commit 916a8b6

Please sign in to comment.