热搜词
发表于 2017-11-7 11:18:49 | 显示全部楼层 |阅读模式
修改江湖家居装修公司正方形LOGO的默认尺寸为300X300,在后台设置中修改为200X200像素,经测试无效,上传的图片仍自动裁剪为300X300像素,

解决方法:

打开  \system\admin\controllers\company\company.ctl.php 文件,查找 public function edit($company_id = null) 对象方法,大概在206行左右,
查看如下代码:

  if ($k === 'logo') {
$size['photo'] = $cfg['companydecorate1'] ? $cfg['companydecorate1'] : '200X100';
} else if($k === 'thumb') {
$size['photo'] = $cfg['companydecorate2'] ? $cfg['companydecorate2'] : '300X300';
}else{
$size['photo'] = '1000X200';
}

替换为:

if ($k === 'logo') {
$size['photo'] = $cfg['company']['logo'] ? $cfg['company']['logo'] : '200X100';
} else if($k === 'thumb') {
$size['photo'] = $cfg['company']['thumb'] ? $cfg['company']['thumb'] : '200X200';
}else{
$size['photo'] = '1000X200';
}

再打开  /system/home/controllers/scenter/company.ctl.php 和 /system/home/controllers/ucenter/company.ctl.php 文件,查找 public function info() 对象方法,做同样的修改与替换。

01.png

全部评论0
回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2024-11-24 22:23 , Processed in 0.235848 second(s), 36 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2024 Discuz! Team