您现在的位置是:首页 > 教程 > 帝国CMS教程帝国CMS教程
帝国CMS灵动标签怎么调用友情链接的方法
运晟2023-01-22 16:55:17帝国CMS教程已有人查阅
导读帝国CMS默认的友情链接标签内置的格式太坑了,无法满足个性化需求。可使用灵动标签来调用:调用文字链接:
帝国CMS默认的友情链接标签内置的格式太坑了,无法满足个性化需求。可使用灵动标签来调用:
调用文字链接:
[e:loop={'select * from [!db.pre!]enewslink where checked=1 and classid=1 order by lid',20,24,0}]<a href="<?=$bqr[lurl]?>"target="_blank"><?=$bqr[lname]?></a>[/e:loop]
调用图文链接:
[e:loop={'select * from [!db.pre!]enewslink where checked=1 and classid=1 order by lid',3,24,0}]<a href="<?=$bqr[lurl]?>" title="<?=$bqr[lname]?>" target="_blank"><img src="<?=$bqr[lpic]?>"/></a>[/e:loop]
其中,classid=1 为友情链接分类ID,checkde=1 为审核过的链接。
如果希望不需要指定分类,则去掉 and classid=1 即可。
下拉列表式友情链接调用:
<form id="form1" name="form1" method="post" action=""><label for="FRIEND LINK ">友情链接:</label><select onchange="window.open(this.options[selectedIndex].value,'','');" name="FRIEND LINK" size="1" id="FRIEND LINK">
[e:loop={'select * from [!db.pre!]enewslink where checked=1 order by lid',20,24,0}]<option value="<?=$bqr[lurl]?>"><?=$bqr[lname]?></option>[/e:loop]
</select>
</form>
本文标签:
很赞哦! ()
相关文章
随机图文
-
帝国CMS实现列表点击数排序下载量排序的方法
利用帝国CMS结合项功能可实现列表页多样化,默认是按最新信息排序的,比如按点击数降序、升序,下载量,价格排序等等。 -
帝国CMS栏目ID获取栏目字段信息的方法
在userfun.php加入代以下自定义函数代码://获取栏目信息function class_field($classid,$field){global $empire,$dbtbpre;$classid=(int)$classid;$arr=array('classname',' -
帝国CMS首页怎么调用会员数/留言数/评论数的代码方法
其实就是用SQL语句的count来统计数据表里面的信息数,具体代码如下:(直接模板里用PHP输出即可) -
帝国CMS新手教程调用栏目缩略图可嵌套其他标签的方法
帝国CMS 调用栏目缩略图,可嵌套其他标签<?php$cr=$empire>fetch1("select classimg from g_enewsclasswhere
留言与评论 (共有 条评论) |