the problem is that when the thumb is being rewritten it searches for an align= call. The new versions of wordpress dont use that any more and use a class of alignleft or alignright instead which makes post thumb output align="ft" or align="ght" because it is replacing the first two letters assuming it is an =". The solution is to open lib/post-thumb-library.php and around line #145 you will find the replaceimage function. replace it with the following:
// begin fix float replace
function ReplaceImage($content) {
$attrList=array ("src", "alt", "title", "rel", "class");
if (!$this->p_rel &&
stripos($content, 'rel="thumb"') === false && stripos($content, "rel='thumb'") === false)
return $content;
// Thumbnails image and replace
$pattern = '/<img([^>]*)\/>/si';
if (preg_match_all($pattern, $content, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) :
if (stripos($match[0], 'class="wp-smiley"')) continue;
if (stripos($match[0], "class='wp-smiley'")) continue;
if (!$this->p_rel){
if (stripos($match[0], 'rel="thumb"') === false
&& stripos($match[0], "rel='thumb'") === false)
continue;
} else {
if (stripos($match[0], 'rel="nothumb"') !== false || stripos($match[0], "rel='nothumb'") !== false)
continue;
}
$match[1] = str_replace("rel='thumb'", '', $match[1]);
$match[1] = str_replace('rel="thumb"', '', $match[1]);
$match[1] = str_replace("rel='nothumb'", '', $match[1]);
$match[1] = str_replace('rel="nothumb"', '', $match[1]);
$m = str_replace('@', '\@', $match[0]);
$m = str_replace(')', '\)', $m);
$m = str_replace('(', '\(', $m);
$pat = '@<a([^>]*)\>([^>]*)'.$m.'([^>]*)\<\/a>@si';
if (preg_match($pat, $content, $foo)) {
continue;
}
$ListAttr = pt_parseAtributes($match[1], $attrList);
$ListAttr['ext'] = substr(strrchr($ListAttr['src'], "."), 1);
$ListAttr['img'] = substr($ListAttr['src'],0,strlen($ListAttr['src']) - (strlen($ListAttr['ext']) + 1) );
if ($ListAttr['title']=='' || !isset($ListAttr['title'])) $ListAttr['title'] = $ListAttr['alt'];
$replacement = $this->MakeThumb($ListAttr);
$content = str_replace($match[0], $replacement, $content);
endforeach;
}
return $content;
}
// end fix float replace
then under that function you will find the makethumb function. Replace it with the following:
// begin fix float replace
function MakeThumb($ListAttr) {
// Initialize parameters
$the_image = $ListAttr['img'].'.'.$ListAttr['ext'];
$ListAttr['alt'] = htmlspecialchars($ListAttr['alt']);
$ListAttr['title'] = htmlspecialchars($ListAttr['title']);
if ($ListAttr['align'])
$align = ' align="'.$ListAttr['align'].'"';
else
$align="";
if ($ListAttr['rel']) {
$rel = ' rel="'.$ListAttr['rel'].'"';
} else {
$rel = $this->lightbox;
}
// Prepare parameter for thumbnail
$arg = 'ALTAPPEND='.get_pt_options('p_append_text').
'&WIDTH='.get_pt_options('p_resize_width').
'&HEIGHT='.get_pt_options('p_resize_height').
$this->addArg;
// Retrieve thumbnail
$t = new pt_thumbnail ($the_image, $arg);
$add_tag = $align;
// Add thumbnail & highslide expand to image
if (POSTTHUMB_USE_HS) {
$h = new pt_highslide ($the_image, $t->thumb_url, $ListAttr['alt']);
$h->set_borders (get_pt_options('ovframe'));
$h->set_title ($ListAttr['title']);
if ($this->p_has_caption)
$h->set_caption (addslashes($ListAttr['alt']));
$h->set_html_size();
$h->set_href_text('', $add_tag);
$h_str = $h->highslide_link ();
unset ($h);
}
// Add thumbnail & thickbox/smoothbox class to image
elseif (class_exists('pt_thickbox')) {
$h = new pt_thickbox ($the_image, $t->thumb_url, $ListAttr['alt']);
$h->set_href_text('', $add_tag);
$h_str = $h->thickbox_link ();
unset ($h);
}
// Simple replacement by thumbnail linked to image
else $h_str = '<img src="'.$t->thumb_url.'" alt="'.$ListAttr['alt'].'" class="'.$ListAttr['class'].'" />';
unset ($t);
return $h_str;
}
// end fix float replace
then open lib/post-thumb-functions.php and around line 154 find the pt_parseatributes function. replace the first line
function pt_parseAtributes($html, $attrList=array ("src", "alt", "title", "align")) {
with the following:
function pt_parseAtributes($html, $attrList=array ("src", "alt", "title", "class")) {
That is how i got it to work... i dont completely understand how those functions work together, but i think my work around will do the trick.
the only problem i see now is that if you dont want the thumbnail linked in a post there is no way to do that.