{"id":5774,"date":"2025-03-26T09:02:33","date_gmt":"2025-03-26T01:02:33","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=5774"},"modified":"2025-04-03T15:58:28","modified_gmt":"2025-04-03T07:58:28","slug":"dedebiz%e5%86%85%e5%ae%b9%e9%a1%b5%e8%b0%83%e7%94%a8%e5%bd%93%e5%89%8d%e6%96%87%e7%ab%a0%e7%9a%84tag%e6%a0%87%e7%ad%be","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/5774.html","title":{"rendered":"DEDEBIZ\u5185\u5bb9\u9875\u3001\u5217\u8868\u9875\u8c03\u7528\u5f53\u524d\u6587\u7ae0\u7684TAG\u6807\u7b7e"},"content":{"rendered":"

DEDEBIZ\u5185\u5bb9\u9875\u5f53\u524d\u6587\u7ae0\u7684TAG\u6807\u7b7e\u8c03\u7528\u4ee3\u7801:<\/p>\n

{dede:tag row='5' sort='new' getall='0'} <a href='[field:link\/]'>[field:tag \/]<\/a>{\/dede:tag}\r\n<\/code><\/pre>\n

 <\/p>\n

\u6548\u679c\u5982\u56fe\uff1a\"\"<\/a><\/p>\n

 <\/p>\n

 <\/p>\n

DEDEBIZ\u680f\u76ee\u5217\u8868\u9875\u8c03\u7528\u5f53\u524d\u6587\u7ae0\u7684TAG\u6807\u7b7e\u8c03\u7528\u4ee3\u7801:<\/p>\n

[field:id function='obtaintags(@me,3)'\/]\r\n<\/code><\/pre>\n

3\u8868\u793a\u8c03\u7528\u6587\u68633\u4e2a\u6807\u7b7e\uff0c\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n

\"\"<\/a><\/p>\n

\u6700\u65b0V6.5.6\u7248\u672c\u91cc\u9762\uff0c\u5b98\u65b9\u628a\u6269\u5c55\u91cc\u9762\u7684\u5185\u5bb9\u5168\u90e8\u6e05\u7a7a\u4e86\u3002\u5982\u679c\u5217\u8868\u9875\u9700\u8981\u8c03\u7528 TAG\u6807\u7b7e\uff0c\u53ef\u4ee5\u628a\u4e0b\u9762\u4ee3\u7801\u6dfb\u52a0\u5230extend.func.php\u6587\u4ef6\u91cc\u9762\u5c31\u884c\u4e86\u3002<\/p>\n

\/\/\u6807\u7b7e\u8c03\u7528[field:id function='obtaintags(@me,3)'\/]3\u8868\u793a\u8c03\u7528\u6587\u68633\u4e2a\u6807\u7b7e\r\nfunction obtaintags($aid, $num = 3)\r\n{\r\n    global $dsql, $cfg_cmspath, $cfg_rewrite;\r\n    $newtag = '';\r\n    $query = \"SELECT * FROM `#@__taglist` WHERE aid='$aid' LIMIT $num\";\r\n    $dsql->Execute('tag', $query);\r\n    while ($row = $dsql->GetArray('tag')) {\r\n        if ($cfg_rewrite == 'Y') {\r\n            $link = $cfg_cmspath.\"\/tags\/{$row['tid']}\";\r\n        } else {\r\n            $link = $cfg_cmspath.\"\/apps\/tags.php?\/{$row['tid']}\";\r\n        }\r\n        $newtag .= ($newtag == '' ? \"<a href=\\\"{$link}\\\">{$row['tag']}<\/a>\" : \"\u3001<a href=\\\"{$link}\\\">{$row['tag']}<\/a>\");\r\n    }\r\n    return $newtag;\r\n}\r\n<\/code><\/pre>\n

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

DEDEBIZ\u5185\u5bb9\u9875\u5f53\u524d\u6587\u7ae0\u7684TAG\u6807\u7b7e\u8c03\u7528\u4ee3\u7801: {dede:tag row='5' sort='new' […]<\/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":[1754,1329],"class_list":["post-5774","post","type-post","status-publish","format-standard","hentry","category-web","tag-dedebiz","tag-tag"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/5774","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=5774"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/5774\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=5774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=5774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=5774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}