网(LieHuo.Net)教程 PHPCMS问吧不注册登录匿名进行提问的修改方法,请看下面的代码:
在ask/question.php中
注释掉第2行
//if(!$_userid) showmessage($LANG['please_login'],$MODULE['member']['url'].'login.php?forward='.urlencode(URL));
再把第32行
$info['userid'] = $posts['userid'] = $_userid;
$info['username'] = $posts['username'] = $_username;
替换成
if($_userid == "")
{
$info['userid'] = $posts['userid'] = 0;
$info['username'] = $posts['username'] = "游客";
}
else
{
$info['userid'] = $posts['userid'] = $_userid;
$info['username'] = $posts['username'] = $_username;
}