Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - Version 4.3

[eluser]Adods[/eluser]
mmm.....

yes, but what i want is 2 different of modules function, one function is work like component that accessible via url like gallery, guest book, etc and one work like module that cannot be acceesible via url like menu, sidebar, login form, etc. And i want to organize them into different folder.

sorry if my english make you confuse.

[eluser]sophistry[/eluser]
@Adods... yes, ME can do what you describe:

1) URL access to complete, self-contained modules where all resources exist in their own, single directory.

2) access small bits of each of the modules from within other modules - so in your example, you want a menu, sidebar, login form and each of these can be in their own directory or in a combined directory.

basically, ME makes CI more flexible. it lets you group related resources together in directories and access them from outside. currently, CI is designed in a way that controllers cannot "talk to" other controllers so you have to be clever in OOP and code architecture if you want to combine pre-existing resources. but, with ME in place you can build a module and then "expose" functionality through the controller like it is a library or an API. so, controllers can be http-facing or internal.

cheers.

BTW, your english is good, and your concepts about programming are better! ;-)

[eluser]Adods[/eluser]
wow.. that's great.. but can put module like menu or login form separately from normal modules folder, like i put normal modules on 'Modules' dir and menu module on 'Blocks' dir??? And is there any example for this new ME? because all example i found using older version.

[eluser]wiredesignz[/eluser]
This may be an idea for a new feature, add a source directory to the module loader.

All URL based calls are directed to APPPATH.'modules/' while internal module calls can specify a module base directory.

Any thoughts?

[eluser]sophistry[/eluser]
OTTOMH... that sounds like extra complexity for not much gain.

why not just put the "Blocks" in a module directory called Blocks? You can have multiple controllers that do each of the jobs required.

What would be gained by allowing the developer to load resources from a directory outside of the modules? Am I missing something?

[eluser]Sam Dark[/eluser]
This can be useful to prevent accessing some modules by URL.

[eluser]Rick Jolly[/eluser]
[quote author="Sam Dark" date="1218654046"]This can be useful to prevent accessing some modules by URL.[/quote]
I'm thinking the same thing.

[eluser]sophistry[/eluser]
but you can do that by putting an underscore in front of the controller method... OR you could extend that convention to apply to module directory names: instead of "blocks" you would just call the dir "_blocks"

restricting access is a good goal, but given that there are already ways to do that easily, are there any other reasons to locate resources outside of the module directory?

[eluser]Adods[/eluser]
yes, but it would be better if it organized into different folder, because if it's not, it'll look messy, 10 modules may be fine, more than that? i believe you'll only get trouble because maybe some modules will have same model name or same controller name.

[eluser]Sam Dark[/eluser]
sophistry
I think underscores and such is a bad idea. One little mistake and you can lose app security.




Theme © iAndrew 2016 - Forum software by © MyBB