ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Matchbox RC2

November 25, 2007 2:24pm

Subscribe [65]
  • #376 / Mar 31, 2009 1:48pm

    PHP Four

    5 posts

    Not sure if anybody noticed, Matchbox does not load the config files associated with libraries in a module. Say if you have a library called rss.php in modules/blog/libraries and a config file in modules/config/rss.php, Matchbox won’t be able to load the config file and pass the config array as parameter to the library’s constructor (more info here: Passing Parameters When Initializing Your Class).

    I had a look into the Loader.php file and after jumping from here and there, I found a bug in the _ci_init_class function which prevented this. At around line number 1035, you’ll find the following code:

    $module = $this->_matchbox->argument(3);
    
    if ($config === null) {
        if ($filepath = $this->_matchbox->find('config/' . $class . EXT, $module)) {
            include($filepath);
        }
    }

    change this to:

    $module = $this->_matchbox->_module;
    
    if ($config === null) {
        // We test for both uppercase and lowercase, for servers that
        // are case-sensitive with regard to file names
        if ($filepath = $this->_matchbox->find('config/' . strtolower($class) . EXT, $module)) {
            include($filepath);
        } else {
            if ($filepath = $this->_matchbox->find('config/' . ucfirst(strtolower($class)) . EXT, $module)) {
                include($filepath);
            }
        }
    }

    Now it should load the config files properly and will give you peace of mind.

    Cheers!

  • #377 / May 12, 2009 3:27pm

    IamPrototype

    135 posts

    I just downloaded Matchbox and can’t wait to use it. Thanks to PHP Four I already replaced the old code with his new improved one. Though I have one question: Will my urls HAVE to look like this http://www.example.com/module/controller/method/parameter

    Another example:

    http://www.myforumnews.com/forum/dashboard/category/news

    So let’s assume I only have to load the forums dashboard/overview.

    http://www.myforumnews.com/forum/dashboard

    CI won’t see this as controller, method/function right?

    And one more thing, could I do it like this:

    http://www.myforumnews.com/forum and then it would load module ‘forum’ and go to my constructer in my controller and then automatically go to dashboard without seeing it in the URL.

    Just curious. Thought I could’ve the same urls as before using Matchbox. But hey, I can route.. I know 😊 Sorry english isn’t my native language!

    ** Edit: I know Modular Seperation has been deprecated to Matchbox. Will all the old Modular Seperation commands still work? Like the following:

    $this->load->module_library()
    $this->load->module_model()
    $this->load->module_view()
    $this->load->module_file()
    $this->load->module_helper()
    $this->load->module_plugin()
    $this->load->module_language()
    $this->load->module_config()
    $this->lang->module_load()
    $this->config->module_load()
  • #378 / Jun 20, 2009 1:56pm

    farinspace

    40 posts

    So are there any module repositories? Additionally are there guidelines for writing modules? If anyone has used jQuery before, they have a nice guideline for writing plugins and a nice repository. It would be nice to have something similar for CodeIgniter / Matchbox and would really further propel the use of CodeIgniter.

  • #379 / Jun 23, 2009 11:38am

    deanf7

    19 posts

    I’m really interested in using matchbox for one of my applications, but was wondering if it’s still being actively developed?  The last official version I could find was for CI 1.6.  It looks like folks have found workarounds for CI 1.7.1, but I’m not sure I want use something that’s not in active development.

    Thanks

  • #380 / Jun 23, 2009 11:39am

    opel

    160 posts

    I used HMVC and I think Wiredesignz is still supporting that.

  • #381 / Jun 23, 2009 9:40pm

    Thorpe Obazee

    1138 posts

    I’m really interested in using matchbox for one of my applications, but was wondering if it’s still being actively developed?  The last official version I could find was for CI 1.6.  It looks like folks have found workarounds for CI 1.7.1, but I’m not sure I want use something that’s not in active development.

    Thanks

    This topic would help: http://ellislab.com/forums/viewthread/119333/

  • #382 / Sep 02, 2009 8:00am

    zdknudsen

    305 posts

    Hi people, I finally got round to updating Matchbox. 😊 There’s been so many changes to CodeIgniter that I figured that it’d be the easiest to reprogram Matchbox from scratch, so that’s what I’ve done. There’s been a few changes to the way Matchbox works, so I’ve put up a revamped version of the documentation on the Wiki. Also, Matchbox now includes a demonstration module. This new version is bound to have a few bugs so please test away and note that i do not recommend this version for production use yet. -Zack

    Also with the changes that’s been made to the way Matchbox works, I’d like for the discussion to be moved to the Wiki discussion thread. (:

  • #383 / Sep 08, 2009 12:28pm

    richfearless

    34 posts

    Hi,

    I would like to use the MY_Controller(read below) with matchbox, is there a way?

    My_Controller manages my layout for me and adding what ever i request in the URL (eg. http://localhost/project/welcome) must display the default layout found at:
    c:\wwwroot\project\system\application\views\layout.php

    and the content is pulled from the matchbox module up with this command in my layout.php file
    <?php echo $this->load->view($this->partial) . PHP_EOL; ?> using the fuction Welcome() @
    c:\wwwroot\project\system\application\modules\welcome\controller\welcome.php

    i hope you can make some sense from this post 😊

    Thanks,
    Richard

  • #384 / Sep 09, 2009 2:05pm

    zdknudsen

    305 posts

    It does make sense. 😊 Have you tried running Matchbox with your MY_Controller? Does CodeIgniter throw any errors?

    One thing you might try is setting $config[‘callers’] = array(APPPATH.‘libraries/MY_Controller’); in the Matchbox config file.

    Also, I’d appreciate it if you’d use the following thread for future questions. http://ellislab.com/forums/viewthread/128084/

    Best regards (:

  • #385 / Oct 01, 2009 12:39pm

    bd3521

    48 posts

    Libraries/Matchbox.php is no longer needed?

    I was running the version from Feb 2008 and want to update to the latest version.

    Thanks

  • #386 / Oct 02, 2009 2:11am

    zdknudsen

    305 posts

    Correct, now only the extended libraries are required.

  • #387 / Oct 02, 2009 1:42pm

    bd3521

    48 posts

    Correct, now only the extended libraries are required.

    Does last years version of matchbox support CI 1.7.2?

    When I upgrade CI to 1.7.2 - while leaving the prior matchbox version - I get page not found for everything but the default controller on PHP 5.2.9/nginx $config[‘uri_protocol’]  = “REQUEST_URI”;.

    It appears to work with PHP 5.3.0/windows -  $config[‘uri_protocol’]  = “AUTO”;

  • #388 / Oct 02, 2009 1:52pm

    zdknudsen

    305 posts

    I completely rewrote Matchbox recently, in order to have it work with the newest versions of CI. I’m afraid you’ll have to upgrade both CI and Matchbox if you want everything to work correctly. 😊

    What version of CI are you upgrading from?

    Also, please remember that even though I rewrote Matchbox, the way it works is still very similar to previous versions. 😊

  • #389 / Oct 02, 2009 3:36pm

    bd3521

    48 posts

    I completely rewrote Matchbox recently, in order to have it work with the newest versions of CI. I’m afraid you’ll have to upgrade both CI and Matchbox if you want everything to work correctly. 😊

    What version of CI are you upgrading from?

    Also, please remember that even though I rewrote Matchbox, the way it works is still very similar to previous versions. 😊

    I upgraded CI from 1.7.0 to 1.7.2 and now updated matchbox to RC2.

    I’m running nginx (with REQUEST_URI) but I get page not found since updating both. If I switch CI back to the 1.7.0 system folder it works again.

    For troubleshooting with 1.7.2 if use AUTO instead of REQUEST_URI it shows the default controller for all links (but doesnt load the selected link). If I keep it at REQUEST_URI the default page works but each link off the default page gives a page not found error. I also tried apache instead of nginx (same results)

  • #390 / Oct 05, 2009 4:38am

    zdknudsen

    305 posts

    Have you tried doing a clean install of Matchbox and CI?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases