-
-
+
+
@@ -166,7 +169,7 @@ function comicpress_display_post() {
-
+
'
'.__('Pages:','comicpress').' ', 'after' => '
', 'next_or_number' => 'number')); ?>
@@ -174,7 +177,7 @@ function comicpress_display_post() {
-
+
', ''); } ?>
diff --git a/functions/moods.php b/functions/moods.php
index 40d9f42..e2b2aa8 100644
--- a/functions/moods.php
+++ b/functions/moods.php
@@ -75,7 +75,7 @@ function comicpress_showmood_edit_post() {
$newmood = $newmood[0]; ?>
-
+
diff --git a/functions/relatedcomics.php b/functions/relatedcomics.php
deleted file mode 100644
index 523de6d..0000000
--- a/functions/relatedcomics.php
+++ /dev/null
@@ -1,73 +0,0 @@
- '5',
- ), $atts));
-
- global $wpdb, $post, $table_prefix, $category_tree;
-
- if ($post->ID) {
- // Get tags
- $tags = wp_get_post_tags($post->ID);
- $tagsarray = array();
- foreach ($tags as $tag) {
- $tagsarray[] = $tag->term_id;
- }
- $tagslist = implode(',', $tagsarray);
- if (empty($tagslist)) return;
- if (empty($limit)) $limit = 5;
- // Do the query
- $q = "SELECT p.*, count(tr.object_id) as count
- FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post->ID
- AND p.post_status = 'publish'
- AND p.post_date_gmt < NOW()
- GROUP BY tr.object_id
- ORDER BY count DESC, p.post_date_gmt DESC
- LIMIT $limit;";
-
- $related = $wpdb->get_results($q);
- if ( $related ) {
- $retval = '
-
- '.__('Related Comics ¬','comicpress');
- $retval .= '
-
';
- $comic_categories = array();
- foreach ($category_tree as $node) {
- $comic_categories[] = end(explode("/", $node));
- }
- $in_comic_cat = 0;
- $retval .= '
- ';
- foreach($related as $r) :
- if (count(array_intersect($comic_categories, wp_get_post_categories($r->ID))) > 0)
- $retval .= '
- '.date('M j, Y',strtotime($r->post_date)).' '.wptexturize($r->post_title).' ';
- endforeach;
- $retval .= '
-
';
- } else {
- $retval .= '
- '.__('No related comics found','comicpress').' ';
- }
- $retval .= '
- ';
- $retval .= '
-
';
- return $retval;
- }
- return;
-}
-// add_shortcode('related_comics', 'related_comics_shortcode');
-
-?>
-
-*/
diff --git a/functions/relatedposts.php b/functions/relatedposts.php
deleted file mode 100644
index 5fd179c..0000000
--- a/functions/relatedposts.php
+++ /dev/null
@@ -1,74 +0,0 @@
- '5',
- ), $atts));
-
- global $wpdb, $post, $table_prefix, $category_tree;
-
- if ($post->ID) {
- // Get tags
- $tags = wp_get_post_tags($post->ID);
- $tagsarray = array();
- foreach ($tags as $tag) {
- $tagsarray[] = $tag->term_id;
- }
- $tagslist = implode(',', $tagsarray);
- if (empty($tagslist)) return;
- if (empty($limit)) $limit = 5;
- // Do the query
- $q = "SELECT p.*, count(tr.object_id) as count
- FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post->ID
- AND p.post_status = 'publish'
- AND p.post_date_gmt < NOW()
- GROUP BY tr.object_id
- ORDER BY count DESC, p.post_date_gmt DESC
- LIMIT $limit;";
-
- $related = $wpdb->get_results($q);
-
- if ( $related ) {
- $retval = '
-
- '.__('Related Posts ¬','comicpress');
- $retval .= '
-
';
- $comic_categories = array();
- foreach ($category_tree as $node) {
- $comic_categories[] = end(explode("/", $node));
- }
- $in_comic_cat = 0;
- $counter = 0;
- $retval .= '
- ';
- foreach($related as $r) :
- if (count(array_intersect($comic_categories, wp_get_post_categories($r->ID))) == 0)
- $retval .= '
- '.date('M j, Y',strtotime($r->post_date)).' '.wptexturize($r->post_title).' ';
- endforeach;
- $retval .= '
-
';
- } else {
- $retval .= '
- '.__('No related posts found','comicpress').' ';
- }
- $retval .= '
- ';
- $retval .= '
-
';
- return $retval;
- }
- return;
-}
-
-// add_shortcode('related_posts', 'related_posts_shortcode');
-
-?>*/
diff --git a/functions/syndication.php b/functions/syndication.php
index c1b10cd..d6b76db 100644
--- a/functions/syndication.php
+++ b/functions/syndication.php
@@ -4,9 +4,62 @@
* Author: Philip M. Hofer (Frumph)
* In Testing
*/
+/*
+
+function cp_add_to_feed_count_rss() {
+ $feedcount = get_option('comicpress_feed_count_rss');
+ if (!empty($feedcount)) {
+ $feedcount = $feedcount + 1;
+ update_option('comicpress_feed_count_rss', $feedcount);
+ } else {
+ add_option('comicpress_feed_count_rss', 1, ' ', 'yes');
+ }
+}
+
+add_action('do_feed_rss', 'cp_add_to_feed_count_rss',5);
+
+
+function cp_add_to_feed_count_rdf() {
+ $feedcount = get_option('comicpress_feed_count_rdf');
+ if (!empty($feedcount)) {
+ $feedcount = $feedcount + 1;
+ update_option('comicpress_feed_count_rdf', $feedcount);
+ } else {
+ add_option('comicpress_feed_count_rdf', 1, ' ', 'yes');
+ }
+}
+
+add_action('do_feed_rdf', 'cp_add_to_feed_count_rdf',5);
+
+
+function cp_add_to_feed_count_atom() {
+ $feedcount = get_option('comicpress_feed_count_atom');
+ if (!empty($feedcount)) {
+ $feedcount = $feedcount + 1;
+ update_option('comicpress_feed_count_atom', $feedcount);
+ } else {
+ add_option('comicpress_feed_count_atom', 1, ' ', 'yes');
+ }
+}
+
+add_action('do_feed_atom', 'cp_add_to_feed_count_atom',5);
+
+function cp_add_to_feed_count_rss2() {
+ $feedcount = get_option('comicpress_feed_count_rss2');
+ if (!empty($feedcount)) {
+ $feedcount = $feedcount + 1;
+ update_option('comicpress_feed_count_rss2', $feedcount);
+ } else {
+ add_option('comicpress_feed_count_rss2', 1, ' ', 'yes');
+ }
+}
+
+add_action('do_feed_rss2', 'cp_add_to_feed_count_rss2',5);
+*/
/**
* Add the number of post comments to the title of the RSS feed items.
+ * TODO Make this togglable via options.
* @param string $title The title of the post.
* @return string The filtered title of the post.
*/
@@ -33,12 +86,8 @@ function comicpress_export_wp() {
remove_filter('the_title_rss', 'comicpress_the_title_rss');
}
-function comicpress_init_rss() {
- $comicpress_options = comicpress_load_options();
- if ($comicpress_options['disable_rss_comments_count']) {
- add_filter('the_title_rss', 'comicpress_the_title_rss');
- add_action('export_wp', 'comicpress_export_wp');
- }
+global $comicpress_options;
+if ($comicpress_options['enable_comment_count_in_rss']) {
+ add_filter('the_title_rss', 'comicpress_the_title_rss');
+ add_action('export_wp', 'comicpress_export_wp');
}
-
-add_action('init', 'comicpress_init_rss');
diff --git a/functions/wp-pagenavi.php b/functions/wp-pagenavi.php
index 4df41d0..d31852d 100644
--- a/functions/wp-pagenavi.php
+++ b/functions/wp-pagenavi.php
@@ -92,9 +92,15 @@ if ($comicpress_options['enable_numbered_pagination']) {
echo '
'.$pagenavi_options['dotleft_text'].' ';
}
}
- echo '
';
- previous_posts_link($pagenavi_options['prev_text']);
- echo ' ';
+ $prev_post_link = get_previous_posts_link( $pagenavi_options['prev_text'] );
+
+ if (!empty($prev_post_link)) {
+ echo "
\r\n";
+ echo $prev_post_link . "\r\n";
+ echo " \r\n";
+ }
+
+
for($i = $start_page; $i <= $end_page; $i++) {
if($i == $paged) {
$current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
@@ -104,9 +110,12 @@ if ($comicpress_options['enable_numbered_pagination']) {
echo '
'.$page_text.' ';
}
}
- echo '
';
- next_posts_link($pagenavi_options['next_text'], $max_page);
- echo ' ';
+ $next_post_link = get_next_posts_link($pagenavi_options['next_text'], $max_page);
+ if (!empty($next_post_link)) {
+ echo "
\r\n";
+ echo $next_post_link ."\r\n";
+ echo " \r\n";
+ }
if ($end_page < $max_page) {
if(!empty($pagenavi_options['dotright_text'])) {
echo '
'.$pagenavi_options['dotright_text'].' ';
diff --git a/header.php b/header.php
index 1dc18db..2bc4c56 100644
--- a/header.php
+++ b/header.php
@@ -23,39 +23,37 @@
+
-
+
+
+
>
-
-
-
-
-
+
+
-
-
+
+
-
-
diff --git a/index.php b/index.php
index 2208cd9..215fe06 100644
--- a/index.php
+++ b/index.php
@@ -12,7 +12,9 @@
endwhile;
}
Restore();
- UnProtect(); ?>
+ UnProtect();
+ wp_reset_query();
+?>
diff --git a/layout-head.php b/layout-head.php
index 7319426..f5d6685 100644
--- a/layout-head.php
+++ b/layout-head.php
@@ -14,14 +14,14 @@
-
+
-
+
@@ -41,23 +41,23 @@
- />
+ />
-
-
+
+
- />
+ />
-
+
-
+
@@ -91,34 +91,34 @@
-
+ ?>
-
-
+
+
selected="selected">
-
+
images/nav/ and place your image files inside of it and create a navstyle.css file to determine the style of your navigation display.','comicpress'); ?>
-
+
-
+
-
+
-
+
-
+
-
+
+
\ No newline at end of file
diff --git a/options/themestyle.php b/options/themestyle.php
index 4e2709a..97871ac 100644
--- a/options/themestyle.php
+++ b/options/themestyle.php
@@ -20,17 +20,34 @@
+
+
selected="selected" >
+
+
selected="selected" >
+
+
selected="selected" >
+
+
selected="selected" >
+
+
selected="selected" >
+
+
selected="selected" >
+
+
selected="selected" >
+
+
selected="selected" >
+
diff --git a/searchform.php b/searchform.php
index 0e1c6ae..8f1308a 100644
--- a/searchform.php
+++ b/searchform.php
@@ -1,4 +1,5 @@
+
+
\ No newline at end of file
diff --git a/sidebar-left.php b/sidebar-left.php
index a68c7e3..c2d20f1 100644
--- a/sidebar-left.php
+++ b/sidebar-left.php
@@ -7,7 +7,7 @@ if (!$comicpress_options['disable_lrsidebars_frontpage']) { ?>
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) :
if (!is_cp_theme_layout('standard,v')) {
the_widget('ComicPressCalendarWidget');
- the_widget('ComicPressArchiveDropdownWidget','mode=monthly_archive');
+ the_widget('ComicPressArchiveDropdownWidget', 'mode=storyline_order');
}
the_widget('ComicPressLatestComicsWidget');
endif;
diff --git a/sidebar-menubar.php b/sidebar-menubar.php
index 51d3bf5..c0c4789 100644
--- a/sidebar-menubar.php
+++ b/sidebar-menubar.php
@@ -1,6 +1,6 @@
'', 'after_widget'=>''));
}
?>
diff --git a/sidebar-right.php b/sidebar-right.php
index 65de015..51e252b 100644
--- a/sidebar-right.php
+++ b/sidebar-right.php
@@ -5,18 +5,15 @@ if (!$comicpress_options['disable_lrsidebars_frontpage']) { ?>
diff --git a/style.css b/style.css
index 541cc1c..b4a2939 100644
--- a/style.css
+++ b/style.css
@@ -859,6 +859,16 @@ ul.children {
padding: 3px;
}
+ .sidebar .ComicPressLatestThumbnailWidget h2 {
+ text-align: left;
+ }
+
+ .sidebar .ComicPressLatestThumbnailWidget {
+ text-align: center;
+ }
+
+
+
/* WIDGETS */
.random-comic-icon, .random-post-icon {
@@ -970,6 +980,7 @@ ul.children {
/* SEARCH */
#s-search, #s-transcript {
+ height: 15px;
width: 140px;
}
diff --git a/widgets/ComicBlogPostWidget.inc b/widgets/ComicBlogPostWidget.inc
index cfaccc3..a79e3ce 100644
--- a/widgets/ComicBlogPostWidget.inc
+++ b/widgets/ComicBlogPostWidget.inc
@@ -13,20 +13,42 @@ class ComicPressComicBlogPostWidget extends WP_Widget {
function ComicPressComicBlogPostWidget($skip_widget_init = false) {
if (!$skip_widget_init) {
- $widget_ops = array('classname' => __CLASS__, 'description' => __('Displays the comic blog post, ..used to be around the comic areas.','comicpress') );
+ $widget_ops = array('classname' => __CLASS__, 'description' => __('Displays the comic blog post. (used within the comic sidebar areas)','comicpress') );
$this->WP_Widget(__CLASS__, __('ComicPress Comic Blog Post','comicpress'), $widget_ops);
}
}
function widget($args, $instance) {
global $post, $wp_query;
- if ((is_home() || is_single()) && in_comic_category()) {
- extract($args, EXTR_SKIP);
+ if (!is_home() && $instance['onlyhome'] || (is_page() || is_archive() || is_search())) return;
+ extract($args, EXTR_SKIP);
+ if (is_home()) {
+ Protect();
+ $comic_query = 'showposts=1&cat='.get_all_comic_categories_as_cat_string();
+ $posts = query_posts($comic_query);
+ if (have_posts()) {
+ while (have_posts()) : the_post();
+ if (!empty($post->post_content)) {
+ echo $before_widget;
+ $temp_query = $wp_query->is_single;
+ $wp_query->is_single = true;
+ $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
+ if ( !empty( $title ) ) { echo "\r\n"; }
+ the_content();
+ $wp_query->is_single = $temp_query;
+ echo $after_widget;
+ }
+ endwhile;
+ }
+ Restore();
+ UnProtect();
+ wp_reset_query();
+ } else {
if (!empty($post->post_content)) {
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
- if ( !empty( $title ) ) { echo ''.$title.'
'; }
- echo $post->post_content;
+ if ( !empty( $title ) ) { echo "\r\n"; }
+ the_content();
echo $after_widget;
}
}
@@ -35,15 +57,17 @@ class ComicPressComicBlogPostWidget extends WP_Widget {
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
+ $instance['onlyhome'] = (bool)( $new_instance['onlyhome'] == 1 ? true : false );
return $instance;
}
function form($instance) {
- $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
+ $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'onlyhome' => false ) );
$title = strip_tags($instance['title']);
+ $onlyhome = $instance['onlyhome'];
?>
Heading:
-
+ /> Display only on the home page?
- post_content)) {
+ echo $before_widget;
+ $temp_query = $wp_query->is_single;
+ $wp_query->is_single = true;
+ foreach (array("archive", "rss", "mini", "comic") as $type) {
+ if (($requested_archive_image = get_comic_url($type, $post)) !== false) {
+ $archive_image = " ";
+ break;
+ }
+ }
+ if (function_exists('has_post_thumbnail')) {
+ if ( has_post_thumbnail($post->ID) ) {
+ $archive_image = get_the_post_thumbnail($post->ID,'full');
+ }
+ } ?>
+
+ is_single = $temp_query;
+ echo $after_widget;
}
- } ?>
-
-
-
-
- '' ) );
+ $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'onlyhome' => false ) );
$title = strip_tags($instance['title']);
+ $onlyhome = $instance['onlyhome'];
?>
- /> Display only on the home page?
+
-