// image grabber function
function pbt_resize($w,$h,$class='alignleft',$showlink=true) {
global $more, $post;
$title = the_title_attribute('echo=0');
if($showlink) {
$link = "";
$linkend = "";
} else {
$link ="";
$linkend="";
}
$more = 1;
$content = get_the_content();
$pattern = '/]+src[\\s=\'"]';
$pattern .= '+([^"\'>\\s]+)/is';
$more = 0;
if(preg_match($pattern,$content,$match)) {
$theImage = "$link$linkend\n\n";
return $theImage;
}
}