ECShop 使用 SuperFly模版相应代码修改
分类: ECShop 2013-02-28 10:31 151人阅读 评论(1) 收藏 举报
1.复制模版文件&图片文件
模版文件: themesvanity
图片文件: static
2.修改自定义标签
文件: “includescls_template.php” , 大约376行 function select($tag) 函数当中,添加 siy 标签处理
[php] view plaincopy
- elseif (substr($tag,0,4) == ‘siy:’) { // david
- $t = $this->get_para(str_replace(‘siy:’,’name=’,$tag), false);
- $out = “<?php n” . ‘$k = ‘ . preg_replace(“/(‘$[^,]+)/e” , “stripslashes(trim(‘1′,”’));”, var_export($t, true)) . “;n”;
- $out .= ‘$plugin = ‘siy_’.$k[‘name’];’ . “n”;
- $out .= ‘if (function_exists($plugin)) {‘ . “n”;
- $out .= ‘ echo $plugin($k);’ . “n”;
- $out .= ‘} else {‘ . “n”;
- $out .= ‘ echo “<!– error: “.$k[‘name’].” not installed –>”;’ . “n”;
- $out .= ‘}’ . “n?>”;
- return $out;
- }
3.前台公用文件
文件: “includesinit.php” , 最后行添加
[php] view plaincopy
- include(ROOT_PATH.’themes/’.$_CFG[‘template’].’/functions.php’);
4.语言文件(最后行添加)
文件: “languageszh_cncommon.php” , 最后行添加
[php] view plaincopy
- include(ROOT_PATH.’themes/’.$_CFG[‘template’].’/lang/’.$_CFG[‘lang’].’/common.php’);
文件: “languageszh_cnshopping_flow.php” , 最后行添加
[php] view plaincopy
- include(ROOT_PATH.’themes/’.$_CFG[‘template’].’/lang/’.$_CFG[‘lang’].’/others.php’);
文件: “languageszh_cnuser.php” , 最后行添加
[php] view plaincopy
- include(ROOT_PATH.’themes/’.$_CFG[‘template’].’/lang/’.$_CFG[‘lang’].’/others.php’);
End All!