start of 2.8.2

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-09-29 16:12:37 -07:00
parent 2739b4bf34
commit 68f9216df6
5 changed files with 73 additions and 27 deletions

View File

@ -249,6 +249,10 @@ $options = array (
"default" => "", "default" => "",
"type" => "comicpress-members_post_category"), "type" => "comicpress-members_post_category"),
array(
"id" => "comicpress-blogposts_with_comic",
"default" => "no",
"type" => "comicpress-blogposts_with_comic"),
array("type" => "close") array("type" => "close")
); );

View File

@ -88,7 +88,8 @@ if (get_option('upload_path') !== false) {
'excerpt_or_content_archive' => 'excerpt_or_content_archive', 'excerpt_or_content_archive' => 'excerpt_or_content_archive',
'excerpt_or_content_search' => 'excerpt_or_content_search', 'excerpt_or_content_search' => 'excerpt_or_content_search',
'category_thumbnail_postcount' => 'category_thumbnail_postcount', '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}"); $variables_to_extract[$variable_name] = get_option("comicpress-${options}");
} }

View File

@ -20,7 +20,7 @@
<?php $wp_query ->in_the_loop = true; $comicFrontpage = new WP_Query(); $comicFrontpage->query('showposts=1&cat='.get_all_comic_categories_as_cat_string()); <?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() ?> while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post() ?>
<?php if (comicpress_check_themepack_file('displaycomic.php') == false) { ?>
<div id="comic-head"><?php get_sidebar('over'); ?></div> <div id="comic-head"><?php get_sidebar('over'); ?></div>
<div class="clear"></div> <div class="clear"></div>
<?php get_sidebar('comicleft'); ?> <?php get_sidebar('comicleft'); ?>
@ -28,7 +28,7 @@
<?php get_sidebar('comicright'); ?> <?php get_sidebar('comicright'); ?>
<div class="clear"></div> <div class="clear"></div>
<div id="comic-foot"><?php get_sidebar('under'); ?></div> <div id="comic-foot"><?php get_sidebar('under'); ?></div>
<?php } ?>
<?php endwhile; ?> <?php endwhile; ?>
<?php } ?> <?php } ?>

View File

@ -170,6 +170,20 @@
</td> </td>
</tr> </tr>
<?php break;
case "comicpress-blogposts_with_comic": ?>
<tr>
<th scope="row"><strong>Show all posts on the same day while viewing single comics?</strong><br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
<td valign="top">
All the blog posts that are on the same day as the comic your viewing will appear.
</td>
</tr>
<?php break; <?php break;
} }
} }

View File

@ -16,7 +16,7 @@
<?php while (have_posts()) : the_post(); <?php while (have_posts()) : the_post();
if (in_comic_category()) { ?> if (in_comic_category()) { ?>
<?php if (comicpress_check_themepack_file('displaycomic.php') == false) { ?>
<div id="comic-head"><?php get_sidebar('over'); ?></div> <div id="comic-head"><?php get_sidebar('over'); ?></div>
<div class="clear"></div> <div class="clear"></div>
<?php get_sidebar('comicleft'); ?> <?php get_sidebar('comicleft'); ?>
@ -24,7 +24,7 @@
<?php get_sidebar('comicright'); ?> <?php get_sidebar('comicright'); ?>
<div class="clear"></div> <div class="clear"></div>
<div id="comic-foot"><?php get_sidebar('under'); ?></div> <div id="comic-foot"><?php get_sidebar('under'); ?></div>
<?php } ?>
<?php } endwhile; ?> <?php } endwhile; ?>
<?php if (is_cp_theme_layout('3c,v')) { ?> <?php if (is_cp_theme_layout('3c,v')) { ?>
@ -48,21 +48,48 @@
</div> </div>
<?php } ?> <?php } ?>
<?php get_sidebar('blog'); ?> <?php get_sidebar('blog'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); <?php if (have_posts()) : while (have_posts()) : the_post();
if (in_comic_category()) { if (in_comic_category()) {
global $disable_comic_blog_frontpage; global $disable_comic_blog_frontpage;
if ($disable_comic_blog_frontpage != 'yes') { if ($disable_comic_blog_frontpage != 'yes') {
display_comic_post(); display_comic_post();
$cur_date = mysql2date('Y-m-j', $post->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 { } else {
display_blog_post(); display_blog_post();
} }
comments_template('', true); ?> endwhile;
<center> 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;
} ?>
<?php comments_template('', true); ?>
<?php get_sidebar('underblog'); ?> <?php get_sidebar('underblog'); ?>
</center> <?php else: ?>
<?php endwhile; else: ?>
<div class="<?php comicpress_post_class(); ?>"> <div class="<?php comicpress_post_class(); ?>">
<div class="post-head"></div> <div class="post-head"></div>
<div class="post"> <div class="post">
@ -71,9 +98,9 @@
</div> </div>
<div class="post-foot"></div> <div class="post-foot"></div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php get_sidebar('underblog'); ?>
</div> </div>
</div> </div>