x2.5 开启广播后游客可以访问个人空间的解决方案
1、打开source\module\home\home_space.php,查找if(helper_access::check_module(‘follow’)) {
$do = $_GET['do'] = ‘follow’;
} else {
$do = $_GET['do'] = !$_G['setting']['homepagestyle'] ? ‘profile’ : ‘index’;
}
}
if($_GET['do'] == ‘follow’) {
if($uid != $_G['uid']) {
$_GET['do'] = ‘view’;
$_GET['uid'] = $uid;
}
require_once libfile(‘home/follow’, ‘module’);
exit;
} elseif(empty($_GET['do']) && !$_G['inajax'] && !helper_access::check_module(‘follow’)) {
$do = ‘profile’;
}修改成
if(helper_access::check_module(‘space’)) {
$do = $_GET['do'] = ‘space’;
} else {
$do = $_GET['do'] = !$_G['setting']['homepagestyle'] ? ‘profile’ : ‘index’;
}
}
if($_GET['do'] == ‘space’) {
if($uid != $_G['uid']) {
$_GET['do'] = ‘view’;
$_GET['uid'] = $uid;
$_GET['privacy'] = 1;
}
require_once libfile(‘home/profile’, ‘include’);
exit;
} elseif(empty($_GET['do']) && !$_G['inajax'] && !helper_access::check_module(‘follow’)) {
$do = ‘profile’;
}2、template\模板目录\home\space_header_personalnv.htm,如果非默认模板下没有home 则直接修改默认模板
查找:
<!–{if empty($personalnv['banitems']['follow']) && helper_access::check_module(‘follow’)}–>
<li><a href=”home.php?mod=follow&uid=$space&do=view”><!–{if !empty($personalnv['items']['follow'])}–>$personalnv['items']['follow']<!–{else}–>{lang follow}<!–{/if}–></a></li>
<!–{/if}–>修改成
<!–{if $_G['uid']}–>
<!–{if empty($personalnv['banitems']['follow']) && helper_access::check_module(‘follow’)}–>
<li><a href=”home.php?mod=follow&uid=$space&do=view”><!–{if !empty($personalnv['items']['follow'])}–>$personalnv['items']['follow']<!–{else}–>{lang follow}<!–{/if}–></a></li>
<!–{/if}–>
<!–{/if}–>
页:
[1]