bellboy (November 3rd, 2010)
<?php
$version = bnc_get_wp_version();
if ($version >= 2.9 && $wptouch_settings['post-cal-thumb'] != 'calendar-icons' && $wptouch_settings['post-cal-thumb'] != 'nothing-shown') { ?>
<div class="wptouch-post-thumb-wrap">
<div class="wptouch-post-thumb">
<?php
if (function_exists('p75GetThumbnail')) {
if ( p75HasThumbnail($post->ID) ) { ?>
<img src="<?php echo p75GetThumbnail($post->ID); ?>" alt="post thumbnail" />
<?php } else { ?>
<?php
$total = '24'; $file_type = '.jpg';
// Change to the location of the folder containing the images
$image_folder = '' . compat_get_plugin_url( 'wptouch' ) . '/themes/core/core-images/thumbs/';
$start = '1'; $random = mt_rand($start, $total); $image_name = $random . $file_type;
if ($wptouch_settings['post-cal-thumb'] == 'post-thumbnails-random') {
echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\" />";
} else {
echo '<img src="' . compat_get_plugin_url( 'wptouch' ) . '/themes/core/core-images/thumbs/thumb-empty.jpg" alt="thumbnail" />';
}
?>
<?php } ?>
<?php } elseif (get_post_custom_values('Thumbnail') == true || get_post_custom_values('thumbnail') == true) { ?>
<img src="<?php $custom_fields = get_post_custom($post_ID); $my_custom_field = $custom_fields['Thumbnail']; foreach ( $my_custom_field as $key => $value ) echo "$value"; ?>" alt="custom-thumbnail" />
<?php } elseif (function_exists('the_post_thumbnail') && !function_exists('p75GetThumbnail')) { ?>
<?php if (has_post_thumbnail()) { ?>
<?php the_post_thumbnail(); ?>
<?php } else { ?>
<?php
$total = '24'; $file_type = '.jpg';
// Change to the location of the folder containing the images
$image_folder = '' . compat_get_plugin_url( 'wptouch' ) . '/themes/core/core-images/thumbs/';
$start = '1'; $random = mt_rand($start, $total); $image_name = $random . $file_type;
if ($wptouch_settings['post-cal-thumb'] == 'post-thumbnails-random') {
echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\" />";
} else {
echo '<img src="' . compat_get_plugin_url( 'wptouch' ) . '/themes/core/core-images/thumbs/thumb-empty.jpg" alt="thumbnail" />';
}
?>
<?php } } ?>
</div>
</div>
<?php } elseif ($wptouch_settings['post-cal-thumb'] == 'calendar-icons') { ?>
<div class="calendar">
<div class="cal-month month-<?php echo get_the_time('m') ?>"><?php echo get_the_time('M') ?></div>
<div class="cal-date"><?php echo get_the_time('j') ?></div>
</div>
<?php } elseif ($wptouch_settings['post-cal-thumb'] == 'nothing-shown') { } else { ?>
<div class="calendar">
<div class="cal-month month-<?php echo get_the_time('m') ?>"><?php echo get_the_time('M') ?></div>
<div class="cal-date"><?php echo get_the_time('j') ?></div>
</div>
<?php } ?>
bellboy (November 3rd, 2010)
There are currently 2 users browsing this thread. (0 members and 2 guests)