Discuz! X2.5 增加端口号记录
1. 增加会员状态表字段 注册IP端口、最后访问端口。类型 char 长度6。ALTER TABLE`pre_common_member_status` ADD`regipport` CHAR( 6 ) NOT NULL DEFAULT'0' AFTER`lastip` ,ADD`lastipport` CHAR( 6 ) NOT NULL DEFAULT'0' AFTER`regipport`2. 增加帖子表字段,发帖时的端口。ALTER TABLE`pre_forum_post` ADD`useport` CHAR( 6 ) NOT NULL DEFAULT'0' AFTER`useip`3. 修改程序文件,注册、访问、发帖时记录访客端口号。
3.1、source\class\table\table_common_member.php 292行
搜索 'lastip' => (string)$ip,下面增加两行:'regipport' => (int) $_SERVER['REMOTE_PORT'],
'lastipport' => (int) $_SERVER['REMOTE_PORT'],3.2、source\class\class_member.php 121行
搜索C::t('common_member_status')->update($_G['uid'], array('lastip' => $_G['clientip'], 'lastvisit' =>TIMESTAMP, 'lastactivity' => TIMESTAMP)); 改成: C::t('common_member_status')->update($_G['uid'], array('lastip' => $_G['clientip'],'lastipport' => (int) $_SERVER['REMOTE_PORT'], 'lastvisit' =>TIMESTAMP, 'lastactivity' => TIMESTAMP));3.3、source\include\post\post_newreply.php415行
搜索 'useip' => $_G['clientip'],下面增加一行 'useport' =>(int) $_SERVER['REMOTE_PORT'],3.4、 source\include\post\post_newthread.php580行
搜索 'useip' => $_G['clientip'], 下面增加一行'useport' =>(int) $_SERVER['REMOTE_PORT'],4. 修改模板用于显示
4.1、template\default\home\space_profile_body.htm154行
</em>$space 后面增加:<!--{if $space != 0}-->$space<!--{/if}--></em>$space 后面增加:<!--{if $space != 0}-->$space<!--{/if}-->4.2、template\default\forum\topicadmin_getip.htm
<b>$member 后面增加:<!--{if $member != 0}-->$member<!--{/if}-->
页:
[1]