The dedecms5.5/5.6/5.7 list page calls the tag tag in two ways:
A, DedeCMSv5.6 and its previous versions:
Dedecms default in the list is unable to call the tag tag, after the help of the moderator, we now provide you with 2 ways.
Method 1:
Add the following code where you want the list:
- [Field:id runphp=Yes]
- $TSQL = new Dedesql (false);
- $tags = ';
- $tsql->setquery ("Select I.tagname from Dede_tag_list t left joins Dede_tag_index I on i.id=T.tid where t . aid=' @me ');
- $tsql->execute (' t ');
- while ($row = $tsql->getarray (' t ', Mysql_assoc)) {
- $tags . = "<a href= '/tag.php?/". UrlEncode ($row [' tagname ']). "' > ". $row [' tagname ']." </a> ";
- }
- @me= $tags;
- [/field:id]
Method 2:
Add the following code to the inc_functions.php file:
- function Listtag ($aid) {$TSQL =new dedesql (false); $tags = "; $tsql->setquery (" select i.tagname from Dede_tag_list t left join dede_tag_index i on i.id= t.tid where t.aid= ' $aid ' <a href= '/tag.php?/". UrlEncode ($row [' Tagname> ". $row [' tagname ']." </a> "; } return $tags; }
Then add the [Field:id function= Listtag (@me) "/] tag to the list page location.
Second, DedeCMSv5.7 version: The previous call code in the 5.6 upgrade to 5.7 of the system can be used normally, but the newly installed 5.7 system seems to be useless. The test found that the Dedecms v5.7 version uses the tag directly: [Field:id function=gettags (@me)/], it can be called out. Just without the link, if you need a link, please comment out the 130 lines of the include\helpers\archive.helper.php file: $tags. = ($tags = = "? $row [' Tag ']: ', '. $row [' tag ']); Replace with the following statement, of course you can also add your own style: $tags. = "<a href= '/tags.php?/". UrlEncode ($row [' tag ']). " /' > '. $row [' tag ']. " </a> ";
Two ways to call the tag tag (top tab) on the dedecms5.5/5.6/5.7 list page