Provide zblog template_zblog them_wordpress template download and customization

Solution to the problem of thumbnail deformation in dedecms5.7

Tianxing Studio 2013-12-27 02:36 course seven thousand two hundred and sixty-six 0 Comments


Search on Baidu“ dedecms thumbnail The results of "deformation" are all for dedecms5.6. However, the deformation problem of the shrinkage map of dedecms5.7 cannot be found. Today, I was really upset with the deformed image. I spent some time searching and finally solved this problem.

The label used by dedecms5.7 list pages to call the scale map is "[field: array runphp='yes'] @ me=(empty (@ me ['litpic '])?" ":"<a href=' {@ me ['archirl ']}' class='preview '><img src=' {@ me ['litpic ']}'/></a>"); [/field: array]" The scale map called by this label does not define the size of the image. We just need to add a box outside the image with css to define the width beyond the height of the image, and the image will not be deformed.

What will be deformed is the call in dedecms 5.7. The label of the call image of dedecms is "[field: imglink/]" The annoying thing about this label is that it will add a "width='120 'height='120'" after the img itself, so if the thumbnail is not square, it must be deformed and can't bear to look at it directly, then we just remove the disgusting definition of width and height, and the solution is as follows:

Replace the "[field: imglink/]" label with "<a href='[field: arc/]' target=" _blank "><img src='[field: picname/]' border='0 'width=' * * '></a>". The width is modified by itself, and the height is defined by css rather than hidden. In this way, the problem of thumbnail deformation is solved. Look at the thumbnail that is no longer deformed, and I can sleep more safely if I have obsessive-compulsive disorder.


Can't find a tutorial that can solve your problem?

You can try to search or ask questions directly online. We also provide charging technical support. If you need it, you can contact us online.

Online questions Online Service

welcome you Comment: Cancel Reply

 Please fill in the verification code
  • Latest articles
  • Hot article ranking
  • Most Comments
Label aggregation
  • Sign in
  • Registered account Forgot your password?
  • register
  • Already have an account? Direct login Forgot your password?
  • Social account login