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]
  • #226 / Feb 18, 2008 2:18pm

    zdknudsen

    305 posts

    Indeed it is. In your matchbox.php config file, the $config[‘directories’] array contains an array of directories RELATIVE to your application folder in which to search for modules. The standard one is ‘modules’ which would be APPPATH/modules, so if you wanted to place your modules in a folder on the same level as the system and application folders, you could simply add the value of ‘../’ to the array which would be APPPATH/../ (e.g. one level above the application folder). You can add as many values to the array as you wish, but keep in mind that the more you add, the more searches will be performed. So if you are going to move all your modules to the new folder, you should remove the standard ‘modules’ value.

  • #227 / Feb 18, 2008 5:57pm

    adamp1

    772 posts

    I was just writing a simple email library for a module system and came up with another area matchbox could help with. In the parser class you pass it a view file to load, problem is this view file must be in the default APPPATH/views, it won’t look in a module folder. Don’t know if this is overwriting too much of the core files.

  • #228 / Feb 18, 2008 6:00pm

    zdknudsen

    305 posts

    First of all, I would like to know if what i suggested in my previous post worked for you. 😊

    Regarding the parser class I don’t quite know if I will incoorporate it. I’ll have to think about it.

  • #229 / Feb 18, 2008 6:03pm

    adamp1

    772 posts

    Yes sorry I read it and it did work fine. The more I use your matchbox application the more I love it, can make things a tad more complex but great to keep things organised.

  • #230 / Feb 18, 2008 6:18pm

    Lone

    350 posts

    @Zach: I just updated it with that code you suggested and the site.com/user/whatever works fine but any of the other links do not work - it hits a 404 error.

    I also made sure that I removed my added code from router.php and from what I can see it exits the _validate_request function at line 283.

  • #231 / Feb 18, 2008 6:20pm

    zdknudsen

    305 posts

    Are the links that throw a 404 error supposed to be redirected to the page controller? If so, are you sure you set up the _remap method, etc.?

  • #232 / Feb 18, 2008 6:26pm

    Lone

    350 posts

    At least someone has their thinking cap on today! Forgot that I removed my _remap function - works perfectly now 😊

    As I had mentioned previously though - am I correct in saying the main limit with this way is that each controller I want to use has to be specified in the routes file?

  • #233 / Feb 18, 2008 6:31pm

    zdknudsen

    305 posts

    That is correct. However I am pretty sure there are means of hooking into CodeIgniter directly from the routes file, so perhaps it is possible to check if the requested controller exists and route based on that.

    Alternatively you could list all the controllers in the controllers folder and loop through them in an array and make routes based on that. You might even be able to use the file helper for that (the function that list files in a directory).

    All this might be overkill though, since it would need to be run through at every request.

  • #234 / Feb 18, 2008 6:47pm

    Lone

    350 posts

    Those are some good suggestions indeed. I am actually thinking that the method of adding them manually might be a good idea now because when we build the modules the hope is for them to be able to be used for multiple clients and quite often we want the SEF link to be different for different clients such as a staff profiler that might be accessed by

    $route['staff(.*)'] = "staff$1";

    for one client and

    $route['our-people(.*)'] = "staff$1";

    for another.

    Great to see you will be releasing as LPGL shortly as we will be using the code commercially - but we still want to support this great contribution as much as possible, you truly have done some great work with it Zach 😊

    Out of interest, when is your plan for the 1.0 release?

  • #235 / Feb 18, 2008 6:53pm

    zdknudsen

    305 posts

    Well, I’ve been planing to make a kind of module manager, but it is still in very early development. Originally the 1.0 release was reserved for when said manager was done, but if development keeps at this pace, Matchbox might go 1.0 before that 😉

  • #236 / Feb 18, 2008 7:38pm

    Lone

    350 posts

    The manager would be very interesting - if you need anything towards design/html/css let me know as more then willing to help out.

    One thing I do like is that you are still calling it Beta even though it is quite stable - it shows that you wont finalise a release just to satisfy the masses 😊

  • #237 / Feb 19, 2008 6:40am

    WolfgangA

    46 posts

    Hm. Can I change the license from GPL in Matchbox 0.9.3 Beta to LGPL in Matchbox 0.9.3 (non-beta), then?

    Yes you can.

  • #238 / Feb 19, 2008 9:46am

    adamp1

    772 posts

    I have a question then about handling view files for emails. I was going to use the parser class to process the view file and then send it but since it won’t look in the module view folder this won’t work. So it seems the only possible solution is to run the view file but using variables. It means the file is cluttered with php code.

    I don’t mind writing the parser class addition, but would you want to include it in the matchbox revision?

  • #239 / Feb 19, 2008 10:05am

    zdknudsen

    305 posts

    I underestimate myself sometimes 😉 Untill I add it in the next update, you can make the parser class work by adding “Parser” to the caller array in the configuration file.

  • #240 / Feb 19, 2008 10:30am

    adamp1

    772 posts

    That works. That’s amazing I don’t understand how it works but it does.

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

ExpressionEngine News!

#eecms, #events, #releases