The DEDECMS homepage calls multiple images in the image set. The DEDECMS homepage calls multiple images in the image set. This article will share with you how the homepage of the dream system calls multiple images in the image set, if you have the same requirements, refer to the DEDECMS homepage to call multiple images in the image set.
This article will share with you the method of calling multiple images in the image set on the homepage of the dream system. if you have the same requirements, refer.
First, find the include/common. inc. php file and paste the following code (I am posting the code on my website, which can be modified as needed ):
?
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']; // retrieves field data Preg_match_all ("/\}. + jpg/", $ imgurls, $ matches); // Retrieve the qualified $ New_arr = array_unique ($ matches [0]); // Remove repeated values from the array $ Pic_num1 ="
"; Return $ pic_num1. $ pic_list. $ pic_end; // The Returned result. } |
I. call method on the dedecms homepage and list page:
Dede: arclist label call and dede: list call
?
1 |
[Field: id function = "Getimg (@ me, 80, 80, 7)"/] |
The width (omitted as 110), height (omitted as 110), and number of calls (omitted as (0) indicate all images) to be displayed ).
If there are multiple image sets, add the category id of the image set as follows:
?
1 |
[Field: id typeid = ''function =" Getimg (@ me, 80, 80, 7) "/] |
II. dedecms:
?
1 |
{Dede: field. id function = "Getimg (@ me, 80, 80, 7 )"/} |
If there are multiple image sets, add the category id of the image set as follows:
?
1 |
{Dede: field. id typeid = ''function =" Getimg (@ me, 80, 80, 7 )"/} |
The width (omitted as 110), height (omitted as 110), and number of calls (omitted as (0) indicate all images) to be displayed ).
The above is all the content of this article, hoping to help you master dedecms.
In this article, I will share with you how to call multiple images in the image set on the homepage of the dream system. if you have the same requirements, refer to the following...