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

[eluser]wiredesignz[/eluser]
Create a normal {$module}/config/autoload.php file entry such as:
Code:
$autoload['config'] = array('some_filename');

Or in your controller create an $autoload class variable using the following format.
Code:
class SomeController extends Controller
{
    protected $autoload = array('config' => array('some_filename'));
}

[eluser]dexcell[/eluser]
Thank you wiredesignz Smile

[eluser]dexcell[/eluser]
[quote author="wiredesignz" date="1225359423"]Create a normal {$module}/config/autoload.php file entry such as:
Code:
$autoload['config'] = array('some_filename');

Or in your controller create an $autoload class variable using the following format.
Code:
class SomeController extends Controller
{
    protected $autoload = array('config' => array('some_filename'));
}
[/quote]

Sorry to bugging you again wiredesignz,
I've failed to convert my project to ME,

Here is what i do:

-Delete all matchbox related file
-Install ME by copying Controller.php, Modules.php and MY_Router.php into application/libraries folder

-Create the {$module}/config/autoload.php as you suggested

here is the autoload that i created (both in their own config folder)

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$autoload['libraries'] = array('cl_auth');
$autoload['config'] = array('cl_auth');

?>

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/* the ignitedrecord library is in subfolder named ignitedrecord also */
$autoload['libraries'] = array('ignitedrecord/ignitedrecord');

?>

- Run my base url, error showup while usually it runs fine.

Any help is appreciated. Thank you Smile

[eluser]Sean Cannon[/eluser]
First, ME is awesome and is making my life ten times easier!

Second, I thought that I would write a little mini-tutorial to help people with loading global views.

If you are looking to have some global views (header, footer, etc.) your directory structure should look something like this:

Code:
application
--config
--controllers
--errors
--helpers
--hooks
--language
--libraries
--models
--modules
----testmodule
------controllers
------models
------views
--views

All you have to do is place any "global views" into the views folder directly underneath the application folder.

You can load them as such:

Code:
$this->load->view(viewname)

Don't make the mistake of deleting the MVC folders directly beneath the application folder as I did. I spent a lot of time trying to figure it out when it was very simple. Hope this helps someone.

[eluser]Armorfist[/eluser]
Hello,

I have two questions:

In MEv4 you had the function fetch_module to get the current module's name, is there something similar available in MEv5? For now i use:

Code:
function fetch_module ()
    {
        return Router::$path;
    }
In the MY_Router.php file.

Second question:
I load a number of language files from various modules in a library. I noticed the load->language() function only loads languages from the module calling it, is there a way (without modifying this function) to load languages from other modules?
For example:
Code:
$this->CI->load->language('this_file_is_from_users_module');
$this->CI->load->language('this_file_is_from_permissions_module');

This question applies to models and libraries also.
Thanks,

[eluser]Armorfist[/eluser]
**SOLVED** - Was using the wrong function. I should be using modules::run
Hello,

In another subject, I'm having two more problems:

When I try:

Code:
$data['teste'] = $this->load->module('teste/welcome2')->index();
$this->load->view('welcome_message',$data);

It should get (I THINK!) the contents from the "welcome2" controller (index method) in "teste" module and store it in the $data['teste'] array so it can be echo'd in the view. Instead, its printing the contents from the "welcome2" controller directly above the 'welcome_message' view content. Its not storing the output in the $data['teste'] at all, it just prints it.

Also, if I call a module or controller that doesn't exist for example:

Code:
$data['teste'] = $this->load->module('fakemodule/fakecontroller')->index();
$this->load->view('welcome_message',$data);

It gives a fatal error, in MEv4 it would ignore it and run the code anyway.

Sorry if these are noob questions.
**SOLVED**

Thanks in advance

[eluser]tdktank59[/eluser]
I dont know if its support and I have no clue on how to do it if it is not...

It would be cool to nest modules within modules for example
Modules
- Authentication
-- Login
--- Controllers
--- Views
--- Models
-- Register
--- Controllers
--- Views
--- Models

[eluser]wiredesignz[/eluser]
Modular Extensions 5.1.37 is now available on the wiki.

fixed a library loader bug. Thanks ImageSmith Wink

[eluser]Armorfist[/eluser]
Ignore my last message, I got it now

[eluser]Johan André[/eluser]
Thanks wiredesign!

I been fiddling around with ME5.1 for the last couple of days and I must say it's great.
I used Matchbox before and was quite happy with it, but since testing ME I won't go back.

It's so cool to load controllers from views and it really saves me alot trouble when developing.

All my old modules works just by replacing Matchbox with ME! Even my favorite setup with my own Viewlibrary and DrFConfused reverse routing is a snap with ME! Great work!

You saved me ALOT of work! Smile




Theme © iAndrew 2016 - Forum software by © MyBB