大图
下边的小图
{dede:php}$thisid = $refObj->Fields['id'];$arr = mulitimgs($thisid);echo $arr;{/dede:php}
以下函数放到 include/extend.func.php
function mulitimgs($id)
{
global $dsql;
$sql = "select title,mulitimgs from `#@__archives` where id ='$id'";
$chRow = $dsql->GetOne($sql);
$obj = $chRow['mulitimgs'];
$match = $id;
preg_match_all("/ddimg=\'(.*?)\'/",$obj,$match);
preg_match_all("/text=\'(.*?)\'/",$obj,$text);
$str="";
$zong = (count($match[1]));
$t_zong = (count($text[1]));
for($i=1;$i<=count($match[1]);$i++)
{
$str.= "".$text[1][$i-1]."";
}
return $str;
}
function mulitimgsone($id)
{
global $dsql;
$sql = "select title,mulitimgs from `#@__archives` where id ='$id'";
$chRow = $dsql->GetOne($sql);
$obj = $chRow['mulitimgs'];
$match = $id;
preg_match_all("/ddimg=\'(.*?)\'/",$obj,$match);
preg_match_all("/text=\'(.*?)\'/",$obj,$text);
$str="";
$zong = (count($match[1]));
$t_zong = (count($text[1]));
for($i=5;$i<=count($match[1]);$i++)
{
$str.= "".$match[1][$i-5]."";
}
return $str;
}
至于切换的效果 你自己根据找的效果来套就可以了,需要改函数里的
$str.= "".$text[1][$i-1]."";