Vheissu / Ci-Smarty

Smarty templating engine integration for Codeigniter 3.0+ with inbuilt theming and asset management.
http://ilikekillnerds.com
179 stars 43 forks source link

Why the folder "templates_c" are not in my APPPATH."cache/smarty/compiled/"? #47

Closed xiaomabuxiao closed 9 years ago

xiaomabuxiao commented 9 years ago

when i use codeigniter3.0 I find the folder "templates_c" is in my ROOT ( together with index.php and application folder and system folder )
but codeigniter 2 is in right way help thank you

awalls commented 9 years ago

This is probably due to #45. In CI3 your config file is not getting picked up as the file /application/libraries/Smarty.php is not being loaded to set this and it's falling back onto the default Smarty config. If you move Smarty.php to /system/libraries it'll get loaded instead. It's not ideal to modify anything in the system folder but until a fix is available it's a workaround.

jizaymes commented 9 years ago

+1 Thanks for the fix.

ernesthernandez commented 9 years ago

Rename library Smarty.php to MY_Smarty.php (or whaterver you want) and the class name CI_Smarty to MY_Smarty.

Go to MY_Parser file and find the line with this code $this->CI->load->library( 'smarty'); and rename to $this->CI->load->library('my_smarty', NULL, 'smarty'); or change all $this->CI->smarty for $this->CI->my_smarty

Is working for me! :) Cheers.

Vheissu commented 9 years ago

This has been fixed in the latest commits.