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

[eluser]Andy78[/eluser]
Are there any compatibility issues between Modular Extensions - HMVC version 5.4 and datamapper orm 1.8?
#72

[eluser]fewds[/eluser]
Ok I was able to hack up CI but I know this is not the correct thing to do since it will break on upgrades. So please if anyone has a better solution let me know. But basically this is what I changed in order to get rid of the three default folders (application/controllers, application/models, and application/views) this change was needed since it looks for the controllers folder under the default application folder but since I'm using HMVC I don't want the default three folders! Anyhow he was the quick fix I came up with.

In the system/core/CodeIgniter.php file around line 243 to 248 I changed it from:

if ( ! file_exists(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT))
{
show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.');
}

include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT);

to:

if ( ! file_exists(APPPATH.(str_replace('../','',$RTR->fetch_directory())).$RTR->fetch_class().EXT))
{
show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.');
}

include(APPPATH.(str_replace('../','',$RTR->fetch_directory())).$RTR->fetch_class().EXT);
#73

[eluser]Unknown[/eluser]
When I try to load a library with the same name from 2 different modules and assign a custom object name to one of them via load('name', NULL, 'new_object_name') the second library doesn't get loaded.

I think this is the code in the MX_Loader that prevents loading 2 identical named libraries even though a different object name has been assigned... Shouldn't that be possible since it is with the native CodeIgniter Loader class...

Code:
if (isset($this->_ci_classes[$class]) AND $_alias = $this->_ci_classes[$class])
      return CI::$APP->$_alias;

Is there a way to do it i'm not aware of ? or a fix somewhere ?

Thanks for this great extension wiredesignz
#74

[eluser]osci[/eluser]
After updating to latest version for multilanguage sites i came across this issue

I was loading lang files after having done a modules::run
so the last fetch_module() would return the last activated module and that resulted in language file not found error


I reverted line 38 in MX_Lang.php
from
Code:
public function load($langfile, $lang = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')    {
to
Code:
public function load($langfile, $lang = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '',$_module = NULL)    {


and line 51 in MX_Lang.php
from
Code:
$_module = CI::$APP->router->fetch_module();
to
Code:
$_module OR $_module = CI::$APP->router->fetch_module();

and it did the trick.

with current code i have to write
Code:
$this->load->language('module_name/filename', $language)
instead of
Code:
$this->load->language('filename', $language)
?

Are there any issues/reasons that made the change in MX_Lang.php?
#75

[eluser]Unknown[/eluser]
[quote author="tobi15" date="1305277664"]When I try to load a library with the same name from 2 different modules and assign a custom object name to one of them via load('name', NULL, 'new_object_name') the second library doesn't get loaded.

I think this is the code in the MX_Loader that prevents loading 2 identical named libraries even though a different object name has been assigned... Shouldn't that be possible since it is with the native CodeIgniter Loader class...

Code:
if (isset($this->_ci_classes[$class]) AND $_alias = $this->_ci_classes[$class])
      return CI::$APP->$_alias;

Is there a way to do it i'm not aware of ? or a fix somewhere ?

Thanks for this great extension wiredesignz[/quote]

I have the same problem when I'm trying to load partial views in one page (Modules::run()).

I think this is cause by Modules::run using the same CI instance to do its job!

Is there any possible to isolate them? Thanks.
#76

[eluser]Unknown[/eluser]
I'm using this module. Works great! Thanks.
#77

[eluser]osci[/eluser]
[quote author="osci" date="1305399319"]After updating to latest version for multilanguage sites i came across this issue

I was loading lang files after having done a modules::run
so the last fetch_module() would return the last activated module and that resulted in language file not found error


I reverted line 38 in MX_Lang.php
from
Code:
public function load($langfile, $lang = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')    {
to
Code:
public function load($langfile, $lang = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '',$_module = NULL)    {


and line 51 in MX_Lang.php
from
Code:
$_module = CI::$APP->router->fetch_module();
to
Code:
$_module OR $_module = CI::$APP->router->fetch_module();

and it did the trick.

with current code i have to write
Code:
$this->load->language('module_name/filename', $language)
instead of
Code:
$this->load->language('filename', $language)
?

Are there any issues/reasons that made the change in MX_Lang.php?[/quote]

I know I've been bugging you a little lately wiredesignz.
Any reason for the above modifications? Were there any problems and you changed code?
#78

[eluser]wiredesignz[/eluser]
@osci, The latest push to Bitbucket has reverted the language loader code to fix that issue. Thanks.

I don't believe the language class suits being used as a singleton when running under HMVC. So it's still not ideal but it works.
#79

[eluser]osci[/eluser]
It works like a charm.
It fixed my module::run module(A) from module(B) and loading afterwards a language for the module(B) lang not found.
Up and running with the latest version.

Thanks wiredesignz.
#80

[eluser]valuk[/eluser]
Hi,

I am new to HMVC and I am facing a dilemma. I was used to extend form_validation library and put rules in config/form_validation.php. Is it possible to create module with MY_form_validation library in it and put rules in modules/model_name/config/form_validation? Is it wise to put each library in separate module or not? Or maybe put all libraries (pagination, session...) that are commonly used in controllers in one module? Or just leave it in application/libraries? I also face same dilemma for helpers?

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB