Today, the wind network will target the {Dede:field http://www.aliyun.com/zixun/aggregation/11696.html ">name= ' image"} in Dedecms The label controls the size of the picture to teach you how to set it.
The method of controlling picture size is usually controlled by CSS, but we would prefer to modify the code implementation in the template tag:
dedecms {Dede:field name=\image\} Label controls picture size
Method One:
Locate the location of the code in the template such as:
<div class= "Picview" >
{Dede:field name= ' image '/}
</div>
Replace it with:
<div class= "Picview" >
<img src= "{dede:field name= ' litpic '/}" width= "height=" >
</div>
This is free to realize the size of the pictures in each template, very convenient! Wind Letter Network recommended that you use this method.
Method Two:
Modify file: include/arc.archives.class.php 262 Line
Template to get thumbnails directly using {Dede:field name= ' image '/}
$this->fields[' image '] = (!eregi (' Jpg|gif|png ', $this->fields[' Picname ')? ":" <img src= ' {$this->fields[' picname ']} '/> ');
Replace it with:
$this->fields[' image '] = (!eregi (' Jpg|gif|png ', $this->fields[' Picname ')? ":" <img src= ' {$this->fields[' picname ']} ' onload= ' Javascript:if (this.width>400) this.style.width=400; ' /> ");
Plus onload= "javascript:if (this.width>400) this.style.width=400;" can picture size. More than 400 shows only 400, and less than 400 shows the actual picture size.
The disadvantage of this approach is that each picture is width=400, and the display of some pictures may affect the page effect.
You can choose to use according to your own needs.