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

[eluser]Gjoko Pargo[/eluser]
Hallo wiredesigns.

I beleave I've found a bug in the modular_extensions.php file.

This:
Code:
function language($langfile = array(), $lang = '')
    {        
      $deft_lang = $this->_me->config->item('language');
        
        $idiom = ($deft_lang == '') ? 'english' : $deft_lang;

Should be changed to this:
Code:
function language($langfile = array(), $lang = '')
    {        
      $deft_lang = $this->_me->config->item('language');
        
        $idiom = ($lang == '') ? $deft_lang : $lang;

[eluser]Gjoko Pargo[/eluser]
And there is another thing I've noticed.
When loading a CI native library from a module, I get an error that the language file cannot be loaded. For example when loading the 'validation' library.
Code:
An Error Was Encountered

Unable to load the requested language file: language/validation_lang.php

[eluser]wiredesignz[/eluser]
@Gjoko Pargo,
Thanks for the post on modules language loader, I will correct this in Version 4.0.27

Natve CI Validation still looks for its language file in application/languages or system/languages.

Are you trying to load a module language for validation? Could you explain the problem in more detail or post some code so I can see what is happening. Thanks.

[eluser]Gjoko Pargo[/eluser]
Actually, I am only loading the CI native 'validation' library in the module. Then the library is looking for the predefined strings in it's language file validation_lang.php (in the application/language folder I believe), but it can't find it.

Unfortunately, I am at the office at this point of time, so I don't have the code with me. But I will post it as soon as I get home.

See`ya in couple of hours.

[eluser]codex[/eluser]
I was just wondering if it's possible to move route.php to a module. I tried that but it doesn't work. But will it one day?

[eluser]wiredesignz[/eluser]
I don't think its possible codex. But can you describe why you want this, I may be able to help.

[eluser]codex[/eluser]
[quote author="wiredesignz" date="1208084300"]I don't think its possible codex. But can you describe why you want this, I may be able to help.[/quote]

Well, since ME is all about self-contained modules it seems logical to have all data associated with a module in one place. I was thinking of putting all the routes belonging to a module in modules>module_name>config>routes.php.

Makes sense?

[eluser]wiredesignz[/eluser]
Unfortunately routing occurs long before a controller or even a module is loaded, so its not really practical. Nice idea though. Wink

[eluser]codex[/eluser]
[quote author="wiredesignz" date="1208085050"]Unfortunately routing occurs long before a controller or even a module is loaded, so its not really practical.[/quote]

Which makes perfect sense (how would CI know where a module is located if the 'locator' is nested in the module itself?). Would be nice though if it *could* work that way ;-)

[eluser]wiredesignz[/eluser]
One thing you could try is a routes.php file in the application/modules directory then have an include APPPATH.'modules/routes.php'; directive in config/routes.php




Theme © iAndrew 2016 - Forum software by © MyBB