- 先安裝Libraries API http://drupal.org/project/libraries
- 在Drupal中Enable Libraries Module
- 安裝pclzip 模組時要去download兩個東西。一個是pclzip的核心程式 pclzip.lib.php(http://www.phpconcept.net/pclzip/pclzip-downloads)下載最新版本(目前是2.8.2版)
- 另外一個是在Drupal用的module(http://drupal.org/project/pclzip)下載(pclzip-7.x-1.x-dev.tar.gz)
- 在Drupal網站路徑 sites/all/下新建一個libraries資料夾。如果是多網站環境下就是在 sites/all/<domain>/下新建一個libraries資料夾
- 在sites/all/libraries或是sites/all/<domain>/libraries資料夾內再建一個pclzip資料夾並把pclzip.lib.php放到此資料夾中。
- 在drupal中安裝pclzip-7.x-1.x-dev.tar.gz這個pclzip模組
- 修改pclzip.module file will be there in (pclzip module)Go to line# 79 - approx and replace the
<?phpfunction pclzip_library_exists() {
$pclzip_path = libraries_get_path('pclzip.lib.php');
if (!is_file($pclzip_path)) {
drupal_set_message(t('Could not find the PclZip library file : @pclzip_path', array('@pclzip_path' => $pclzip_path)), 'error');
return FALSE;
}
return TRUE;
}?>WITH<?phpfunction pclzip_library_exists() {
$pclzip_path = libraries_get_path('pclzip');
$pclzip_path = $pclzip_path.'/pclzip.lib.php';
if (!is_file($pclzip_path)) {
drupal_set_message(t('Could not find the PclZip library file : @pclzip_path', array('@pclzip_path' => $pclzip_path)), 'error');
return FALSE;
}
return TRUE;
}?> - 在Drupal中Enable pclzip模組
- 一定要安裝Libraries API不然會出現miss libaries的錯誤。
補充作法:
Here if some one needs any help, you can use this as patch for now. I think the code that is written for now is wrong.
Do the following steps.
1- Download pclzip.lib.php
2- Create a folder named 'pclzip' inside your libraries folder (preferable - sites/all/libraries)
3- Copy pclzip.lib.php to sites/all/libraries/pclzip (folder) - the path might be diff you have created this folder else where
4- IMP and this is the patch.
Go to pclzip.module file will be there in (pclzip module)
Go to line# 79 - approx and replace the
<?phpfunction pclzip_library_exists() {
$pclzip_path = libraries_get_path('pclzip.lib.php');
if (!is_file($pclzip_path)) {
drupal_set_message(t('Could not find the PclZip library file : @pclzip_path', array('@pclzip_path' => $pclzip_path)), 'error');
return FALSE;
}
return TRUE;
}?>
WITH
<?phpfunction pclzip_library_exists() {
$pclzip_path = libraries_get_path('pclzip');
$pclzip_path = $pclzip_path.'/pclzip.lib.php';
if (!is_file($pclzip_path)) {
drupal_set_message(t('Could not find the PclZip library file : @pclzip_path', array('@pclzip_path' => $pclzip_path)), 'error');
return FALSE;
}
return TRUE;
}
?>
沒有留言:
張貼留言