{"id":1780,"date":"2018-07-03T10:12:08","date_gmt":"2018-07-03T02:12:08","guid":{"rendered":"http:\/\/www.baishitou.cn\/?p=1780"},"modified":"2018-07-03T10:12:08","modified_gmt":"2018-07-03T02:12:08","slug":"%e7%bb%87%e6%a2%a6dedecms%e6%89%b9%e9%87%8f%e6%b7%bb%e5%8a%a0%e6%88%96%e4%bf%ae%e6%94%b9tag%e6%a0%87%e7%ad%be%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/1780.html","title":{"rendered":"\u7ec7\u68a6DedeCms\u6279\u91cf\u6dfb\u52a0\u6216\u4fee\u6539TAG\u6807\u7b7e\u7684\u65b9\u6cd5"},"content":{"rendered":"

\u4e4b\u524d\u53d1\u5e03\u4e86\u4e0d\u5c11\u6587\u7ae0\uff0c\u540e\u6765\u53d1\u73b0\u4e4b\u524d\u7684\u8fd9\u4e9b\u6587\u7ae0\u5f53\u65f6\u53d1\u5e03\u65f6\u90fd\u6ca1\u6709\u6dfb\u52a0tag\u6807\u7b7e\uff0c\u7136\u800c\u73b0\u5728\u9700\u8981\u90fd\u6dfb\u52a0\u4e0atag\u6807\u7b7e\uff0c\u7136\u800c\u8fd9\u4e2a\u5728\u9ed8\u8ba4\u7684\u7ec7\u68a6\u540e\u53f0\u662f\u6ca1\u529e\u6cd5\u6279\u91cf\u5b9e\u73b0\u7684\uff0c\u53ea\u80fd\u4e00\u7bc7\u7bc7\u6587\u7ae0\u53bb\u4fee\u6539\u3002
\n\u601d\u8003\uff1a \u7ec7\u68a6\u539f\u672c\u7684\u6587\u7ae0\u6279\u91cf\u7ba1\u7406\u4e2d\u6709\u8fd9\u4e48\u51e0\u9879\uff0c\u770b\u56fe\uff1a<\/p>\n

\"QQ\u622a\u56fe20180703100759\"<\/a><\/p>\n

\u6839\u636e\u8fd9\u4e2a\u81ea\u52a8\u5173\u952e\u8bcd\u3001\u6279\u91cf\u589e\u52a0\u5c5e\u6027\u3001\u6279\u91cf\u5220\u9664\u5c5e\u6027\u8fd9\u4e2a\u601d\u8def\u6765\u8fdb\u884c\u6279\u91cftag\u6807\u7b7e\u64cd\u4f5c\u3002 \u4e3a\u5df2\u53d1\u5e03\u7684\u4ea7\u54c1\u6216\u8005\u6587\u7ae0\u6dfb\u52a0tag\uff0c\u6709\u65f6\u5019\u4f1a\u8ba9\u4f60\u65e0\u53ef\u5948\u4f55\u3002\u56e0\u4e3adedecms\u7684\u540e\u53f0\u5e76\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd\uff0c\u6211\u4eec\u8981\u7684\u5c31\u662f\u5c06\u8fd9\u6837\u7684\u529f\u80fd\u6dfb\u52a0\u5230dedecms\u7684\u540e\u53f0\u91cc\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c06\u624b\u628a\u624b\u6559\u4f60\u5982\u4f55\u589e\u52a0\u6279\u91cf\u6dfb\u52a0tag\u7684\u529f\u80fd\u3002\u4fee\u6539\u540e\u7684\u5177\u4f53\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n

\"QQ\u622a\u56fe20180703100614\"<\/a><\/p>\n

\"QQ\u622a\u56fe20180703100627\"<\/a><\/p>\n

\u4fee\u6539\u65b9\u6cd5\uff1a<\/h1>\n

1\u3001\u6253\u5f00dede\/templets\/content_list.htm\uff0c\u627e\u5230\uff1a<\/strong><\/p>\n

<a href=\"javascript:;\" onClick=\"cAtts('attsDel',event,this)\" class=\"coolbg\">&nbsp;\u5220\u9664\u5c5e\u6027&nbsp;<\/a><\/code><\/pre>\n

\u5728\u5b83\u4e0b\u9762\u6dfb\u52a0\uff1a<\/p>\n

<a class=\"coolbg\" onclick=\"EditArcs('tagsEdit',event,this)\" href=\"javascript:;\"> \u4fee\u6539tags\u6807\u7b7e <\/a><\/code><\/pre>\n

2\u3001\u6253\u5f00dede\/js\/list.js\uff0c\u5728\u6587\u4ef6\u6700\u540e\u8fb9\u6dfb\u52a0\uff1a<\/strong><\/p>\n

 \/*\u6279\u91cf\u4fee\u6539\u6587\u6863*\/\r\nfunction EditArcs(jname,e,obj){\r\nvar qstr=getCheckboxItem();\r\nif(qstr=='')\r\n{\r\nalert('\u5fc5\u9700\u9009\u62e9\u4e00\u4e2a\u6216\u591a\u4e2a\u6587\u6863\uff01');\r\nreturn;\r\n}\r\nLoadQuickDiv(e, 'archives_do.php?dopost=batchEditArchives&qstr='+qstr+'&dojob='+jname+'&rnd='+Math.random(), 'tagsEditDlg', '450px', '160px');\r\nChangeFullDiv('show');\r\n}<\/code><\/pre>\n

3.\u6253\u5f00dede\/archives_do.php\uff0c\u8fd9\u4e2a\u6587\u4ef6\u7684\u6700\u540e\u56db\u884c\u662f\uff1a<\/strong><\/p>\n

 <?php\r\n\/\/AJAX\u7a97\u4f53\u7ed3\u675f\r\n}\r\n?><\/code><\/pre>\n

\u628a\u5b83\u66ff\u6362\u6210\u4e0b\u9762\u4ee3\u7801\uff1a<\/p>\n

\r\n    <?php\r\n    \/\/AJAX \u7a97\u4f53\u7ed3\u675f\r\n    }\r\n    \/*\r\n    * --------------------------------------------\r\n    * function batchEditArchives(){}\r\n    * \u6279\u91cf\u4fee\u6539\u6587\u6863\r\n    * --------------------------------------------\r\n    * *\/\r\n    else if ($dopost == 'batchEditArchives')\r\n    {\r\n    if( !empty($aid) && empty($qstr) )\r\n    {\r\n    $qstr = $aid;\r\n    }\r\n    $dojobname = '\u4fee\u6539TAG\u6807\u7b7e';\r\n    AjaxHead();\r\n    \/\/\u8f93\u51faAJAX\u53ef\u79fb\u52a8\u7a97\u4f53\r\n    $divname = 'tagsEditDlg';\r\n    echo \"<div class='title' onmousemove=\\\"DropMoveHand('{$divname}', 225);\\\" onmousedown=\\\"DropStartHand();\\\" onmouseup=\\\"DropStopHand();\\\">\\r\\n\";\r\n    echo \" <div class='titLeft'>{$dojobname}<\/div>\\r\\n\";\r\n    echo \" <div class='titRight'><img src='images\/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\\\"{$divname}\\\");ChangeFullDiv(\\\"hide\\\");' \u5c01\u9501' title='\u5c01\u9501' \/><\/div>\\r\\n\";\r\n    echo \"<\/div>\\r\\n\";\r\n    echo \"<form name='tagsEditDlgform' action='archives_do.php' method='post'>\\r\\n\";\r\n    echo \"<input type='hidden' name='dopost' value='{$dojob}' \/>\\r\\n\";\r\n    echo \"<input type='hidden' name='qstr' value='{$qstr}' \/>\\r\\n\";\r\n    echo \"<table width='100%' style='margin-top:6px;z-index:9000;'>\\r\\n\";\r\n    ?>\r\n    <tr height='28'>\r\n    <td width=\"80\" class='bline'>&nbsp;\u6807 \u7b7e\uff1a<\/td>\r\n    <td class='bline'>\r\n    <input type='text' name='tags' id=\"tags\" value='' \/>(','\u53f7\u5206\u9694\uff0c\u5355\u4e2a\u6807\u7b7e\u5c0f\u4e8e12\u5b57\u8282)\r\n    <\/td>\r\n    <\/tr>\r\n    <tr height='32'>\r\n    <td width=\"80\" class='bline'>&nbsp;\u6587\u6863ID\uff1a<\/td>\r\n    <td class='bline'>\r\n    <input type='text' name='tmpids' value=\"<?php echo $qstr; ?>\" style='width:310px;overflow:hidden;' \/>\r\n    <\/td>\r\n    <\/tr>\r\n    <tr height='32'>\r\n    <td colspan='2' align='center' style='padding-top:12px'>\r\n    <input name=\"imageField\" type=\"image\" src=\"images\/button_ok.gif\" width=\"60\" height=\"22\" class=\"np\" border=\"0\" style=\"cursor:pointer\" \/>\r\n    &nbsp;&nbsp;\r\n    <img src=\"images\/button_back.gif\" width=\"60\" height=\"22\" border=\"0\" onclick='HideObj(\"<?php echo $divname; ?>\");ChangeFullDiv(\"hide\");' style=\"cursor:pointer\" \/>\r\n    <\/td>\r\n    <\/td>\r\n    <\/tr>\r\n    <\/table>\r\n    <\/form>\r\n    <?php\r\n    \/\/AJAX \u7a97\u4f53\u7ed3\u675f\r\n    }\r\n    \/\/\u4fee\u6539\u6807\u7b7e\u7ed3\u675f\r\n    \/*\r\n    * ------------------------------\r\n    * \u4fee\u6539\u6807\u7b7e\u8be6\u7ec6\u64cd\u4f5c\r\n    * function tagsEdit(){}\r\n    * ------------------------------\r\n    *\r\n    * *\/\r\n    elseif ($dopost == 'tagsEdit'){\r\n    \/\/CheckPurview('a_Commend,sys_ArcBatch');\r\n    if( !empty($aid) && empty($qstr) )\r\n    {\r\n    $qstr = $aid;\r\n    }\r\n    if($qstr=='')\r\n    {\r\n    ShowMsg(\"\u53c2\u6570\u65e0\u6548\uff01\", $ENV_GOBACK_URL);\r\n    exit();\r\n    }\r\n     \r\n    if(empty($tags))\r\n    {\r\n    ShowMsg(\"\u5fc5\u9700\u8f93\u5165tags\u6807\u7b7e\uff01\", $ENV_GOBACK_URL);\r\n    exit();\r\n    }\r\n    $tags = str_replace('\uff0c', ',', $tags);\r\n    $tagss = explode(',',$tags);\r\n    if(empty($tagss)){\r\n    ShowMsg(\"\u5fc5\u9700\u8f93\u5165tags\u6807\u7b7e\uff01\", $ENV_GOBACK_URL);\r\n    exit();\r\n    }\r\n     \r\n    $arcids = ereg_replace('[^0-9,]','',ereg_replace('`', ',', $qstr));\r\n    $arcids_arr = explode(',', $arcids);\r\n    if (empty($arcids_arr)) {\r\n    ShowMsg(\"\u53c2\u6570\u65e0\u6548\uff01\", $ENV_GOBACK_URL);\r\n    exit();\r\n    }\r\n     \r\n    foreach($arcids_arr as $id){\r\n    \/*\r\n    * \u5904\u7406\u4fee\u6539\u540e\u7684Tag\r\n    *\/\r\n    $oldtag = GetTags($id);\r\n    $oldtags = explode(',',$oldtag);\r\n    foreach($tagss as $tag)\r\n    {\r\n    $tag = trim($tag);\r\n    if(isset($tag[255]) || $tag!=stripslashes($tag))\r\n    {\r\n    continue;\r\n    }\r\n    if(!in_array($tag,$oldtags))\r\n    {\r\n    InsertOneTag($tag,$id);\r\n    }\r\n    }\r\n    foreach($oldtags as $tag)\r\n    {\r\n    if(!in_array($tag,$tagss))\r\n    {\r\n    $dsql->ExecuteNoneQuery(\"Delete From `js_taglist` where aid='$id' And tag like '$tag' \");\r\n    $dsql->ExecuteNoneQuery(\"Update `js_tagindex` set total=total-1 where tag like '$tag' \");\r\n    }\r\n    else\r\n    {\r\n    $dsql->ExecuteNoneQuery(\"Update `js_taglist` set `arcrank` = '$arcrank', `typeid` = '$typeid' where tag like '$tag' \");\r\n    }\r\n    }\r\n    }\r\n    ShowMsg(\"\u6210\u529f\u4fee\u6539\u9009\u4e2d\u6587\u6863\u7684tags\u6807\u7b7e\uff01\", $ENV_GOBACK_URL);\r\n    exit();\r\n     \r\n    }<\/code><\/pre>\n

\u6279\u91cf\u589e\u52a0TAG\u6807\u7b7e<\/strong>\u3001\u6279\u91cf\u4fee\u6539TAG\u6807\u7b7e<\/strong>\u3001\u6279\u91cf\u5220\u9664TAG\u6807\u7b7e<\/strong>\u529f\u80fd\u5230\u6b64\u5b8c\u6210\u3002<\/p>\n

 <\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

\u4e4b\u524d\u53d1\u5e03\u4e86\u4e0d\u5c11\u6587\u7ae0\uff0c\u540e\u6765\u53d1\u73b0\u4e4b\u524d\u7684\u8fd9\u4e9b\u6587\u7ae0\u5f53\u65f6\u53d1\u5e03\u65f6\u90fd\u6ca1\u6709\u6dfb\u52a0tag\u6807\u7b7e\uff0c\u7136\u800c\u73b0\u5728\u9700\u8981\u90fd\u6dfb\u52a0\u4e0atag\u6807\u7b7e\uff0c\u7136\u800c […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1780","post","type-post","status-publish","format-standard","hentry","category-web"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=1780"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1780\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=1780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=1780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=1780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}