/**DEDECMS首页和列表页调用单个图片集里的多张图片
function Getimg($aid,$imgwith=110,$imgheight=110,$num=0)
{
global $dsql;
$imgurls = '';
$row =$dsql->getone( "Select aid,imgurls From `js_addonimages` where aid='$aid' ");
$id=$row['aid'];
$imgurls= $row['imgurls'];
$dtp = new DedeTagParse();
$dtp->LoadSource($imgurls);
if(is_array($dtp->CTags))
{
$i=0;
foreach($dtp->CTags as $ctag)
{
if($i<$num){
if($ctag->GetName()=="img")
{
$bigimg = trim($ctag->GetInnerText());
if($ctag->GetAtt('ddimg') != $bigimg && $ctag->GetAtt('ddimg')!='')
{
$litimg = $ctag->GetAtt('ddimg');
}
$title=$ctag->GetAtt('text');
$imglist.='<li><a title="'.$title.'" href="/plus/view.php?aid='.$id.'"><img src="'.$bigimg.'" width="'.$imgwith.'" height="'.$imgheight.'" alt="'.$title.'"></a></li>';
$i++;
}
}
}
}
return $imglist; }

DEDECMS首页和列表页调用单个图片集里的多张图片的更多相关文章

  1. DedeCms 首页、列表页调用文章body内容的方法

    [第一种方法] arclist标签使用如下: {dede:arclist row='1' typeid='1' addfields='body' idlist='1' channelid='1'} [ ...

  2. DEDECMS首页,列表页调用自定义图片字段,只显示图片地址

    第一步:将自定义字段“图片”类型改为“图片(仅地址)”类型. 第二部:在{dede:arclist row='1' addfields='stu' titlelen='24' orderby='pub ...

  3. 织梦首页、列表页调用文章body内容的两种方法

    http://blog.csdn.net/langyu1021/article/details/52261411 关于首页.列表页调用文章body内容的两种方法,具体方法如下: 第一种方法: {ded ...

  4. 织梦dedecms首页、列表页、文章页文章点击浏览次数实时调用方法

    首先呢,先在根目录 /plus 目录下找到count.php  复制一份然后命名为viewclick.php(你也可以命名为你容易理解的名字)用编辑器将viewclick.php打开然后删除以下几行代 ...

  5. dede 首页或列表页调用文章内容页body内容

    在使用dede过程,有的朋友会调调出文章的列表的内容出来,怎么调呢?当然是用dede的传参的数据查询语句了,方法如下: {dede:arclist flag=h typeid=2 row=1 titl ...

  6. 【dedecms】DEDE列表页调用文章内容第一张图片(非缩略图)方法

    打开 ../ include/ common.func.php 添加代码 //将缩放图转变为文章第一张图片 function firstimg($str_pic) { $str_sub=substr( ...

  7. dede首页、列表页调用非缩略图

    在include/extend.func.php末尾添加 function firstimg($str_pic) { $str_sub=substr($str_pic,0,-7).strrchr($s ...

  8. dedecms织梦列表页调用TAG标签并带上链接的实现方法

    在需要调用的地方添加如下代码: [field:id runphp='yes'] global $cfg_cmspath; $tags = GetTags(@me); $revalue = ''; $t ...

  9. dedecms列表页调用子栏目列表,织梦首页调用栏目的子栏目标签代码

    dedecms列表页调用子栏目列表,织梦首页调用栏目的子栏目标签代码. dedecms列表页调用子栏目列表标签: {dede:channelartlist type='sun' }<a href ...

随机推荐

  1. table纵横都需要下拉框

    table 溢出,下拉框显示不全 <div class="table-scrollable"style="height: 500px; overflow-y: vi ...

  2. sqlalchemy presto 时间比较

    大数据统计时,需要计算开仓订单减掉经纪商时间差,等于n 小时 或 星期几的订单. presto sql语句如下: select sum(profit) from t_table where open_ ...

  3. Codeforces Round #359 (Div. 2) B

    B. Little Robber Girl's Zoo time limit per test 2 seconds memory limit per test 256 megabytes input ...

  4. [原]C++拾遗

    int a=3,b=4; bool ok=(a==2,b==4); printf("%d\n",ok); //输出的结果是1,逗号既不是&& 也不是|| 应该是从前 ...

  5. Download RPM packages from a YUM repo without installing

    This how-to will explain how to download rpm packages from a yum repository without installing them. ...

  6. java:网络编程(InetAddress,InetSocketAddress,URL,TCP(Socket与SeverSocket),TCP与UDP的区别)

    InerAddress: /**IP地址:在网络上唯一标示一台计算机 * 端口号:标示计算机上不同的应用程序 * java.net.InetAddress类:此类表示互联网协议 (IP) 地址. * ...

  7. OpenCV 2.4.9 学习笔记(4)—— 像素类型与Templates的限制使用

    限制使用templates C++中的Templates使得接口机制非常好用,高效而且能够保证数据与算法的安全.但是过多地使用templates可能会增加计算时间和代码长度,有时候还能难区分接口和实现 ...

  8. Cow Dance Show

    题目大意: 经过几个月的排练,奶牛们基本准备好展出她们的年度舞蹈表演.今年她们要表演的是著名的奶牛芭蕾——“cowpelia”. 表演唯一有待决定的是舞台的尺寸.一个大小为K的舞台可以支持K头牛同时在 ...

  9. Generator函数的语法

    简介 Generator函数是ES6关于异步编程的解决方案.Generator函数能够让函数暂停执行(即交出函数的执行权),简单直白点来理解,Generator函数就是一个状态机,内部封装了多个状态( ...

  10. glEnable(GL_DEPTH_TEST)的问题

    http://www.gameres.com/msg_195903.html 在程序中加入glEnable(GL_DEPTH_TEST)之后显示就完全黑屏了,即使是清空了深度缓冲glClear(GL_ ...