| 
	
 | 
 Posted by surfivor on 03/09/07 22:52 
I am doing some preliminary research as we are slated to do a project 
with wordpress. I looked at the wordpress code and realized why I like 
MVC so much (Rails) because the code mixed in with the rendering 
looked like a mess to me. I'm not at all sure exactly what we will be 
doing on the project as the details haven''t been discussed yet. 
 
I found that the Wordpress API doesn't look well documented. I set up 
wordress and created some blog posts. I was then able to install 
codeigniter and access the wordpress database through codeigniter. I 
decided to try doing my research with codeigniter because it's 
lightweight and it's unclrear if they will let us use an MVC framework 
to begin with, but I figured codeigniter was the best bet to try to 
present since the learning curve would be smaller and getting it to 
work with wordpress if that is possible might be easier etc. 
 
The biggest thing to work out it seems like is to try to figure out 
how to get both codeigniter and wordpress working together because 
each's engine probaly figures it owns the URL's comeing from the 
browser. I can actually get them to render together on the same page, 
but it's not consistent, and I am not sure what is really going on.  I 
unclear how to work out a scheme on that that would be guaranteed to 
work all the time. 
I am new to PHP and am not sure how the URL paths are worked out with 
these engines or otherwise. 
 
Basically the codeigniter has a fairly long index.php and Wordpress 
has a short one. I combined them and the wordpress is at the end and 
starts where it says 
"Short and sweet" below. Obviously pages that are totally seperate, 
that is our stuff from wordpress stuff would be easier to work out, 
but I am not sure if anyone has ever done stuff like this and if there 
are some strategies you could use. 
 
 
# long bunch of codeigniter index.php stuff starts here 
.... 
... 
 
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; 
# end of codeigniter index.php 
# Wordpress index.php starts: 
 
/* Short and sweet */ 
define('WP_USE_THEMES', true); 
require('./wp-blog-header.php'); 
?>
 
  
Navigation:
[Reply to this message] 
 |