Welcome Guest, Not a member yet? Register   Sign In
Autoload a controller
#1

[eluser]hostingx[/eluser]
Hello,

How can i autoload a controller? so with every request it is loaded?

I have a controller users and a controller forum

When i'm in forum, i also need some functions out of users, how can i do this?

Thanks in forward!
#2

[eluser]wiredesignz[/eluser]
Search for `MY_Controller` in the forums.
#3

[eluser]hostingx[/eluser]
Well i found a way, that you make it a my_controller and put it into the librarie folder, but i also need to recall it! So i have to use the controller it self too!

For users to login etc...
#4

[eluser]wiredesignz[/eluser]
If you extend your other page controllers from MY_Controller, you will have its methods available to them.
#5

[eluser]ontguy[/eluser]
I've put an example of how it can be done here: http://ellislab.com/forums/viewthread/72296/#357461




Theme © iAndrew 2016 - Forum software by © MyBB