How to integrate joomla 1.5.x into wordpress

You should install WordPress first.

Now put joomla inside wordpress(wordpress/joomla ).

Now install joomla into same database that are already install wordpress.

All of the header and footer stuff in joomla is used from wordpress so you do not need to restyle it in joomla . All you need to do is to style and work on the content area of the joomla template output.

Steps:
1) Do the full styling of wordpress part. After that, header.php of your wordpress template file and surround the header output stuff with comments like:
<!– STARTHeaderContainer –>

—-
——
—-

<!– ENDHeaderContainer –>

2) Do the full styling of wordpress part. After that, footer.php of your wordpress template file and surround the footer output stuff with comments like:

<!– STARTFooterContainer –>


—-
——
—-

<!– ENDFooterContainer –>

3) Go to Joomla/includes/application.php file, copy paste the class into it.

class Joomlawordpress_ConnectWJ
{
private $_content;
private $_header;
private $_footer;

public function __construct($url, $markerStartHeader = null, $markerEndHeader = null, $markerStartFooter = null, $markerEndFooter = null)
{
$this->_content = file_get_contents($url);
$this->_renderHeader($markerStartHeader, $markerEndHeader);
$this->_renderFooter($markerStartFooter, $markerEndFooter);
}

public function renderHeader($markerStart = null, $markerEnd = null)
{
return $this->_header;
}

private function _renderHeader($markerStart = null, $markerEnd = null)
{
$markerStart = (is_null($markerStart)) ? ‘’ : (string)$markerStart;
$markerEnd = (is_null($markerEnd)) ? ‘’ : (string)$markerEnd;

$headerStart = stripos($this->_content, $markerStart);
$headerEnd = stripos($this->_content, $markerEnd);

$this->_header = substr($this->_content, $headerStart, $headerEnd-$headerStart);
}

public function renderFooter()
{
return $this->_footer;
}

private function _renderFooter($markerStart = null, $markerEnd = null)
{
$markerStart = (is_null($markerStart)) ?” : (string)$markerStart;
$markerEnd = (is_null($markerEnd)) ? ”: (string)$markerEnd;

$footerStart = stripos($this->_content, $markerStart);
$footerEnd = stripos($this->_content, $markerEnd);

$this->_footer = substr($this->_content, $footerStart, $footerEnd-$footerStart);
}

}
4) Inside Joomla theme folder, open index.php and instantiate a class like:

$parts = new Joomlawordpress_ConnectWJ(‘http://example.domain&#8217;);

echo $parts->renderHeader();

5) Inside Joomla theme folder, open index.php and instantiate a class like:

$parts = new Joomlawordpress_ConnectWJ(‘http://example.domain&#8217;);

echo $parts->renderFooter();
Upon refresh of Joomla home page you should now see the WordPress header and footer loaded with Joomla content.

2 thoughts on “How to integrate joomla 1.5.x into wordpress

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s