I’m using this module. Works great! Thanks.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
January 29, 2011 1:58am
Subscribe [99]#76 / May 16, 2011 4:11am
I’m using this module. Works great! Thanks.
#77 / May 28, 2011 1:01pm
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
frompublic function load($langfile, $lang = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '') {to
public function load($langfile, $lang = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '',$_module = NULL) {
and line 51 in MX_Lang.php
from$_module = CI::$APP->router->fetch_module();to
$_module OR $_module = CI::$APP->router->fetch_module();
and it did the trick.with current code i have to write
$this->load->language('module_name/filename', $language)instead of
$this->load->language('filename', $language)?
Are there any issues/reasons that made the change in MX_Lang.php?
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 / May 28, 2011 7:50pm
@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 / May 29, 2011 5:34am
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 / May 31, 2011 2:17pm
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
#81 / Jun 04, 2011 4:19pm
I have a question regarding checking the existence of modules.
Let’s say I have a module that makes calls to other modules. Is there a way of knowing if a module exists before trying to call it?
In HMVC there is not such functionality.
Should I write a helper to check for folder existence or should I keep registry of installed modules?
Could this feature be added to Modules class?
#82 / Jun 06, 2011 3:26am
hi
using latest reactor with latest hmvc
i get a error Fatal error: Cannot access protected property CI_Form_validation::$CI
if i try to use $this->form_validation->CI =& $this;
#83 / Jun 06, 2011 3:34am
Extend CI_Form_validation (MY_Form_validation) and make $CI a public variable.
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
class MY_Form_validation extends CI_Form_validation
{
public $CI;
}#84 / Jun 06, 2011 6:41am
thanks @wiredesignz that solved the problem
#85 / Jun 06, 2011 8:34am
why am i getting this on my pages?
A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI::$controller
Filename: MX/Loader.php
Line Number: 266I have the latest reactor and using the latest hmvc
#86 / Jun 06, 2011 10:24am
@eokorie, Looks like I introduced a typo on line 266 with my previous update.
I have just corrected that and pushed the fix to Bitbucket. Thanks.
#87 / Jun 07, 2011 5:18pm
Hello wiredesignz,
Congratulations again for your work.
I had a problem here but i don’t know if it is really a bug, let me try to explain for you.
When i’m on this page assignment/student/view, i can’t call other controller with the same name, like: modules::run(‘book/student/search’).
Can you undestand me? I think you can’t load another module with the same controller name.
Thanks.
#88 / Jun 24, 2011 11:42pm
Hi Wiredesignz, I have a problem with: Modules::run(‘module_name/method’).
there are 2 modules:
../modules
|- /mod_one
| - /controllers / mod_one.php
| - /views / mod_one_view.php
|
|- /mod_two
- /controllers / mod_two.php
- /views / mod_two_view.php
mod_one.php
class Mod_one extends MX_Controller {
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->load->view('mod_one/mod_one_view.php')
}
}mod_two.php
class Mod_two extends MX_Controller {
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->load->view('mod_two/mod_two_view.php')
}
}
mod_one_view.php
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>view one</title>
</head>
<body>
<?php
echo "This is view of mod_one module";
?>
</body>
</html>
on mod_two_view.php i use Modules::run(‘mod_one’) or Modules::run(‘Mod_one’) or Modules::run(‘mod_one/index’)... but it not worked.
mod_two_view.php
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>tess</title>
</head>
<body>
<?php
echo Modules::run('mod_one'); //but An Error Was Encountered
//Unable to locate the file: mod_one.php
?>
</body>
</html>
Plz help me!!!!
#89 / Jun 25, 2011 12:00am
If you extend MX_Controller you only use the module name prefix when loading a view from a view sub-directory or from a different module. MX_Loader knows which module to load from.
$this->load->view('mod_one_view');#90 / Jun 25, 2011 12:01am
Try lower case name!
<?php
echo modules::run('mod_one'); //but An Error Was Encountered
//Unable to locate the file: mod_one.php
?>
// Proto type:
<?php echo modules::run('module/controller/method', $param, $...);InsiteFX