Joomla and Codeigniter - 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: Joomla and Codeigniter (/showthread.php?tid=39636) |
Joomla and Codeigniter - El Forum - 03-16-2011 [eluser]alejandronanez[/eluser] Hi there, how are you guys. The thing is that now I'm developing a small web application with CI and later I will integrate it with Joomla in a wrapper. (I have to do this because the client has been working with Joomla from a long time ago) The thing is that I need to know what user is logged in (the user logs in with joomla) to know what method call with Codeigniter. Am I clear? Has anyone done this before? Thanks guys Joomla and Codeigniter - El Forum - 04-03-2011 [eluser]danielgrin[/eluser] I based my solution on code found here http://forum.joomla.org/viewtopic.php?f=304&t=580193. At first I tried to load the Joomla framework within a CI library, but this caused a series of errors, and seemed like more trouble than it was worth. My current working solution is to use CURL to access a custom script. I'm sure this could be refined further but I needed a quick solution. JOOMLA SIDE (loads Joomla framework and returns logged in user object as JSON) file: get_joomla_user.php (could be in the site root or anywhere as long as paths are correct) Code: <?php CI SIDE - fetch user object via file_get_contents file: CI_APP_FOLDER/libraries/Joomla_user.php Code: <?php I hope this helps. Daniel Joomla and Codeigniter - El Forum - 04-09-2011 [eluser]gowrav vishwakarma[/eluser] you should see USE CI FOR JOOMLA DEVELOPMENT or USING CI FOR JOOMLA DEVELOPMENT post a reply back to developer or forum if have any trouble .. Joomla and Codeigniter - El Forum - 04-09-2011 [eluser]gowrav vishwakarma[/eluser] in any of your controller (made in xCIDEveloper) to know the current user logged in use the follwoing line.. Code: $current_user_id=JFactory::getUser()->id; Joomla and Codeigniter - El Forum - 04-09-2011 [eluser]danielgrin[/eluser] My requirements were to bridge an existing CI application with Joomla so that they still functioned independently. Adding CI to work within Joomla components was not an option, although it looks like something I would like to explore in the future. Joomla and Codeigniter - El Forum - 04-09-2011 [eluser]gowrav vishwakarma[/eluser] Well I haven't tried it a well but if you are good at CI internals then .. just replace this systems application with your one .. and yes don't forget to look at some config there in.. Joomla and Codeigniter - El Forum - 07-29-2011 [eluser]gowrav vishwakarma[/eluser] Now Develop for Joomla in CodeIgniter, xCIDeveloper 0.6 released. installs in Joomla 1.5, 1.6 and 1.7 in same way and components developed in xCI works same in any of joomla version. http://www.xavoc.com/ |