dedecms TAG标签按栏目显示的方法
<p><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>解决步骤:</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>一、打开include/taglib/目录下的 tag.lib.php 文件</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>找到下面这段代码,并在中间插入标注部分代码</span></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<p class="right">
<span><u>复制代码</u></span></p>
<p>
代码如下:</p>
</div>
<p class="msgborder" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
if($getall==0 &amp;&amp; isset($refObj-&gt;Fields['tags']) &amp;&amp; !empty($refObj-&gt;Fields['aid'])) <br>
{ <br>
$dsql-&gt;SetQuery("Select tid From `ddmx_taglist` where aid = '{$refObj-&gt;Fields['aid']}' "); <br>
$dsql-&gt;Execute(); <br>
$ids = ''; <br>
while($row = $dsql-&gt;GetArray()) <br>
{ <br>
$ids .= ( $ids=='' ? $row['tid'] : ','.$row['tid'] ); <br>
} <br>
if($ids != '') <br>
{ <br>
$addsql = " where id in($ids) "; <br>
} <br>
if($addsql=='') return ''; <br>
} <br>
else if($getall==2) <br>
{ <br>
$addsql = " where typeid='{$refObj-&gt;Fields['typeid']}' "; <br>
} <br>
else <br>
{ <br>
if(!empty($typeid)) <br>
{ <br>
$addsql = " where typeid='$typeid' "; <br>
} </p>
<p>
<br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>二、修改你的模板</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>模板调用如下:</span></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<p class="right">
<span><u>复制代码</u></span></p>
<p>
代码如下:</p>
</div>
<p class="msgborder" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
{dede:tag sort='hot' getall='2'}<br>
<a href=''></a><br>
{/dede:tag} </p>
頁:
[1]