guess you're right wink

You could also set PUN_ROOT in the site integration file, like I do. Like this:

define('PUN_ROOT', '/home/account/forums/');
require_once '/home/account/forums/' . 'include/common.php';
require_once '/home/account/forums/' . 'include/parser.php';

Well, as it is now, it screws up the smileys when I use the parse_message() function on the site. So I modified it, and it works. I thought it would be useful if this fix was also done in the official version.

It would still work I suppose, because PUN_ROOT would point to the correct subdomain, and it would parse the smiley links to be from that subdomain... Or do I not understand this correctly?

This bug causes the parse_message function to write the scr= path to any smiley incorrectly, when the function is used on a website that has the forums integrated.

This should fix it:

include/parser.php line 366:

        $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);

should be:

        $text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="' . PUN_ROOT . 'img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);