diff --git a/.gitignore b/.gitignore index 5236e1e..4971ac3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ +.directory diff --git a/addons/Core/Core.inc b/addons/Core/Core.inc index e3b1b79..25f4002 100644 --- a/addons/Core/Core.inc +++ b/addons/Core/Core.inc @@ -77,7 +77,7 @@ class ComicPressAddonCore extends ComicPressAddon { 'none' => __('Not a comic', 'comicpress'), 'comic' => __('Comic', 'comicpress'), 'rss' => __('RSS', 'comicpress'), - 'archive' => __('Archive', 'comicpress'), + 'archive' => __('Archive', 'comicpress') ); $current_type = get_post_meta($post->ID, 'comic_image_type', true); diff --git a/archive-comic-calendar.php b/archive-comic-calendar.php index 1b2721e..befb068 100644 --- a/archive-comic-calendar.php +++ b/archive-comic-calendar.php @@ -4,12 +4,12 @@ Template Name: Comic Calendar Archive */ global $comicpress; + +$comicpress->additional_stylesheets[] = '/style/archive-comic-calendar.css'; ?> - - additional_stylesheets[] = '/style/archive-comic-calendar.css'; + + get_header(); ?> - - - -
+
+
+

+
+ +
-
-
-

-
- -
- - - 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) ) { ?> -

- - query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$year); - while ($comicArchive->have_posts()) : $comicArchive->the_post() ?> - - -
- - -
- -
-
+ get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date DESC"); + foreach ( $years as $year ) { + if (!empty($year)) { ?> +

+ + query('showposts=10000&cat=' . $comicpress->get_all_comic_categories_as_cat_string() . '&year='.$year); + while ($comic_archive->have_posts()) { + $comic_archive->the_post(); ?> + + + + + +
+ +
+
+
- + \ No newline at end of file diff --git a/archive.php b/archive.php index 8f6f070..1b88899 100644 --- a/archive.php +++ b/archive.php @@ -6,7 +6,7 @@ // why can't wordpress allow for post date asc sorting out of the box... - $posts = query_posts($query_string.'&order=asc'); + $posts = query_posts($query_string . '&order=asc'); while (have_posts()) { the_post(); @@ -15,13 +15,9 @@ } else { include(dirname(__FILE__) . '/partials/archive-blog-post.inc'); } - } ?> + } - + include(dirname(__FILE__) . '/partials/archive-page-nav.inc'); diff --git a/classes/ComicPress.inc b/classes/ComicPress.inc index 2402214..a06121d 100644 --- a/classes/ComicPress.inc +++ b/classes/ComicPress.inc @@ -9,6 +9,7 @@ class ComicPress { 'category_order' => false, 'blogpost_count' => 10 ); + var $additional_stylesheets = array(); var $comic_post_attachments_cache = array(); @@ -33,6 +34,14 @@ class ComicPress { $this->flatten_categories(); $this->separate_categories(); $this->sort_comic_categories(); + + add_action('wp_head', array(&$this, 'wp_head')); + } + + function wp_head() { + foreach ($this->additional_stylesheets as $uri) { ?> + +
+ - +
-
+ query( + 'showposts=' . + (int)$comicpress->comicpress_options['blogpost_count'] . + '&cat=-' . + $comicpress->comicpress_options['comic_category_id'] . + '&paged=' . + $paged + ); -query( - 'showposts=' . - (int)$comicpress->comicpress_options['blogpost_count'] . - '&cat=-' . - $comicpress->comicpress_options['comic_category_id'] . - '&paged=' . - $paged - ); + while ($wp_query->have_posts()) { + $wp_query->the_post(); + include(dirname(__FILE__) . '/partials/index-blog-post.inc'); + } - while ($wp_query->have_posts()) { - $wp_query->the_post(); include(dirname(__FILE__) . '/partials/index-blog-post.inc'); - } -?> - - + ?>
diff --git a/partials/archive-page-nav.inc b/partials/archive-page-nav.inc new file mode 100644 index 0000000..d28497a --- /dev/null +++ b/partials/archive-page-nav.inc @@ -0,0 +1,5 @@ + diff --git a/partials/index-page-nav.inc b/partials/index-page-nav.inc new file mode 100644 index 0000000..b3e5e36 --- /dev/null +++ b/partials/index-page-nav.inc @@ -0,0 +1,5 @@ + diff --git a/partials/single-no-matches.inc b/partials/single-no-matches.inc new file mode 100644 index 0000000..0372c6f --- /dev/null +++ b/partials/single-no-matches.inc @@ -0,0 +1,6 @@ +
+
+

Sorry, no posts matched your criteria.

+
+
+
diff --git a/single.php b/single.php index f31f5fe..d92a549 100644 --- a/single.php +++ b/single.php @@ -28,14 +28,9 @@ comments_template(); } - } else { ?> -
-
-

Sorry, no posts matched your criteria.

-
-
-
- diff --git a/style/archive-comic.css b/style/archive-comic.css new file mode 100644 index 0000000..7d6a0c3 --- /dev/null +++ b/style/archive-comic.css @@ -0,0 +1,16 @@ +.archive-date { + padding: 0 5px 0 0; + font-size: 11px; + white-space: nowrap; +} + +.archive-title { + padding: 2px 5px; + line-height: 11px; + border-left: 1px solid #000; +} + +.month-table { + border-collapse: collapse; + margin: 0 0 20px 0; +}