clean up 2.8 - Core intergation issues

This commit is contained in:
John Bintz 2009-11-21 13:42:53 -05:00
parent 8dbb9d9a05
commit de637fdd99
5 changed files with 32 additions and 32 deletions

View File

@ -28,18 +28,18 @@ class ComicPressNavigation {
// global previous/next // global previous/next
foreach (array('previous', 'next') as $field) { foreach (array('previous', 'next') as $field) {
$nav[$field] = $this->_dbi->{"get_${field}_comic"}($categories, $post); $nav[$field] = $this->_dbi->{"get_${field}_post"}($categories, $post);
} }
// global first/last // global first/last
foreach (array('first', 'last') as $field) { foreach (array('first', 'last') as $field) {
$nav[$field] = $this->_dbi->{"get_${field}_comic"}($categories); $nav[$field] = $this->_dbi->{"get_${field}_post"}($categories);
} }
if ($category = $this->_storyline->get_valid_post_category($post->ID)) { if ($category = $this->_storyline->get_valid_post_category($post->ID)) {
// storyline previous/next // storyline previous/next
foreach (array('previous', 'next') as $field) { foreach (array('previous', 'next') as $field) {
$nav["storyline-${field}"] = $this->_dbi->{"get_${field}_comic"}($category, $post); $nav["storyline-${field}"] = $this->_dbi->{"get_${field}_post"}($category, $post);
} }
// adjacent storyline nodes // adjacent storyline nodes
@ -47,7 +47,7 @@ class ComicPressNavigation {
foreach ($valid as $field) { foreach ($valid as $field) {
$all_adjacents = $this->_storyline->all_adjacent($category, $field); $all_adjacents = $this->_storyline->all_adjacent($category, $field);
foreach ($all_adjacents as $adjacent_category) { foreach ($all_adjacents as $adjacent_category) {
$result = $this->_dbi->get_first_comic($adjacent_category); $result = $this->_dbi->get_first_post($adjacent_category);
if (!empty($result)) { if (!empty($result)) {
$nav["storyline-chapter-${field}"] = $result; break; $nav["storyline-chapter-${field}"] = $result; break;
} }

View File

@ -15,9 +15,13 @@ class ComicPressStoryline {
* Get the flattened storyline from options. * Get the flattened storyline from options.
*/ */
function get_flattened_storyline() { function get_flattened_storyline() {
$comicpress = &ComicPress::get_instance(); if (class_exists('ComicPress')) {
if (isset($comicpress->comicpress_options['storyline_order'])) { $comicpress = &ComicPress::get_instance();
return $comicpress->comicpress_options['storyline_order']; if (isset($comicpress->comicpress_options['storyline_order'])) {
return $comicpress->comicpress_options['storyline_order'];
}
} else {
return get_option("comicpress-storyline-category-order");
} }
return false; return false;
} }

View File

@ -2,22 +2,22 @@
//COMIC CATEGORY -the WordPress ID # of your comic category (default "3") //COMIC CATEGORY -the WordPress ID # of your comic category (default "3")
$comiccat = "3"; $comiccat = "3";
//BLOG CATEGORY - the WordPress ID of your blog category (default "1") //BLOG CATEGORY - the WordPress ID of your blog category (default "1")
$blogcat = "4"; $blogcat = "5";
//COMIC FOLDER - the folder your comics files are located in (default "comics") //COMIC FOLDER - the folder your comics files are located in (default "comics")
$comic_folder = "comics"; $comic_folder = "comics";
//RSS COMIC FOLDER - the folder your comic files are in for the RSS feed (default "comics") //RSS COMIC FOLDER - the folder your comic files are in for the RSS feed (default "comics")
$rss_comic_folder = "comics-rss"; $rss_comic_folder = "comics-rss";
//ARCHIVE COMIC FOLDER - the folder your comic files are in for your archive pages (default "comics") //ARCHIVE COMIC FOLDER - the folder your comic files are in for your archive pages (default "comics")
$archive_comic_folder = "comics-archive"; $archive_comic_folder = "comics-archive";
//ARCHIVE COMIC WIDTH - the width your comics will appear on archive or search results (default "380") //ARCHIVE COMIC WIDTH - the width your comics will appear on archive or search results (default "380")
$archive_comic_width = "380"; $archive_comic_width = "380";
//RSS COMIC WIDTH - ComicPress Manager plugin users only - the width your comics appear in the RSS feed (default "600"). //RSS COMIC WIDTH - ComicPress Manager plugin users only - the width your comics appear in the RSS feed (default "600").
$rss_comic_width = "600"; $rss_comic_width = "600";
@ -30,4 +30,4 @@ $mini_comic_width = "80";
//Minithumb Comic Folder - The folder for your your mini thumbs (default "comics-mini") //Minithumb Comic Folder - The folder for your your mini thumbs (default "comics-mini")
$mini_comic_folder = "comics-mini"; $mini_comic_folder = "comics-mini";
?> ?>

View File

@ -13,13 +13,12 @@
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<?php if (!(is_paged())) { ?> <?php if (!(is_paged())) { ?>
<?php if ($disable_comic_frontpage != 'yes') { ?> <?php if ($disable_comic_frontpage != 'yes') { ?>
<?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_child_file('partials/displaycomic') == false) { ?> <?php if (comicpress_check_child_file('partials/displaycomic') == false) { ?>
<div id="comic-wrap"> <div id="comic-wrap">
<div id="comic-head"><?php get_sidebar('over'); ?></div> <div id="comic-head"><?php get_sidebar('over'); ?></div>
@ -32,9 +31,9 @@
</div> </div>
<?php } ?> <?php } ?>
<?php endwhile; ?> <?php endwhile; ?>
<?php } ?> <?php } ?>
<?php } ?> <?php } ?>
<?php if (is_cp_theme_layout('3c,standard,3c2r')) { ?> <?php if (is_cp_theme_layout('3c,standard,3c2r')) { ?>
@ -57,14 +56,14 @@
</center> </center>
</div> </div>
<?php } <?php }
get_sidebar('blog'); get_sidebar('blog');
if ($disable_comic_frontpage != 'yes' && $disable_comic_blog_frontpage != 'yes' && !is_paged() ) { ?> if ($disable_comic_frontpage != 'yes' && $disable_comic_blog_frontpage != 'yes' && !is_paged() ) { ?>
<?php while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post(); <?php while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post();
display_comic_post(); display_comic_post();
$comicFrontPage->is_single = true; $comicFrontPage->is_single = true;
comments_template(); comments_template();
endwhile; ?> endwhile; ?>
<?php } ?> <?php } ?>
@ -74,18 +73,18 @@ if ($disable_comic_frontpage != 'yes' && $disable_comic_blog_frontpage != 'yes'
<?php if ($disable_blog_frontpage != 'yes') { <?php if ($disable_blog_frontpage != 'yes') {
global $blog_postcount; ?> global $blog_postcount; ?>
<?php <?php
if ($split_column_in_two != 'yes') { if ($split_column_in_two != 'yes') {
$blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&paged='.$paged; $blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
$posts = query_posts($blog_query); $posts = query_posts($blog_query);
if (have_posts()) { ?> if (have_posts()) { ?>
<div class="blogindex-head"></div> <div class="blogindex-head"></div>
<div class="blogindex"> <div class="blogindex">
<?php while (have_posts()) : the_post(); <?php while (have_posts()) : the_post();
display_blog_post(); display_blog_post();
endwhile; ?> endwhile; ?>
</div> </div>
<div class="blogindex-foot"></div> <div class="blogindex-foot"></div>

View File

@ -241,9 +241,6 @@ class WidgetComicPressGraphicalStorylineNavigation extends WP_Widget {
$storyline = new ComicPressStoryline(); $storyline = new ComicPressStoryline();
$storyline->create_structure(get_option('comicpress-storyline-category-order')); $storyline->create_structure(get_option('comicpress-storyline-category-order'));
$dbi = ComicPressDBInterface::get_instance();
$dbi->set_comic_categories($storyline->get_comic_categories());
$navigation = new ComicPressNavigation(); $navigation = new ComicPressNavigation();
$navigation->init($storyline); $navigation->init($storyline);
$post_nav = $navigation->get_post_nav($post); $post_nav = $navigation->get_post_nav($post);