雨后的草原,野花竞放,像一块刚浸过水的花头巾,连露珠儿也都是五颜六色的了!一条条小河宛如蓝色的缎带缠绕着一望无际的绿色田野,远处一座座造型古朴、色彩和谐的小屋,一派美丽动人的田园风光!
只有第0点试成功过!!其余未试
0.
includehelpersarchive.helper.php
增加方法:
function GetTags_list($aid) { global $dsql; $tags = ''; $query = "SELECT tag FROM `taglist` WHERE aid='$aid' "; $dsql->Execute('tag',$query); while($row = $dsql->GetArray('tag')) { $tags .= ($tags=='' ? "<a rel="nofollow noopener noreferrer" href='/tags.php?/".urlencode($row['tag'])."'>".$row['tag']."</a>" : ','."<a rel="nofollow noopener noreferrer" href='/tags.php?/".urlencode($row['tag'])."'>".$row['tag']."</a>"); } return $tags; } |
function GetTags($aid) { global $dsql; $tags = ''; $query = "Select tag From `tf_taglist` where aid='$aid' "; $dsql->Execute('tag',$query); while($row = $dsql->GetArray('tag')) { $tags .= ($tags=='' ? $row['tag'] : ','.$row['tag']); } return $tags; } 修改为 //获得某文档的所有tag function GetTags($aid) { global $dsql; $tags = ''; $query = "Select tag From `dede_taglist` where aid='$aid' "; $dsql->Execute('tag',$query); while($row = $dsql->GetArray('tag')) { $tags.= ($tags=='' ? "<a rel="nofollow noopener noreferrer" href=/tags.php?/{$row['tag']} target=_blank>{$row['tag']}</a>" : ','."<a rel="nofollow noopener noreferrer" href=/tags.php?/{$row['tag']} target=_blank>{$row['tag']}</a>"); } return $tags; } |
本文dede织梦模板程序列表页调用tag标签的好代码教程到此结束。树木长得高是为了吸收阳光,老鹰飞得高是为了捕捉猎物,人站得高是为了接受挑战。小编再次感谢大家对我们的支持!