2009-08-21 19:29:45 +00:00
|
|
|
<?php
|
2009-12-22 22:20:11 +00:00
|
|
|
|
new function comicpress_display_comic_image() which you can pass a string "archive,rss,mini,comic" whatever order you want to try first, as well as can pass boolean use thumbnail which will check if the post has a thumbnail image if so use that and bypass the other thumbs
echo comicpress_display_comic_image("rss,comic", true);
is a valid usage, will check if there's a thumbnail for the post and use that, otherwise check the rss directory for an image, if can't find that, default to the comic directory.
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
2010-01-02 18:49:59 +00:00
|
|
|
function comicpress_display_comic_image($searchorder = "comic",$use_post_image = false) {
|
|
|
|
global $post;
|
|
|
|
if ($use_post_image) {
|
|
|
|
if (function_exists('has_post_thumbnail')) {
|
|
|
|
if ( has_post_thumbnail($post->ID) ) {
|
|
|
|
$comic_image = get_the_post_thumbnail($post->ID,'full');
|
2010-01-02 19:58:26 +00:00
|
|
|
$comic_image = preg_replace('#title="([^*]*)"#', 'title="'.the_hovertext().'"', $comic_image);
|
new function comicpress_display_comic_image() which you can pass a string "archive,rss,mini,comic" whatever order you want to try first, as well as can pass boolean use thumbnail which will check if the post has a thumbnail image if so use that and bypass the other thumbs
echo comicpress_display_comic_image("rss,comic", true);
is a valid usage, will check if there's a thumbnail for the post and use that, otherwise check the rss directory for an image, if can't find that, default to the comic directory.
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
2010-01-02 18:49:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!isset($comic_image)) {
|
|
|
|
$searchorder = explode(',',$searchorder);
|
|
|
|
$requested_archive_image = '';
|
|
|
|
foreach ($searchorder as $type) {
|
|
|
|
if (($requested_archive_image = get_comic_url($type, $post)) !== false) {
|
2010-01-02 19:58:26 +00:00
|
|
|
$comic_image = "<img src=\"$requested_archive_image\" alt=\"".get_the_title()."\" title=\"".the_hovertext()."\" />";
|
new function comicpress_display_comic_image() which you can pass a string "archive,rss,mini,comic" whatever order you want to try first, as well as can pass boolean use thumbnail which will check if the post has a thumbnail image if so use that and bypass the other thumbs
echo comicpress_display_comic_image("rss,comic", true);
is a valid usage, will check if there's a thumbnail for the post and use that, otherwise check the rss directory for an image, if can't find that, default to the comic directory.
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
2010-01-02 18:49:59 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return apply_filters('comicpress_display_comic_image',$comic_image);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function comicpress_display_comic_area() {
|
2009-12-25 06:06:20 +00:00
|
|
|
global $post, $wp_query, $comicpress_options;
|
2009-12-22 22:20:11 +00:00
|
|
|
if (comicpress_check_child_file('partials/displaycomic') == false) { ?>
|
|
|
|
<div id="comic-wrap">
|
|
|
|
<div id="comic-head"><?php get_sidebar('over'); ?></div>
|
|
|
|
<div class="clear"></div>
|
|
|
|
<?php get_sidebar('comicleft'); ?>
|
new function comicpress_display_comic_image() which you can pass a string "archive,rss,mini,comic" whatever order you want to try first, as well as can pass boolean use thumbnail which will check if the post has a thumbnail image if so use that and bypass the other thumbs
echo comicpress_display_comic_image("rss,comic", true);
is a valid usage, will check if there's a thumbnail for the post and use that, otherwise check the rss directory for an image, if can't find that, default to the comic directory.
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
2010-01-02 18:49:59 +00:00
|
|
|
<div id="comic"><?php comicpress_display_comic(); ?></div>
|
2009-12-22 22:20:11 +00:00
|
|
|
<?php get_sidebar('comicright'); ?>
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div id="comic-foot"><?php get_sidebar('under'); ?></div>
|
|
|
|
</div>
|
|
|
|
<?php }
|
|
|
|
}
|
2009-08-21 19:29:45 +00:00
|
|
|
|
new function comicpress_display_comic_image() which you can pass a string "archive,rss,mini,comic" whatever order you want to try first, as well as can pass boolean use thumbnail which will check if the post has a thumbnail image if so use that and bypass the other thumbs
echo comicpress_display_comic_image("rss,comic", true);
is a valid usage, will check if there's a thumbnail for the post and use that, otherwise check the rss directory for an image, if can't find that, default to the comic directory.
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
2010-01-02 18:49:59 +00:00
|
|
|
function comicpress_display_comic() {
|
2009-11-22 18:06:19 +00:00
|
|
|
global $post, $wp_query, $rascal_says, $comicpress_options, $comic_filename_filters;
|
2009-08-21 19:29:45 +00:00
|
|
|
$next_comic = get_next_comic_permalink();
|
|
|
|
$comic = explode(".", the_comic_filename());
|
|
|
|
if ($comic[1] == 'swf') { ?>
|
2009-08-31 07:47:03 +00:00
|
|
|
<?php
|
|
|
|
$height = get_post_meta( get_the_ID(), "fheight", true );
|
|
|
|
$width = get_post_meta( get_the_ID(), "fwidth", true );
|
|
|
|
if (empty($height)) $height = '300';
|
|
|
|
if (empty($width)) $width = '100%';
|
|
|
|
?>
|
|
|
|
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?php echo $width; ?>" height="<?php echo $height; ?>">
|
|
|
|
<param name="movie" value="<?php echo get_comic_url(); ?>" />
|
2009-09-04 15:39:27 +00:00
|
|
|
<!--[if !IE]>--><object type="application/x-shockwave-flash" data="<?php echo get_comic_url(); ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>"><!--<![endif]-->
|
2009-08-21 19:29:45 +00:00
|
|
|
<div>
|
|
|
|
<h1>Get Flash!</h1>
|
|
|
|
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
|
|
|
|
</div>
|
2009-09-04 15:39:27 +00:00
|
|
|
<!--[if !IE]>--></object><!--<![endif]--></object>
|
2009-08-21 19:29:45 +00:00
|
|
|
<?php } else {
|
2009-11-22 18:06:19 +00:00
|
|
|
if ($comicpress_options['comic_clicks_next']) {
|
2009-08-21 19:29:45 +00:00
|
|
|
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
|
2009-11-22 18:06:19 +00:00
|
|
|
if ($comicpress_options['rascal_says'] && !empty($hovertext)) { ?>
|
2009-08-22 23:26:25 +00:00
|
|
|
<a href="<?php echo $next_comic; ?>" class="tt"><span class="tooltip"><span class="top"></span><span class="middle"><?php the_hovertext() ?></span><span class="bottom"></span></span><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_title(); ?>" /></a>
|
2009-08-21 19:29:45 +00:00
|
|
|
<?php } else { ?>
|
|
|
|
<a href="<?php echo $next_comic; ?>"><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a>
|
|
|
|
<?php } ?>
|
|
|
|
<?php } else {
|
|
|
|
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
|
2009-11-22 18:06:19 +00:00
|
|
|
if ($comicpress_options['rascal_says'] && !empty($hovertext)) { ?>
|
2009-08-22 23:26:25 +00:00
|
|
|
<a href="#" class="tt"><span class="tooltip"><span class="top"></span><span class="middle"><?php the_hovertext() ?></span><span class="bottom"></span></span><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_title(); ?>" /></a>
|
2009-08-21 19:29:45 +00:00
|
|
|
<?php } else { ?>
|
2009-11-02 12:23:41 +00:00
|
|
|
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" class="instant itiltleft icolorFFFCE9 ishadow40 historical" />
|
2009-08-21 19:29:45 +00:00
|
|
|
<?php }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-08-21 17:45:23 +00:00
|
|
|
?>
|