more display_post functions, .pagetitle is moving to .page-title (references both in the style.css atm, but pages use .page-title now)

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-12-24 07:20:21 -08:00
parent 45418a90d1
commit 8f76c62ada
4 changed files with 108 additions and 131 deletions

View File

@ -21,49 +21,24 @@ function display_blog_post() {
<div class="post-text"> <div class="post-text">
<?php comicpress_display_post_title(); ?> <?php comicpress_display_post_title(); ?>
<?php comicpress_display_post_author(); ?> <?php comicpress_display_post_author(); ?>
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?> <?php comicpress_display_post_category(); ?>
<div class="post-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div>
<?php } ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?> <?php if(function_exists('the_ratings')) { the_ratings(); } ?>
<?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div class="entry"> <div class="entry">
<?php comicpress_display_the_content(); ?>
<?php <div class="clear"></div>
if (is_archive() || is_search()) {
if ($comicpress_options['excerpt_or_content_archive'] != 'excerpt') {
the_content(__('&darr; Read the rest of this entry...','comicpress'));
} else {
the_excerpt();
}
} else {
if (!is_single()) { global $more; $more = 0; }
the_content(__('&darr; Read the rest of this entry...','comicpress'));
if (is_single()) wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number'));
}
?>
<div class="clear"></div>
</div>
<div class="post-extras">
<?php if (!$comicpress_options['disable_tags_in_posts']) { ?>
<div class="post-tags">
<?php the_tags(__('&#9492; Tags: ','comicpress'), ', ', '<br />'); ?>
</div> </div>
<?php } ?> <div class="post-extras">
<?php <?php comicpress_display_post_tags(); ?>
if ('open' == $post->comment_status) { <?php comicpress_display_comment_link(); ?>
if (comicpress_check_child_file('partials/commentlink') == false && !is_single()) { ?> <div class="clear"></div>
<div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty">&nbsp;</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">1</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">%</span> '.__('Comments ','comicpress')); ?></div> <?php if ($comicpress_options['enable_related_posts']) echo ComicPressRelatedPosts::display_related_posts(); ?>
<?php } </div>
}
?>
<div class="clear"></div>
<?php if ($comicpress_options['enable_related_posts']) echo ComicPressRelatedPosts::display_related_posts(); ?>
</div> </div>
</div> <div class="post-foot"></div>
<div class="post-foot"></div>
</div> </div>
<?php <?php
} }

View File

