Phpcms article content image thumbnail method
Modify in/phpcms/modules/content/index.php
The method is to match the IMG image address, zoom and replace with the thumb to show it.
?
?
In the show () method, modify the $content
?
Content = preg_replace ('/]*src=[\ ' ")? ([^>\ ' "\s]*) [\'"]? [^>]*>/ie ', ' Self::changethumb (' $ ', ' $ ') ', $content);
??
Match the picture, give itself class function Changgethumb operation, $, match the entire IMG code, match out the image URL address
?
?
protected static function Changethumb ($old, $path) { $width = 580; The passed-in string has escaped, minus $old = str_replace (' \ "', '" ', $old); Its own thumb function, not unfamiliar $new = Str_replace ($path, Thumb ($path, $width, 0), $old); return $new;}
Okay, so you can see if the pictures on your page are all turned into thumbnail images,