Adjusting post-images for archive and search on media files

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2010-01-07 01:58:44 -08:00
parent 99a8586e01
commit add5e68dc9
2 changed files with 5 additions and 4 deletions

View File

@ -19,7 +19,8 @@ function comicpress_display_comic_image($searchorder = "comic", $use_post_image
global $post;
$post_to_use = !is_null($override_post) ? $override_post : $post;
$title_to_use = !is_null($title) ? $title : the_hovertext($post_to_use);
if ($use_post_image) {
$comic = explode(".", the_comic_filename());
if ($use_post_image || strtolower($comic[1]) == 'swf') {
if (function_exists('has_post_thumbnail')) {
if ( has_post_thumbnail($post_to_use->ID) ) {
$comic_image = get_the_post_thumbnail($post_to_use->ID,'full');
@ -29,7 +30,7 @@ function comicpress_display_comic_image($searchorder = "comic", $use_post_image
}
if (!isset($comic_image)) {
$comic = explode(".", the_comic_filename());
if ($comic[1] == 'swf') {
if (strtolower($comic[1]) == 'swf') {
$comic_image = "<img src=\"".get_template_directory_uri().'/images/mediafile.png'."\" alt=\"{$title_to_use}\" />";
}
}

View File

@ -128,7 +128,7 @@ function comicpress_display_the_content($is_comic = false) {
if (is_archive() || is_search()) {
if ($is_comic) { ?>
<div class="comicarchiveframe">
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="Click for full size." /></a>
<a href="<?php the_permalink() ?>"><?php echo comicpress_display_comic_image("archive,rss,comic", true); ?></a>
</div>
<?php }
if ($comicpress_options['excerpt_or_content_archive'] != 'excerpt') {