This article for you to share is the dream system in the first call picture set of multiple pictures in the way, there are the same needs of small partners can refer to.
First find the include/common.inc.php file, put the following code in (I posted on my website, can be modified according to the need):
?
1 2 3 4, 5 6 7 8 9 10 11 12 13 14 15 |
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 Eligible $new _arr=array_unique ($ MATCHES[0];//Remove duplicate values in array $pic _num1= "<dt><div class=tu_big></div></dt><dd><ul>"; foreach ($new _arr as $key) {$pic _list.= ' <li></li> "; $pic _end= "</ul></dd>"; Return $pic _num1. $pic _list. $pic _end;//Returns results} |
First, the DEDECMS Web site in the home page and list pages of the call method:
Dede:arclist tag calls and Dede:list list calls
?
1 |
[Field:id function= "getimg (@me, 80,80,7)"/] |
The 80 and 80 and 7 respectively are to display the width of the picture (omitted to 110) and the height (omitted to 110) and the call number (omitted to (0), representing all the sheets).
If you have more than one picture set, then add the class ID of the picture set, as follows
?
1 |
[Field:id typeid= ' function= "getimg (@me, 80,80,7)"/] |
Two, the DEDECMS article inside the page calls the picture set several pictures the invocation method:
?
1 |
{dede:field.id function= "getimg (@me, 80,80,7)"/} |
If you have more than one picture set, then add the class ID of the picture set, as follows
?
1 |
{dede:field.id typeid= ' function= ' getimg (@me, 80,80,7) "/} |
The 80 and 80 and 7 respectively are to display the width of the picture (omitted to 110) and the height (omitted to 110) and the call number (omitted to (0), representing all the sheets).
The above mentioned is the entire content of this article, hope to be able to master dedecms to be helpful to everybody.