名站网址导航为大驾家提供DedeCMS站点程序站点教程相关的知识,比如织梦程序安装教程,织梦程序系统故障等教程。织梦程序图集中,上传的图片像素宽高小于系统设置定的这个尺寸: 较小的这些图片就会无法生成缩略图,导致图集在网页上缩略图显示X叉号,这应该是织梦程序DEDEcms的一个历史遗漏bug,可用下面相关具体操作方法修复。 /include/helpers/,这个网站文件中搜索,下面的相关具体代码如下:
01 if($srcW<=$toW && $srch<=$toh ) return TRUE; 02 $toWh=$toW/$toh; 03 $srcWh=$srcW/$srch; 04 if($toWh<=$srcWh) 05 { 06 $ftoW=$toW; 07 $ftoh=$ftoW*($srch/$srcW); 08 } 09 else 10 { 11 $ftoh=$toh; 12 $ftoW=$ftoh*($srcW/$srch); 13 } |
01 $ftoW=$toh; 02 [size=; font-size: inherit,inherit] $ftoh=$toh; 03 /// 04 [size=; font-size: inherit,inherit] if( $srch<=$toh && $srcW<=$toW ) 05 [size=; font-size: inherit,inherit] { 06 [size=; font-size: inherit,inherit] $ftoW=$srcW; 07 [size=; font-size: inherit,inherit] $ftoh=$srch; 08 [size=; font-size: inherit,inherit] if(function_exists("imagecreatetruecolor")) 09 [size=; font-size: inherit,inherit] { 10 [size=; font-size: inherit,inherit] @$ni = imagecreatetruecolor($ftoW,$ftoh); 11 [size=; font-size: inherit,inherit] if($ni) 12 [size=; font-size: inherit,inherit] { 13 [size=; font-size: inherit,inherit] imagecopyresampled($ni,$im,0,0,0,0,$ftoW,$ftoh,$srcW,$srch); 14 [size=; font-size: inherit,inherit] } 15 [size=; font-size: inherit,inherit] else 16 [size=; font-size: inherit,inherit] { 17 [size=; font-size: inherit,inherit] $ni=imagecreate($ftoW,$ftoh); 18 [size=; font-size: inherit,inherit] imagecopyresized($ni,$im,0,0,0,0,$ftoW,$ftoh,$srcW,$srch); 19 [size=; font-size: inherit,inherit] } 20 [size=; font-size: inherit,inherit] } 21 [size=; font-size: inherit,inherit] else 22 [size=; font-size: inherit,inherit] { 23 [size=; font-size: inherit,inherit] $ni=imagecreate($ftoW,$ftoh); 24 [size=; font-size: inherit,inherit] imagecopyresized($ni,$im,0,0,0,0,$ftoW,$ftoh,$srcW,$srch); 25 [size=; font-size: inherit,inherit] } 26 [size=; font-size: inherit,inherit] switch ($srcInfo[2]) 27 [size=; font-size: inherit,inherit] { 28 [size=; font-size: inherit,inherit] case 1: 29 [size=; font-size: inherit,inherit] imagegif($ni,$toFile); 30 [size=; font-size: inherit,inherit] break; 31 [size=; font-size: inherit,inherit] case 2: 32 [size=; font-size: inherit,inherit] imagejpeg($ni,$toFile,100); 33 [size=; font-size: inherit,inherit] break; 34 [size=; font-size: inherit,inherit] case 3: 35 [size=; font-size: inherit,inherit] imagepng($ni,$toFile); 36 [size=; font-size: inherit,inherit] break; 37 [size=; font-size: inherit,inherit] case 6: 38 [size=; font-size: inherit,inherit] imagebmp($ni,$toFile); 39 [size=; font-size: inherit,inherit] break; 40 [size=; font-size: inherit,inherit] default: 41 [size=; font-size: inherit,inherit] return false; 42 [size=; font-size: inherit,inherit] } 43 [size=; font-size: inherit,inherit] imagedestroy($ni); 44 [size=; font-size: inherit,inherit] } /// 45 46 $toWh=$toW/$toh; 47 $srcWh=$srcW/$srch; 48 if($toWh<=$srcWh) 49 { 50 $ftoW=$toW; 51 $ftoh=$ftoW*($srch/$srcW); 52 } 53 else 54 { 55 $ftoh=$toh; 56 $ftoW=$ftoh*($srcW/$srch); 57 } |
关于DedeCMS站点程序站点教程相关的知识,就说到这里了希望能帮助朋友们。织梦程序cms系统TAG标签和分页伪静态网站网页设置教程