Topic: Include baseurl with smileyparsing
function do_smilies($text)
{
global $smiley_text, $smiley_img, $pun_config;
$text = ' '.$text.' ';
$num_smilies = count($smiley_text);
for ($i = 0; $i < $num_smilies; ++$i)
$text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="'.$pun_config['o_base_url'].'/img/smilies/'.$smiley_img[$i].'" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);
return substr($text, 1, -1);
}
Mind the "src="'.$pun_config['o_base_url'].'/", this helped me integrate the parsingfunctions into my site a lot faster Maybe it's a handy thing for 1.3