Here's something to get someone started:
Replace this (in showflat):
if ($filewidth[0] > $config['max_width']) { <br /> $TempBod .= "<br /><br /><IMG SRC=\"$config[fileurl]/$File\" width=\"{$config['max_width']}\" Border=\"0\" alt=\"{$ubbt_lang['FILE_ATTACH']}\">";<br /> }<br /> else {<br /> $TempBod .= "<br /><br /><IMG SRC=\"$config[fileurl]/$File\" Border=\"0\" alt=\"{$ubbt_lang['FILE_ATTACH']}\">";<br /> }
With this:
if ($filewidth[0] > $config['max_width']) { <br /> $imagestring = "<br /><br /><IMG SRC=\"$config[fileurl]/$File\" width=\"{$config['max_width']}\" Border=\"0\" alt=\"{$ubbt_lang['FILE_ATTACH']}\">";<br /> }<br /> else {<br /> $imagestring = "<br /><br /><IMG SRC=\"$config[fileurl]/$File\" Border=\"0\" alt=\"{$ubbt_lang['FILE_ATTACH']}\">";<br /> }<br /> if ( !strpos($Body, "[imageplacement]") ) {<br /> $TempBod .= $imagestring;<br /> } else {<br /> $TempBod = str_replace("[imageplacement]", $imagestring, $Body);<br /> }
I haven't tested this, but if it doesn't work it's at least a place to start. If it does work, the corresponding code in showthreaded would have to be changed as well.