如何去除ecshop标题和网站底部的Powered by ECShop

一.去掉标题栏的’Powered by ECShop’

打开includes/lib_main.php文件;

找到:$page_title = $GLOBALS[‘_CFG’][‘shop_title’] . ‘ – ‘ . ‘Powered by ECShop’;

改为:$page_title = $GLOBALS[‘_CFG’][‘shop_title’];
 

二.去除底部的’Powered by ECShop’;

很多朋友想直接删除themes/default/library/page_footer.lbi文件中的代码:{foreach from=$lang.p_y item=pv}{$pv}{/foreach}{$licensed}<br/> ,然而删除后’Powered by ECShop’就会在网页中乱跑,故而无法实现我们的效果。

打开js/common.js文件;

将该文件第261行到第353行代码删除:

继续阅读如何去除ecshop标题和网站底部的Powered by ECShop

ECShop商品显示时的相册图只能显示5张

默认情况下,商品相册图只会显示5张,查看代码后看到是读取数据库ecs_shop_config的表

记录 goods_gallery_number 的值,那只需修改下这个数值就可以了。改到更大的一个数就行了。

因为这里的数字为最大值,意思是多于几张只显示几张。

在includes\lib_common.php  #594行

$arr[‘goods_gallery_number’] = intval($arr[‘goods_gallery_number’]) ? intval($arr[‘goods_gallery_number’]) : 5;

这个意为如果未设置goods_gallery_number值,就取默认值5。也就是如果数据库里有goods_gallery_number值,这里的修改是无作用的。

PHP5.4环境下ECSHOP网站报错问题集锦

运行Ecshop首页出现报错:出现下面这就话:

  Strict Standards: Only variables should be passed by reference in D:\**\includes\cls_template.php on line 406 第406行:$tag_sel = array_shift(explode(‘ ‘, $tag));

  解决办法 1 5.3 5.4以上版本的问题,应该也和配置有关 只要406行把这一句拆成两句就没有问题了

  $tag_sel = array_shift(explode(‘ ‘, $tag));

  改成:

  $tag_arr = explode(‘ ‘, $tag);

  $tag_sel = array_shift($tag_arr);

  (实验过,绝对可行)因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值 解决办法 修改完了要记得清理缓存。

2、php5.4环境下安装ECshop出现includes/lib_base.php on line 346的解决方案。

将cls_image.php 中 function gd_version() 改成 static function gd_version() 即可。

3 网站后台验证码不显示PHP Strict Standards: Redefining already defined constructor for class captcha in D:\web\322\includes\cls_captcha.php on line 119

打开 includes/cls_captcha.php

找到下面这段代码

function __construct($folder = ”, $width = 145, $height = 20)

{

$this->captcha($folder, $width, $height);

}

将它移到

function captcha($folder = ”, $width = 145, $height = 20)

的上边。

ECShop 上传图中图没有缩略

修改/admin/goods.php #691行

if (!copy(‘../’ . $goods_img, ‘../’ . $newname)) //Edit by DreamboyMT $img change to $goods_img;

修改/admin/includes/lib_goods.php #358行,加水印之后 添加

//产品相册缩放 Edit by DreamboyMT ADD
$img_url = $GLOBALS[‘image’]->make_thumb(‘../’.$img_url , $GLOBALS[‘_CFG’][‘image_width’], $GLOBALS[‘_CFG’][‘image_height’]);
if ($proc_thumb && gd_version() > 0){ @unlink(‘../’.$newname); }

批量生成图 /admin/picture_batch.php #433行处

copy(ROOT_PATH . $row[‘img_original’], $dir . $file_name);

换成:

$img_url = $GLOBALS[‘image’]->make_thumb( ‘../’.$row[‘img_original’] , $GLOBALS[‘_CFG’][‘image_width’], $GLOBALS[‘_CFG’][‘image_height’]);
rename(ROOT_PATH .$img_url, $dir . $file_name);

改完之后,中图就会按后台设置的尺寸缩略,不同比例会留白。
因为产品展示时系统调用的是goods_img(相册中图),这里就需要改为调用原图,要不图太小了。
修改/admin/includes/lib_goods.php #726行 function get_goods_gallery

SQL 语句里添加 img_original, 字段

在 foreach 里添加一行赋值:

$row[$key][‘img_original’] = get_image_path($goods_id, $gallery_img[‘img_original’], false, ‘gallery’); //Edit by DreamboyMT ADD

完成后就可以在模版里调用 img_original 原图变量了
修改模版里的 /library/goods_gallery.lbi #9,16行

href=”{$picture.img_original}”

修改模版里的 goods.dwt #59行

<a href="{$pictures.0.img_original}"