We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

third_party helpers

Development and Programming

webdezzo's avatar
webdezzo
16 posts
15 years ago
webdezzo's avatar webdezzo

Hi all,

I have worked with CodeIgniter for quite some time, and we always place any non standard helper files in the system/application/helpers directory. These are untouched when we upgrade the CI version and everything works out great.

Getting deeper into EE 2.0, my question is, where should we be putting helpers that we have currently developed for CI that we want to port to EE 2.0? My first guess would be a helpers folder within the third_party folder that way it’s untouched with version updates as well, but I am not sure if there is a means for this currently. Should we put them in expressionengine/helpers ? These files could “potentially” be overwritten on version upgrades etc.

Best practices for this?

Thanks!

       
Greg Aker's avatar
Greg Aker
6,022 posts
15 years ago
Greg Aker's avatar Greg Aker

webdezzo,

Like the third_party directory in CodeIgniter, the idea behind the system/expressionengine/third_party directory in EE is to house the total package. So you can have a config/helpers/libraries/models/etc directories that will work alongside your addons. When you are in your addon, you load them with $this->EE->load->library/helper/etc.

The idea behind this is that an update to EE will basically mean keeping your config and third_party directories and updating the rest of the app.

Make sense?

       
Jayson Ng's avatar
Jayson Ng
67 posts
15 years ago
Jayson Ng's avatar Jayson Ng

hi Greg, does putting library files in third_party/libraries load files that are in the autoload.php config file as well?

Just to clear up, you’re saying usint $this->EE->load->library(‘my_file’) loads third_party/libraries/my_file.php?

I’m asking because I can’t seem to get it to work. the only way I can get my custom library to load is if I place it in the libraries folder. :(

thanks,

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.