來源: http://open.38.com/index.php/topic,342.0.html改好了 跟大家分享一下 並且補充那篇文章不清楚的部分
參考文章
http://coppermine.sourceforge.net/board/index.php?topic=9159.0首先 改Big5.php的地方 這是我自己改的 翻的不好請原諒
'what_rebuild' => '重建縮圖,調整影像大小和照片原始大小',
'thumbs_wait' => '更新縮圖 且/或 調整/原來影像尺寸, 請稍待... ',
'thumbs_continue_wait' => '繼續 更新縮圖 且/或 調整/原來影像尺寸... ',
'update' => '更新縮圖 且/或 調整影像大小或原始尺吋 ',
'update_originals' => '將原來照片縮小到設定允許上傳的最大長和寬.', (此行我直接置於上面這一行的下方)
util.php file 的部分 文章中提到的我則是放在以下的地方
---------找到-------------------------------------
$imagesize = getimagesize($image);
if (max($imagesize[0], $imagesize[1]) > $CONFIG['picture_width'] && $CONFIG['make_intermediate']) {
if (resize_image($image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'])) {
print $normal . $lang_util_php['updated_succesfully'] . '!<br />';
my_flush();
} else {
print $lang_util_php['error_create'] . ':$normal<br />';
my_flush();
}
}
}
----------------------------在下面,加上----------------------------------
// *** START *** Original Resize Mod ***
if ($updatetype == 3) {
$original = $CONFIG['fullpath'] . mysql_result($result, $i, "filepath") . mysql_result($result, $i, "filename");
$temp_original = $CONFIG['fullpath'] . mysql_result($result, $i, "filepath") . "temp_" . mysql_result($result, $i, "filename");
$imagesize = getimagesize($image);
if (max($imagesize[0], $imagesize[1]) > $CONFIG['max_upl_width_height']) {
if (rename($original, $temp_original) &&
copy($temp_original, $original) &&
unlink($temp_original) &&
resize_image($image, $original, $CONFIG['max_upl_width_height'], $CONFIG['thumb_method'], $CONFIG['thumb_use'])) {
// need to save new size of original to database!
$imagesize = getimagesize($original);
$pid = mysql_result($result, $i, "pid");
$update = "pwidth = " . (int) $imagesize[0];
$update .= ", pheight = " . (int) $imagesize[1];
$update .= ", filesize = " . (int) filesize($original);
$query = "UPDATE {$CONFIG['TABLE_PICTURES']} SET $update WHERE pid='$pid' LIMIT 1";
$result_resize = db_query($query);
print $original .' '. $lang_util_php['updated_succesfully'] . '!<br />';
my_flush();
} else {
print $lang_util_php['error_create'] . ':$original<br />';
my_flush();
}
}
}
// *** END *** Original Resize Mod ***
希望能對想裝此外掛的人幫上一些忙