Mrs Andrea
As you wrote my theme use timthumb and I have been trying to modify it with the codes you showed me, without any result!!!
In my theme(comfy) I have builtin-function which has two codes aboat thumb as folow.
can you please tell me which one must be change and how?
Best Regards
creating thumbnails
********************************************************************/
function show_thumb($w,$h,$zc,$cropfrom,$q) {
global $post;
preg_match_all(‘/\< *[img][^\>]*src *= *[\”\’]{0,1}([^\”\’\ >]*)/’,get_the_content(),$matches);
$thumb = get_post_meta($post->ID, ‘thumb’, true);
if ($thumb) {
print ‘<img src=”‘.get_bloginfo(‘template_directory’).’/thumbs/timthumb.php?src=’.$thumb.’&w=’.$w.’&h=’.$h.’&zc=’.$zc.’&cropfrom=’.$cropfrom.’&q=’.$q.'” alt=”‘.str_replace(‘&’, ‘&’, $post->post_title).'” title=”‘.str_replace(‘&’, ‘&’, $post->post_title).'” />‘;
} elseif (count($matches[1]) > 0) {
print ‘<img src=”‘.get_bloginfo(‘template_directory’).’/thumbs/timthumb.php?src=’.$matches[1][0].’&w=’.$w.’&h=’.$h.’&zc=’.$zc.’&cropfrom=’.$cropfrom.’&q=’.$q.'” alt=”‘.str_replace(‘&’, ‘&’, $post->post_title).'” title=”‘.str_replac’&’, ‘&’, $post->post_title).'” />‘;
} else {
// no custom key, no images, show nothing
}
}
/********************************************************************
creating thumbnails (no permalink to story, image only)
********************************************************************/
function show_thumb_only($w,$h,$zc,$cropfrom,$q) {
global $post;
preg_match_all(‘/\< *[img][^\>]*src *= *[\”\’]{0,1}([^\”\’\ >]*)/’,get_the_content(),$matches);
$thumb = get_post_meta($post->ID, ‘thumb’, true);
if ($thumb) {
print ‘<img src=”‘.get_bloginfo(‘template_directory’).’/thumbs/timthumb.php?src=’.$thumb.’&w=’.$w.’&h=’.$h.’&zc=’.$zc.’&cropfrom=’.$cropfrom.’&q=’.$q.'” alt=”‘.str_replace(‘&’, ‘&’, $post->post_title).'” title=”‘.str_replace(‘&’, ‘&’, $post->post_title).'” />’;
} elseif (count($matches[1]) > 0) {
print ‘<img src=”‘.get_bloginfo(‘template_directory’).’/thumbs/timthumb.php?src=’.$matches[1][0].’&w=’.$w.’&h=’.$h.’&zc=’.$zc.’&cropfrom=’.$cropfrom.’&q=’.$q.'” alt=”‘.str_replace(‘&’, ‘&’, $post->post_title).'” title=”‘.str_replace(‘&’, ‘&’, $post->post_title).'” />’;
} else {
// no custom key, no images, show nothing
}
}