@ -19,7 +19,7 @@ function display_comic_post($frontpage = 0) {
<div class="nav-next"><?php next_comic_link('%link', __('Next &rsaquo;','comicpress')) ?></div> <div class="nav-next"><?php next_comic_link('%link', __('Next &rsaquo;','comicpress')) ?></div>
<?php if ( get_permalink() != $last_comic ) { ?><div class="nav-last"><a href="<?php echo $last_comic ?>"><?php _e('Last &rsaquo;&rsaquo;','comicpress'); ?></a></div><?php } ?> <?php if ( get_permalink() != $last_comic ) { ?><div class="nav-last"><a href="<?php echo $last_comic ?>"><?php _e('Last &rsaquo;&rsaquo;','comicpress'); ?></a></div><?php } ?>
</div> </div>
<br class="clear-margins"> <br class="clear-margins" />
<?php } <?php }
} ?> } ?>
@ -28,57 +28,28 @@ function display_comic_post($frontpage = 0) {
<div class="post-comic-head"></div> <div class="post-comic-head"></div>
<div class="post-comic" id="post-comic-<?php the_ID() ?>"> <div class="post-comic" id="post-comic-<?php the_ID() ?>">
<div class="post-comic-info"> <div class="post-comic-info">
<?php if ($comicpress_options['enable_comic_post_author_gravatar']) { ?> <?php comicpress_display_author_gravatar(); ?>
<div class="post-comic-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div> <?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php } ?> <?php comicpress_display_post_calendar(); ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?> <div class="post-comic-text">
<?php if ($comicpress_options['enable_comic_post_calendar']) { ?> <?php comicpress_display_post_title(); ?>
<div class="post-comic-date"> <?php comicpress_display_post_author(); ?>
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div> <?php comicpress_display_post_category(); ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
</div> </div>
<?php } ?> </div>
<div class="post-comic-text"> <div class="entry">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php comicpress_display_the_content(); ?>
<div class="post-comic-author"> <?php the_time('F jS, Y'); ?> <span class="pipe">|</span> by <?php the_author_posts_link(); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></div> <div class="clear"></div>
<?php if (get_option('comicpress-enable-storyline-support') == 1) { ?> </div>
<ul class="storyline-cats"><li class="storyline-root"><?php the_category(' &raquo; </li><li>', multiple) ?></li></ul> <div class="post-comic-extras">
<?php } else { ?> <?php comicpress_display_post_tags(); ?>
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?> <?php comicpress_display_comment_link(); ?>
<div class="post-comic-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div> <div class="clear"></div>
<?php } ?> <?php if ($comicpress_options['enable_related_comics']) echo ComicPressRelatedPosts::display_related_comics(); ?>
<?php } ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
</div> </div>
</div> </div>
<div class="entry"> <div class="post-comic-foot"></div>
<?php if (is_archive() || is_search()) { ?>
<div class="comicarchiveframe">
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="Click for full size." /></a>
</div>
<?php }
if (!is_single()) { global $more; $more = 0; }
the_content(__('&darr; Read the rest of this entry...','comicpress'));
if (is_single()) wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
<div class="clear"></div>
</div>
<div class="post-comic-extras">
<?php if (!$comicpress_options['disable_tags_in_posts']) { ?>
<div class="post-comic-tags">
<?php the_tags(__('&#9492; Tags: ','comicpress'), ', ', '<br />'); ?>
</div>
<?php } ?>
<?php
if ('open' == $post->comment_status && !$comicpress_options['static_blog'] && !is_single()) {
if (comicpress_check_child_file('partials/commentlink') == false) { ?>
<div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty">&nbsp;</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">1</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">%</span> '.__('Comments ','comicpress')); ?></div>
<?php }
}
?>
<div class="clear"></div>
<?php if ($comicpress_options['enable_related_comics']) echo ComicPressRelatedPosts::display_related_comics(); ?>
</div>
</div>
<div class="post-comic-foot"></div>
</div> </div>
<?php <?php
} }

View File

