帝国CMS首页通过loop标签调用TAGS的实现代码


本文整理自网络,侵删。

帝国CMS首页无法调用TAGS,但是本人整理了一段可以使用的代码分享给大家。

[e:loop={0,13,3,0}]
          <?php
$fr=$empire->fetch1("select infotags from diansui_ecms_news_data_1 where id='$bqr[id]'");
?>
<?php
$alltag="";
$tag=explode(",",$fr[infotags]);
for($t=0;$t<count($tag);$t++)
{
$alltag.='<a href="/tags-'.urlencode($tag[$t]).'-0.html">'.$tag[$t].'</a>';
}
?>
<?php
if($bqr[titlepic])
{
?>
<li class='clearfix'><span class='fl'><a titleurl']?>'  target='_blank' rel='nofollow'><img src='<?=$bqr['titlepic']?>' alt='<?=$bqr['title']?>' /></a></span><h3><a titleurl']?>' title='<?=$bqr['title']?>' target='_blank'><?=$bqr['title']?></a></h3><p><?=$bqr['smalltext']?>...<a titleurl']?>' title='更多' target='_blank'>[更多]</a></p><div class='mn-lis-tit'><span class='mn-date'><?=date('Y-m-d',$bqr[newstime])?></span><span class='mn-category ml25'>类目:<a ><?=$bqsr[classname]?></a></span><span class='mn-keyword ml25'>关键词:<?=$alltag?>
</span></div></li>
<?php
}
else
{
?>
<li class='clearfix border'><h3><a titleurl']?>' title='<?=$bqr['title']?>' target='_blank'><?=$bqr['title']?></a></h3><p><?=$bqr['smalltext']?>...<a titleurl']?>' title='更多' target='_blank'>[更多]</a></p><div class='mn-lis-tit'><span class='mn-date'><?=date('Y-m-d',$bqr[newstime])?></span><span class='mn-category ml25'>类目:<a ><?=$bqsr[classname]?></a></span><span class='mn-keyword ml25'>关键词:<?=$alltag?></span></div></li>
<?php
}
?>
[/e:loop]

大家根据自己的需要修改代码结构与样式即可。


标签:帝国CMS

相关阅读 >>

帝国CMS数据库配置文件是哪个文件?

帝国CMS tags功能介绍与管理

jquery html css 实现王者荣耀官网首页效果 附实例代码

帝国CMS签发信息功能使用介绍

帝国CMS根据不同会员组显示不同内容的方法

新手建站入门教程⑨:如何建一个门户网站

帝国CMS中关于[!--newsnav--]的问题

帝国CMS调用自定义列表名称的方法(简单二次开发实现)

帝国CMS上传附件命名实现以原文件名命名的方法

帝国CMS7.5使用tagsid实现伪静态调用方法

更多相关阅读请进入《帝国CMS》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...