Welcome Guest, Not a member yet? Register   Sign In
User_agent in my_config.php?
#1

[eluser]ThatAirplaneGuy[/eluser]
I would like to be able to detect the user's platform via user_agent library during config load. Depending on what platform the user is running, I will set an 'ENV_TYPE' config variable that I will access throughout the application to create different views, menus, functionality, etc.

I know I can do the user_agent detection in the default controller, but if I link to a separate controller and bypass the default controller, I would bypass the platform detection and would need the platform detection in every one of my controllers. I would rather have it done at the core application level, and let the config variable be accessible by all controllers afterwards.

I have the user_agent library in autoload, but I can't access the library in config.php.

Am I missing an easy fix? Any ideas?

Thanks ahead of time...
CJ


Messages In This Thread
User_agent in my_config.php? - by El Forum - 05-10-2011, 08:11 AM
User_agent in my_config.php? - by El Forum - 05-10-2011, 08:44 AM
User_agent in my_config.php? - by El Forum - 05-10-2011, 01:12 PM
User_agent in my_config.php? - by El Forum - 05-10-2011, 03:50 PM
User_agent in my_config.php? - by El Forum - 05-10-2011, 11:27 PM
User_agent in my_config.php? - by El Forum - 05-11-2011, 09:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB