More smarty extensions... fixes a few PHP specific issues that don't match PHP 5.2.4 requirements.