Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - HMVC version 5.2
#21

[eluser]wiredesignz[/eluser]
If you don’t mind providing me with an email address via private message to my account I will add you to the PHP5 version mailing list. Wink
#22

[eluser]Sam Dark[/eluser]
There is a problem with configs in 5.0.15. You can't load global config(app/config/site.php) from a module with

Code:
$this->load->config('site');

Fix

Add 'config/' to modules_helper.php:
Code:
/* then scan application directories for these types */
        if (in_array($base, array('controllers/', 'models/', 'views/', 'config/')))
#23

[eluser]wiredesignz[/eluser]
Nice work Sam.

You could also autoload your site config file in the main autoload.php sequence.

I will add your change to the next release. Thanks Wink
#24

[eluser]wiredesignz[/eluser]
For those interested, here's an indication of Modular Extensions PHP5 performance.
Code:
DEBUG - 2008-06-13 13:10:44 --> Config Class Initialized
DEBUG - 2008-06-13 13:10:44 --> Hooks Class Initialized
DEBUG - 2008-06-13 13:10:44 --> URI Class Initialized
DEBUG - 2008-06-13 13:10:44 --> Router Class Initialized
DEBUG - 2008-06-13 13:10:44 --> Output Class Initialized
DEBUG - 2008-06-13 13:10:44 --> Input Class Initialized
DEBUG - 2008-06-13 13:10:44 --> Global POST and COOKIE data sanitized
DEBUG - 2008-06-13 13:10:44 --> Language Class Initialized
DEBUG - 2008-06-13 13:10:44 --> Default_controller Controller Initialized  // 1st controller
DEBUG - 2008-06-13 13:10:44 --> Loader Class Initialized
DEBUG - 2008-06-13 13:10:44 --> Helpers loaded: parser, url, form, html
DEBUG - 2008-06-13 13:10:44 --> Database Driver Class Initialized
DEBUG - 2008-06-13 13:10:44 --> Model Class Initialized
DEBUG - 2008-06-13 13:10:44 --> Default Model initialised as
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/showroom/controllers/showroom.php
DEBUG - 2008-06-13 13:10:44 --> Showroom Controller Initialized  // 2nd controller
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/showroom/config/autoload.php
DEBUG - 2008-06-13 13:10:44 --> Pagination Class Initialized
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/search/controllers/search.php
DEBUG - 2008-06-13 13:10:44 --> Search Controller Initialized   // 3rd controller
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/models/vehicles_model.php
DEBUG - 2008-06-13 13:10:44 --> Model Class Initialized
DEBUG - 2008-06-13 13:10:44 --> Default Model initialised as stock
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/home/views/hot_pick.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/home/views/hot_pick.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/home/views/hot_pick.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/home/views/hot_pick.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/home/views/hot_pick.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/home/views/hot_pick.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/home/views/hot_pick.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/home/views/hot_pick.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/home/views/hot_pick.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/showroom/views/showroom_content.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/modules/search/views/box.php
DEBUG - 2008-06-13 13:10:44 --> File loaded: application/views/default_layout.php
DEBUG - 2008-06-13 13:10:44 --> Final output sent to browser  // 12 view partials
DEBUG - 2008-06-13 13:10:44 --> Total execution time: 0.0465

Source: http://www.ezybuycars.net.nz/showroom without logging 0.0247s
#25

[eluser]Sam Dark[/eluser]
Still having problems with config with 5.0.18. It seems you forgot to include my fix.
#26

[eluser]Ivan A. Zenteno[/eluser]
[wiredesignz] Could you send me the latest files also. Thanks
#27

[eluser]wiredesignz[/eluser]
@ivan, If you don’t mind providing me with an email address via private message to my account I will add you to the PHP5 version mailing list.
#28

[eluser]phpwebdev[/eluser]
how to load lang file

I have some like this
modules
-welcome
--controllers
--view
--module
--language
---english

any ideas?

I can load lang file, but file must be plased on the
applicaton/language/english/welcome_lang.php

Smile
#29

[eluser]wiredesignz[/eluser]
@Sam, Yes after some thought I feel it more appropriate that shared config files are added to application/config/autoload.php, this way modules are not looking in application/config twice each time they load.

You might also try $this->config->load('site') as the config class has a built in loader.
#30

[eluser]wiredesignz[/eluser]
@phpwebdev, You can load a module language file by using: $this->load->language('filename', 'langauge') as described in CI user guide.

Example:
Code:
//modules/{current_module}/language/spanish/spanish_lang.php
$this->load->language('spanish', 'spanish');




Theme © iAndrew 2016 - Forum software by © MyBB