{"id":30651,"date":"2024-11-25T14:21:33","date_gmt":"2024-11-25T06:21:33","guid":{"rendered":"https:\/\/fwq.ai\/blog\/30651\/"},"modified":"2024-11-25T14:21:33","modified_gmt":"2024-11-25T06:21:33","slug":"dedecms-tag%e6%a0%87%e7%ad%be%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%e9%9a%8f%e6%9c%ba%e9%a2%9c%e8%89%b2%e5%92%8c%e5%ad%97%e4%bd%93%e5%a4%a7%e5%b0%8f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/30651\/","title":{"rendered":"dedecms tag\u6807\u7b7e\u600e\u4e48\u5b9e\u73b0\u968f\u673a\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f"},"content":{"rendered":"<p style=\"text-align: center\"><strong><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/020\/5e055d0d7d851490.jpg\" class=\"aligncenter\" title=\"dedecms tag\u6807\u7b7e\u600e\u4e48\u5b9e\u73b0\u968f\u673a\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u63d2\u56fe\" alt=\"dedecms tag\u6807\u7b7e\u600e\u4e48\u5b9e\u73b0\u968f\u673a\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u63d2\u56fe\" \/><\/strong><\/p>\n<p><strong> tag\u6807\u7b7e\u600e\u4e48\u5b9e\u73b0\u968f\u673a\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\uff1f<\/strong><\/p>\n<p>\u6211\u4eec\u6240\u8981\u5b9e\u73b0\u7684\u529f\u80fd\u662f\uff1a\u6807\u7b7e\u4e91\u7684\u6548\u679c\uff0c\u5305\u62ec\u6807\u7b7e\u6709\u4e0d\u540c\u7684\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u7b49\uff0c\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u90fd\u4e3a\u968f\u673a\u663e\u793a\uff0c\u53ef\u6539\u53d8\u4ee3\u7801\u6765\u63a7\u5236\u5176\u8303\u56f4\uff0c\u770b\u8d77\u6765\u8fd8\u4e0d\u9519\u54e6\uff0c\u63a5\u4e0b\u6765\u770b\u5b9e\u73b0\u65b9\u6cd5\uff0c\u611f\u5174\u8da3\u7684\u4f60\u53ef\u4e0d\u8981\u9519\u8fc7\u4e86\u54c8<\/p>\n<p>&nbsp;&nbsp;\u63a8\u8350\u5b66\u4e60\uff1a<\/p>\n<p>\u529f\u80fd\u8bf4\u660e\uff1a&nbsp;<\/p>\n<p>\u5b9e\u73b0\u6807\u7b7e\u4e91\u7684\u6548\u679c\uff0c\u5305\u62ec\u6807\u7b7e\u6709\u4e0d\u540c\u7684\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u7b49\uff0c\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u90fd\u4e3a\u968f\u673a\u663e\u793a\uff0c\u53ef\u6539\u53d8\u4ee3\u7801\u6765\u63a7\u5236\u5176\u8303\u56f4\u3002&nbsp;<\/p>\n<p>\u5b9e\u73b0DeDeCms\u6807\u7b7e\u4e91\u7684\u6548\u679c\uff0c\u5305\u62ec\u6807\u7b7e\u6709\u4e0d\u540c\u7684\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u7b49\u7b49\uff0c\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u90fd\u4e3a\u968f\u673a\u663e\u793a\uff0c\u53ef\u6539\u53d8\u4ee3\u7801\u6765\u63a7\u5236\u5176\u8303\u56f4\u3002&nbsp;<\/p>\n<p>\u4fee\u6539\u65b9\u6cd5\uff1a&nbsp;<\/p>\n<p>1\u3001\u5728\/include\/common.func.php \u4e2d\u52a0\u5165\u5982\u4e0b\u51fd\u6570\u3002&nbsp;<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>function&nbsp;getTagStyle()&nbsp;\n{&nbsp;\n$minFontSize=8;&nbsp;\/\/\u6700\u5c0f\u5b57\u4f53\u5927\u5c0f,\u53ef\u6839\u636e\u9700\u8981\u81ea\u884c\u66f4\u6539&nbsp;\n$maxFontSize=18;&nbsp;\/\/\u6700\u5927\u5b57\u4f53\u5927\u5c0f,\u53ef\u6839\u636e\u9700\u8981\u81ea\u884c\u66f4\u6539&nbsp;\nreturn&nbsp;'font-size:'.($minFontSize+lcg_value()*(abs($maxFontSize-$minFontSize))).'px;color:#'.dechex(rand(0,255)).dechex(rand(0,196)).dechex(rand(0,255));&nbsp;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6b64\u51fd\u6570\u7684\u4f5c\u7528\u662f\u8f93\u51fa\u968f\u673a\u7684\u6837\u5f0f\uff0c\u5305\u62ecfont-size\u548ccolor\u3002&nbsp;<\/p>\n<p>\u5982\u679c\u4f60\u60f3\u6307\u5b9a\u53ea\u663e\u793a\u51e0\u4e2a\u5b57\u4f53\u5927\u5c0f\uff0c\u800c\u4e0d\u662f\u5b8c\u5168\u968f\u673a\uff0c\u8bf7\u5c06\u4e0a\u9762\u7684\u51fd\u6570\u4ee3\u7801\u4fee\u6539\u4e3a\uff1a&nbsp;<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>function&nbsp;getTagStyle()&nbsp;\n{&nbsp;\n$sizearray&nbsp;=&nbsp;array('8','9','10','11','12','20');&nbsp;\/\/\u81ea\u5b9a\u4e49\u5b57\u4f53\u5927\u5c0f,\u53ef\u6839\u636e\u9700\u8981\u81ea\u884c\u4fee\u6539&nbsp;\nreturn&nbsp;'font-size:'.$sizearray[rand(0,count($sizearray))].'pt;color:#'.dechex(rand(0,255)).dechex(rand(0,196)).dechex(rand(0,255));&nbsp;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>2\u3001\u5728\u6a21\u677f\u4e2d\u7528\u5982\u4e0b\u4ee3\u7801\u8c03\u7528\u6807\u7b7e\u3002&nbsp;<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>{dede:tag&nbsp;row='45'&nbsp;getall='1'&nbsp;sort='hot'}&nbsp;\n&lt;a&gt;[field:tag&nbsp;\/]&lt;\/a&gt;&nbsp;\n{\/dede:tag}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>3\u3001\u5728dede\u540e\u53f0\u751f\u6210\u76f8\u5e94html\uff0cOK\uff0c\u770b\u6548\u679c\u5427\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f tag\u6807\u7b7e\u600e\u4e48\u5b9e\u73b0\u968f\u673a\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>tag\u6807\u7b7e\u600e\u4e48\u5b9e\u73b0\u968f\u673a\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\uff1f \u6211\u4eec\u6240\u8981\u5b9e\u73b0\u7684\u529f\u80fd\u662f\uff1a\u6807\u7b7e\u4e91\u7684\u6548\u679c\uff0c\u5305\u62ec\u6807\u7b7e\u6709\u4e0d\u540c\u7684\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u7b49\uff0c\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u90fd\u4e3a\u968f\u673a\u663e\u793a\uff0c\u53ef\u6539\u53d8\u4ee3\u7801\u6765\u63a7\u5236\u5176\u8303\u56f4\uff0c\u770b\u8d77\u6765\u8fd8\u4e0d\u9519\u54e6\uff0c\u63a5\u4e0b\u6765\u770b\u5b9e\u73b0\u65b9\u6cd5\uff0c\u611f\u5174\u8da3\u7684\u4f60\u53ef\u4e0d\u8981\u9519\u8fc7\u4e86\u54c8 &nbsp;&nbsp;\u63a8\u8350\u5b66\u4e60\uff1a \u529f\u80fd\u8bf4\u660e\uff1a&nbsp; \u5b9e\u73b0\u6807\u7b7e\u4e91\u7684\u6548\u679c\uff0c\u5305\u62ec\u6807\u7b7e\u6709\u4e0d\u540c\u7684\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u7b49\uff0c\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u90fd\u4e3a\u968f\u673a\u663e\u793a\uff0c\u53ef\u6539\u53d8\u4ee3\u7801\u6765\u63a7\u5236\u5176\u8303\u56f4\u3002&nbsp; \u5b9e\u73b0DeDeCms\u6807\u7b7e\u4e91\u7684\u6548\u679c\uff0c\u5305\u62ec\u6807\u7b7e\u6709\u4e0d\u540c\u7684\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u7b49\u7b49\uff0c\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u90fd\u4e3a\u968f\u673a\u663e\u793a\uff0c\u53ef\u6539\u53d8\u4ee3\u7801\u6765\u63a7\u5236\u5176\u8303\u56f4\u3002&nbsp; \u4fee\u6539\u65b9\u6cd5\uff1a&nbsp; 1\u3001\u5728\/include\/common.func.php \u4e2d\u52a0\u5165\u5982\u4e0b\u51fd\u6570\u3002&nbsp; \u4ee3\u7801\u5982\u4e0b: function&nbsp;getTagStyle()&nbsp; {&nbsp; $minFontSize=8;&nbsp;\/\/\u6700\u5c0f\u5b57\u4f53\u5927\u5c0f,\u53ef\u6839\u636e\u9700\u8981\u81ea\u884c\u66f4\u6539&nbsp; $maxFontSize=18;&nbsp;\/\/\u6700\u5927\u5b57\u4f53\u5927\u5c0f,\u53ef\u6839\u636e\u9700\u8981\u81ea\u884c\u66f4\u6539&nbsp; return&nbsp;&#8216;font-size:&#8217;.($minFontSize+lcg_value()*(abs($maxFontSize-$minFontSize))).&#8217;px;color:#&#8217;.dechex(rand(0,255)).dechex(rand(0,196)).dechex(rand(0,255));&nbsp; } \u767b\u5f55\u540e\u590d\u5236 \u6b64\u51fd\u6570\u7684\u4f5c\u7528\u662f\u8f93\u51fa\u968f\u673a\u7684\u6837\u5f0f\uff0c\u5305\u62ecfont-size\u548ccolor\u3002&nbsp; \u5982\u679c\u4f60\u60f3\u6307\u5b9a\u53ea\u663e\u793a\u51e0\u4e2a\u5b57\u4f53\u5927\u5c0f\uff0c\u800c\u4e0d\u662f\u5b8c\u5168\u968f\u673a\uff0c\u8bf7\u5c06\u4e0a\u9762\u7684\u51fd\u6570\u4ee3\u7801\u4fee\u6539\u4e3a\uff1a&nbsp; \u4ee3\u7801\u5982\u4e0b: function&nbsp;getTagStyle()&nbsp; {&nbsp; $sizearray&nbsp;=&nbsp;array(&#8216;8&#8242;,&#8217;9&#8242;,&#8217;10&#8217;,&#8217;11&#8217;,&#8217;12&#8217;,&#8217;20&#8217;);&nbsp;\/\/\u81ea\u5b9a\u4e49\u5b57\u4f53\u5927\u5c0f,\u53ef\u6839\u636e\u9700\u8981\u81ea\u884c\u4fee\u6539&nbsp; return&nbsp;&#8216;font-size:&#8217;.$sizearray[rand(0,count($sizearray))].&#8217;pt;color:#&#8217;.dechex(rand(0,255)).dechex(rand(0,196)).dechex(rand(0,255));&nbsp; } \u767b\u5f55\u540e\u590d\u5236 2\u3001\u5728\u6a21\u677f\u4e2d\u7528\u5982\u4e0b\u4ee3\u7801\u8c03\u7528\u6807\u7b7e\u3002&nbsp; \u4ee3\u7801\u5982\u4e0b: {dede:tag&nbsp;row=&#8217;45&#8217;&nbsp;getall=&#8217;1&#8242;&nbsp;sort=&#8217;hot&#8217;}&nbsp; &lt;a&gt;[field:tag&nbsp;\/]&lt;\/a&gt;&nbsp; {\/dede:tag} \u767b\u5f55\u540e\u590d\u5236 3\u3001\u5728dede\u540e\u53f0\u751f\u6210\u76f8\u5e94html\uff0cOK\uff0c\u770b\u6548\u679c\u5427\u3002 \u4ee5\u4e0a\u5c31\u662f tag\u6807\u7b7e\u600e\u4e48\u5b9e\u73b0\u968f\u673a\u989c\u8272\u548c\u5b57\u4f53\u5927\u5c0f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-30651","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=30651"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30651\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=30651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=30651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=30651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}