DEDECMS Home Call multiple pictures in the picture set, Dedecms picture collection
First find the include/common.inc.php file, paste the following code (I posted on my website, the specific can be modified as needed):
function getimg ($aid, $imgwith, $imgheight) {global $dsql; $imgurls = '; $row = $dsql->getone ("Select Imgurls from Dede_ Addonimages where aid= ' $aid '); $imgurls = $row [' Imgurls '];//get field data Preg_match_all ("/\}.+jpg/", $imgurls, $matches);// Remove the eligible $new_arr=array_unique ($matches [0]);//Remove duplicate values from the array $pic_num1= "
"; foreach ($new _arr as $key) {$pic _list.="
";} $pic _end= "
"; return $pic _num1. $pic _list. $pic _end;//Return Results}
First, Dedecms the calling method in the homepage and List page of the website:
Dede:arclist tag invocation and dede:list list invocation
[Field:id function= "getimg (@me, 80,80,7)"/]
80 and 80 and 7 respectively are to display the width of the picture (omitted as 110) and the height (omitted as 110) and the number of calls (omitted to (0), representing all sheets).
If there are multiple picture sets, then the class ID of the add-on set is as follows
[Field:id typeid= ' function= ' getimg (@me, 80,80,7) "/]
Second, the DEDECMS article inside the page calls the picture collection multiple pictures call method:
{dede:field.id function= "getimg (@me, 80,80,7)"/}
If there are multiple picture sets, then the class ID of the add-on set is as follows
{dede:field.id typeid= "function=" getimg (@me, 80,80,7) "/}
80 and 80 and 7 respectively are to display the width of the picture (omitted as 110) and the height (omitted as 110) and the number of calls (omitted to (0), representing all sheets).
The above is the whole content of this article, I hope to be able to master the Dedecms to help you.
http://www.bkjia.com/PHPjc/1011945.html www.bkjia.com true http://www.bkjia.com/PHPjc/1011945.html techarticle Dedecms Home Call pictures in the collection of pictures, dedecms picture set to find the include/common.inc.php file, the following code to paste in (I posted on my website, the specific can be as needed ...)