找回密码
 注册
查看: 2716|回复: 0
收起左侧

7.3.2的已阅改成7.x之前的,直接完成阅读

[复制链接]

5312

主题

8317

帖子

1万

积分

管理员

出售国内外虚拟空间

Rank: 10Rank: 10Rank: 10

积分
14660
帖子
8317
精华
67
体力
14660 点
蓝豆
2391 点
注册时间
2007-6-8

终身成就奖LY官方团队会员身份ID卡

发表于 2009-5-14 09:20:41 | 显示全部楼层 |阅读模式
1.jpg

7.3.2把已阅功能变成消息模式,很多人都不习惯,其实我也不习惯,所以就改了下,代码很简单,大家别拍砖

功能:直接跳转,完成,并自动发消息给楼主.
打开masingle.php
找到
  1. } elseif ($action == inspect){  $forumset = unserialize($foruminfo[forumset]); InitGP(array(pid,page,p,ifmsg,nextto)); $rt = $db->get_one(SELECT inspect FROM pw_threads WHERE tid=.pwEscape($tid) . " AND fid=".pwEscape($fid)); list($lou) = explode("\\t",$rt[inspect]); $pid > $lou && $lou = $pid; $inspect = $lou."\\t".addslashes($windid); $db->update(UPDATE pw_threads SET inspect=.pwEscape($inspect). WHERE tid=.pwEscape($tid)); delfcache($fid,$db_fcachenum); $threaddb = $db->get_one("SELECT author,subject FROM pw_threads WHERE tid=".pwEscape($tid)); $postdate = get_date($timestamp,Y-m-d H:i); $tmpurl="<a href=read.php?tid=$tid&page=$page#$p>"; $msg = array( toUser=> $threaddb[author], subject=> 您的帖子被阅读, content=> 您的帖子:".$tmpurl.$threaddb[subject].</a>",于.$postdate .被版主<font color=orange><b> .$windid.</b> </font>阅读到<font color=red>.$lou.</font>楼. ); pwSendMsg($msg); refreshto("read.php?tid=$tid&page=$page#$p",operate_success);  } elseif ($action == pingcp) {
复制代码

替换成:
  1. } elseif ($action == inspect) {  $forumset = unserialize($foruminfo[forumset]); if (empty($forumset[inspect])) { Showmsg(undefined_action); } InitGP(array(pid,page,p)); if (empty($_POST[step])) { if (!empty($foruminfo[t_type]) && ($isGM || pwRights($isBM,tpctype))) { $iftypeavailable = 1; } $reason_sel = ; $reason_a= explode("\\n",$db_adminreason); foreach ($reason_a as $k=>$v) { if ($v = trim($v)) { $reason_sel .= "<option value=\\"$v\\">$v</option>"; } else { $reason_sel .= "<option value=\\"\\">-------</option>"; } } require_once PrintEot($template);footer();  } else { PostCheck(); InitGP(array(ifmsg,nextto)); $rt = $db->get_one(SELECT inspect FROM pw_threads WHERE tid=.pwEscape($tid) . " AND fid=".pwEscape($fid)); empty($rt) && Showmsg(undefined_action); list($lou) = explode("\\t",$rt[inspect]); $pid > $lou && $lou = $pid; $inspect = $lou."\\t".addslashes($windid); $db->update(UPDATE pw_threads SET inspect=.pwEscape($inspect). WHERE tid=.pwEscape($tid)); delfcache($fid,$db_fcachenum); if ($ifmsg) { $threaddb = $db->get_one("SELECT author,subject FROM pw_threads WHERE tid=".pwEscape($tid)); $postdate = get_date($timestamp,Y-m-d H:i); $msg = array( toUser=> $threaddb[author], subject=> inspect_title, content=> inspect_content, other=> array( manager=> $windid, tid=> $tid, subject=> $threaddb[subject], postdate=> $postdate, reason=> stripslashes($atc_content) ) ); pwSendMsg($msg); } if (!empty($nextto)) { if (!defined(AJAX)) { refreshto("mawhole.php?action=$nextto&fid=$fid&seltid=$tid",operate_success); } else { $selids = $tid; Showmsg(ajax_nextto); } } else { refreshto("read.php?tid=$tid&page=$page#$p",operate_success); } }  } elseif ($action == pingcp) {
复制代码
出售国内或美国高性能虚拟空间,高速VPS以及服务器! 同时承接各种类型的网站制作,网站维护,支付宝交易安全放心!    联系QQ:6102031
懒得打字嘛,点击右侧快捷回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

网站公告上一条 /2 下一条

GMT+8, 2024-4-29 09:27 , Processed in 0.125000 second(s), 28 queries , Gzip On.

© 2006-2022 Powered by Discuz! X3.4

快速回复 返回顶部 返回列表