The DEDECMS homepage calls multiple images in the image set and dedecms image set. The DEDECMS homepage calls multiple images in the image set. the dedecms image set first finds includecommon. inc. php file, paste the following code (I am posting on my website, you can call multiple images in the image set on the DEDECMS homepage as needed, dedecms image set
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 ):
Function Getimg ($ aid, $ imgwith, $ imgheight) {global $ dsql; $ imgurls = ''; $ row = $ dsql-> getone ("select imgurls from dede_addonimages where aid = '$ aid'"); $ imgurls = $ row ['imgurls']; // Obtain the field data preg_match_all ("/\}. + jpg/", $ imgurls, $ matches); // Retrieve the $ new_arr = array_unique ($ matches [0]) that meets the conditions; // remove the repeated values in the array $ pic_num1 ="
"; Foreach ($ new_arr as $ key) {$ pic_list. ="
";}$ Pic_end ="
"; Return $ pic_num1. $ pic_list. $ pic_end; // return result}
I. call method on the dedecms homepage and list page:
Dede: arclist label call and dede: list call
[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:
[field:id typeid='' function="Getimg(@me,80,80,7)" /]
II. dedecms:
{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:
{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.
First, find the include/common. inc. php file and paste the following code (I am posting the code on my website. you can refer to the following code as needed...