{"id":9,"date":"2011-08-05T03:06:36","date_gmt":"2011-08-05T03:06:36","guid":{"rendered":"http:\/\/www.uut8.com\/?p=7"},"modified":"2011-08-05T03:06:36","modified_gmt":"2011-08-05T03:06:36","slug":"%e6%8e%a5%e6%94%b6%e6%88%96%e5%8f%96%e6%b6%88%e4%b8%bb%e9%a2%98%e5%9b%9e%e5%b8%96%e6%8f%90%e9%86%92%e7%9a%84%e5%8a%9f%e8%83%bd%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.uut8.com\/?p=9","title":{"rendered":"\u63a5\u6536\u6216\u53d6\u6d88\u4e3b\u9898\u56de\u5e16\u63d0\u9192\u7684\u529f\u80fd\u5206\u6790"},"content":{"rendered":"<p>\u5728Discuz!\u4e4b\u524d\u4e00\u7cfb\u5217\u7248\u4e2d\uff0c\u4e00\u76f4\u6709\u4e2a\u529f\u80fd\uff0c\u53eb\u5173\u6ce8\u6b64\u4e3b\u9898\uff0c\u4e00\u6709\u56de\u590d\uff0c\u5c31\u4f1a\u901a\u77e5\u8fd9\u4e9b\u5173\u6ce8\u6b64\u4e3b\u9898\u7684\u4eba\uff0c\u4ee5\u77ed\u6d88\u606f\u7684\u65b9\u5f0f\u3002\u5728Discuz!X\u7cfb\u5217\u4e2d\uff0c\u53ea\u6709\u4e3b\u9898\u7684\u4f5c\u8005\u624d\u6709\u8fd9\u4e2a\u529f\u80fd\uff0c\u63a5\u6536\u6216\u53d6\u6d88\u56de\u590d\u63d0\u9192\u3002\u73b0\u5728\u5206\u6790\u4e00\u4e0bDiscuz!X\u7cfb\u5217\u7684\u8fd9\u4e2a\u529f\u80fd\uff0c\u5982\u679c\u7ad9\u957f\u6709\u5174\u8da3\uff0c\u8fd8\u53ef\u4ee5\u4f9d\u7167\u8fd9\u4e2a\u601d\u8def\u53bb\u81ea\u5df1\u52a8\u624b\u4fee\u6539\u4e00\u756a\uff0c\u672a\u5c1d\u4e0d\u53ef\u3002<\/p>\n<p>\u9996\u5148\u6211\u4eec\u770b\u770b\u5728\u6a21\u7248\u4e2d\u7684\u4ee3\u7801\uff1a<\/p>\n<pre class=\"brush:xml\">&lt;!--{if $thread['authorid'] == $_G['uid']}--&gt;\n        &lt;span class=\"pipe\"&gt;|&lt;\/span&gt;\n\t    &lt;!--{if $replynotice == 1}--&gt;\n\t            &lt;a id=\"replynotice\" href=\"forum.php?mod=misc&amp;action=replynotice&amp;op=ignore&amp;tid=$_G[tid]\" status=\"1\" onclick=\"ajaxmenu(this, 3000, 0, 0, '43', function () {replyNotice();});return false;\"&gt;{lang ignore_replynotice}&lt;\/a&gt;\n\t    &lt;!--{else}--&gt;\n\t            &lt;a id=\"replynotice\" href=\"forum.php?mod=misc&amp;action=replynotice&amp;op=receive&amp;tid=$_G[tid]\" status=\"0\" onclick=\"ajaxmenu(this, 3000, 0, 0, '43', function () {replyNotice();});return false;\"&gt;{lang receive_replynotice}&lt;\/a&gt;\n            &lt;!--{\/if}--&gt;\n&lt;!--{\/if}--&gt;<\/pre>\n<p><!--more--><\/p>\n<pre class=\"brush:xml\"><\/pre>\n<p>\u610f\u601d\u662f\u5f53\u4e3b\u9898\u7684\u4f5c\u8005\u548c\u5f53\u524d\u767b\u9646\u7684uid\u4e00\u81f4\uff0c\u4e5f\u5c31\u662f\u4e3b\u9898\u4f5c\u8005\u6d4f\u89c8\u65f6\uff0c\u663e\u793a\u4ee5\u4e0b\u5185\u5bb9\u3002$replynotice\u7b49\u4e8e1\uff0c\u5219\u5f53\u524d\u72b6\u6001\u663e\u793a\u4e3a\u53d6\u6d88\u56de\u590d\u901a\u77e5\uff0c\u53cd\u4e4b\u5219\u663e\u793a\u63a5\u6536\u56de\u590d\u901a\u77e5\u3002\u8fd9\u91cc\u662f\u901a\u8fc7ajax\u5f02\u6b65\u5904\u7406\u7684\u3002\u6211\u4eec\u770b\u5904\u7406\u5f97\u94fe\u63a5\u662f\u63d0\u4ea4\u5230f orum.php?mod=misc&amp;action=replynotice&amp;op=ignore&amp;tid=$_G[tid]\uff0c\u90a3\u4e48\uff0c\u6211\u4eec\u5c31\u987a\u7740\u8fd9\u4e2a\u5730\u5740\u67e5\u770b\u4ee3\u7801\uff0cmod\u7b49\u4e8emisc\uff0c\u8c03\u7528\u7684\u5c31\u662f\u8c03\u7528source\\module\\forum\\forum_misc.php\u6587\u4ef6\uff0caction\u7b49\u4e8ereplynotice\uff0c\u88ab\u5f53\u4f5c\u662f\u4e00\u4e2a\u6761\u4ef6\u6765\u5904\u7406\uff0c\u5f53action\u7b49\u4e8ereplynotice\uff0c\u5219\u4f1a\u53bb\u64cd\u4f5c\u6570\u636e\u5e93\uff0c\u662f\u53d6\u6d88\u662f\u63a5\u6536\uff0c\u90fd\u5728\u8fd9\u91cc\u5904\u7406\u3002<\/p>\n<pre class=\"brush:php\">elseif($_G['gp_action'] == 'replynotice') {\n\t$tid = intval($_G['gp_tid']);\n\t$status = $_G['gp_op'] == 'ignore' ? 0 : 1;\n\tif(!empty($tid)) {\n\t\t$thread = DB::fetch_first(\"SELECT authorid, status FROM \".DB::table('forum_thread').\" WHERE tid='$tid' AND displayorder&gt;='0'\");\n\t\tif($thread['authorid'] == $_G['uid']) {\n\t\t\t$thread['status'] = setstatus(6, $status, $thread['status']);\n\t\t\tDB::query(\"UPDATE \".DB::table('forum_thread').\" SET status='$thread[status]' WHERE tid='$tid'\", 'UNBUFFERED');\n\t\t\tshowmessage('replynotice_success_'.$status);\n\t\t}\n\t}<\/pre>\n<p>\u6211\u4eec\u770b\u5230$_G[&#8216;gp_action&#8217;] == &#8216;replynotice&#8217;\u65f6\uff0c\u9996\u5148intval\u4e00\u4e0btid\u503c\uff0c\u7136\u540e\u5f53\u524d\u7684op\u503c\u662f\u4e0d\u662f\u7b49\u4e8eignore\uff0c\u5373\u53d6\u6d88\uff0c\u5982\u679c\u662f\uff0c\u5219$stauts\u7b49\u4e8e0\uff0c\u5426\u5219\u7b49\u4e8e1\u3002\u7136\u540e\u5224\u65ad\u662f\u5426\u4e3b\u9898\u4f5c\u8005\u548c\u5f53\u524duid\u4e00\u81f4\uff0c\u5982\u679c\u4e00\u81f4\uff0c\u5219\u5bf9\u4e4b\u524d\u83b7\u53d6\u7684$stauts\u503c\u8fdb\u884csetstatus\u5904\u7406\uff0csetstatus\u5373\u662f\u5bf9\u6570\u503c\u8fdb\u884c\u4e86\u5f02\u6216\u4f4d\u8fd0\u7b97\u5904\u7406\uff0c\u7136\u540e\u5c31\u662f\u66f4\u65b0\u6570\u636e\u5e93\u4e86\uff0c\u5bf9forum_thread\u8868\u7684status\u5b57\u6bb5\u8fdb\u884c\u66f4\u65b0\u3002\u5e76\u63d0\u793a\u66f4\u65b0\u6210\u529f\u3002<\/p>\n<p>\u4e0b\u9762\u5f53\u6b64\u4e3b\u9898\u6709\u4e86\u65b0\u56de\u590d\u7684\u65f6\u5019\uff0c\u7a0b\u5e8f\u53c8\u662f\u600e\u4e48\u5904\u7406\u7684\u5462\uff1f\u6211\u4eec\u6765\u770b\u770bpost_newreply.php\u8fd9\u4e2a\u6587\u4ef6\uff0c\u5927\u7ea697\u884c\u5f00\u59cb\uff1a<\/p>\n<pre class=\"brush:php\">if(!empty($_G['uid']) &amp;&amp; $_G['uid'] != $post['authorid']) {\n\t\tnotification_add($post['authorid'], 'pcomment', 'comment_add', array(\n\t\t\t'tid' =&gt; $_G['tid'],\n\t\t\t'pid' =&gt; $_G['gp_pid'],\n\t\t\t'subject' =&gt; $thread['subject'],\n\t\t\t'commentmsg' =&gt; cutstr(str_replace(array('[b]', '[\/b]', '[\/color]'), '', preg_replace(\"\/\\[color=([#\\w]+?)\\]\/i\", \"\", stripslashes($comment))), 200)\n\t\t));\n\t}<\/pre>\n<p>\u56de\u590d\u540e\uff0c\u7a0b\u5e8f\u5224\u65aduid\u662f\u5426\u4e3a\u7a7a\uff0c\u5e76\u4e14uid\u548c\u4f5c\u8005\u662f\u5426\u662f\u540c\u4e00\u4e2a\u4eba\uff0c\u4e0d\u662f\u7684\u8bdd\uff0c\u5c31\u901a\u77e5\u4f5c\u8005\u3002notification_add\u51fd\u6570\u5c31\u662f\u901a\u77e5\u4f5c\u8005\u5df2\u6709\u4e86\u65b0\u56de\u590d\uff0c\u53c2\u6570\u4e3aauthorid\uff0c\u56de\u590d\u5185\u5bb9\uff0c\u7c7b\u578b\u4e3a\u56de\u590d\uff0c\u8fd8\u6709\u4e2a\u6570\u7ec4\uff1atid\uff0cpid\uff0c\u4e3b\u9898\uff0c\u5185\u5bb9\u3002\u5e76\u66ff\u6362\u6389\u4e86\u91cc\u9762\u7684\u7c97\u4f53\uff0c\u989c\u8272\u7b49\u7684\u6807\u7b7e\u5c5e\u6027\u3002<\/p>\n<p>\u5982\u679c\u54ea\u4f4d\u7ad9\u957f\u6709\u5174\u8da3\uff0c\u53ef\u4ee5\u6cbf\u7740\u8fd9\u4e2a\u601d\u8def\uff0c\u53bb\u505a\u4e9b\u6539\u8fdb\uff0c\u6bd4\u5982\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u5bf9\u4e3b\u9898\u8fdb\u884c\u5173\u6ce8\uff0c\u8fd9\u6837\u5c31\u9700\u8981\u5bf9uid\u505a\u51fa\u5224\u65ad\uff0c\u5e76\u5728\u8868\u4e2d\u52a0\u4e2a\u5b57\u6bb5\uff0c\u4e13\u95e8\u7528\u6765\u5b58\u50a8uid\u7684\u76f8\u5173\u4fe1\u606f\uff0c\u4ee5\u4fbf\u6709\u4e86\u65b0\u56de\u590d\u7684\u65f6\u5019\u8fdb\u884c\u901a\u77e5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728Discuz!\u4e4b\u524d\u4e00\u7cfb\u5217\u7248\u4e2d\uff0c\u4e00\u76f4\u6709\u4e2a\u529f\u80fd\uff0c\u53eb\u5173\u6ce8\u6b64\u4e3b\u9898\uff0c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-discuz"],"_links":{"self":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":0,"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}