ECShop 网上商店系统支持论坛's Archiver

weiaijun 发表于 2008-8-23 11:52

代码中调用模板的部分有哪些呢?

ecshop  前台使用模板的代码,我就找到

\includes\init.php  157-159行
$smarty->template_dir   = ROOT_PATH . 'themes/' . $_CFG['template'];
$smarty->cache_dir      = ROOT_PATH . 'templates/caches';
$smarty->compile_dir    = ROOT_PATH . 'templates/compiled';

如果此时,$_CFG['template'] = 'green,joyo25';

$smarty->template_dir   = ROOT_PATH . 'themes/' . $_CFG['template'];
改成
$tplArr = explode(',',$_CFG['template']);
$smarty->template_dir   = ROOT_PATH . 'themes/' . $tplArr[0];

然后,清除缓存,刷新主页面,可以显示文字,图片啊(模板的)、CSS啊啥的都不能显示。。。
这是为什么啊?然道还有哪用到模板名称$_CFG['template']的么?

谁知道哈?麻烦指导一下。。。:handshake

weiaijun 发表于 2008-8-23 14:03

:) :Q

weiaijun 发表于 2008-8-23 15:02

大家给点建议哈

mhboy 发表于 2008-8-23 15:31

:( 版主给你帮助一下吧,呵呵。

weiaijun 发表于 2008-8-23 15:33

:Q :Q

weiaijun 发表于 2008-9-2 14:27

:handshake 再顶起。。。

Goda 发表于 2008-9-2 14:37

贴一下您的网店地址

weiaijun 发表于 2008-9-2 14:46

稍等下,我在本地弄的,现在挂到服务器上去,稍等下。。。

weiaijun 发表于 2008-9-2 15:17

程序上传ing

刚才看了一下编译后的模板文件(complied/index.dwt.php),猛然发现:
<link href="themes/green,joyo25/style.css" rel="stylesheet" type="text/css" />
其中green,joyo25就是我当前变量$_CFG['template']
看了一下元神文件(themes/green/index.dwt):
<link href="style.css" rel="stylesheet" type="text/css" />
我在index.php里没有找到控制样式表名称的语句。。。:Q

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.