
Cabai Hidup - 2015-09-15 14:16:00 -
In reply to message 13 from fadojutimi temitayo
For those who experience the error 'Message: Undefined property: Smarty::$template_ext', I hope this could help someone. Even though I used CI3, I think the method will work with CI2 as well. What I did :
- File Smarty.php in \application\libraries I renamed to Smartylib.php and the class name inside the file I changed to Smartylib.
- To load the library, use $this->load->library('smartylib') or $this->CI->load->library('smartylib'), instead of $this->load->library('smarty') or $this->CI->load->library('smarty').
- Similar changes required in \application\libraries\MY_Parser.php and \application\core\MY_Output.php, change from 'smarty' to 'smartylib'.
- If loading from autoload.php, again change from 'smarty' to 'smartylib'.
My guess is because it looks for the '$template_ext' in Smarty.class.php instead of Smarty.php. I didn't look for actual reason, as long as the method I used works.