to put it Live

edited September 2015 in Modules
Hey,

I want to understand 2 things in particular( i am newbie for deploying codeigniter & CMS):-

1) I made the whole web application on a testing server. What things i should consider while deploying so that i can do progressive changes later & then sync with the deployed version.

2) I made my whole front end using a controller( named stu) in an advanced module. The backend is handled by the fuel generated controller (named stu_module).

Right now the fuel/login appears whenever i try to access the front end via "{domain}/stu" --- stu being the name of the advanced module & name of the controller file.
And when i change $config['admin_enabled'] to FALSE -- "{domain}/stu" shows 404_error.
Where should i change so that:-
---- i can access the front end via {domain}/stu without the fuel/login appearing.
---- & back end with {domain}/admin with fuel/login appearing.

I am not much familiar with the server routing techniques & redirecting in CMS. I am trying to understand it but its confusing with so many files in fuel & CI system.

Thanks for the help.
( In server side we have nginx & not apache - i don't know if this will help)

Comments

  • edited 10:07AM
    In your fuel/application/config/MY_fuel.php file, the first config value should be "fuel_path". Is your's set to $config['fuel_path'] = 'stu/'; ? If so, change that to to $config['fuel_path'] = 'admin/'; This will allow you to access it at /admin

    Also, is the main stu controller (at fuel/modules/stu/controllers/stu.php) extending the Fuel_base_controller? If so, this will redirect you to login to FUEL. If you want it to be a front-end controller, it should not inherit from that controller. Lastly, you can control the routes for your advanced module in the fuel/modules/stu/config/stu_routes.php file.
  • edited 10:07AM
    Yes i did the first thing already , changed $config['fuel_path'] = 'fuel/' to $config['fuel_path'] = 'admin/'.

    About the second part, i have extended to the Fuel_base_controller. And now i realize there would be a lot of changes which would be required. :((....should have thought about it earlier.

    Can i still use the fuel utilities/functions by loading any of its library ? Like i am doing using the Ion Auth plugin.

    I think, the only solution left to me is to extend to CI_controller & debug the whole code, replacing fuel with the CI utilities. :|
  • edited September 2015
    OR is it possible to force login the viewer with a limited permission( only to stu advanced controller) whenever they try to access the "{domain}/stu" & let the viewer enter the credentials if it accesses the "{domain}/admin"???

    I just want to know is it possible or not -- i will be trying that first, i suppose .
  • edited 10:07AM
    You can use the fuel object anywhere by accessing the main $CI object (get_instance() function) or using $this->fuel in the controller (which is the CI object).

    Also, you can pass false in the constructor of your extended controller to bypass authorization and handle it outside of the base class (the fuel/modules/fuel/controllers/manage.php controller does this).
  • edited 10:07AM
    I cant tell you how thankful i am - that false parameter saved me.
    Yesterday, i spent 2hours analysing all the changes i have to do if i have to remove fuel class.

    Thanks a Ton. :D
Sign In or Register to comment.