二月 21, 2008

[問題修正] 解決網誌模版編輯器在 Linux 上無法預覽模版圖檔的問題

主要是在 Linux 上對網址的要求比較嚴格!

javascript:openImagePreviewWindow('http://www.tiec.tp.edu.tw/lifetype./templates/blog_102/jay_FallingLeaves-randombanner/screenshot.jpg');

你可以發現多了一個 " 點 " !

所以找了一下程式。解決方法如下


修改

plugins\templateeditor\class\view 中的

pluginblogtemplateslistview.class.php

找到

$tmp['url'] = $file;

其上加入

$file = ereg_replace("./templates", "/templates", $file);

$file = ereg_replace("./templates", "/templates", $file);
$tmp['url'] = $file;

這樣就可以啦!


延伸閱讀

PHP使用RegEx(一)


發佈者: 陳怡杰 老師 at 14:19│  點閱次數 (219)│ 修改文章管理迴響迴響 (0)部落格學習筆記 , 精華置頂
回應文章
(必要)
authimage