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