.post-date .date are now .post-calendar-date and .calendar-date (cause its for the graphic calendar) .post-date is now for the full date in the post under the title, new functions comicpress_display_post_calendar() and comicpress_disdplay_post_author() with associating filters for both.

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-12-24 06:09:34 -08:00
parent 40da7b3935
commit 45418a90d1
3 changed files with 36 additions and 23 deletions

View File

@ -15,22 +15,17 @@ function display_blog_post() {
<div class="post-head"></div> <div class="post-head"></div>
<div class="post" id="post-<?php the_ID() ?>"> <div class="post" id="post-<?php the_ID() ?>">
<div class="post-info"> <div class="post-info">
<?php if ($comicpress_options['enable_post_author_gravatar']) { ?> <?php comicpress_display_author_gravatar(); ?>
<div class="post-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 } ?>
<?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(); ?>
<?php if ($comicpress_options['enable_post_calendar']) { ?> <?php comicpress_display_post_calendar(); ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<?php } ?>
<div class="post-text"> <div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php 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> <?php comicpress_display_post_author(); ?>
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?> <?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
<div class="post-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div> <div class="post-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div>
<?php } ?> <?php } ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?> <?php if(function_exists('the_ratings')) { the_ratings(); } ?>
<?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View File

@ -1,8 +1,12 @@
<?php <?php
function comicpress_display_post_title() { function comicpress_display_post_title() {
global $post; global $post, $wp_query;
$post_title = "<h2 class=\"post-title\"><a href=\"".get_permalink()."\">".get_the_title() ."</a></h2>\r\n"; $post_title = "<h2 class=\"post-title\">";
if (is_home() || is_search() || is_archive()) $post_title .= "<a href=\"".get_permalink()."\">";
$post_title .= get_the_title();
if (is_home() || is_search() || is_archive()) $post_title .= "</a>";
$post_title .= "</h2>\r\n";
echo apply_filters('comicpress_display_post_title',$post_title); echo apply_filters('comicpress_display_post_title',$post_title);
} }
@ -25,6 +29,20 @@ function comicpress_display_author_gravatar() {
} }
} }
function comicpress_display_post_calendar() {
global $post, $comicpress_options;
if ($comicpress_options['enable_post_calendar']) {
$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);
}
}
function comicpress_display_post_author() {
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>";
echo apply_filters('comicpress_display_post_author',$post_author);
}
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()) { ?>

View File

@ -509,7 +509,7 @@ h4, h4 a {
margin-right: 2px; margin-right: 2px;
} }
.post-date, .post-comic-date { .post-calendar-date, .post-comic-calendar-date {
color: #777; color: #777;
font-family: 'Georgia' , serif; font-family: 'Georgia' , serif;
font-size: 15px; font-size: 15px;
@ -518,7 +518,7 @@ h4, h4 a {
margin-right: 3px; margin-right: 3px;
} }
.post-date .date, .post-comic-date .date { .post-calendar-date .calendar-date, .post-comic-calendar-date .calendar-date {
height: 50px; height: 50px;
width: 45px; width: 45px;
background: url(images/calendar.png) center no-repeat; background: url(images/calendar.png) center no-repeat;
@ -532,7 +532,7 @@ h4, h4 a {
} }
.post-date .date span, .post-comic-date .date span { .post-calendar-date .calendar-date span, .post-comic-calendar-date .calendar-date span {
height: 16px; height: 16px;
padding: 1px 0 4px 0; padding: 1px 0 4px 0;
display: block; display: block;