Phil Sturgeon

Web developer, kayaker, outdoors madman and part-time alcoholic.


Modular Separation for CodeIgniter 2

Posted CodeIgniter at Mar 24, 2010

Sadly CodeIgniter 2.0-dev has not brought us any sort of modular/HMVC system, but luckly Modular Separation works for this new "version" with two minor tweaks.

The fix was worked out a few hours after the CodeIgniter 2.0 dev code was released but I was hoping wiredesignz would incorporate and re-post. Sadly the man has other commitments to attend to, so I have released the patched version.

I will use this fork to work on some cool new CodeIgniter 2.0 related features such as supporting Packages as well as the existing custom "module location" array.

Note: In no way is this intended as theft of wiredesignz work. He is a brilliant developer who I have a great deal of respect for, so please notice his name is still on every file with only "@modified Phil Sturgeon" added in. I have patched his work.

Update: There was some confusion in this post with my wording. CodeIgniter 2.0 is not officially released yet, I am talking about the development code. DO NOT use CodeIgniter 2.0 on any live sites just yet, I will post an update when I feel confident enough to run CodeIgniter 2.0 on my live sites.

Comments

User comments
  • Gravatar Matt

    Jun 28, 2010

    Just tried implementing module separation 2.1 from the bitbucket repo. , and it was looking for My_config. So i stole it from pyrocms and it worked fine :)

  • Gravatar Luke

    Jun 26, 2010

    just to let everyone know... you need to put these in the application/core folder as of latest codeigniter 2 version... placing them in application/libraries is in older versions.

  • Gravatar Emmanuel

    Apr 04, 2010

    Hi Phil,

    Having a slight issue applying the update. I am just testing out a fresh alpha copy of CI2.0. I have copied the patched files to the application's libraries folder, created a modules folder and a page module. Unfortunately, when I try to access the module, I get a "404 Page Not Found" error.

    What could I be doing wrong?

  • Gravatar Anil

    Mar 26, 2010

    Please add a search function to this website.. :) It is getting little hard to find tutorials dated back.

    Cheers,
    Anil

  • Gravatar Anil

    Mar 25, 2010

    Hi Phil,
    Thanks for the answer,

    Every one in Codeigniter community try to develop a CMS (Which I really appreciate), but no one tries to do a basic structure or some basic modular development structure which will allow us to use it more ways than possible now. I am not sure whether you got my point or not, I mean if I want to develop a CRM I should be able to use the basic structure and develop it, If I want to develop a website I should be able to do it, If I have to do something else I should be able to do it. I know we can modify Pyro CMS to do all this stuff which i am doing now.. but I think you will know a better solution for this may be..

  • Gravatar Phil Sturgeon

    Mar 25, 2010

    Hold your horses guys, CodeIgniter 2.0 is still in development, but the codebase has been released. I am getting my code working with it so I can play along with the development changes and bug-fixes as they come in.

    Do NOT start deploying websites with CodeIgniter 2.0 just yet, there are still some major bugs to be sorted out. I have squashed a few of them and have one left that I am going to look at tonight. I'll post an upgrade guide when I believe CodeIgniter 2.0 is ready to go into use.

    Btw, PyroCMS is running perfectly on CodeIgniter 2.0 :-)

  • Gravatar Patrick Fraley

    Mar 25, 2010

    CodeIgniter 2.0 was released? Where can one find it? On CodeIgnter.com it is still 1.7.2?

  • Gravatar Amit

    Mar 25, 2010

    "The fix was worked out a few hours after CodeIgniter 2.0 was released"

    Released? Where? CI 2.0 is still in development, hasn't made it out yet.

  • Gravatar Anil

    Mar 25, 2010

    Hi phil,

    I follow your website regularly,you do a good job keep it up. I have one question regarding codeigniter 2.0 - is it better to wait until the final version or can i start working with 2.0, i saw you are changing pyrocms to 2.0, Did you face any problems using this. We are starting a new project in our company and how hard it will be to upgrade from 1.7.2 to 2.0 in future.

Post a comment