最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
discuz x2.5增加IP地址端口号修改图文教程
时间:2022-06-25 16:30:49 编辑:袖梨 来源:一聚教程网
应市公安局网监要求,discuz等交互类站点在用户日志保存时需添加ip端口号的记录。以下为discuz X2.5版本添加ip端口号修改记录:
1. 修改用户状态表`pre_common_member_status`,添加注册ip端口、最后访问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. 修改帖子表`pre_forum_post`,添加发帖时用户ip端口。
ALTER TABLE `pre_forum_post` ADD `useport` CHAR( 6 ) NOT NULL DEFAULT '0' AFTER `useip`
3. 修改程序文件,注册、访问、发帖时记录访客端口号。
①在sourceclasstabletable_common_member.php 292行
查找 'lastip' => (string)$ip, 下面增加两行:
②在sourceclassclass_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));
③在sourceincludepostpost_newreply.php 415行
查找'useip' => $_G['clientip'], 下面增加一行
'useport' => (int) $_SERVER['REMOTE_PORT'],
④在sourceincludepostpost_newthread.php 580行
查找'useip' => $_G['clientip'], 下面增加一行
'useport' => (int) $_SERVER['REMOTE_PORT'],
4. 修改对应需显示端口号得模板文件
①templatedefaulthomespace_profile_body.htm 154行
$space[regip] 后面增加:$space[regipport]
$space[lastip] 后面增加:$space[lastipport]
②templatedefaultforumtopicadmin_getip.htm
$member[useip] 后面增加:
$member[useport]
5. 修改后效果如下图:
相关文章
- 碧蓝航线的里雅斯特期待的便当时间皮肤有什么 04-30
- 明日之后踏浪逐星服装展示攻略 04-30
- 深空之眼幽月塞勒涅刻印搭配核心思路 04-30
- 明日之后红杉茶会护卫队首领BOSS有哪些 04-30
- CF手游段位奖励汇总攻略 04-30
- 无期迷途5-13怎么走攻略 04-30