Permalink
Browse files

Putting templets back into the root, removed some notices.

  • Loading branch information...
1 parent c6fbf2f commit efde6a4119f9585ad41501ee0bd7e37b333151fa @Frumph committed Jun 3, 2012
View
0 templates/archive-comic-calendar.php → archive-comic-calendar.php
File renamed without changes.
View
0 templates/archive-comic-month.php → archive-comic-month.php
File renamed without changes.
View
48 templates/archive-comic-storyline-thumbs.php → archive-comic-storyline-thumbs.php
@@ -2,16 +2,23 @@
/*
Template Name: Comic Storyline with Thumbs
*/
-get_header();
+get_header();
+$is_comic = false;
+while (have_posts()) : the_post();
+
?>
-<div <?php post_class(); ?>>
- <?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 post_class(); ?>>
+ <?php comicpress_display_post_thumbnail($is_comic); ?>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-head"></div><?php } ?>
+ <div class="post-content">
+ <div class="post-info">
+ <div class="post-text">
+ <?php comicpress_display_post_title($is_comic); ?>
+ </div>
+ </div>
+ <div class="clear"></div>
+ <div class="entry">
+ <?php comicpress_display_the_content($is_comic); ?>
<ul id="storyline" class="level-0">
<?php if (comicpress_themeinfo('enable-storyline-support') == 1) {
if (($result = comicpress_themeinfo('storyline-category-order')) !== false) {
@@ -59,10 +66,21 @@
} else { ?>
<li><h3>Storyline Support is not currently enabled on this site.</h3><br /><br /><strong>Note to the Administrator:</strong><br /> To enable storyline support and manage storyline categories make sure you are running the latest version of the <a href="http://wordpress.org/extend/plugins/comicpress-manager/">ComicPress Manager</a> plugin and check your storyline settings from it's administration menu.</h3></li>
<?php } ?>
- </ul>
- <div class="clear"></div>
- </div>
- <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
-</div>
+ </ul>
+ <div class="clear"></div>
+ </div>
+ <?php edit_post_link(__('Edit this page.','comicpress'), '', ''); ?>
+ </div>
+ <?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
+ </div>
+ <?php
+
+endwhile;
+?>
-<?php get_footer() ?>
+<?php
+if ('open' == $post->comment_status) {
+ comments_template('', true);
+}
+get_footer();
+ ?>
View
0 templates/archive-comic-storyline.php → archive-comic-storyline.php
File renamed without changes.
View
0 templates/archive-comic-year.php → archive-comic-year.php
File renamed without changes.
View
0 templates/archive-comic.php → archive-comic.php
File renamed without changes.
View
0 templates/buystrip.php → buystrip.php
File renamed without changes.
View
4 comicpress-config.php
@@ -1,10 +1,10 @@
<?php
//COMIC CATEGORY -the WordPress ID # of your comic category (default "3")
-$comiccat = "4";
+$comiccat = "111";
//BLOG CATEGORY - the WordPress ID of your blog category (default "4")
-$blogcat = "3";
+$blogcat = "110";
//COMIC FOLDER - the folder your comics files are located in (default "comics")
$comic_folder = "comics";
View
34 functions.php
@@ -34,15 +34,18 @@ function comicpress_enqueue_comment_reply() {
get_template_part('child', 'functions');
get_template_part('child', 'widgets');
-// This theme allows users to set a custom background
-// the global if has anything in it from the child theme, use it.
-$comicpress_background_array = array();
-if (function_exists('comicpress_child_theme_background_array'))
- $comicpress_background_array = comicpress_child_theme_background_array();
-// Set defaults if it doesn't exit from the global
-if (!isset($comicpress_background_array)) $comicpress_background_array = array('default-color' => 'fff', 'default-image' => '');
-add_theme_support( 'custom-background', $comicpress_background_array );
+if ( version_compare( $wp_version, "3.3.999", ">" ) ) {
+ // This theme allows users to set a custom background
+ // the global if has anything in it from the child theme, use it.
+ $comicpress_background_array = array();
+ if (function_exists('comicpress_child_theme_background_array')) $comicpress_background_array = comicpress_child_theme_background_array();
+// Set defaults if it doesn't exit from the global
+ if (!isset($comicpress_background_array)) $comicpress_background_array = array('default-color' => 'fff', 'default-image' => '');
+ add_theme_support( 'custom-background', $comicpress_background_array );
+} else {
+ add_custom_background();
+}
// These autoload
foreach (glob(get_template_directory() . "/functions/*.php") as $funcfile) {
@@ -659,4 +662,17 @@ function comicpress_disable_sidebars() {
return false;
}
-?>
+add_filter('previous_post_rel_link', 'comicpress_rel_link_removal');
+add_filter('next_post_rel_link', 'comicpress_rel_link_removal');
+
+if (!function_exists('comicpress_rel_link_removal')) {
+ function comicpress_rel_link_removal($link) {
+ global $post, $wp_query;
+ if (is_single() && !is_attachment()) {
+ if (comicpress_in_comic_category()) $link=false;
+ }
+ return $link;
+ }
+}
+
+?>
View
182 functions/custom-header.php
@@ -1,62 +1,132 @@
<?php
-$custom_header_args = array();
-
-add_theme_support( 'custom-header', array(
- // Header image default
- 'default-image' => false,
- // Header text display default
- 'header-text' => false,
- // Header text color default
- 'default-text-color' => '000',
- // Header image width (in pixels)
- 'width' => comicpress_themeinfo('custom_image_header_width'),
- // Header image height (in pixels)
- 'height' => comicpress_themeinfo('custom_image_header_height'),
- // Header image random rotation default
- 'random-default' => false,
- // Template header style callback
- 'wp-head-callback' => 'comicpress_header_style',
- // Admin header style callback
- 'admin-head-callback' => 'comicpress_admin_header_style',
- // Admin preview style callback
- 'admin-preview-callback' => 'comicpress_admin_header_style'
- ) );
-
-function comicpress_admin_header_style() { ?>
-<style type="text/css">
-#headimg {
- width: <?php echo get_custom_header()->width; ?>px;
- height: <?php echo get_custom_header()->height; ?>px;
- background: url(<?php header_image(); ?>) no-repeat center;
-}
-
-#headimg h1, #headimg .description {
- display: none;
-}
-</style>
- <?php
-}
-
-function comicpress_header_style() {
- if (get_header_image()) { ?>
-<style type="text/css">
- #header {
- width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
- /* height: <?php echo HEADER_IMAGE_HEIGHT; ?>px; */
- background: url(<?php header_image(); ?>) top center no-repeat;
- overflow: hidden;
+if ( version_compare( $wp_version, "3.3.999", ">" ) ) {
+
+ $custom_header_args = array();
+
+ add_theme_support( 'custom-header', array(
+ // Header image default
+ 'default-image' => false,
+ // Header text display default
+ 'header-text' => false,
+ // Header text color default
+ 'default-text-color' => '000',
+ // Header image width (in pixels)
+ 'width' => comicpress_themeinfo('custom_image_header_width'),
+ // Header image height (in pixels)
+ 'height' => comicpress_themeinfo('custom_image_header_height'),
+ // Header image random rotation default
+ 'random-default' => false,
+ // Template header style callback
+ 'wp-head-callback' => 'comicpress_header_style',
+ // Admin header style callback
+ 'admin-head-callback' => 'comicpress_admin_header_style',
+ // Admin preview style callback
+ 'admin-preview-callback' => 'comicpress_admin_header_style'
+ ) );
+
+ function comicpress_admin_header_style() { ?>
+ <style type="text/css">
+ #headimg {
+ width: <?php echo get_custom_header()->width; ?>px;
+ height: <?php echo get_custom_header()->height; ?>px;
+ background: url(<?php header_image(); ?>) no-repeat center;
+ }
+
+ #headimg h1, #headimg .description {
+ display: none;
+ }
+ </style>
+ <?php
+ }
+
+ function comicpress_header_style() {
+ if (get_header_image()) { ?>
+ <style type="text/css">
+ #header {
+ width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
+ /* height: <?php echo HEADER_IMAGE_HEIGHT; ?>px; */
+ background: url(<?php header_image(); ?>) top center no-repeat;
+ overflow: hidden;
+ }
+ #header h1 { padding: 0; }
+ #header h1 a {
+ display: block;
+ width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
+ height: <?php echo HEADER_IMAGE_HEIGHT-1; ?>px;
+ text-indent: -9999px;
+ }
+ #header .description { display: none; }
+ </style>
+ <?php }
+ }
+} else {
+ add_filter('comicpress_header_image_width', 'comicpress_change_header_width');
+
+ function comicpress_change_header_width($width) {
+ $new_width = comicpress_themeinfo('custom_image_header_width');
+ if (!empty($new_width) && ((int)$new_width > 0))
+ $width = $new_width;
+ return $width;
}
- #header h1 { padding: 0; }
- #header h1 a {
- display: block;
+
+ add_filter('comicpress_header_image_height', 'comicpress_change_header_height');
+
+ function comicpress_change_header_height($height) {
+ $new_height = comicpress_themeinfo('custom_image_header_height');
+ if (!empty($new_height) && ((int)$new_height > 0))
+ $height = $new_height;
+ return $height;
+ }
+
+ // Custom Image Header Defaults
+ define('HEADER_TEXTCOLOR', '');
+ define('HEADER_IMAGE', ''); // %s is theme dir
+ define('NO_HEADER_TEXT', true);
+
+ define( 'HEADER_IMAGE_WIDTH', apply_filters( 'comicpress_header_image_width', '980') );
+ define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'comicpress_header_image_height', '100') );
+ set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
+
+ add_custom_image_header('comicpress_header_style', 'comicpress_admin_header_style');
+
+ function comicpress_admin_header_style() { ?>
+ <style type="text/css">
+ #headimg {
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
- height: <?php echo HEADER_IMAGE_HEIGHT-1; ?>px;
- text-indent: -9999px;
+ height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
+ background: url(<?php header_image(); ?>) no-repeat center;
+ }
+
+ #headimg h1, #headimg .description {
+ display: none;
+ }
+ </style>
+
+ <?php
+ }
+
+ function comicpress_header_style() {
+ if (get_header_image()) { ?>
+ <style type="text/css">
+ #header {
+ width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
+ height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
+ background: url(<?php header_image(); ?>) top center no-repeat;
+ overflow: hidden;
+ }
+
+ #header h1 { padding: 0; }
+ #header h1 a {
+ display: block;
+ width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
+ height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
+ text-indent: -9999px;
+ }
+ #header .description { display: none; }
+ </style>
+
+ <?php }
}
- #header .description { display: none; }
-</style>
- <?php }
}
-
-?>
+?>
View
6 functions/navigation.php
@@ -36,14 +36,14 @@ function comicpress_get_last_comic_permalink() {
* Get the link to the previous comic from the current one.
*/
function comicpress_previous_comic_link($format, $link) {
- previous_post_link($format, $link, false, comicpress_all_blog_categories_array_and());
+ previous_post_link($format, $link, false, comicpress_all_blog_categories_string());
}
/**
* Get the link to the next comic from the current one.
*/
function comicpress_next_comic_link($format, $link) {
- next_post_link($format, $link, false, comicpress_all_blog_categories_array_and());
+ next_post_link($format, $link, false, comicpress_all_blog_categories_string());
}
/**
@@ -88,7 +88,7 @@ function comicpress_get_adjacent_comic($category, $previous = false, $in_same_ca
if (!empty($category)) {
$categories_to_exclude = comicpress_get_string_to_exclude_all_but_provided_categories($category);
} else {
- $categories_to_exclude = comicpress_all_blog_categories_array_and();
+ $categories_to_exclude = comicpress_all_blog_categories_string();
}
return get_adjacent_post($in_same_category, $categories_to_exclude, $previous);
}
View
0 templates/links.php → links.php
File renamed without changes.
View
0 templates/members-blog.php → members-blog.php
File renamed without changes.
View
6 style.css
@@ -619,6 +619,7 @@ h4, h4 a {
.entry {
line-height: 18px;
padding: 3px 0;
+ overflow: hidden;
}
.more-link {
@@ -744,6 +745,10 @@ textarea#comment {
padding: 5px;
}
+p.nocomments {
+ text-align: center;
+}
+
.form-submit {
float: left;
display: inline-block
@@ -1497,6 +1502,7 @@ li.storyline-root {
#wp-paginav {
text-align: left;
+ margin: 10px 0;
}
#paginav {
View
31 templates/blog.php
@@ -1,31 +0,0 @@
-<?php
-/*
-Template Name: Blog
-*/
-get_header();
-
-$temp_query = $wp_query;
-
-if (!comicpress_themeinfo('split_column_in_two')) {
- $paged = get_query_var('paged');
- $blog_query = 'cat='.comicpress_exclude_comic_categories().'&paged='.$paged;
- $posts = &query_posts($blog_query);
- if (have_posts()) { ?>
- <div class="blogindex-head"></div>
- <div class="blogindex">
- <?php while (have_posts()) : the_post();
- comicpress_display_post();
- endwhile; ?>
- </div>
- <div class="blogindex-foot"></div>
-<?php }
- comicpress_pagination();
-} else {
- comicpress_dual_columns();
-}
-
-$wp_query = $temp_query; $temp_query = null;
-
-if (is_active_sidebar('under-blog')) get_sidebar('underblog');
-get_footer();
- ?>
View
23 widgets/archivedropdown.php
@@ -99,20 +99,23 @@ function widget($args, $instance) {
$category_id = end($parts);
$category = $categories_by_id[$category_id];
$description = $category->description;
- $first_comic_in_category = comicpress_get_terminal_post_in_category($category_id);
- $first_comic_permalink = get_permalink($first_comic_in_category->ID);
- $padding = str_repeat("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", $target_depth-1);
-
- $option = '<option value="'.get_category_link($category_id).'">';
- $option .= $padding.$category->name;
- if ($category->count > 0) $option .= ' ('.$category->count.')';
- $option .= '</option>'."\r\n";
- $comicpress_storyline_dropdown_archive .= $option;
-
+ $the_posts = get_posts('post_status=publish&numberposts=-1&cat='.$category->term_id);
+ if (is_array($the_posts) && !empty($the_posts)) {
+ $first_comic_in_category = comicpress_get_terminal_post_in_category($category_id);
+ $first_comic_permalink = get_permalink($first_comic_in_category->ID);
+ $padding = str_repeat("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", $target_depth-1);
+
+ $option = '<option value="'.get_category_link($category_id).'">';
+ $option .= $padding.$category->name;
+ if ($category->count > 0) $option .= ' ('.$category->count.')';
+ $option .= '</option>'."\r\n";
+ $comicpress_storyline_dropdown_archive .= $option;
+ }
$current_depth = $target_depth;
}
wp_cache_set( 'comicpress', $comicpress_storyline_dropdown_archive, 'archivedropdown', 7200 );
}
+ wp_reset_query();
echo $comicpress_storyline_dropdown_archive;
}
break;

0 comments on commit efde6a4

Please sign in to comment.