In phpcms modulescontentindex. php, the image scaling method is to match the img Image address and use thumb for scaling and replacement .?? In the show () method, modify $ content? Contentpreg_replace (& lt; img [^ & gt;] * src []? ([^ & Gt; Method for scaling down the phpcms article content
In/phpcms/modules/content/index. php, modify
The method is to match the img Image address and use thumb for scaling and replacement to display the image.
?
?
In the show () method, modify $ content
?
Content = preg_replace ('/] * src = [\' "]? ([^> \ '"\ S] *) [\'"]? [^>] *>/Ie ', "self: changeThumb (' $ 0', '$ 1')", $ content );
??
Match the image and give it to the class function changgeThumb. $0 matches the entire img code. $1 matches the image url.
?
?
Protected static function changeThumb ($ old, $ path) {$ width = 580; // escape the passed string and remove $ old = str_replace ('\"', '"', $ old); // The built-in thumb function, no stranger $ new = str_replace ($ path, thumb ($ path, $ width, 0 ), $ old); return $ new ;}
? Okay, so you can see if all the images on your page have become thumbnails,