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

/libraries/Smarty.php #45

Closed phrakon closed 9 years ago

phrakon commented 9 years ago

I have CI 3 and had a problem after i copied all of your files to codeigniter application folder. Something worked but config file was ignored.

When i used $this->CI->load->library('smarty'); in MY_Parser.php was included original Smarty class instead of CI_Smarty in /libraries/Smarty.php. I copied it into system/libraries and it works well.

KlustoR commented 9 years ago

I can confirm this, moving smarty.php from application/libraries to system/libraries fixes the problem i had with the config not loading.

fixedlv commented 9 years ago

Same here

KlustoR commented 9 years ago

Any update on this issue ? I'd like smarty.php in another location then system directory if possible.

awalls commented 9 years ago

Is a fix being planned for this as I am getting the same issue as well on a CI3 install?

caiosantossp commented 9 years ago

I changed the name of the class from Smart to CustomSmart and all its references and it worked like a charm.

ernesthernandez commented 9 years ago

Rhe solution is simple:

  1. rename library Smarty.php to MY_Smarty.php (or whaterver you want) and the class name CI_Smarty to MY_Smarty.
  2. 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

Cheers everyone. I have kind of moved on from PHP these days, well Codeigniter. However, considering how many people use this library, I'll keep it up-to-date. I've committed some fixes for these issues. Thanks for being patient.