0
我們有一個Joomla 1.5網站與博客中的子文件夾/blog/
檢查的Joomla登錄從WordPress的博客
我們想在每一頁的頂部的登錄狀態。爲了保持導航的一致性,我們希望在WordPress博客頂部顯示joomla登錄狀態。
例如:
登錄|註冊|幫助
或
您loged作爲斯蒂芬·鮑 |幫助
問題是,雖然scipt正確地返回登錄狀態,如果我將它添加到wordpress模板狀態正確返回並繪製到屏幕,但頁面停止繪製。任何人都有任何想法,我如何阻止Joomla腳本使Wordpress腳本停止。
<?php
define('_JEXEC', 1);
define('JPATH_BASE', '/Library/WebServer/testqueensberrycom');
define('DS', DIRECTORY_SEPARATOR);
require_once (JPATH_BASE .DS.'includes'.DS.'defines.php');
require_once (JPATH_BASE .DS.'includes'.DS.'framework.php');
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
//$mainframe->triggerEvent('onAfterInitialise');
//$mainframe->route();
//$mainframe->authorize('');
$user =& JFactory::getUser();
if (($user->id) > 0){
return 'You are signed in as: <a href="/editprofile/user.html">' . $user->username . '</a> | <a href="/index.php?option=com_content&view=article&id=225">Help</a> | <a href="/index.php?option=com_user&task=logout&return=cGFydG5lci9wcm9jZXNzL3BhcnRuZXIuaHRtbA==">Sign out</a>';
} else {
return '<a href="/index.php?option=com_user&view=login">Login</a> | Join | <a href="/index.php?option=com_content&view=article&id=225">Help</a>';
}
?>
予以明確。這是一個php腳本,我正在嘗試在wordpress安裝中運行。問題本身並不是腳本本身。這是它似乎殺了wordpress會話。 任何接受者? – 2009-08-01 04:17:27