Welcome Guest, Not a member yet? Register   Sign In
disabling hooks for some controllers
#1

(This post was last modified: 03-28-2018, 12:54 AM by neuron.)

Hi, 
I builded website which has normal user area and admin user area (admin user controllers are under application/admin/).
I Separated Base controllers for user and admin area in MY_Controller.php by:

PHP Code:
class MY_Controller extends CI_Controller {
    public function 
__construct() {
        
parent::__construct();
    }
}

class 
Public_Controller extends MY_Controller {
    public function 
__construct() {
parent::__construct();
    }
}

class 
Admin_Controller extends MY_Controller
{
    function 
__construct(){
        
parent::__construct();
    }



My issue is I have 'display_override' hook to minify output. I don't want it to run in Admin area.
Also I used this http://www.responsivefilemanager.com/ filemanager plugin for file management. Because of some pathes, minification library causing me issues when I open filemanager. 



Is there way to enable hooks in some areas only?
Reply
#2

Do a check to see which controller you are running in your hook code.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB