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

    I started a thread on the Kohanaphp.com forums about a MODx-Kohana integration
    http://forum.kohanaphp.com/comments.php?DiscussionID=4221

    If you like Kohana and wish you could make snippets like this

    $blogs = ORM::factory('blog')->where('cat',5)->find_all();
    foreach($blogs as $blog) {
      View::factory('blogs/single_post',array('post'=>$blog))->render(true);
    }


    Then come over and take a look - we could use your help.

      • 17499 ☆ A M B ☆
      • 872 Posts
      Hello Yehosef,

      The integration of Kohana is a good project and a very good idea.
      Plus, you’ve raised a lot of interesting point regarding MODx, what could be improved and why Kohana can be a good choice to do so.

      However, i want to review some points you’ve made in your post(on Kohana forum) who are not up to date concerning MODx Revolution.


      • MODx Revolution default Manager is only a "context" which means that you can replace it by one who does not contain ExtJS. The way to do it is foggy for now because the core team concentrate their efforts on deveopment rather than documentation and tutorials.
      • MODx Revolution’s manager is made with ExtJS 3.
        It does not include all the refinement available for this libs (yet!), but it up to date.
      • Regarding ExtJs, i think that this choice has been made because it’s a very robust, easily extendable and OOP javascript library.
      • I might have misunderstand your comment on php4. Revo is only compatible with php5+
      • Did you check the docs for both Revolution and xpdo since the early beta? There are a lots of exemple and demo available now for both of them.

      See for example how we could rewrite your above code with Revolution:

      <?php
      $blogs = $modx->newQuery('blog',array('cat',5))->getCollection();
      foreach($blogs as blog){
        $output .= $blogFactory->getChunk('post',array(
           'post' => $blog->get('post')
        ));
      }


      Try to give MODx Revolution more time, you might be surprised!

      Good luck for your project too.
        • 33101
        • 46 Posts
        @lossendae

        Thanks for the post and the information. I didn’t know the current status of Revo so it’s good to hear that there have been advancements. I’ll try to give the new version a spin.

        It seems from the XPDO is written for php4 (and 5 - but, still 4) - and I know that XPDO is the guts of the Revo system - what requires php5?

          • 33101
          • 46 Posts
          about php4/5 - I see in the documentation at
          http://svn.modxcms.com/docs/display/revolution/PHP+Coding+in+MODx+Revolution,+Pt.+II

          $c = $modx->newQuery('modResource');  
          $c->leftJoin('modUser','PublishedBy');  
          $c->where(array(  
              'modResource.published' => 1,  
              'modResource.searchable' => 1,  
          ));  

          In php5 you would use chaining - this is the php4 approach - this still leads me to wonder where the php5 is?
            • 17499 ☆ A M B ☆
            • 872 Posts
            xPDO itself can work with php4 when used as a standalone ORM.

            MODx use xPDO but the team has decided to only support php5+

            Since the official website of xPDO has not been updated since the annoucement on the forum (As of r5984, Revolution 2.0.0 will be PHP 5.1.1+ only), i don’t know if it’s xPDO that has evolved or MODx who gives the limit.

            Concerning the last post, the exemple on the docs could have used the chaining method, but were written at a time where Revolution still supported php4.
            It may be a good idea to update the documentation.