bestlong 怕失憶論壇

標題: 將 xtc 或 twe 的 Smarty 版本升級 [打印本頁]

作者: bestlong    時間: 2009-11-1 21:59     標題: 將 xtc 或 twe 的 Smarty 版本升級

使用 xtc 或 twe 架設購物網站的人應該很多
這兩套系統都是使用 Smarty 樣版引擎
想要更新其實很簡單

http://www.smarty.net/ 下載 Smarty 新的版本
解壓縮後將其中的 libs 目錄名稱改成 Smarty_x.x.x 後,複製到 includes/classes 目錄下
修改 Smarty_x.x.x/Smarty.class.php 將  config_dir 設定成
  1. var $config_dir =  'lang';
複製代碼
再來修改設定檔 includes/application_top.php 所引用的 Smarty 版本
  1. require (DIR_WS_CLASSES.'Smarty_x.x.x/Smarty.class.php');
複製代碼
將 x.x.x 對應到剛加入的 includes/classes/Smarty_x.x.x 版本路徑
然後檢查網頁是否正常作業以及 Log 有無錯誤訊息

後台也請修改 admin/includes/application_top.php
  1. require(DIR_FS_CATALOG.DIR_WS_CLASSES . 'Smarty_x.x.x/Smarty.class.php');
複製代碼
這樣就完成 Smarty 的升級了
作者: bestlong    時間: 2009-11-1 22:28

另外要注意的是某些加工過的 xtc 或 twe 的版本
可能有使用到 Smarty 的 plugins 的機制
就要將舊版的 Smarty_x.x.x/plugins/ 目錄中找一下
複製到新版後應該可以直接使用




歡迎光臨 bestlong 怕失憶論壇 (http://www.bestlong.idv.tw/) Powered by Discuz! X1.5