MY_Controller extension problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: MY_Controller extension problem (/showthread.php?tid=55487) |
MY_Controller extension problem - El Forum - 10-29-2012 [eluser]jacobson[/eluser] Hello, I have a problem with facebook. I want the "log in with facebook" button to be visible on all pages. This means that I need the whole code in controller/action related with facebook (about 20 lines).I wanted to put all of this into just one file. I wanted to use core extension My_Controller. I added all of this lines to __construct to My_Controller and added to my site_controlle to extend My_Controller but it's not working. Facebook is not visible :/ Am I doing something wrong ? is there any other possible solution for this problem ? MY_Controller extension problem - El Forum - 10-29-2012 [eluser]solid9[/eluser] Don't add the 'FaceBook' login button codes in the _construct instead add it into your Header View. By doing this it will show up to all of your pages. Hope it will help you. MY_Controller extension problem - El Forum - 10-29-2012 [eluser]jacobson[/eluser] earlier i had it on my index page only : Code: function __construct() { Code: public function index() { but I want to have it on all pages that's why I wanted to extend the controller. MY_Controller extension problem - El Forum - 10-29-2012 [eluser]solid9[/eluser] oAuth 2.0 |