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

[eluser]sortof_user[/eluser]
Dear All,

I wanted to raise an issue I’ve been working on for hours and hours and it is getting me frustrated. I successfully fresh installed ci1.7.2 on local machine also dx_auth library PHP5 version.

However now I wanted dx_auth to be modular therefore I copied the c/m/v of dx_auth into application/modules/auth adjusted the related config files. I’ve kept the dx_auth libraries in the application/library however I renamed them to be MX_Auth and MX_Auth_Event also changed all the references to have MX prefix instead of having DX in both application/library and application/modules/auth.

Now whenever I point the browser to localmachine/folder/auth the login form appears with no errors however it seems that it is not logging me on. I tested now “MX_Auth” _set_session, is_logged_in and check_uri_permissions the testing result was I am not able to login and always returning false when calling is_logged_in therefore I am always redirected to modules/auth/views/auth/login_form

Any Advice would be indeed appreciated.

Many Thanks Indeed

[eluser]sortof_user[/eluser]
Dear wiredesignz,

Please can you suggest an example on using dx_auth with ME Modular Extensions PHP5.

Kind Regards,

Ihab Arnous.

[eluser]sortof_user[/eluser]
[quote author="wiredesignz" date="1256671054"]The access control part of DX_Auth (or any authentication library) is not suitable for a module because it is needed by the entire application. But you may put the registration and login parts in to a module.[/quote]

Dear wiredesignz,

Please can you suggest an example on using dx_auth with ME Modular Extensions PHP5.

Kind Regards,

Ihab Arnous.

[eluser]ciGR[/eluser]
Hello,
I'just give a try to Modular extensions and I try to extend the Loader class to autoload some custom classes.I read that I must use MX_Loader instead of the MY_Loader
So to start extending I have in my app/libraries a MX_Loader.php file with the below code
Code:
if (!defined('BASEPATH'))   exit('No direct script access allowed');

/* extend the loader library */

class MX_Loader extends CI_Loader {
    /* extend _ci_autoloader for add the possibility to autoload classes */
    public function MX_Loader(){
        parent::CI_Loader();
    }
}

But after that, nothing works on load library, can't load models,views... any more.

Where is my fault?

Thank you!

[eluser]wiredesignz[/eluser]
Auto-loading custom classes within CI can be easily done without extending the Loader class.

But in any case your "MX_Loader" class should extend the "Loader" class not "CI_Loader" if you need that functionality.

[eluser]ciGR[/eluser]
what I want to do by extending the loader is to add functionality into config/autoload.php use the
Code:
$autoload['class']=array('class_name');
to autoload some custom classes. I can't to that with create custom libraries, I want these classes to create some custom controllers and models which later I can extend that with my app controllers instead classic Controller

I tried to extend the Loader but I have no result, in user_guide tell to extend the CI_Loader

Thank you.

[eluser]wiredesignz[/eluser]
Modular Extensions uses PHP5 spl_autoload, so you do not need to specifically load parent classes.

If your parent classes are located in the applicaton/libraries directory they will be referenced automatically.

[eluser]ciGR[/eluser]
[edit]
Yes you have right, I must extend the Loader instead CI_Loader. I see that in the file Controller.php of modular extension package, there is a Loader class which extends the CI_Loader.

When I extend the CI_Loader the Modular extensions's Loader class never used so I had the problem to load models and views which was into module directories.I get this problem because I never see any MY_Loader.php class file into libraries in modular extensions package, I did't imagine that it will be into Controller.php

Now it's all ok!



--------------------------------- old message ----------------------------------------
Thank you!!
Yes I know these functionσ, but help me that you tell me that the files into libraries auto-included.
I know how to include a class, but what exactly I wanted was to have a directory includes/classes/ into which I place my classes. And into Controllers I can write for example,
Code:
class content_admin extends admin_controller {

}
or
class content extends public_controller {

}

without any __autoload function, or include(...) into controller files, I wanted this work transparently.
It's not about a real project, just exercising with CI to customize it, so any other development uses this custom classes and Modular extensions can make his own 3rd party modules, like an api. Just an exercise to understand better the CI.

So thank you for your time and sorry If I am off-topic of the modular extensions.

[eluser]AndyBC[/eluser]
Anyone contemplating rewriting Modular Extensions so it works with Codeigniter 2.0?
I tried to hack the files myself, but it's just beyond me ..

Best regards
AndyBC

(yes, I know "Modular Separation" has support for CI 2.0, but I need the hmvc in "Modular Extensions")

[eluser]wiredesignz[/eluser]
I will be providing a CI2.0 compatibility update to Modular Extensions - PHP5 soon.




Theme © iAndrew 2016 - Forum software by © MyBB