EllisLab text mark
Advanced Search
2 of 22
2
   
Modular Separation - PHP5 (Modules)
Posted: 16 October 2009 11:16 AM   [ Ignore ]   [ # 21 ]   [ Rating: 0 ]
Avatar
Joined: 2007-03-25
18 posts

Did anyone tried modular separation with DMZ? It works perfect when DMZ model is in normal models folder but when is in the modules/MODULE/models cannot find it.

I’m not sore is this right topic for this question or it need changes from DataMapper side

 Signature 

V.

 
Posted: 18 October 2009 11:02 AM   [ Ignore ]   [ # 22 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

Modular Separation - PHP5 version 1.06 is attached to this post.

Added feature: Multiple module base locations.

EDIT:
deprecated file removed

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 19 October 2009 04:01 PM   [ Ignore ]   [ # 23 ]   [ Rating: 0 ]
Joined: 2009-10-19
2 posts
wiredesignz - 04 August 2009 01:10 AM

Controllers in sub-directories are supported and resources may be cross loaded from other modules.

How do you go about cross loading resources from other modules? How can you specify which module to load a model from?

 
Posted: 19 October 2009 04:29 PM   [ Ignore ]   [ # 24 ]   [ Rating: 0 ]
Joined: 2009-10-19
2 posts

errr my bad, I had some naming issues going on. It works as you would think $this->load->model(modulename/model);

Nice work on this project, so far it is running very smoothly

 
Posted: 19 October 2009 09:48 PM   [ Ignore ]   [ # 25 ]   [ Rating: 0 ]
Avatar
Joined: 2008-01-17
426 posts

i love this. so much better than Matchbox… but it would be nice if i went to the admin module via /admin it would auto load the controller that is set in the routes folder as home

/admin/welcome

if it already does this im retarded and cant figure it out haha

 Signature 

aka trs21219
CodeSanity | Github | LinkedIn | Facebook | Twitter | Last.fm

 
Posted: 19 October 2009 10:42 PM   [ Ignore ]   [ # 26 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

It does.

Set a route in your admin module config/routes.php file as

$route['admin''welcome'
 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 19 October 2009 10:46 PM   [ Ignore ]   [ # 27 ]   [ Rating: 0 ]
Avatar
Joined: 2008-01-17
426 posts

oh ok that makes sense… thanks!

 Signature 

aka trs21219
CodeSanity | Github | LinkedIn | Facebook | Twitter | Last.fm

 
Posted: 20 October 2009 12:02 AM   [ Ignore ]   [ # 28 ]   [ Rating: 0 ]
Avatar
Joined: 2004-09-17
24 posts

Hi wiredesignz, any plans to backport the new features back to ME-HMVC?

 Signature 

Fred Wu
Founder of Wuit.com | Web Developer at Envato
My blog: fredwu.me | Follow me @fredwu

 
Posted: 20 October 2009 12:31 AM   [ Ignore ]   [ # 29 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

Hey Fred,

Yes Modular Extensions PHP5 version 5.2.26 will have the same features. In fact the two projects share the same codebase.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 20 October 2009 12:42 AM   [ Ignore ]   [ # 30 ]   [ Rating: 0 ]
Avatar
Joined: 2004-09-17
24 posts

That’s great! Thanks wiredesignz. smile

 Signature 

Fred Wu
Founder of Wuit.com | Web Developer at Envato
My blog: fredwu.me | Follow me @fredwu

 
Posted: 21 October 2009 07:35 AM   [ Ignore ]   [ # 31 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

Modular Separation - PHP5 version 1.07 is attached to this post.

Updated Modules::find() code in line with Modular Extensions - PHP5 version 5.2.27

EDIT:
deprecated file removed

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 21 October 2009 12:09 PM   [ Ignore ]   [ # 32 ]   [ Rating: 0 ]
Avatar
Joined: 2007-08-29
94 posts

Is there a documentation somewhere how to use it?

 Signature 

Visit the german-speaking CI-community at http://codeigniter.ch
FreeBSD- and Server-Tutorials at http://serverzeit.de
The event-calendar for Mini-Drivers at http://miniyourlife.com

 
Posted: 21 October 2009 07:36 PM   [ Ignore ]   [ # 33 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

Documentation:

Modular Separation allows you to use modules for code organization in your application.

Modules now comply with CI 1.7.2, Controllers in sub-directories are supported and resources may be cross loaded from other modules.

You should be able to take any CodeIgniter application and place it into a module and it should work without alteration. However routes might need altering to allow for the added separation of a module.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 26 October 2009 07:56 AM   [ Ignore ]   [ # 34 ]   [ Rating: 0 ]
Joined: 2009-10-11
1 posts

Does it autoload all config files in the modules config directory?
It seems like my application loads the config files twice.

And looking in the log, the config class and language class is also loaded twice?
And with global XSS filtering on, it filters twice too.

Else, really nice work - i love it!

 
Posted: 28 October 2009 04:23 PM   [ Ignore ]   [ # 35 ]   [ Rating: 0 ]
Joined: 2008-07-22
23 posts

This is my steps:
- extract a fresh CI 1.7.2 to local server and change the base url to respect my installation dir
- hit a base url:

http://localhost/ci_test/ 

- extract a fresh (Modular Separation 17) and put MY_Loader.php and MY_Router.php in application/libraries

-create a modules folder
-create a “mymodule” folder into modules.

....

application
—->modules
  ——>mymodule
      —->controllers
        —->welcome.php

class Welcome extends Controller
{
  
function __construct() { parent::Controller}
  
function index()echo 'testing'}

i put the following url

http://localhost/ci_test/index.php/mymodule/welcome

and…

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: libraries/MY_Router.php

Line Number: 61
A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: libraries/MY_Router.php

Line Number: 66
A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: libraries/Router.php

Line Number: 201
A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: libraries/Router.php

Line Number: 207
A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: libraries/Router.php

Line Number: 210
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\mod\system\libraries\Exceptions.php:166)

Filename: codeigniter/Common.php

Line Number: 360
404 Page Not Found

The page you requested was not found.

whats wrong. /???x!?

 
2 of 22
2