Modular Extensions - Version 4.3 |
[eluser]Sam Dark[/eluser]
Switched to 4206 from 5025 just to test. Seems issues with config loading are now fixed. That's very good. Found a bug. Modular controller method is running twice. /modules/test/controllers/index.php Code: <?php prints Code: CALL
[eluser]wiredesignz[/eluser]
@Sam, If you have a controller class named Index it's constructor will be run twice as you see, because CI uses index() as the default entry point to the controller and of course it is the constructor also. This is a CI thing, and not related to ME.
[eluser]freshface[/eluser]
A best practice question. Is the best use of ME to load it in a controller? (controllers/front.php) Or in modules/front/controllers/front.php Or just call the module in controllers/front.php
[eluser]Sam Dark[/eluser]
@wiredesignz, thanks! Forgot about PHP4 constructors… again
[eluser]wiredesignz[/eluser]
@freshface, There is no best practice. Try all methods, see which works for you.
[eluser]Stylec[/eluser]
Hi, I'm having a problem with the modules::run . My structure is as follows - modules - admin -- controllers --- admin.php - news -- controllers --- admin.php --- news.php Using modules::run to call a method in news/controllers/news.php, this works fine but when I try using Code: modules::run('news/controllers/admin', $data, 'adminPanelBlock'); Code: Unable to run the requested module: news/controllers/admin->adminPanelBlock Thanks for any help.
[eluser]freshface[/eluser]
And without controllers? Code: modules::run('news/admin', $data, 'adminPanelBlock');
[eluser]Stylec[/eluser]
No that doesn't work although it generates a different error Code: Unable to locate the requested file: application/modules/news/methods/adminPanelBlock.php
[eluser]Stylec[/eluser]
No that doesn't work either. Still same errors as before. |
Welcome Guest, Not a member yet? Register Sign In |