歡迎光臨, 訪客. 請先 登入註冊一個帳號.
五月 04, 2024, 04:59:30 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  開發  |  外掛程式  |  解決 FreeBSD 中 templateeditor 中無法 zip 打包下載的方法 « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 解決 FreeBSD 中 templateeditor 中無法 zip 打包下載的方法  (閱讀 8068 次)
reic
LifeType 中文發展團隊
初級會員
*****
文章: 57


檢視個人資料 個人網站
« 於: 九月 30, 2006, 07:13:51 下午 »

修改
引用
class/action/pluginsitearchivetemplatesetaction.class.php
class/action/pluginblogarchivetemplatesetaction.class.php

這兩個檔案,在其中找到下列文字

$templateArchive->set_options(array( 'basedir' => $baseBlogTemplateFolder , 'overwrite'=> 1, 'inmemory'=>1));


修改為
$templateArchive->set_options(array( 'basedir' => $baseBlogTemplateFolder , 'overwrite'=> 1, 'inmemory'=>1,'storepaths'=>3));

這樣就可以正確的打包下載了
已記錄

歡迎光臨 Reic's place
大雄
新手見習
*
文章: 4


檢視個人資料 個人網站
« 回覆文章 #1 於: 十月 03, 2006, 10:33:43 下午 »

為了這個問題困擾一段時間,不僅是freebsd,linux及windows都有這個問題。謝謝reic兄的提醒...

但無須修改這二支程式,只要修改templateeditor外掛裡的 archive.php (lifetype目錄/plugins/templateeditor/class/archive/archive.php) 這個檔案的參數即可...

程式碼:
class archive
{
        function archive($name)
        {
                $this->options = array(
                        'basedir'=>".",
                        'name'=>$name,
                        'prepend'=>"",
                        'inmemory'=>0,
                        'overwrite'=>1,
                        'recurse'=>1,
                        'storepaths'=>1,   (預設為1)
                        'level'=>3,
                        'method'=>1,
                        'sfx'=>"",
                        'type'=>"",
                        'comment'=>""
                );
                $this->files = array();
                $this->exclude = array();
                $this->storeonly = array();
                $this->error = array();
        }

其中的參數設定為   'storepaths'=>3, 就可解決
已記錄
頁: [1]
LifeType 中文開發論壇  |  開發  |  外掛程式  |  解決 FreeBSD 中 templateeditor 中無法 zip 打包下載的方法 « 上篇主題 下篇主題 »
    前往: