Version Description
- Implemented new feature of calculating images size according server configuration.
- Minor bugs fixed.
Download this release
Release Info
Developer | Gallery-Bank |
Plugin | Gallery Bank: WordPress Photo Gallery Plugin |
Version | 3.0.109 |
Comparing to | |
See all releases |
Code changes from version 3.0.108 to 3.0.109
- gallery-bank.php +1 -1
- readme.txt +6 -1
- views/dashboard.php +8 -0
- views/edit-album.php +8 -0
- views/header.php +117 -0
gallery-bank.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin URI: http://tech-banker.com
|
5 |
Description: Gallery Bank is an easy to use Responsive WordPress Gallery Plugin for photos, videos, galleries and albums.
|
6 |
Author: Tech Banker
|
7 |
-
Version: 3.0.
|
8 |
Author URI: http://tech-banker.com
|
9 |
*/
|
10 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
4 |
Plugin URI: http://tech-banker.com
|
5 |
Description: Gallery Bank is an easy to use Responsive WordPress Gallery Plugin for photos, videos, galleries and albums.
|
6 |
Author: Tech Banker
|
7 |
+
Version: 3.0.109
|
8 |
Author URI: http://tech-banker.com
|
9 |
*/
|
10 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Gallery-Bank,contact-banker
|
|
3 |
Tags: add album, add gallery, add picture, add pictures, admin, AJAX, album, banner rotator, best gallery, best gallery plugin, best image slider, best portfolio, bilder, comments, easy media gallery, fancy gallery, filterable gallery, filterable portfolio, foto, fotoalbum, fotogalerie, free photo gallery, fullscreen gallery, galary, galeri, galerie, galerij, galery, gallary, Galleria, gallerie, galleries, gallery, gallery decription, gallery image, gallery lightbox, Gallery Plugin, gallery shortcode, gallery slider, gelary, gellary, gellery, google, grid gallery, html5 player, html5 video, html5-audio, image, image album, image gallery, image gallery plugin, image lightbox, image rotate, image slider, image slideshow, images, images gallery, jquery, jquery gallery, links, media, media gallery, multiple pictures, nextgen gallery, page, pagination gallery, pagination portfolio, photo, photo album, photo albums, photo gallery, photoalbum, photogallery, photos, photoset, picture, pictures, plugin, plugin for gallery, plugin gallery, portfolio, portfolio gallery, portfolio plugin, Post, posts, responsive gallery, responsive image gallery, responsive slider, responsive slideshow, responsive wordpress photo gallery, seo, seo image, shortcode, sidebar, Simple gallery, slide show, slideshow, thumbnail, twitter, upload images, upload photos, video gallery, view images, view pictures, website gallery, widget, widget gallery, wordpress gallery, wordpress gallery plugin, wordpress photo gallery plugin, wordpress portfolio plugin, wp gallery, wp gallery plugin, wp gallery plugins
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 4.1.1
|
6 |
-
Stable tag: 3.0.
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -500,6 +500,11 @@ is False in shortcode.
|
|
500 |
|
501 |
== Changelog ==
|
502 |
|
|
|
|
|
|
|
|
|
|
|
503 |
= 3.0.108 =
|
504 |
|
505 |
* Minor bugs fixed.
|
3 |
Tags: add album, add gallery, add picture, add pictures, admin, AJAX, album, banner rotator, best gallery, best gallery plugin, best image slider, best portfolio, bilder, comments, easy media gallery, fancy gallery, filterable gallery, filterable portfolio, foto, fotoalbum, fotogalerie, free photo gallery, fullscreen gallery, galary, galeri, galerie, galerij, galery, gallary, Galleria, gallerie, galleries, gallery, gallery decription, gallery image, gallery lightbox, Gallery Plugin, gallery shortcode, gallery slider, gelary, gellary, gellery, google, grid gallery, html5 player, html5 video, html5-audio, image, image album, image gallery, image gallery plugin, image lightbox, image rotate, image slider, image slideshow, images, images gallery, jquery, jquery gallery, links, media, media gallery, multiple pictures, nextgen gallery, page, pagination gallery, pagination portfolio, photo, photo album, photo albums, photo gallery, photoalbum, photogallery, photos, photoset, picture, pictures, plugin, plugin for gallery, plugin gallery, portfolio, portfolio gallery, portfolio plugin, Post, posts, responsive gallery, responsive image gallery, responsive slider, responsive slideshow, responsive wordpress photo gallery, seo, seo image, shortcode, sidebar, Simple gallery, slide show, slideshow, thumbnail, twitter, upload images, upload photos, video gallery, view images, view pictures, website gallery, widget, widget gallery, wordpress gallery, wordpress gallery plugin, wordpress photo gallery plugin, wordpress portfolio plugin, wp gallery, wp gallery plugin, wp gallery plugins
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 4.1.1
|
6 |
+
Stable tag: 3.0.109
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
500 |
|
501 |
== Changelog ==
|
502 |
|
503 |
+
= 3.0.109 =
|
504 |
+
|
505 |
+
* Implemented new feature of calculating images size according server configuration.
|
506 |
+
* Minor bugs fixed.
|
507 |
+
|
508 |
= 3.0.108 =
|
509 |
|
510 |
* Minor bugs fixed.
|
views/dashboard.php
CHANGED
@@ -284,6 +284,14 @@
|
|
284 |
display: none !important;
|
285 |
}
|
286 |
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
<form id="frmdashboard" class="layout-form">
|
288 |
<div id="poststuff" style="width: 99% !important;">
|
289 |
<div id="post-body" class="metabox-holder">
|
284 |
display: none !important;
|
285 |
}
|
286 |
</style>
|
287 |
+
<div class="custom-message red">
|
288 |
+
<span style="line-height: inherit;">
|
289 |
+
<?php echo( sprintf( __( "<b>Notice:</b> Your server allows you to upload <b>%s</b> files of maximum total <b>%s</b> bytes and allows <b>%s</b> seconds to complete.", gallery_bank ), $max_files_upload, $max_files_size, $max_files_time));?>
|
290 |
+
<?php _e( "<br />If your request exceeds these limitations, it will fail, probably without an errormessage.", gallery_bank); ?>
|
291 |
+
<?php _e( "<br />Additionally your hosting provider may have set other limitations on uploading files.", gallery_bank); ?>
|
292 |
+
<?php echo check_server_configuration();?>
|
293 |
+
</span>
|
294 |
+
</div>
|
295 |
<form id="frmdashboard" class="layout-form">
|
296 |
<div id="poststuff" style="width: 99% !important;">
|
297 |
<div id="post-body" class="metabox-holder">
|
views/edit-album.php
CHANGED
@@ -197,6 +197,14 @@
|
|
197 |
</div>
|
198 |
</div>
|
199 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
<div class="fluid-layout">
|
201 |
<div class="layout-span7">
|
202 |
<div class="widget-layout">
|
197 |
</div>
|
198 |
</div>
|
199 |
</div>
|
200 |
+
<div class="custom-message red" style="margin:0px;">
|
201 |
+
<span style="line-height: inherit;">
|
202 |
+
<?php echo( sprintf( __( "<b>Notice:</b> Your server allows you to upload <b>%s</b> files of maximum total <b>%s</b> bytes and allows <b>%s</b> seconds to complete.", gallery_bank ), $max_files_upload, $max_files_size, $max_files_time));?>
|
203 |
+
<?php _e( "<br />If your request exceeds these limitations, it will fail, probably without an errormessage.", gallery_bank); ?>
|
204 |
+
<?php _e( "<br />Additionally your hosting provider may have set other limitations on uploading files.", gallery_bank); ?>
|
205 |
+
<?php echo check_server_configuration();?>
|
206 |
+
</span>
|
207 |
+
</div>
|
208 |
<div class="fluid-layout">
|
209 |
<div class="layout-span7">
|
210 |
<div class="widget-layout">
|
views/header.php
CHANGED
@@ -9,6 +9,97 @@ array_push($gb_translated_lang,"ar","be_BY","et","fi","ja","ko_KR","nb_NO","no",
|
|
9 |
"zh_sg","zh_TW","zh","cs_CZ","sk_SK","el","hr","sl_SL","id_ID","ro_RO","nn_NO","uk","sl_SL", "th","tr_TR");
|
10 |
|
11 |
$language = get_locale();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
?>
|
13 |
<div id="welcome-panel" class="welcome-panel" style="padding:0px !important;background-color: #f9f9f9 !important">
|
14 |
<div class="welcome-panel-content">
|
@@ -103,6 +194,19 @@ switch($_REQUEST["page"])
|
|
103 |
{
|
104 |
case "gallery_bank":
|
105 |
$page = "Dashboard";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
break;
|
107 |
case "gallery_bank_shortcode":
|
108 |
$page = "Short-Codes";
|
@@ -121,6 +225,19 @@ switch($_REQUEST["page"])
|
|
121 |
break;
|
122 |
case "save_album":
|
123 |
$page = "Album";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
break;
|
125 |
case "images_sorting":
|
126 |
$page = "Re-order Images";
|
9 |
"zh_sg","zh_TW","zh","cs_CZ","sk_SK","el","hr","sl_SL","id_ID","ro_RO","nn_NO","uk","sl_SL", "th","tr_TR");
|
10 |
|
11 |
$language = get_locale();
|
12 |
+
|
13 |
+
if(!function_exists("check_server_configuration"))
|
14 |
+
{
|
15 |
+
function check_server_configuration( $con = true, $x = "0", $y = "0" )
|
16 |
+
{
|
17 |
+
if( ! function_exists( "memory_get_usage")) return "";
|
18 |
+
|
19 |
+
$server_memory_limit = 0;
|
20 |
+
$ini_memory_limit = gallery_convert_bytes( ini_get( "memory_limit" ) );
|
21 |
+
$php_configuration = gallery_convert_bytes( get_cfg_var( "memory_limit" ) );
|
22 |
+
|
23 |
+
if ( $ini_memory_limit && $php_configuration ) $server_memory_limit = min( $ini_memory_limit, $php_configuration );
|
24 |
+
elseif($ini_memory_limit) $server_memory_limit = $ini_memory_limit;
|
25 |
+
else $server_memory_limit = $php_configuration;
|
26 |
+
|
27 |
+
if ( ! $server_memory_limit) return "";
|
28 |
+
|
29 |
+
$free_memory = $server_memory_limit - memory_get_usage( true );
|
30 |
+
$image_pixels = gallery_get_minisize() * gallery_get_minisize() * 3 / 4;
|
31 |
+
|
32 |
+
$bytes_per_pixel = $server_memory_limit / ( 1024 * 1024 );
|
33 |
+
$factor_result = "6.00" - "0.58" * ( $bytes_per_pixel / 104 );
|
34 |
+
|
35 |
+
$max_image_pixel = ( $free_memory / $factor_result ) - $image_pixels;
|
36 |
+
|
37 |
+
if ( $max_image_pixel < 0 ) return "";
|
38 |
+
|
39 |
+
if ( $x && $y )
|
40 |
+
{
|
41 |
+
if ($x * $y <= $max_image_pixel) $result = true;
|
42 |
+
else $result = false;
|
43 |
+
}
|
44 |
+
else
|
45 |
+
{
|
46 |
+
|
47 |
+
$max_x = sqrt($max_image_pixel / 12) * 4;
|
48 |
+
$max_y = sqrt($max_image_pixel / 12) * 3;
|
49 |
+
if($con)
|
50 |
+
{
|
51 |
+
$result = "<br />".sprintf(__( "Based on your server memory limit you should not upload images larger then <strong>%d x %d (%2.1f MP)</strong>", gallery_bank), $max_x, $max_y, $max_image_pixel / ( 1024 * 1024 ));
|
52 |
+
}
|
53 |
+
else
|
54 |
+
{
|
55 |
+
$result["maxx"] = $max_x;
|
56 |
+
$result["maxy"] = $max_y;
|
57 |
+
$result["maxp"] = $max_image_pixel;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
return $result;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
if(!function_exists("gallery_convert_bytes"))
|
65 |
+
{
|
66 |
+
function gallery_convert_bytes($value)
|
67 |
+
{
|
68 |
+
if (is_numeric($value))
|
69 |
+
{
|
70 |
+
return max("0",$value);
|
71 |
+
}
|
72 |
+
else
|
73 |
+
{
|
74 |
+
$value_length = strlen($value);
|
75 |
+
$value_string = substr($value, 0, $value_length - 1);
|
76 |
+
$unit = strtolower(substr($value, $value_length - 1));
|
77 |
+
switch ($unit)
|
78 |
+
{
|
79 |
+
case "k":
|
80 |
+
$value_string *= 1024;
|
81 |
+
break;
|
82 |
+
case "m":
|
83 |
+
$value_string *= 1048576;
|
84 |
+
break;
|
85 |
+
case "g":
|
86 |
+
$value_string *= 1073741824;
|
87 |
+
break;
|
88 |
+
}
|
89 |
+
return max("0", $value_string);
|
90 |
+
}
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
if(!function_exists("gallery_get_minisize"))
|
95 |
+
{
|
96 |
+
function gallery_get_minisize()
|
97 |
+
{
|
98 |
+
$result = "100";
|
99 |
+
$result = ceil($result / 25) * 25;
|
100 |
+
return $result;
|
101 |
+
}
|
102 |
+
}
|
103 |
?>
|
104 |
<div id="welcome-panel" class="welcome-panel" style="padding:0px !important;background-color: #f9f9f9 !important">
|
105 |
<div class="welcome-panel-content">
|
194 |
{
|
195 |
case "gallery_bank":
|
196 |
$page = "Dashboard";
|
197 |
+
if ( ! function_exists( "imagecreatefromjpeg" ) ) {
|
198 |
+
_e( "There is a serious misconfiguration in your servers PHP config. Function imagecreatefromjpeg() does not exist. You will encounter problems when uploading photos and not be able to generate thumbnail images. Ask your hosting provider to add GD support with a minimal version 1.8.", gallery_bank );
|
199 |
+
}
|
200 |
+
|
201 |
+
$max_upload_files = ini_get( "max_file_uploads" );
|
202 |
+
$max_files_upload = $max_upload_files;
|
203 |
+
if ( $max_upload_files < "1" ) {
|
204 |
+
$max_files_upload = __( "unknown", gallery_bank );
|
205 |
+
$max_upload_files = "15";
|
206 |
+
}
|
207 |
+
$max_files_size = ini_get( "upload_max_filesize" );
|
208 |
+
$max_files_time = ini_get( "max_input_time" );
|
209 |
+
if ( $max_files_time < "1" ) $max_files_time = __( "unknown", gallery_bank );
|
210 |
break;
|
211 |
case "gallery_bank_shortcode":
|
212 |
$page = "Short-Codes";
|
225 |
break;
|
226 |
case "save_album":
|
227 |
$page = "Album";
|
228 |
+
if ( ! function_exists( "imagecreatefromjpeg" ) ) {
|
229 |
+
_e( "There is a serious misconfiguration in your servers PHP config. Function imagecreatefromjpeg() does not exist. You will encounter problems when uploading photos and not be able to generate thumbnail images. Ask your hosting provider to add GD support with a minimal version 1.8.", gallery_bank );
|
230 |
+
}
|
231 |
+
|
232 |
+
$max_upload_files = ini_get( "max_file_uploads" );
|
233 |
+
$max_files_upload = $max_upload_files;
|
234 |
+
if ( $max_upload_files < "1" ) {
|
235 |
+
$max_files_upload = __( "unknown", gallery_bank );
|
236 |
+
$max_upload_files = "15";
|
237 |
+
}
|
238 |
+
$max_files_size = ini_get( "upload_max_filesize" );
|
239 |
+
$max_files_time = ini_get( "max_input_time" );
|
240 |
+
if ( $max_files_time < "1" ) $max_files_time = __( "unknown", gallery_bank );
|
241 |
break;
|
242 |
case "images_sorting":
|
243 |
$page = "Re-order Images";
|