@ -2,10 +2,14 @@
function comicpress_display_post_title() { function comicpress_display_post_title() {
global $post, $wp_query; global $post, $wp_query;
$post_title = "<h2 class=\"post-title\">"; if (is_page()) {
if (is_home() || is_search() || is_archive()) $post_title .= "<a href=\"".get_permalink()."\">"; $post_title = "<h2 class=\"page-title\">";
} else {
$post_title = "<h2 class=\"post-title\">";
}
if (is_home() || is_search() || is_archive() || in_comic_category() && !is_page()) $post_title .= "<a href=\"".get_permalink()."\">";
$post_title .= get_the_title(); $post_title .= get_the_title();
if (is_home() || is_search() || is_archive()) $post_title .= "</a>"; if (is_home() || is_search() || is_archive() || in_comic_category() && !is_page()) $post_title .= "</a>";
$post_title .= "</h2>\r\n"; $post_title .= "</h2>\r\n";
echo apply_filters('comicpress_display_post_title',$post_title); echo apply_filters('comicpress_display_post_title',$post_title);
} }
@ -21,17 +25,17 @@ function comicpress_display_post_thumbnail() {
} }
function comicpress_display_author_gravatar() { function comicpress_display_author_gravatar() {
global $post, $comicpress_options; global $post, $wp_query, $comicpress_options;
if ($comicpress_options['enable_post_author_gravatar'] && (is_home() || is_single())) { if ((!in_comic_category() && $comicpress_options['enable_post_author_gravatar']) || (in_comic_category() && $comicpress_options['enable_comic_post_author_gravatar']) && !is_page()) {
$author_get_gravatar = str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); $author_get_gravatar = str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64));
$author_gravatar = "<div class=\"post-author-gravatar\">".$author_get_gravatar."</div>"; $author_gravatar = "<div class=\"post-author-gravatar\">".$author_get_gravatar."</div>\r\n";
echo apply_filters('comicpress_display_author_gravatar', $author_gravatar); echo apply_filters('comicpress_display_author_gravatar', $author_gravatar);
} }
} }
function comicpress_display_post_calendar() { function comicpress_display_post_calendar() {
global $post, $comicpress_options; global $post, $wp_query, $comicpress_options;
if ($comicpress_options['enable_post_calendar']) { if ((!in_comic_category() && $comicpress_options['enable_post_calendar']) || (in_comic_category() && $comicpress_options['enable_comic_post_calendar']) && !is_page()) {
$post_calendar = "<div class=\"post-calendar-date\"><div class=\"calendar-date\"><span>".get_the_time('M')."</span>".get_the_time('d')."</div></div>\r\n"; $post_calendar = "<div class=\"post-calendar-date\"><div class=\"calendar-date\"><span>".get_the_time('M')."</span>".get_the_time('d')."</div></div>\r\n";
echo apply_filters('comicpress_display_post_calendar',$post_calendar); echo apply_filters('comicpress_display_post_calendar',$post_calendar);
} }
@ -39,10 +43,40 @@ function comicpress_display_post_calendar() {
function comicpress_display_post_author() { function comicpress_display_post_author() {
global $post; global $post;
$post_author = "<div class=\"post-author\"><span class=\"post-date\">".get_the_time('F jS, Y')."</span> <span class=\"pipe\">|</span> by ".get_the_author_meta('display_name')."</div>"; $post_author = "<div class=\"post-author\"><span class=\"post-date\">".get_the_time('F jS, Y')."</span> <span class=\"pipe\">|</span> ".__(' by ','comicpress'). get_the_author_meta('display_name')."</div>\r\n";
echo apply_filters('comicpress_display_post_author',$post_author); echo apply_filters('comicpress_display_post_author',$post_author);
} }
function comicpress_display_post_category() {
global $post, $wp_query, $comicpress_options;
if (!$comicpress_options['disable_categories_in_posts']) {
if (get_option('comicpress-enable-storyline-support') == 1 && in_comic_category()) {
$post_category = "<ul class=\"storyline-cats\"><li class=\"storyline-root\">". get_the_category_list(' &raquo; </li><li>', multiple)."</li></ul>\r\n";
} else {
$post_category = "<div class=\"post-cat\">". __('Posted In: ','comicpress') .get_the_category_list(',')."</div>\r\n";
}
echo apply_filters('comicpress_display_post_category',$post_category);
}
}
function comicpress_display_post_tags() {
global $post, $comicpress_options;
if (!$comicpress_options['disable_tags_in_posts']) {
$post_tags = "<div class=\"post-tags\">".get_the_tag_list(__('&#9492; Tags: ','comicpress'), ', ', '<br />')."</div>\r\n";
echo apply_filters('comicpress_display_post_tags',$post_tags);
}
}
function comicpress_display_comment_link() {
global $post, $comicpress_option;
if ('open' == $post->comment_status) {
if (comicpress_check_child_file('partials/commentlink') == false && !is_single()) {
$post_comment_link = "<div class=\"comment-link\">".get_comment_reply_link('<span class="comment-balloon comment-balloon-empty">&nbsp;</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">1</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">%</span> '.__('Comments ','comicpress'))."</div>\r\n";
apply_filters('comicpress_display_comment_link',$post_comment_link);
}
}
}
function comicpress_display_blog_navigation() { function comicpress_display_blog_navigation() {
global $post, $wp_query; global $post, $wp_query;
if (is_single() && !in_comic_category()) { ?> if (is_single() && !in_comic_category()) { ?>
@ -55,7 +89,27 @@ function comicpress_display_blog_navigation() {
<div class="clear"></div> <div class="clear"></div>
<?php } <?php }
} }
function comicpress_display_the_content() {
global $post, $wp_query, $comicpress_options;
if (is_archive() || is_search()) {
if (in_comic_category()) { ?>
<div class="comicarchiveframe">
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="Click for full size." /></a>
</div>
<?php }
if ($comicpress_options['excerpt_or_content_archive'] != 'excerpt') {
the_content(__('&darr; Read the rest of this entry...','comicpress'));
} else {
the_excerpt();
}
} else {
if (!is_single()) { global $more; $more = 0; }
the_content(__('&darr; Read the rest of this entry...','comicpress'));
if (is_single()) wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number'));
}
}
function comicpress_display_post() { function comicpress_display_post() {
global $post, $wp_query; ?> global $post, $wp_query; ?>
@ -67,49 +121,28 @@ function comicpress_display_post() {
<div class="post-info"> <div class="post-info">
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?> <?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<div class="post-text"> <div class="post-text">
<?php comicpress_display_post_title(); ?> <?php
<?php if (!is_page()) { ?> comicpress_display_post_title();
<div class="post-author"> <?php the_time('F jS, Y'); ?> <span class="pipe">|</span> by <?php the_author_posts_link(); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></div> if (!is_page()) {
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?> comicpress_display_post_author();
<div class="post-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div> comicpress_display_post_category();
<?php } ?> if (function_exists('the_ratings')) { the_ratings(); }
<?php if(function_exists('the_ratings')) { the_ratings(); } ?> edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] ');
<?php } ?> }
?>
</div> </div>
<?php comicpress_display_author_gravatar(); ?> <?php comicpress_display_author_gravatar(); ?>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="entry"> <div class="entry">
<?php <?php comicpress_display_the_content(); ?>
if (is_archive() || is_search()) {
if ($comicpress_options['excerpt_or_content_archive'] != 'excerpt') {
the_content(__('&darr; Read the rest of this entry...','comicpress'));
} else {
the_excerpt();
}
} else {
if (!is_single()) { global $more; $more = 0; }
the_content(__('&darr; Read the rest of this entry...','comicpress'));
if (is_single()) wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number'));
}
?>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>
<?php wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">'.__('Pages:','comicpress').'</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?> <?php wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">'.__('Pages:','comicpress').'</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
</div> </div>
<div class="post-extras"> <div class="post-extras">
<?php if (!$comicpress_options['disable_tags_in_posts']) { ?> <?php comicpress_display_post_tags(); ?>
<div class="post-tags"> <?php comicpress_display_comment_link(); ?>
<?php the_tags(__('&#9492; Tags: ','comicpress'), ', ', '<br />'); ?>
</div>
<?php } ?>
<?php
if ('open' == $post->comment_status) {
if (comicpress_check_child_file('partials/commentlink') == false && !is_single()) { ?>
<div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty">&nbsp;</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">1</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">%</span> '.__('Comments ','comicpress')); ?></div>
<?php }
}
?>
<div class="clear"></div> <div class="clear"></div>
<?php if ($comicpress_options['enable_related_posts']) echo ComicPressRelatedPosts::display_related_posts(); ?> <?php if ($comicpress_options['enable_related_posts']) echo ComicPressRelatedPosts::display_related_posts(); ?>
</div> </div>
@ -124,9 +157,7 @@ function comicpress_display_page_post() {
<?php comicpress_display_post_thumbnail(); ?> <?php comicpress_display_post_thumbnail(); ?>
<div class="post-page-head"></div> <div class="post-page-head"></div>
<div class="post-page"> <div class="post-page">
<?php if (!$comicpress_options['disable_page_titles']) { ?> <?php comicpress_display_post_title(); ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<div class="entry"> <div class="entry">
<?php the_content(); ?> <?php the_content(); ?>
</div> </div>

View File

@ -122,7 +122,7 @@ h2, h2 a {
letter-spacing: -1px; letter-spacing: -1px;
} }
h2.pagetitle, h2.pagetitle a { h2.pagetitle, h2.pagetitle a, h2.page-title, h2.page-title a {
padding: 0 0 5px 0; padding: 0 0 5px 0;
margin-top: 10px; margin-top: 10px;
font-size: 28px; font-size: 28px;