7.3.2的已阅改成7.x之前的,直接完成阅读
7.3.2把已阅功能变成消息模式,很多人都不习惯,其实我也不习惯,所以就改了下,代码很简单,大家别拍砖
功能:直接跳转,完成,并自动发消息给楼主.
打开masingle.php
找到
} elseif ($action == inspect){$forumset = unserialize($foruminfo); 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); $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, subject=> 您的帖子被阅读, content=> 您的帖子:\".$tmpurl.$threaddb.</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) {
替换成:
} elseif ($action == inspect) {$forumset = unserialize($foruminfo); if (empty($forumset)) { Showmsg(undefined_action); } InitGP(array(pid,page,p)); if (empty($_POST)) { if (!empty($foruminfo) && ($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); $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, subject=> inspect_title, content=> inspect_content, other=> array( manager=> $windid, tid=> $tid, subject=> $threaddb, 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) {
页:
[1]