1. 打开 admin/misc.inc.php 找:
- $query = $db->query("SELECT groupid, grouptitle FROM {$tablepre}usergroups WHERE groupid<>'7' AND type<>'member'");
复制代码
改为:
- $query = $db->query("SELECT groupid, grouptitle FROM {$tablepre}usergroups ORDER BY type");
复制代码
2. 打开 index.php 找:
- $whosonline[] = $online;
- } else {
- break;
复制代码
改为:
- $whosonline[] = $online;
- } else {
- if (isset($_DCACHE['onlinelist'][7])) {
- $online['icon'] = $_DCACHE['onlinelist'][7];
- $online['username'] = '游客';
- $online['fid'] = $online['fid'] ? $forumname[$online['fid']] : 0;
- $online['action'] = $actioncode[$online['action']];
- $online['lastactivity'] = gmdate($timeformat, $online['lastactivity'] + ($timeoffset * 3600));
- $whosonline[] = $online;
- }
复制代码
找:
- $query = $db->query("SELECT uid
复制代码
后面加上:
找(共2处):
前面加上(2处都改):
- $online['ip'] = $online['ip1'].'.'.$online['ip2'].'.'.$online['ip3'].'.'.$online['ip4'];
- if($adminid==1||$adminid==2||$adminid==3) {
- require_once $discuz_root.'./include/misc.func.php';
- $online['iplocation'] = convertip($online['ip']);
- }
复制代码
以上代码能让管理组都看到IP和来自!
3. 打开templates/default/index.htm 找:(最后加上一个空格)
- <a href="viewpro.php?uid=$online[uid]"
复制代码
改为:
- <!--{if $online[uid]}-->
- <a href="viewpro.php?uid=$online[uid]"
- <!--{else}-->
- <a href="###"
- <!--{/if}-->
复制代码
找:
- <!--{if $online['fid']}-->{LF}{lang forum}: $online[fid]<!--{/if}-->
复制代码
后面加上:
- <!--{if $adminid==1}-->{LF}{lang online_ip}: $online[ip]{LF}来自:$online[iplocation]<!--{/if}-->
复制代码
注意:先把游客图片放到images/common/目录下,然后进入系统设置后台--其他设置--在线列表定制--中设置了游客的图片,游客才能显示!
[ 本帖最后由 逍x遥y 于 2006-3-5 21:10 编辑 ] |