In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about the method of Weaving Dream Dedecms to get the address of thumbnail images. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
Dream Dedecms how to get the address of the original thumbnail picture?
Here to introduce to you a Dedecms method to get the address of the original thumbnail image, this operation can not be obtained by regular, because random problems often occur.
Modify include/extend.func.php. Before modifying, please make sure to back up the original file and add the following code:
The code is as follows:
/ / take the address of the first image function firstimg ($str_pic) {$str_sub=substr ($str_pic,0,-7). ".jpg"; / / delete the last seven digits of the thumbnail string, and then add the suffix .jpgreturn $str_sub;}
Then loop through the template:
The code is as follows:
[field:litpic function=firstimg ('@ me') /]
The direct call is used:
The code is as follows:
{dede:field name='litpic' function= "firstimg (@ me)" /}
This is fine, very easy to use, and tried a few articles are good, but there is one thing to note, if there is no thumbnail we do not make a judgment.
Thank you for reading! This is the way to share the address of the original thumbnail picture on Weaving Dream Dedecms. I hope the above content can be helpful to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.