From 68f9216df611ac87bd982bc97d8532ed161513d1 Mon Sep 17 00:00:00 2001 From: "Philip M. Hofer (Frumph)" Date: Tue, 29 Sep 2009 16:12:37 -0700 Subject: [PATCH] start of 2.8.2 Signed-off-by: Philip M. Hofer (Frumph) --- comicpress-options-config.php | 6 +++- functions.php | 3 +- index.php | 18 +++++------ options/postoptions.php | 14 +++++++++ single.php | 59 +++++++++++++++++++++++++---------- 5 files changed, 73 insertions(+), 27 deletions(-) diff --git a/comicpress-options-config.php b/comicpress-options-config.php index a9258a7..201759e 100644 --- a/comicpress-options-config.php +++ b/comicpress-options-config.php @@ -249,7 +249,11 @@ $options = array ( "default" => "", "type" => "comicpress-members_post_category"), - + array( + "id" => "comicpress-blogposts_with_comic", + "default" => "no", + "type" => "comicpress-blogposts_with_comic"), + array("type" => "close") ); ?> \ No newline at end of file diff --git a/functions.php b/functions.php index 8372fee..0c54c28 100644 --- a/functions.php +++ b/functions.php @@ -88,7 +88,8 @@ 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' ) as $options => $variable_name) { + 'members_post_category' => 'members_post_category', + 'blogposts_with_comic' => 'blogposts_with_comic' ) as $options => $variable_name) { $variables_to_extract[$variable_name] = get_option("comicpress-${options}"); } diff --git a/index.php b/index.php index e3e0a0c..7801c18 100644 --- a/index.php +++ b/index.php @@ -20,15 +20,15 @@ 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() ?> - -
-
- -
- -
-
- + +
+
+ +
+ +
+
+ diff --git a/options/postoptions.php b/options/postoptions.php index 17e02e5..a4d36f1 100644 --- a/options/postoptions.php +++ b/options/postoptions.php @@ -170,6 +170,20 @@ + + + Show all posts on the same day while viewing single comics?

+ + +    + + + + All the blog posts that are on the same day as the comic your viewing will appear. + + + - -
-
- -
- -
-
- + +
+
+ +
+ +
+
+ @@ -48,21 +48,48 @@ - post_date); + $next_comic = get_next_comic(); + $next_comic = (array)$next_comic; + $next_date = mysql2date('Y-m-j', $next_comic['post_date']); + $blog_query = 'showposts='.$blog_postcount.'&order=asc&cat=-'.exclude_comic_categories(); } } else { display_blog_post(); } - comments_template('', true); ?> + endwhile; + + global $blogposts_with_comic; + + if ($blogposts_with_comic == 'yes') { + + $temppost = $post; + $temp_query = $wp_query; + + if (in_comic_category() && !empty($blog_query)) { + function filter_where($where = '') { + global $cur_date, $next_date; + $where .= " AND post_date >= '".$cur_date."' AND post_date < '".$next_date."'"; + return $where; + } + add_filter('posts_where', 'filter_where'); + $posts = query_posts($blog_query); + if (have_posts()) { while (have_posts()) : the_post(); + display_blog_post(); + endwhile; } + } + $post = $temppost; $wp_query = $temp_query; $temppost = null; $temp_query = null; + } ?> + + + + -
- -
-
@@ -71,9 +98,9 @@
+ -