Well my 1.2.* code was simliar to below...
Add the _w _h lines.
$smiley_text = array(':)', '=)',
$smiley_img = array('smile.png', 'smile.png',
$smiley_img_w = array('15px', '15px',
$smiley_img_h = array('15px', '15px',then change
$text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);to
$text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="img/smilies/'.$smiley_img[$i].'" width="'.$smiley_img_w[$i].'" height="'.$smiley_img_h[$i].'" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);