{"id":5044,"date":"2022-01-31T12:44:20","date_gmt":"2022-01-31T04:44:20","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=5044"},"modified":"2022-01-30T17:47:25","modified_gmt":"2022-01-30T09:47:25","slug":"%e5%b8%9d%e5%9b%bdcms%e5%88%97%e8%a1%a8%e9%a1%b5%e5%a6%82%e4%bd%95%e8%b0%83%e7%94%a8%e6%96%87%e7%ab%a0tag","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/5044.html","title":{"rendered":"\u5e1d\u56fdCMS\u5217\u8868\u9875\u5982\u4f55\u8c03\u7528\u6587\u7ae0tag"},"content":{"rendered":"
\u5e1d\u56fdCMS\u5217\u8868\u9875\u5982\u4f55\u8c03\u7528\u6587\u7ae0tag\uff1f\u5217\u8868\u9875\u8c03\u7528tag\u7684\u65b9\u6cd5\u6709\u4e24\u79cd\uff0c\u4e00\u79cd\u662f\u5207\u5272\u526f\u8868\u7684infotags\u5b57\u6bb5\uff0c\u7b2c\u4e8c\u79cd\u79cd\u662f\u4ecephome_enewstagsdata\u8868\u4e2d\u63d0\u53d6\u3002\u5982\u679c\u91c7\u7528tagid\u6216tag\u9759\u6001\u5316\uff0c\u5219\u63a8\u8350\u4f7f\u7528\u7b2c\u4e8c\u79cd\u65b9\u6cd5\uff0c\u6548\u7387\u66f4\u9ad8\u3002\u5982\u679c\u91c7\u7528tagname\u7684\u52a8\u6001\u94fe\u63a5\u65b9\u5f0f\uff0c\u53ef\u4ee5\u91c7\u7528\u7b2c\u4e00\u79cd\u65b9\u6cd5\u3002<\/p>\n
\u7b2c\u4e00\u79cd\u65b9\u6cd5\uff1a\u5207\u5272infotags\u5b57\u6bb5<\/strong><\/p>\n \u7b2c\u4e8c\u79cd\u65b9\u6cd5\uff1a\u4ecephome_enewstagsdata\u8868\u4e2d\u63d0\u53d6<\/strong><\/p>\n <\/p>\n \u8bf4\u660e\uff1a<\/strong> 2\u3001\u4ee5\u4e0a\u4ee3\u7801\u653e\u5165\u5217\u8868\u5185\u5bb9\u6a21\u677f(list.var) \uff0c\u5fc5\u987b\u5f00\u542f\u4f7f\u7528\u7a0b\u5e8f\u4ee3\u7801\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u5e1d\u56fdCMS\u5217\u8868\u9875\u5982\u4f55\u8c03\u7528\u6587\u7ae0tag\uff1f\u5217\u8868\u9875\u8c03\u7528tag\u7684\u65b9\u6cd5\u6709\u4e24\u79cd\uff0c\u4e00\u79cd\u662f\u5207\u5272\u526f\u8868\u7684infotags\u5b57\u6bb5\uff0c\u7b2c\u4e8c\u79cd […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[339,1580,1600],"class_list":["post-5044","post","type-post","status-publish","format-standard","hentry","category-web","tag-339","tag-cms","tag-tag"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/5044","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=5044"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/5044\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=5044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=5044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=5044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\/* \u5217\u8868\u9875\u663e\u793atag \u5f00\u59cb*\/\r\n$fr=$empire->fetch1(\"select infotags from {$dbtbpre}ecms_\".$class_r[$r['classid']]['tbname'].\"_data_{$r[stb]} where id='$r[id]'\");\r\n$tagstr='';\r\n$infotags_r=explode(',',$fr['infotags']);\r\n$tagscount=count($infotags_r);\r\nfor($i=0;$i<$tagscount;$i++){\r\n\t$tagname=$infotags_r[$i];\r\n\tif(empty($tagname)){\r\n\t\tcontinue;\r\n\t}\r\n\t\r\n\t\/\/tagname\u7684\u52a8\u6001 \u6216 \u4f2a\u9759\u6001 \u65f6\u7684\u94fe\u63a5\uff0c\u91c7\u7528\u4ee5\u4e0b2\u884c\u4ee3\u7801\r\n\/*\t$tu=eReturnRewriteTagsUrl(0,$tagname);\r\n\t$tagslink=$tu['pageurl'];*\/\r\n\r\n\t\/\/tagid\u5f0f\u7684\u52a8\u6001\u94fe\u63a5\uff0c\u91c7\u7528\u4ee5\u4e0b6\u884c\u4ee3\u7801\r\n\t$tt=$empire->fetch1(\"select * from {$dbtbpre}enewstags where tagname='\".$tagname.\"' limit 1\");\r\n\tif(!$tt['tagid']){\r\n\t\tcontinue;\r\n\t}else{\r\n\t\t$tagslink=$public_r['newsurl'].'e\/tags\/?tagid='.$tagid;;\r\n\t}\r\n\r\n\r\n\t\/\/\u91c7\u7528\u4e1c\u5761\u7f51\u9759\u6001\u5316\u63d2\u4ef6\u65f6\u7684tag\u94fe\u63a5\uff0c\u91c7\u7528\u4ee5\u4e0b6\u884c\u4ee3\u7801\r\n\/*\t$tt=$empire->fetch1(\"select * from {$dbtbpre}enewstags where tagname='\".$tagname.\"' limit 1\");\r\n\tif(!$tt['tagid']){\r\n\t\tcontinue;\r\n\t}else{\r\n\t\t$tagslink=user_HtmlTagLink($tt['tagid']);\r\n\t}*\/\r\n\r\n\t\/\/\u8fd4\u56de\u5355\u72ec\u4e00\u4e2atag\u7684\u4ee3\u7801\r\n\t$tagstr.='<a title=\"'.$tagname.'\" target=\"_blank\" href=\"'.$tagslink.'\">'.$tagname.'<\/a>';\r\n}\r\n\/*\u7ed3\u675f*\/\r\n\r\n$listtemp='\u5176\u5b83\u4ee3\u7801'.$tagstr.'\u5176\u5b83\u4ee3\u7801';\r\n<\/code><\/pre>\n
\/* \u5217\u8868\u9875\u663e\u793atag \u5f00\u59cb*\/\r\n$tagstr='';\r\n$tsql=$empire->query(\"select tagid from {$dbtbpre}enewstagsdata where id='$r[id]' and classid='$r[classid]' \");\r\nwhile($tr=$empire->fetch($tsql)){\r\n\t$tt=$empire->fetch1(\"select * from {$dbtbpre}enewstags where tagid=\".$tr['tagid'].\" limit 1\");\r\n\tif(!$tt['tagid']){\r\n\t\tcontinue;\r\n\t}else{\r\n\t\t\/\/tagname\u7684\u52a8\u6001 \u6216 \u4f2a\u9759\u6001 \u65f6\u7684\u94fe\u63a5\uff0c\u91c7\u7528\u4ee5\u4e0b1\u884c\u4ee3\u7801\r\n\t\t\/\/$tagslink=eReturnRewriteTagsUrl(0,$tt['tagname'],1);\r\n\r\n\t\t\/\/tagid\u5f0f\u7684\u52a8\u6001\u94fe\u63a5\uff0c\u91c7\u7528\u4ee5\u4e0b1\u884c\u4ee3\u7801\r\n\t\t$tagslink=$public_r['newsurl'].'e\/tags\/?tagid='.$tt['tagid'];\r\n\r\n\t\t\/\/\u91c7\u7528\u4e1c\u5761\u7f51\u9759\u6001\u5316\u63d2\u4ef6\u65f6\u7684tag\u94fe\u63a5\uff0c\u91c7\u7528\u4ee5\u4e0b1\u884c\u4ee3\u7801\r\n\t\t\/\/$tagslink=user_HtmlTagLink($tt['tagid']);\r\n\t}\r\n\t$tagstr.='<a title=\"'.$tagname.'\" target=\"_blank\" href=\"'.$tagslink.'\">'.$tt['tagname'].'<\/a>';\r\n}\r\n\/*\u7ed3\u675f*\/\r\n\r\n\r\n$listtemp='\u5176\u5b83\u4ee3\u7801'.$tagstr.'\u5176\u5b83\u4ee3\u7801';\r\n<\/code><\/pre>\n
\n1\u3001\u4ee3\u7801\u4e2d\u7684tag\u94fe\u63a5\u90fd\u67093\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u9009\u62e9\u3002<\/p>\n