CodeIgniter Forums
Modular Separation - PHP5 (Modules) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Modular Separation - PHP5 (Modules) (/showthread.php?tid=20208)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33


Modular Separation - PHP5 (Modules) - El Forum - 04-03-2011

[eluser]theprodigy[/eluser]
Quote:That’s essentially what I want to do, but I need to know the plugin exists before it can be added to the database. Preferably, I’d like to be able to make adding modules in as simple as dropping the module into the directory and running an “Update modules” method. It sounds like the best way to do this would be the scandir method you outlined?
I would have your "Update Modules" method do the scandir, and compare the array returned to the folder_name column in the db.modules table, and insert any modules not found.
That sounds kinda like what you are looking for.
Maybe you can even setup a config/install.php file per module, with the data you want inserted into the db for that module (name, active, etc).


Modular Separation - PHP5 (Modules) - El Forum - 05-24-2011

[eluser]B3ll4triX[/eluser]
How to access library in other module?


Modular Separation - PHP5 (Modules) - El Forum - 05-24-2011

[eluser]hungnm144[/eluser]
Quote:How to access library in other module?

if you want load model from other module (or helper, language)
Code example:
Quote:$this->load->model('name_module/module_model.php');
$this->load->helper('name_module/module_helper.php');



Modular Separation - PHP5 (Modules) - El Forum - 05-24-2011

[eluser]B3ll4triX[/eluser]
i have module A with library L1, and i want to use library L1 in module B, how to access library L1 in module A from module B?


Modular Separation - PHP5 (Modules) - El Forum - 05-24-2011

[eluser]Unknown[/eluser]
Hello everbody,

I try to implement modules at my Codeigniter. It does not work and i don't know why. I did
the steps but when i try to acces trough the url its gives a 404. Somebody know whats wrong.

Thanks!

Bye


Modular Separation - PHP5 (Modules) - El Forum - 05-24-2011

[eluser]hungnm144[/eluser]
[quote author="B3ll4triX" date="1306256588"]i have module A with library L1, and i want to use library L1 in module B, how to access library L1 in module A from module B?[/quote]
in module A

Quote:$this->load->library('module_b/library_l1.php');



Modular Separation - PHP5 (Modules) - El Forum - 06-16-2011

[eluser]getSurreal[/eluser]
Am I the only one who hates these massive threads? This module needs it's own discussion group where each question can be a new topic. Don't make everyone read a 32+ page thread to try learn this module.


Modular Separation - PHP5 (Modules) - El Forum - 06-16-2011

[eluser]wiredesignz[/eluser]
@Sir Dali, Why don't you create the discussion group yourself instead of telling people what to do?


Modular Separation - PHP5 (Modules) - El Forum - 06-16-2011

[eluser]getSurreal[/eluser]
@wiredesignz, Why would I do that? I don't own the project and I'm not even a user of it yet. I was wanting to investigate it and having a 32 page thread to read through did not encourage me.


Modular Separation - PHP5 (Modules) - El Forum - 06-16-2011

[eluser]wiredesignz[/eluser]
@Sir Dali, I recommend that you try to use Modular Extensions HMVC based on the information in the wiki on Bitbucket (see my signature) and then, when you have difficulty, do a search in the forums, or better yet ask a question.