Random Comic on frontpage doesnt work too well, just removing it.

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2010-01-18 18:06:38 -08:00
parent ba43d0b07b
commit 1f7702ac6c
5 changed files with 3 additions and 23 deletions

View File

@ -80,7 +80,6 @@ function comicpress_admin() {
'disable_comic_blog_frontpage', 'disable_comic_blog_frontpage',
'disable_comic_blog_single', 'disable_comic_blog_single',
'disable_blog_frontpage', 'disable_blog_frontpage',
'enable_random_comic_frontpage'
) as $key) { ) as $key) {
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false ); $comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
} }

View File

@ -144,7 +144,6 @@ function comicpress_load_options() {
'cp_theme_layout' => 'standard', 'cp_theme_layout' => 'standard',
'transcript_in_posts' => false, 'transcript_in_posts' => false,
'enable_widgetarea_use_sidebar_css' => false, 'enable_widgetarea_use_sidebar_css' => false,
'enable_random_comic_frontpage' => false,
'enable_custom_image_header' => false, 'enable_custom_image_header' => false,
'custom_image_header_width' => '980', 'custom_image_header_width' => '980',

View File

@ -3,13 +3,8 @@
<?php if (!$comicpress_options['disable_comic_frontpage'] && !$comicpress_options['disable_comic_blog_frontpage'] && !is_paged() ) { <?php if (!$comicpress_options['disable_comic_frontpage'] && !$comicpress_options['disable_comic_blog_frontpage'] && !is_paged() ) {
Protect(); Protect();
global $frontpage_postnum; $comic_query = '&showposts=1&cat='.get_all_comic_categories_as_cat_string();
if (isset($frontpage_postnum)) { $posts = query_posts($comic_query);
$post = & get_post( $frontpage_postnum );
} else {
$comic_query = '&showposts=1&cat='.get_all_comic_categories_as_cat_string();
$posts = query_posts($comic_query);
}
$wp_query->is_archive = false; $wp_query->is_archive = false;
if (have_posts()) { if (have_posts()) {
comicpress_display_post(); comicpress_display_post();

View File

@ -22,11 +22,7 @@
<?php <?php
if (!$comicpress_options['disable_comic_frontpage'] && is_home()) { if (!$comicpress_options['disable_comic_frontpage'] && is_home()) {
Protect(); Protect();
if ($comicpress_options['enable_random_comic_frontpage'] && is_home()) { $comic_query = 'showposts=1&cat='.get_all_comic_categories_as_cat_string();
$comic_query = 'showposts=1&orderby=rand&cat='.get_all_comic_categories_as_cat_string();
} else {
$comic_query = 'showposts=1&cat='.get_all_comic_categories_as_cat_string();
}
$posts = query_posts($comic_query); $posts = query_posts($comic_query);
if (have_posts()) { if (have_posts()) {
while (have_posts()) : the_post(); while (have_posts()) : the_post();

View File

@ -64,15 +64,6 @@
<?php _e('Checkmark this and the blog portion of the comic will not display on the single/archive pages of your site.','comicpress'); ?> <?php _e('Checkmark this and the blog portion of the comic will not display on the single/archive pages of your site.','comicpress'); ?>
</td> </td>
</tr> </tr>
<tr>
<th scope="row"><label for="enable_random_comic_frontpage"><?php _e('Have it so that the index/front page shows a random comic each pageload?','comicpress'); ?></label></th>
<td>
<input id="enable_random_comic_frontpage" name="enable_random_comic_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_random_comic_frontpage']); ?> />
</td>
<td>
<?php _e('When this is checkmarked, the front page will display a random comic from the archive.','comicpress'); ?>
</td>
</tr>
</table> </table>
</div> </div>