今天在网上终于找到了去掉shopex版权的办法,下面就是,以供研究参考:
1、去除<meta标记中的<meta name="generator" content="ShopEx 4.xx" />中的shopex版权:
到home/cache/front_tmpl/目录下搜索header.html-zh_CN.php文件,在所有找到的文件中查找:
echo smarty_function_header(array(), $this);
替换为:
ob_start();echo smarty_function_header(array(), $this);$headContent=preg_replace('/<meta .*?content="shopex .*? \/>/is','',ob_get_contents());ob_clean();echo $headContent;ob_end_flush();
如果是改为要将ShopEx 4.xx改为自己的内容请替换为:
ob_start();echo smarty_function_header(array(), $this);$headContent=preg_replace('/(<meta .*?content=")shopex .*?(".*? \/>)/is','\\1你的标识\\2',ob_get_contents());ob_clean();echo $headContent;ob_end_flush();
2、去除底部“本店由ShopEx...”字样的声明:
到home/cache/front_tmpl/目录下搜索footer.html-zh_CN.php文件,在所有找到的文件中查找:
echo smarty_function_footer(array(), $this);
替换为:
ob_start();echo smarty_function_footer(array(), $this);$headContent=preg_replace('/<table .*?本店由.*?(<script)/uis','\\1',ob_get_contents());ob_clean();echo $headContent;ob_end_flush();
然后记住用Dreamweaver或UltraEdit将所有替换过的文件另存为无BOM的UTF-8文件。否则含中文的正则匹配不会正确执行。
以上操作在4.84版本上测试通过。
此方法仅供有需要的朋友研究使用,不建议去除版权,毕竟大多数人是在免费使用:)支持正版授权。