From 4d85666c188b678728501ca0f6781a526c55439c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Mon, 18 Nov 2013 10:40:39 +0600 Subject: [PATCH 1/4] Transparency PNG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit При использовании функций resize или crop (остальные функции не проверялись) к PNG изображению с прозрачным фоном терялась прозрачность, фон становился черным. --- libraries/Gelato/Image/Image.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/Gelato/Image/Image.php b/libraries/Gelato/Image/Image.php index b4e5faf..07abc38 100644 --- a/libraries/Gelato/Image/Image.php +++ b/libraries/Gelato/Image/Image.php @@ -218,6 +218,8 @@ class Image // Create a new true color image width new width and height $resized = imagecreatetruecolor($new_width, $new_height); + $transPng = imagecolorallocatealpha($resized, 0, 0, 0, 127); + imagefill($resized, 0, 0, $transPng); // Copy and resize part of an image with resampling imagecopyresampled($resized, $this->image, 0, 0, 0, 0, $new_width, $new_height, $this->width, $this->height); @@ -227,6 +229,8 @@ class Image // Create a new true color image width new width and height $this->image = imagecreatetruecolor($new_width, $new_height); + $transPng = imagecolorallocatealpha($this->image, 0, 0, 0, 127); + imagefill($this->image, 0, 0, $transPng); // Copy and resize part of an image with resampling imagecopyresampled($this->image, $resized, 0, 0, 0, 0, $new_width, $new_height, $new_width, $new_height); @@ -269,6 +273,8 @@ class Image // Create a new true color image $crop = imagecreatetruecolor($width, $height); + $transPng = imagecolorallocatealpha($crop, 0, 0, 0, 127); + imagefill($crop, 0, 0, $transPng); // Copy and resize part of an image with resampling imagecopyresampled($crop, $this->image, 0, 0, $x, $y, $this->width, $this->height, $this->width, $this->height); @@ -278,6 +284,8 @@ class Image // Create a new true color image $this->image = imagecreatetruecolor($width, $height); + $transPng = imagecolorallocatealpha($this->image, 0, 0, 0, 127); + imagefill($this->image, 0, 0, $transPng); // Copy and resize part of an image with resampling imagecopyresampled($this->image, $crop, 0, 0, 0, 0, $width, $height, $width, $height); From d79b09254234b6212bdcdff47f1a6d140d8e048e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Mon, 18 Nov 2013 10:57:30 +0600 Subject: [PATCH 2/4] Update ru.lang.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit При сохранении настроек выскакивало оповещение "Your changes have been saved." --- plugins/box/system/languages/ru.lang.php | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/box/system/languages/ru.lang.php b/plugins/box/system/languages/ru.lang.php index d12e1f7..700411d 100644 --- a/plugins/box/system/languages/ru.lang.php +++ b/plugins/box/system/languages/ru.lang.php @@ -75,5 +75,6 @@ 'Main .htaccess file not writable' => 'Главный .htaccess файл не доступен для записи', 'Official Support Forum' => 'Официальный Форум Поддержки', 'Documentation' => 'Документация', + 'Your changes have been saved.' => 'Ваши изменения сохранены.', ) ); From 8f60502a0e9321b8651924915bb46772ac24802e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Mon, 18 Nov 2013 10:58:13 +0600 Subject: [PATCH 3/4] Update en.lang.php --- plugins/box/system/languages/en.lang.php | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/box/system/languages/en.lang.php b/plugins/box/system/languages/en.lang.php index 70b5f53..a110839 100644 --- a/plugins/box/system/languages/en.lang.php +++ b/plugins/box/system/languages/en.lang.php @@ -76,5 +76,6 @@ 'Main .htaccess file not writable' => 'Main .htaccess file not writable', 'Official Support Forum' => 'Official Support Forum', 'Documentation' => 'Documentation', + 'Your changes have been saved.' => 'Your changes have been saved.', ) ); From 9f8d7f5198c8deb7f450ba869af0998f20ac71bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Mon, 18 Nov 2013 11:10:37 +0600 Subject: [PATCH 4/4] Idiorm configure (utf8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Без указания кодировки, возникают проблемы с кириллицей --- engine/Monstra.php | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/Monstra.php b/engine/Monstra.php index 6017e2b..54f1ae3 100644 --- a/engine/Monstra.php +++ b/engine/Monstra.php @@ -179,6 +179,7 @@ class Monstra ORM::configure(MONSTRA_DB_DSN); ORM::configure('username', MONSTRA_DB_USER); ORM::configure('password', MONSTRA_DB_PASSWORD); + ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); } /**