We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15170
    • 90 Posts
    Hi,

    Before discovering MODx I was planning to learn CodeIgniter.
    Can I use CodeIgniter with MODx or is there no need now to learn CodeIgniter?

    Jan
      • 5340
      • 1,624 Posts
      I use modx with codeigniter but through an IFRAME. Some of the tools where built using codeigniter so I needed a way to integrate them into the new modx site.

      I would not start to learn Codeigniter but focus on the new Modx Revolution.
      Anyway if you know PHP and some OOP codeigniter is very easy to learn.
        • 15170
        • 90 Posts
        Thanks for replying Cipa.

        Unfortunately PHP is my weak point. Do you advise me to improve my PHP first?
        Will I need to be good at PHP to use MODx Revolution.
          • 5340
          • 1,624 Posts
          It’s always good to know your PHP wink
          Maybe you can do it in parallel.

          Unless you need custom stuff, modx will always have a way to do things without you editing a PHP line. And if you need something custom, I’m sure the community will help.
            • 1343 ☆ A M B ☆
            • 2,213 Posts
            If your just starting out with MODx you might want to look into Evolution first to get your feet wet. Revolution is the up and coming version, but at the moment it lacks the resources of Evolution and isn’t out of Beta.

            If you don’t have strong php skills you likely don’t want to use Revolution at this point in time... but then again it’s entirely up to how much of a challenge you want.
              Patrick | Server Wrangler
              About Me: Website | Tweets |  MODX Hosting
              • 29774
              • 386 Posts
              @Cipa You can include rendered CodeIgniter views in modx documents (and pass $_REQUEST vars between them) if you make use of cURL - no need for an iframe (disclaimer: I’ve not done this - yet smiley )

              @jzigbe CI is a great framework to learn object orientated php coding and the mvc pattern - because it’s so well documented. I recommend you learn both modx and CI since there’s never one tool for every job.

              And no, you don’t need to know PHP to use Revolution, but as a beginner you should probably stay with Evo until Revo is out of beta. The concepts you learn in Evo will be transferable to Revo.
                Snippets: GoogleMap | FileDetails | Related Plugin: SSL
                • 5340
                • 1,624 Posts
                @Cipa You can include rendered CodeIgniter views in modx documents (and pass $_REQUEST vars between them) if you make use of cURL - no need for an iframe (disclaimer: I’ve not done this - yet )

                Thx,

                Seems a bit more complicated but definitely the right way to do it.
                But I’m not sure about apps the make use of sessions. Is it possible to read/write sessions via CURL?(maybe it’s stupid question).
                Anyway, the apps I use have a login built in modx. If the login is correct I replace a div with an iframe. From here everything is done inside the Iframe.
                  • 29774
                  • 386 Posts
                  In principle you shouldn’t need to access the session though cURL as you can use the modx session to secure your modx page and a modx snippet to instantiate cURL and include your CI view. However, you would need to secure your CI directory from direct access somehow (but then the same applies with an iframe).
                    Snippets: GoogleMap | FileDetails | Related Plugin: SSL
                    • 15170
                    • 90 Posts
                    Thanks all for replying.
                      • 9207 ☆ A M B ☆
                      • 2,475 Posts
                      It’s definitely possible to integrate CodeIgniter and MODx, but it can be technical -- one way is to create a CI application alongside your MODx install and decide who handles what by modifying your .htaccess file... but I really wouldn’t recommend this unless you’re really comfortable with web applications and you have a solid understanding of the various processes that occur together to make one work.

                      CodeIgniter is a PHP framework... MODx is a CMS. Lots of overlap here, but they’re not the same. Revolution is built on a new framework: xPDO, and it looks really promising. Jason has been doing a lot of work on this and I’m excited to try it out. However, it’s very young, so there is precious little documentation, whereas CodeIgniter has videos and books etc.

                      I think the big question is "what exactly do you need to do?" If you need to build a custom web application that flies off the CMS radar, then CodeIgniter (or similar frameworks) would be an obvious choice. If a majority of what you need can be accomplished by a CMS (e.g. MODx), then it’s probably a better use of time to work inside a CMS and extend functionality as needed.

                      Learning PHP? Do it. Program. Find something you need to do with PHP and do it. Books and all that help, but experience is the true teacher.

                      Hope this helps.