CodeIgniter Forums
Using Wordpress Admin with CodeIgniter Application - 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: Using Wordpress Admin with CodeIgniter Application (/showthread.php?tid=27755)



Using Wordpress Admin with CodeIgniter Application - El Forum - 02-19-2010

[eluser]Unknown[/eluser]
Hey guys,

I've tried doing some research on this topic, but I haven't found an exact solution that suits my needs yet.

Basically I'm building a website in CodeIgniter, but using WordPress for the site's blog. Now what I would like to do is find a way to use the WordPress admin for administration of my CodeIgniter application, as opposed to writing a custom administration system from scratch directly in CodeIgniter.

All the other posts on this subject that I could find talked about implementing WordPress directly into CodeIgniter, so that you can use WordPress functions in your CodeIgniter application. This doesn't help me, because in my case, I want to keep my CodeIgniter application independent. The only function I may wish to share between the two applications is the user authentication system, but that can be implemented later.

Any ideas on how I would go about doing this? My first thought is to create some sort of custom API in my CodeIgniter application, that I can access through a WordPress plugin. I'm not too sure how I would do that though, and how secure it would be. Nonetheless I'm open to all suggestions.

Thanks,
Scott


Using Wordpress Admin with CodeIgniter Application - El Forum - 02-19-2010

[eluser]stef25[/eluser]
If WP stores the logged in status in the php session, try doing a print_r($_SESSION) in any CI controller and see if anything usable shows up. If it does, you could copy the necessary values to a CI session and use those values throughout your app.

I'm not sure what your directory structure is?

Might be completely wrong on this.


Using Wordpress Admin with CodeIgniter Application - El Forum - 02-19-2010

[eluser]Unknown[/eluser]
The user authentication integration is only something I may consider adding in the long run, not really interested in how to incorporate it at this point. What I'm really focused on is the administration integration.


Using Wordpress Admin with CodeIgniter Application - El Forum - 02-28-2010

[eluser]Unknown[/eluser]
How did you go with a solution for this?

@stef25 nothing is shown in the session (I think WP uses DB sessions by default).

I've tried a few different ways, but I just get the WP login screen which just loops and won't show the CI pages.


Using Wordpress Admin with CodeIgniter Application - El Forum - 03-18-2010

[eluser]angeal99[/eluser]
Please provide us the code Sad

i`am need it