Version Description
Download this release
Release Info
Developer | contact-banker |
Plugin | Gallery Bank: WordPress Photo Gallery Plugin |
Version | 3.1.38 |
Comparing to | |
See all releases |
Code changes from version 3.1.37 to 3.1.38
- front_views/gallery-bank-shortcode.php +226 -255
- front_views/grid-albums.php +7 -7
- front_views/includes_common_after.php +151 -154
- front_views/includes_common_before.php +30 -28
- front_views/listed-album.php +7 -7
- gallery-bank.php +394 -593
- lib/add-new-album-class.php +142 -173
- lib/gallery-bank-class.php +610 -645
- lib/install-script.php +159 -154
- lib/uninstall-script.php +0 -19
- readme.txt +109 -107
- uninstall.php +23 -0
- views/album-sorting.php +12 -12
- views/automatic-plugin-update.php +0 -62
- views/dashboard.php +86 -89
- views/edit-album.php +39 -38
- views/header.php +91 -100
- views/images-sorting.php +11 -11
- views/includes_common_before.php +15 -50
- views/other-settings.php +62 -0
- views/recommended-plugins.php +35 -36
- views/settings.php +23 -23
- views/wizard.php +32 -36
front_views/gallery-bank-shortcode.php
CHANGED
@@ -170,287 +170,258 @@ jQuery(document).ready(function ()
|
|
170 |
show_images_in_row();
|
171 |
gb_display_images();
|
172 |
});
|
173 |
-
|
174 |
{
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
jQuery("#div_no_of_images").css("display","none");
|
185 |
-
}
|
186 |
-
}
|
187 |
}
|
188 |
-
|
189 |
{
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
jQuery("#div_img_in_row").css("display","inline-block");
|
201 |
-
}
|
202 |
-
}
|
203 |
}
|
204 |
-
|
205 |
{
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
}
|
231 |
-
show_images_in_row();
|
232 |
-
}
|
233 |
}
|
234 |
-
|
235 |
{
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
jQuery("#div_special_effects").css("display", "none");
|
246 |
-
}
|
247 |
-
}
|
248 |
}
|
249 |
-
|
250 |
{
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
jQuery("#ux_select_multiple_albums").css("display", "block");
|
261 |
-
}
|
262 |
-
}
|
263 |
}
|
264 |
-
|
265 |
{
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
}
|
300 |
-
}
|
301 |
-
}
|
302 |
}
|
303 |
-
|
304 |
{
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
jQuery("#ux_select_album").css("display", "none");
|
313 |
-
}
|
314 |
-
}
|
315 |
}
|
316 |
-
|
317 |
{
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
var no_of_images = jQuery("#ux_show_no_of_images").val();
|
332 |
-
var sort_order = jQuery("#ddl_sort_order").val();
|
333 |
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
}
|
426 |
}
|
427 |
/**
|
428 |
* @return {boolean}
|
429 |
*/
|
430 |
-
|
431 |
-
{
|
432 |
-
|
433 |
-
|
434 |
-
return (charCode > 47 && charCode < 58) || charCode == 127 || charCode == 8;
|
435 |
-
}
|
436 |
}
|
437 |
-
|
438 |
{
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
break;
|
453 |
-
}
|
454 |
-
}
|
455 |
}
|
456 |
</script>
|
170 |
show_images_in_row();
|
171 |
gb_display_images();
|
172 |
});
|
173 |
+
function gb_display_images()
|
174 |
{
|
175 |
+
var show_images = jQuery("#ddl_display_images").val();
|
176 |
+
if(show_images == "selected")
|
177 |
+
{
|
178 |
+
jQuery("#div_no_of_images").css("display","block");
|
179 |
+
}
|
180 |
+
else
|
181 |
+
{
|
182 |
+
jQuery("#div_no_of_images").css("display","none");
|
183 |
+
}
|
|
|
|
|
|
|
184 |
}
|
185 |
+
function show_images_in_row()
|
186 |
{
|
187 |
+
var responsive = jQuery("#ux_responsive_gallery").prop("checked");
|
188 |
+
var gallery_format = jQuery("#ux_gallery_format").val();
|
189 |
+
if(responsive == true && (gallery_format == "thumbnail" || gallery_format == "masonry" || gallery_format == "slideshow" ))
|
190 |
+
{
|
191 |
+
jQuery("#div_img_in_row").css("display","none");
|
192 |
+
}
|
193 |
+
else if(gallery_format != "blog" && gallery_format != "slideshow")
|
194 |
+
{
|
195 |
+
jQuery("#div_img_in_row").css("display","inline-block");
|
196 |
+
}
|
|
|
|
|
|
|
197 |
}
|
198 |
+
function select_images_in_row()
|
199 |
{
|
200 |
+
var gallery_format = jQuery("#ux_gallery_format").val();
|
201 |
+
switch(gallery_format)
|
202 |
+
{
|
203 |
+
case "thumbnail":
|
204 |
+
jQuery("#div_img_in_row").css("display", "inline-block");
|
205 |
+
jQuery("#gb_gallery_format").css("display", "inline-block");
|
206 |
+
jQuery("#div_special_effects").css("display", "inline-block");
|
207 |
+
jQuery("#div_animation_effects").css("display", "block");
|
208 |
+
break;
|
209 |
+
case "masonry":
|
210 |
+
jQuery("#div_img_in_row").css("display", "inline-block");
|
211 |
+
jQuery("#gb_gallery_format").css("display", "inline-block");
|
212 |
+
jQuery("#div_special_effects").css("display", "inline-block");
|
213 |
+
jQuery("#div_animation_effects").css("display", "block");
|
214 |
+
jQuery("#ux_special_effects").val("grayscale");
|
215 |
+
break;
|
216 |
+
default:
|
217 |
+
jQuery("#gb_gallery_format").css("display", "inline-block");
|
218 |
+
jQuery("#div_img_in_row").css("display", "none");
|
219 |
+
jQuery("#div_special_effects").css("display", "inline-block");
|
220 |
+
jQuery("#div_animation_effects").css("display", "block");
|
221 |
+
break;
|
222 |
+
}
|
223 |
+
show_images_in_row();
|
|
|
|
|
|
|
224 |
}
|
225 |
+
function show_special_effect()
|
226 |
{
|
227 |
+
var text_format = jQuery("#ux_text_format").val();
|
228 |
+
if (text_format == "no_text")
|
229 |
+
{
|
230 |
+
jQuery("#div_special_effects").css("display", "inline-block");
|
231 |
+
}
|
232 |
+
else
|
233 |
+
{
|
234 |
+
jQuery("#div_special_effects").css("display", "none");
|
235 |
+
}
|
|
|
|
|
|
|
236 |
}
|
237 |
+
function show_gallery_albums()
|
238 |
{
|
239 |
+
var show_albums = jQuery("#ddl_show_albums").val();
|
240 |
+
if(show_albums == "all")
|
241 |
+
{
|
242 |
+
jQuery("#ux_select_multiple_albums").css("display", "none");
|
243 |
+
}
|
244 |
+
else
|
245 |
+
{
|
246 |
+
jQuery("#ux_select_multiple_albums").css("display", "block");
|
247 |
+
}
|
|
|
|
|
|
|
248 |
}
|
249 |
+
function check_gallery_type()
|
250 |
{
|
251 |
+
var gallery_type = jQuery("input:radio[name=ux_gallery]:checked").val();
|
252 |
+
var album_format = jQuery("#ux_album_format").val();
|
253 |
+
if (gallery_type == 0) {
|
254 |
+
jQuery("#album_format").css("display", "none");
|
255 |
+
jQuery("#div_albums_in_row").css("display", "none");
|
256 |
+
jQuery("#ux_select_album").css("display", "block");
|
257 |
+
jQuery("#slide_show").css("display", "none");
|
258 |
+
jQuery("#ux_show_multiple_albums").css("display", "none");
|
259 |
+
jQuery("#ux_select_multiple_albums").css("display", "none");
|
260 |
+
}
|
261 |
+
else {
|
262 |
+
jQuery("#album_format").css("display", "inline-block");
|
263 |
+
if (album_format != "individual") {
|
264 |
+
jQuery("#ux_select_album").css("display", "none");
|
265 |
+
if (album_format == "grid") {
|
266 |
+
jQuery("#div_albums_in_row").css("display", "inline-block");
|
267 |
+
jQuery("#slide_show").css("display", "block");
|
268 |
+
jQuery("#ux_show_multiple_albums").css("display", "inline-block");
|
269 |
+
}
|
270 |
+
else {
|
271 |
+
jQuery("#div_albums_in_row").css("display", "none");
|
272 |
+
jQuery("#slide_show").css("display", "block");
|
273 |
+
jQuery("#ux_show_multiple_albums").css("display", "inline-block");
|
274 |
+
}
|
275 |
+
show_gallery_albums();
|
276 |
+
}
|
277 |
+
else {
|
278 |
+
jQuery("#div_albums_in_row").css("display", "none");
|
279 |
+
jQuery("#slide_show").css("display", "block");
|
280 |
+
jQuery("#ux_show_multiple_albums").css("display", "none");
|
281 |
+
jQuery("#ux_select_multiple_albums").css("display", "none");
|
282 |
+
}
|
283 |
+
}
|
|
|
|
|
|
|
284 |
}
|
285 |
+
function select_album()
|
286 |
{
|
287 |
+
var album_format = jQuery("#ux_album_format").val();
|
288 |
+
if (album_format == "individual") {
|
289 |
+
jQuery("#ux_select_album").css("display", "block");
|
290 |
+
}
|
291 |
+
else {
|
292 |
+
jQuery("#ux_select_album").css("display", "none");
|
293 |
+
}
|
|
|
|
|
|
|
294 |
}
|
295 |
+
function InsertGallery()
|
296 |
{
|
297 |
+
var gallery_effect;
|
298 |
+
var album_id = jQuery("#ux_ddl_select_album").val();
|
299 |
+
var album_format = jQuery("#ux_album_format").val();
|
300 |
+
var gallery_format = jQuery("#ux_gallery_format").val();
|
301 |
+
var text_format = jQuery("#ux_text_format").val();
|
302 |
+
var images_in_row = jQuery("#ux_img_in_row").val();
|
303 |
+
var album_in_row = jQuery("#ux_album_in_row").val();
|
304 |
+
var gallery_type = jQuery("input:radio[name=ux_gallery]:checked").val();
|
305 |
+
var album_type = jQuery("#ddl_show_albums").val();
|
306 |
+
var selected_albums = jQuery("#ddl_add_multi_album").val();
|
307 |
+
var display_images = jQuery("#ddl_display_images").val();
|
308 |
+
var no_of_images = jQuery("#ux_show_no_of_images").val();
|
309 |
+
var sort_order = jQuery("#ddl_sort_order").val();
|
|
|
|
|
310 |
|
311 |
+
var displayAlbumTitle = jQuery("#ux_album_title").prop("checked");
|
312 |
+
var responsiveGallery = jQuery("#ux_responsive_gallery").prop("checked");
|
313 |
+
var responsive;
|
314 |
|
315 |
+
if(no_of_images == "")
|
316 |
+
{
|
317 |
+
alert("<?php _e("Enter number of images you want to display.", "gallery-bank") ?>");
|
318 |
+
return;
|
319 |
+
}
|
320 |
|
321 |
+
if(responsiveGallery == true)
|
322 |
+
{
|
323 |
+
responsive = "responsive=\""+ responsiveGallery+"\"";
|
324 |
+
}
|
325 |
+
else
|
326 |
+
{
|
327 |
+
responsive = "img_in_row=\""+ images_in_row+"\"";
|
328 |
+
}
|
329 |
|
330 |
+
if(album_type == "all")
|
331 |
+
{
|
332 |
+
var display_selected_albums = "show_albums=\"all\"";
|
333 |
+
}
|
334 |
+
else
|
335 |
+
{
|
336 |
+
var display_selected_albums = "show_albums=\""+ encodeURIComponent(selected_albums)+"\"";
|
337 |
+
}
|
338 |
|
339 |
+
if(display_images == "all")
|
340 |
+
{
|
341 |
+
var show_no_of_images = "display=\"all\" sort_by=\""+sort_order+"\"";
|
342 |
+
}
|
343 |
+
else
|
344 |
+
{
|
345 |
+
var show_no_of_images = "display=\"selected\" no_of_images=\""+no_of_images+"\" sort_by=\""+sort_order+"\"";
|
346 |
+
}
|
347 |
|
348 |
+
if (gallery_type == 1) {
|
349 |
+
if (album_format == "individual") {
|
350 |
+
if (gallery_format == "thumbnail" || gallery_format == "masonry") {
|
351 |
+
if (text_format == "title_only") {
|
352 |
+
window.send_to_editor("[gallery_bank type=\"" + album_format + "\" format=\"" + gallery_format + "\" title=\"true\" desc=\"false\" "+responsive+" "+show_no_of_images+" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\" album_id=\"" + album_id + "\"]");
|
353 |
+
}
|
354 |
+
else if (text_format == "title_desc") {
|
355 |
+
window.send_to_editor("[gallery_bank type=\"" + album_format + "\" format=\"" + gallery_format + "\" title=\"true\" desc=\"true\" "+responsive+" "+show_no_of_images+" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\" album_id=\"" + album_id + "\"]");
|
356 |
+
}
|
357 |
+
else if (text_format == "no_text") {
|
358 |
+
window.send_to_editor("[gallery_bank type=\"" + album_format + "\" format=\"" + gallery_format + "\" title=\"false\" desc=\"false\" "+responsive+" "+show_no_of_images+" special_effect=\"\" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\" album_id=\"" + album_id + "\"]");
|
359 |
+
}
|
360 |
+
}
|
361 |
+
}
|
362 |
+
else if (album_format == "grid") {
|
363 |
+
if (gallery_format == "thumbnail" || gallery_format == "masonry") {
|
364 |
+
if (text_format == "title_only") {
|
365 |
+
window.send_to_editor("[gallery_bank type=\"" + album_format + "\" format=\"" + gallery_format + "\" "+display_selected_albums+" title=\"true\" desc=\"false\" "+responsive+" "+show_no_of_images+" albums_in_row=\"" + album_in_row + "\" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\"]");
|
366 |
+
}
|
367 |
+
else if (text_format == "title_desc") {
|
368 |
+
window.send_to_editor("[gallery_bank type=\"" + album_format + "\" format=\"" + gallery_format + "\" "+display_selected_albums+" title=\"true\" desc=\"true\" "+responsive+" "+show_no_of_images+" albums_in_row=\"" + album_in_row + "\" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\"]");
|
369 |
+
}
|
370 |
+
else if (text_format == "no_text") {
|
371 |
+
window.send_to_editor("[gallery_bank type=\"" + album_format + "\" format=\"" + gallery_format + "\" "+display_selected_albums+" title=\"false\" desc=\"false\" "+responsive+" "+show_no_of_images+" albums_in_row=\"" + album_in_row + "\" special_effect=\"\" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\"]");
|
372 |
+
}
|
373 |
+
}
|
374 |
+
}
|
375 |
+
else {
|
376 |
+
if (gallery_format == "thumbnail" || gallery_format == "masonry") {
|
377 |
+
if (text_format == "title_only") {
|
378 |
+
window.send_to_editor("[gallery_bank type=\"" + album_format + "\" format=\"" + gallery_format + "\" "+display_selected_albums+" title=\"true\" desc=\"false\" "+responsive+" "+show_no_of_images+" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\"]");
|
379 |
+
}
|
380 |
+
else if (text_format == "title_desc") {
|
381 |
+
window.send_to_editor("[gallery_bank type=\"" + album_format + "\" format=\"" + gallery_format + "\" "+display_selected_albums+" title=\"true\" desc=\"true\" "+responsive+" "+show_no_of_images+" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\"]");
|
382 |
+
}
|
383 |
+
else if (text_format == "no_text") {
|
384 |
+
window.send_to_editor("[gallery_bank type=\"" + album_format + "\" format=\"" + gallery_format + "\" "+display_selected_albums+" title=\"false\" desc=\"false\" "+responsive+" "+show_no_of_images+" special_effect=\"\" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\"]");
|
385 |
+
}
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
else {
|
390 |
+
if (gallery_format == "thumbnail" || gallery_format == "masonry") {
|
391 |
+
if (text_format == "title_only") {
|
392 |
+
window.send_to_editor("[gallery_bank type=\"images\" format=\"" + gallery_format + "\" title=\"true\" desc=\"false\" "+responsive+" "+show_no_of_images+" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\" album_id=\"" + album_id + "\"]");
|
393 |
+
}
|
394 |
+
else if (text_format == "title_desc") {
|
395 |
+
window.send_to_editor("[gallery_bank type=\"images\" format=\"" + gallery_format + "\" title=\"true\" desc=\"true\" "+responsive+" "+show_no_of_images+" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\" album_id=\"" + album_id + "\"]");
|
396 |
+
}
|
397 |
+
else if (text_format == "no_text") {
|
398 |
+
window.send_to_editor("[gallery_bank type=\"images\" format=\"" + gallery_format + "\" title=\"false\" desc=\"false\" "+responsive+" "+show_no_of_images+" special_effect=\"\" animation_effect=\"\" album_title=\"" + displayAlbumTitle + "\" album_id=\"" + album_id + "\"]");
|
399 |
+
}
|
400 |
+
}
|
401 |
+
}
|
|
|
402 |
}
|
403 |
/**
|
404 |
* @return {boolean}
|
405 |
*/
|
406 |
+
|
407 |
+
function OnlyNumbers(evt) {
|
408 |
+
var charCode = (evt.which) ? evt.which : event.keyCode;
|
409 |
+
return (charCode > 47 && charCode < 58) || charCode == 127 || charCode == 8;
|
|
|
|
|
410 |
}
|
411 |
+
function set_text_value(text_type)
|
412 |
{
|
413 |
+
var val = "";
|
414 |
+
switch (text_type) {
|
415 |
+
case "img_in_row":
|
416 |
+
val = jQuery("#ux_img_in_row").val();
|
417 |
+
if (val < 1)
|
418 |
+
jQuery("#ux_img_in_row").val(1);
|
419 |
+
break;
|
420 |
+
case "album_in_row":
|
421 |
+
val = jQuery("#ux_album_in_row").val();
|
422 |
+
if (val < 1)
|
423 |
+
jQuery("#ux_album_in_row").val(1);
|
424 |
+
break;
|
425 |
+
}
|
|
|
|
|
|
|
426 |
}
|
427 |
</script>
|
front_views/grid-albums.php
CHANGED
@@ -18,27 +18,27 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
18 |
$wpdb->prepare
|
19 |
(
|
20 |
"SELECT album_cover,thumbnail_url FROM " . gallery_bank_pics() . " WHERE album_cover=1 and album_id = %d",
|
21 |
-
$album[$flag]->album_id
|
22 |
)
|
23 |
);
|
24 |
?>
|
25 |
<div class="albums_margin">
|
26 |
<div class="gallery-bank-hover-details">
|
27 |
-
<div class="imgLiquid dynamic_cover_css" id="<?php echo $unique_id; ?>" onclick="view_album_images<?php echo $unique_id; ?>(<?php echo $album[$flag]->album_id; ?>,<?php echo $unique_id; ?>)">
|
28 |
<?php
|
29 |
if (count($albumCover) != 0) {
|
30 |
-
if ($albumCover->album_cover == 0) {
|
31 |
?>
|
32 |
-
<img id="albumOrder_<?php echo $album[$flag]->album_id; ?>" src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>" style="height:<?php echo $cover_thumbnail_height; ?>px;"/>
|
33 |
<?php
|
34 |
} else {
|
35 |
?>
|
36 |
-
<img id="albumOrder_<?php echo $album[$flag]->album_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_ALBUM_THUMB_URL . $albumCover->thumbnail_url); ?>"/>
|
37 |
<?php
|
38 |
}
|
39 |
} else {
|
40 |
?>
|
41 |
-
<img id="albumOrder_<?php echo $album[$flag]->album_id; ?>" src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>" style="height:<?php echo $cover_thumbnail_height; ?>px;"/>
|
42 |
<?php
|
43 |
}
|
44 |
?>
|
@@ -65,7 +65,7 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
65 |
}
|
66 |
?>
|
67 |
<div class="album_link">
|
68 |
-
<a onclick="view_album_images<?php echo $unique_id; ?>(<?php echo $album[$flag]->album_id; ?>,<?php echo $unique_id; ?>)">
|
69 |
<?php echo $album_click_text; ?>
|
70 |
</a>
|
71 |
</div>
|
18 |
$wpdb->prepare
|
19 |
(
|
20 |
"SELECT album_cover,thumbnail_url FROM " . gallery_bank_pics() . " WHERE album_cover=1 and album_id = %d",
|
21 |
+
intval($album[$flag]->album_id)
|
22 |
)
|
23 |
);
|
24 |
?>
|
25 |
<div class="albums_margin">
|
26 |
<div class="gallery-bank-hover-details">
|
27 |
+
<div class="imgLiquid dynamic_cover_css" id="<?php echo $unique_id; ?>" onclick="view_album_images<?php echo $unique_id; ?>(<?php echo intval($album[$flag]->album_id); ?>,<?php echo $unique_id; ?>)">
|
28 |
<?php
|
29 |
if (count($albumCover) != 0) {
|
30 |
+
if (intval($albumCover->album_cover) == 0) {
|
31 |
?>
|
32 |
+
<img id="albumOrder_<?php echo intval($album[$flag]->album_id); ?>" src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>" style="height:<?php echo $cover_thumbnail_height; ?>px;"/>
|
33 |
<?php
|
34 |
} else {
|
35 |
?>
|
36 |
+
<img id="albumOrder_<?php echo intval($album[$flag]->album_id); ?>" src="<?php echo stripcslashes(GALLERY_BK_ALBUM_THUMB_URL . $albumCover->thumbnail_url); ?>"/>
|
37 |
<?php
|
38 |
}
|
39 |
} else {
|
40 |
?>
|
41 |
+
<img id="albumOrder_<?php echo intval($album[$flag]->album_id); ?>" src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>" style="height:<?php echo $cover_thumbnail_height; ?>px;"/>
|
42 |
<?php
|
43 |
}
|
44 |
?>
|
65 |
}
|
66 |
?>
|
67 |
<div class="album_link">
|
68 |
+
<a onclick="view_album_images<?php echo $unique_id; ?>(<?php echo intval($album[$flag]->album_id); ?>,<?php echo $unique_id; ?>)">
|
69 |
<?php echo $album_click_text; ?>
|
70 |
</a>
|
71 |
</div>
|
front_views/includes_common_after.php
CHANGED
@@ -63,167 +63,164 @@ switch ($album_type) {
|
|
63 |
if($album_type == "grid")
|
64 |
{
|
65 |
?>
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
<?php
|
117 |
}
|
118 |
elseif($album_type == "list")
|
119 |
{
|
120 |
?>
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
}
|
171 |
-
<?php
|
172 |
}
|
173 |
else
|
174 |
{
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
<?php
|
227 |
}
|
228 |
?>
|
229 |
</script>
|
@@ -265,4 +262,4 @@ if($album_type == "images")
|
|
265 |
</script>
|
266 |
<?php
|
267 |
}
|
268 |
-
?>
|
63 |
if($album_type == "grid")
|
64 |
{
|
65 |
?>
|
66 |
+
|
67 |
+
function view_album_images<?php echo $unique_id;?>(album_id, unique_id) {
|
68 |
+
var isImageDesc = "<?php echo $img_desc ;?>";
|
69 |
+
var isImageTitle = "<?php echo $img_title; ?>";
|
70 |
+
var gallery_format = "<?php echo $gallery_type; ?>";
|
71 |
+
var images_in_row = "<?php echo $img_in_row; ?>";
|
72 |
+
var iswidget = "<?php echo $galleryWidget; ?>";
|
73 |
+
var special_effects = "<?php echo $special_effect; ?>";
|
74 |
+
var animation_effects = "<?php echo $animation_effect; ?>";
|
75 |
+
var show_album_title = "<?php echo $album_title; ?>";
|
76 |
+
var filmstrip_width = "<?php echo $image_width; ?>";
|
77 |
+
var isResponsive = "<?php echo $responsive;?>";
|
78 |
+
var display = "<?php echo $display;?>";
|
79 |
+
var sort_order = "<?php echo $sort_by;?>";
|
80 |
+
var display_no_of_images = "<?php echo $no_of_images;?>";
|
81 |
+
jQuery(".albums-in-row_" + unique_id).css("display", "none");
|
82 |
+
jQuery("#back_button" + unique_id).css("display", "none");
|
83 |
+
jQuery("#seperator" + unique_id).css("display", "none");
|
84 |
+
jQuery("#bank_album_images_div" + unique_id).css("display", "block");
|
85 |
+
jQuery.post(ajaxurl, "album_id=" + album_id + "&isImageDesc=" + isImageDesc +
|
86 |
+
"&isImageTitle=" + isImageTitle + "&gallery_format=" + gallery_format +
|
87 |
+
"&images_in_row=" + images_in_row + "&iswidget=" + iswidget +
|
88 |
+
"&special_effects=" + special_effects + "&animation_effects=" + animation_effects +
|
89 |
+
"&filmstrip_width=" + filmstrip_width + "&show_album_title=" + show_album_title +
|
90 |
+
"&isResponsive="+isResponsive+"&no_of_images="+display_no_of_images+"&display="+display+"&sort_by="+sort_order+
|
91 |
+
"¶m=show_album_gallery&action=front_view_all_albums_library", function (data) {
|
92 |
+
jQuery("#back_button" + unique_id).css("display", "block");
|
93 |
+
jQuery("#seperator" + unique_id).css("display", "block");
|
94 |
+
jQuery("#seperator1" + unique_id).css("display", "none");
|
95 |
+
jQuery("#show_bank_album_images" + unique_id).html(data);
|
96 |
+
});
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
function view_albums<?php echo $unique_id;?>(unique_id) {
|
101 |
+
jQuery(".albums-in-row_" + unique_id).css("display", "block");
|
102 |
+
jQuery("#bank_album_images_div" + unique_id).css("display", "none");
|
103 |
+
jQuery("#back_button" + unique_id).css("display", "none");
|
104 |
+
jQuery("#seperator" + unique_id).css("display", "none");
|
105 |
+
jQuery("#show_bank_album_images" + unique_id).html("");
|
106 |
+
<?php
|
107 |
+
if($album_seperator == 1)
|
108 |
+
{
|
109 |
+
?>
|
110 |
+
jQuery("#seperator1" + unique_id).css("display", "block");
|
111 |
+
<?php
|
112 |
+
}
|
113 |
+
?>
|
114 |
+
}
|
115 |
+
|
116 |
<?php
|
117 |
}
|
118 |
elseif($album_type == "list")
|
119 |
{
|
120 |
?>
|
121 |
+
|
122 |
+
function view_listed_album_images<?php echo $unique_id;?>(album_id, unique_id) {
|
123 |
+
var isImageDesc = "<?php echo $img_desc ;?>";
|
124 |
+
var isImageTitle = "<?php echo $img_title; ?>";
|
125 |
+
var gallery_format = "<?php echo $gallery_type; ?>";
|
126 |
+
var images_in_row = "<?php echo $img_in_row; ?>";
|
127 |
+
var iswidget = "<?php echo $galleryWidget; ?>";
|
128 |
+
var special_effects = "<?php echo $special_effect; ?>";
|
129 |
+
var animation_effects = "<?php echo $animation_effect; ?>";
|
130 |
+
var show_album_title = "<?php echo $album_title; ?>";
|
131 |
+
var filmstrip_width = "<?php echo $image_width; ?>";
|
132 |
+
var isResponsive = "<?php echo $responsive;?>";
|
133 |
+
var display = "<?php echo $display;?>";
|
134 |
+
var sort_order = "<?php echo $sort_by;?>";
|
135 |
+
var display_no_of_images = "<?php echo $no_of_images;?>";
|
136 |
+
jQuery("#view_gallery_bank_albums_" + unique_id).css("display", "none");
|
137 |
+
jQuery("#back_button" + unique_id).css("display", "none");
|
138 |
+
jQuery("#seperator" + unique_id).css("display", "none");
|
139 |
+
jQuery("#bank_album_images_div" + unique_id).css("display", "block");
|
140 |
+
jQuery.post(ajaxurl, "album_id=" + album_id + "&isImageDesc=" + isImageDesc +
|
141 |
+
"&isImageTitle=" + isImageTitle + "&gallery_format=" + gallery_format +
|
142 |
+
"&images_in_row=" + images_in_row + "&iswidget=" + iswidget +
|
143 |
+
"&special_effects=" + special_effects + "&animation_effects=" + animation_effects +
|
144 |
+
"&filmstrip_width=" + filmstrip_width + "&show_album_title=" + show_album_title +
|
145 |
+
"&isResponsive="+isResponsive+"&no_of_images="+display_no_of_images+"&display="+display+"&sort_by="+sort_order+
|
146 |
+
"¶m=show_album_gallery&action=front_view_all_albums_library", function (data) {
|
147 |
+
jQuery("#back_button" + unique_id).css("display", "block");
|
148 |
+
jQuery("#seperator" + unique_id).css("display", "block");
|
149 |
+
jQuery("#seperator1" + unique_id).css("display", "none");
|
150 |
+
jQuery("#show_bank_album_images" + unique_id).html(data);
|
151 |
+
});
|
152 |
+
}
|
153 |
+
|
154 |
+
function view_list_albums<?php echo $unique_id;?>(unique_id) {
|
155 |
+
jQuery("#view_gallery_bank_albums_" + unique_id).css("display", "block");
|
156 |
+
jQuery("#bank_album_images_div" + unique_id).css("display", "none");
|
157 |
+
jQuery("#back_button" + unique_id).css("display", "none");
|
158 |
+
jQuery("#seperator" + unique_id).css("display", "none");
|
159 |
+
jQuery("#show_bank_album_images" + unique_id).html("");
|
160 |
+
<?php
|
161 |
+
if($album_seperator == 1)
|
162 |
+
{
|
163 |
+
?>
|
164 |
+
jQuery("#seperator1" + unique_id).css("display", "block");
|
165 |
+
<?php
|
166 |
+
}
|
167 |
+
?>
|
168 |
+
}
|
169 |
+
<?php
|
|
|
|
|
170 |
}
|
171 |
else
|
172 |
{
|
173 |
+
?>
|
174 |
+
|
175 |
+
function view_individual_album_images<?php echo $unique_id;?>(album_id, unique_id) {
|
176 |
+
var isImageDesc = "<?php echo $img_desc ;?>";
|
177 |
+
var isImageTitle = "<?php echo $img_title; ?>";
|
178 |
+
var gallery_format = "<?php echo $gallery_type; ?>";
|
179 |
+
var images_in_row = "<?php echo $img_in_row; ?>";
|
180 |
+
var iswidget = "<?php echo $galleryWidget; ?>";
|
181 |
+
var special_effects = "<?php echo $special_effect; ?>";
|
182 |
+
var animation_effects = "<?php echo $animation_effect; ?>";
|
183 |
+
var show_album_title = "<?php echo $album_title; ?>";
|
184 |
+
var filmstrip_width = "<?php echo $image_width; ?>";
|
185 |
+
var isResponsive = "<?php echo $responsive;?>";
|
186 |
+
var display = "<?php echo $display;?>";
|
187 |
+
var sort_order = "<?php echo $sort_by;?>";
|
188 |
+
var display_no_of_images = "<?php echo $no_of_images;?>";
|
189 |
+
jQuery("#ux_individual_main_div" + unique_id).css("display", "none");
|
190 |
+
jQuery("#back_button" + unique_id).css("display", "none");
|
191 |
+
jQuery("#seperator" + unique_id).css("display", "none");
|
192 |
+
jQuery("#bank_album_images_div" + unique_id).css("display", "block");
|
193 |
+
jQuery.post(ajaxurl, "album_id=" + album_id + "&isImageDesc=" + isImageDesc +
|
194 |
+
"&isImageTitle=" + isImageTitle + "&gallery_format=" + gallery_format +
|
195 |
+
"&images_in_row=" + images_in_row + "&iswidget=" + iswidget +
|
196 |
+
"&special_effects=" + special_effects + "&animation_effects=" + animation_effects +
|
197 |
+
"&filmstrip_width=" + filmstrip_width + "&show_album_title=" + show_album_title +
|
198 |
+
"&isResponsive="+isResponsive+"&no_of_images="+display_no_of_images+"&display="+display+"&sort_by="+sort_order+
|
199 |
+
"¶m=show_album_gallery&action=front_view_all_albums_library", function (data) {
|
200 |
+
jQuery("#back_button" + unique_id).css("display", "block");
|
201 |
+
jQuery("#seperator" + unique_id).css("display", "block");
|
202 |
+
jQuery("#seperator1" + unique_id).css("display", "none");
|
203 |
+
jQuery("#show_bank_album_images" + unique_id).html(data);
|
204 |
+
});
|
205 |
+
}
|
206 |
+
|
207 |
+
|
208 |
+
function view_individual_albums<?php echo $unique_id;?>(unique_id) {
|
209 |
+
jQuery("#ux_individual_main_div" + unique_id).css("display", "inline-block");
|
210 |
+
jQuery("#bank_album_images_div" + unique_id).css("display", "none");
|
211 |
+
jQuery("#back_button" + unique_id).css("display", "none");
|
212 |
+
jQuery("#seperator" + unique_id).css("display", "none");
|
213 |
+
jQuery("#show_bank_album_images" + unique_id).html("");
|
214 |
+
<?php
|
215 |
+
if($album_seperator == 1)
|
216 |
+
{
|
217 |
+
?>
|
218 |
+
jQuery("#seperator1" + unique_id).css("display", "block");
|
219 |
+
<?php
|
220 |
+
}
|
221 |
+
?>
|
222 |
+
}
|
223 |
+
<?php
|
|
|
224 |
}
|
225 |
?>
|
226 |
</script>
|
262 |
</script>
|
263 |
<?php
|
264 |
}
|
265 |
+
?>
|
front_views/includes_common_before.php
CHANGED
@@ -10,7 +10,7 @@ $album_css = $wpdb->get_results
|
|
10 |
if (count($album_css) != 0) {
|
11 |
$setting_keys = array();
|
12 |
for ($flag = 0; $flag < count($album_css); $flag++) {
|
13 |
-
array_push($setting_keys, $album_css[$flag]->setting_key);
|
14 |
}
|
15 |
}
|
16 |
switch ($album_type) {
|
@@ -274,7 +274,7 @@ switch ($album_type) {
|
|
274 |
$thumbnails_border_radius = intval($album_css[$index]->setting_value);
|
275 |
|
276 |
$index = array_search("thumbnails_border_color", $setting_keys);
|
277 |
-
$thumbnails_border_color = $album_css[$index]->setting_value;
|
278 |
|
279 |
$index = array_search("margin_btw_thumbnails", $setting_keys);
|
280 |
$margin_btw_thumbnails = intval($album_css[$index]->setting_value);
|
@@ -284,13 +284,13 @@ switch ($album_type) {
|
|
284 |
$perspective_margin_bottom = $margin_btw_thumbnails + 50;
|
285 |
|
286 |
$index = array_search("thumbnail_text_color", $setting_keys);
|
287 |
-
$thumbnail_text_color = $album_css[$index]->setting_value;
|
288 |
|
289 |
$index = array_search("thumbnail_text_align", $setting_keys);
|
290 |
-
$thumbnail_text_align = $album_css[$index]->setting_value;
|
291 |
|
292 |
$index = array_search("thumbnail_font_family", $setting_keys);
|
293 |
-
$thumbnail_font_family = $album_css[$index]->setting_value;
|
294 |
|
295 |
$index = array_search("heading_font_size", $setting_keys);
|
296 |
$heading_font_size = intval($album_css[$index]->setting_value);
|
@@ -302,7 +302,7 @@ switch ($album_type) {
|
|
302 |
$thumbnail_desc_length = intval($album_css[$index]->setting_value);
|
303 |
|
304 |
$index = array_search("lightbox_type", $setting_keys);
|
305 |
-
$lightbox_type = $album_css[$index]->setting_value;
|
306 |
|
307 |
$index = array_search("lightbox_overlay_opacity", $setting_keys);
|
308 |
$lightbox_overlay_opacity = doubleval($album_css[$index]->setting_value);
|
@@ -314,17 +314,17 @@ switch ($album_type) {
|
|
314 |
$lightbox_overlay_border_radius = intval($album_css[$index]->setting_value);
|
315 |
|
316 |
$index = array_search("lightbox_text_color", $setting_keys);
|
317 |
-
$lightbox_text_color = $album_css[$index]->setting_value;
|
318 |
|
319 |
$index = array_search("lightbox_overlay_border_color", $setting_keys);
|
320 |
-
$lightbox_overlay_border_color = $album_css[$index]->setting_value;
|
321 |
$lightbox_border_color_value = $lightbox_overlay_border_size . "px solid " . $lightbox_overlay_border_color;
|
322 |
|
323 |
$index = array_search("lightbox_inline_bg_color", $setting_keys);
|
324 |
-
$lightbox_inline_bg_color = $album_css[$index]->setting_value;
|
325 |
|
326 |
$index = array_search("lightbox_overlay_bg_color", $setting_keys);
|
327 |
-
$lightbox_overlay_bg_color = $album_css[$index]->setting_value;
|
328 |
|
329 |
|
330 |
$index = array_search("lightbox_fade_in_time", $setting_keys);
|
@@ -334,10 +334,10 @@ switch ($album_type) {
|
|
334 |
$lightbox_fade_out_time = intval($album_css[$index]->setting_value);
|
335 |
|
336 |
$index = array_search("lightbox_text_align", $setting_keys);
|
337 |
-
$lightbox_text_align = $album_css[$index]->setting_value;
|
338 |
|
339 |
$index = array_search("lightbox_font_family", $setting_keys);
|
340 |
-
$lightbox_font_family = $album_css[$index]->setting_value;
|
341 |
|
342 |
$index = array_search("lightbox_heading_font_size", $setting_keys);
|
343 |
$lightbox_heading_font_size = intval($album_css[$index]->setting_value);
|
@@ -370,33 +370,33 @@ switch ($album_type) {
|
|
370 |
break;
|
371 |
case "grid" || "list" || "individual":
|
372 |
$index = array_search("cover_thumbnail_width", $setting_keys);
|
373 |
-
$cover_thumbnail_width = $album_css[$index]->setting_value;
|
374 |
|
375 |
$index = array_search("cover_thumbnail_height", $setting_keys);
|
376 |
-
$cover_thumbnail_height = $album_css[$index]->setting_value;
|
377 |
|
378 |
$index = array_search("cover_thumbnail_opacity", $setting_keys);
|
379 |
-
$cover_thumbnail_opacity = $album_css[$index]->setting_value;
|
380 |
|
381 |
$index = array_search("cover_thumbnail_border_size", $setting_keys);
|
382 |
-
$cover_thumbnail_border_size = $album_css[$index]->setting_value;
|
383 |
|
384 |
|
385 |
$index = array_search("cover_thumbnail_border_radius", $setting_keys);
|
386 |
-
$cover_thumbnail_border_radius = $album_css[$index]->setting_value;
|
387 |
|
388 |
$index = array_search("cover_thumbnail_border_color", $setting_keys);
|
389 |
-
$cover_thumbnail_border_color = $album_css[$index]->setting_value;
|
390 |
|
391 |
$index = array_search("margin_btw_cover_thumbnails", $setting_keys);
|
392 |
-
$margin_btw_cover_thumbnails = $album_css[$index]->setting_value;
|
393 |
$margin = $margin_btw_cover_thumbnails + 10;
|
394 |
|
395 |
$index = array_search("album_text_align", $setting_keys);
|
396 |
-
$album_text_align = $album_css[$index]->setting_value;
|
397 |
|
398 |
$index = array_search("album_font_family", $setting_keys);
|
399 |
-
$album_font_family = $album_css[$index]->setting_value;
|
400 |
|
401 |
$index = array_search("album_heading_font_size", $setting_keys);
|
402 |
$album_heading_font_size = intval($album_css[$index]->setting_value);
|
@@ -405,28 +405,28 @@ switch ($album_type) {
|
|
405 |
$album_text_font_size = intval($album_css[$index]->setting_value);
|
406 |
|
407 |
$index = array_search("album_click_text", $setting_keys);
|
408 |
-
$album_click_text = $album_css[$index]->setting_value;
|
409 |
|
410 |
$index = array_search("album_text_color", $setting_keys);
|
411 |
-
$album_text_color = $album_css[$index]->setting_value;
|
412 |
|
413 |
$index = array_search("album_desc_length", $setting_keys);
|
414 |
-
$album_desc_length = $album_css[$index]->setting_value;
|
415 |
|
416 |
$index = array_search("back_button_text", $setting_keys);
|
417 |
-
$back_button_text = $album_css[$index]->setting_value;
|
418 |
|
419 |
$index = array_search("button_color", $setting_keys);
|
420 |
-
$button_color = $album_css[$index]->setting_value;
|
421 |
|
422 |
$index = array_search("button_text_color", $setting_keys);
|
423 |
-
$button_text_color = $album_css[$index]->setting_value;
|
424 |
|
425 |
$index = array_search("album_seperator", $setting_keys);
|
426 |
$album_seperator = intval($album_css[$index]->setting_value);
|
427 |
|
428 |
$index = array_search("language_direction", $setting_keys);
|
429 |
-
$lang_dir_setting = $album_css[$index]->setting_value;
|
430 |
|
431 |
break;
|
432 |
}
|
@@ -440,6 +440,7 @@ switch ($album_type) {
|
|
440 |
{
|
441 |
case "images":
|
442 |
?>
|
|
|
443 |
/*noinspection ALL*/
|
444 |
.dynamic_css
|
445 |
{
|
@@ -554,6 +555,7 @@ switch ($album_type) {
|
|
554 |
if($widget != "true")
|
555 |
{
|
556 |
?>
|
|
|
557 |
@media screen and (min-width:970px)
|
558 |
{
|
559 |
.imgLiquidFill
|
10 |
if (count($album_css) != 0) {
|
11 |
$setting_keys = array();
|
12 |
for ($flag = 0; $flag < count($album_css); $flag++) {
|
13 |
+
array_push($setting_keys, esc_attr($album_css[$flag]->setting_key));
|
14 |
}
|
15 |
}
|
16 |
switch ($album_type) {
|
274 |
$thumbnails_border_radius = intval($album_css[$index]->setting_value);
|
275 |
|
276 |
$index = array_search("thumbnails_border_color", $setting_keys);
|
277 |
+
$thumbnails_border_color = esc_attr($album_css[$index]->setting_value);
|
278 |
|
279 |
$index = array_search("margin_btw_thumbnails", $setting_keys);
|
280 |
$margin_btw_thumbnails = intval($album_css[$index]->setting_value);
|
284 |
$perspective_margin_bottom = $margin_btw_thumbnails + 50;
|
285 |
|
286 |
$index = array_search("thumbnail_text_color", $setting_keys);
|
287 |
+
$thumbnail_text_color = esc_attr($album_css[$index]->setting_value);
|
288 |
|
289 |
$index = array_search("thumbnail_text_align", $setting_keys);
|
290 |
+
$thumbnail_text_align = esc_attr($album_css[$index]->setting_value);
|
291 |
|
292 |
$index = array_search("thumbnail_font_family", $setting_keys);
|
293 |
+
$thumbnail_font_family = esc_html($album_css[$index]->setting_value);
|
294 |
|
295 |
$index = array_search("heading_font_size", $setting_keys);
|
296 |
$heading_font_size = intval($album_css[$index]->setting_value);
|
302 |
$thumbnail_desc_length = intval($album_css[$index]->setting_value);
|
303 |
|
304 |
$index = array_search("lightbox_type", $setting_keys);
|
305 |
+
$lightbox_type = esc_attr($album_css[$index]->setting_value);
|
306 |
|
307 |
$index = array_search("lightbox_overlay_opacity", $setting_keys);
|
308 |
$lightbox_overlay_opacity = doubleval($album_css[$index]->setting_value);
|
314 |
$lightbox_overlay_border_radius = intval($album_css[$index]->setting_value);
|
315 |
|
316 |
$index = array_search("lightbox_text_color", $setting_keys);
|
317 |
+
$lightbox_text_color = esc_attr($album_css[$index]->setting_value);
|
318 |
|
319 |
$index = array_search("lightbox_overlay_border_color", $setting_keys);
|
320 |
+
$lightbox_overlay_border_color = esc_attr($album_css[$index]->setting_value);
|
321 |
$lightbox_border_color_value = $lightbox_overlay_border_size . "px solid " . $lightbox_overlay_border_color;
|
322 |
|
323 |
$index = array_search("lightbox_inline_bg_color", $setting_keys);
|
324 |
+
$lightbox_inline_bg_color = esc_attr($album_css[$index]->setting_value);
|
325 |
|
326 |
$index = array_search("lightbox_overlay_bg_color", $setting_keys);
|
327 |
+
$lightbox_overlay_bg_color = esc_attr($album_css[$index]->setting_value);
|
328 |
|
329 |
|
330 |
$index = array_search("lightbox_fade_in_time", $setting_keys);
|
334 |
$lightbox_fade_out_time = intval($album_css[$index]->setting_value);
|
335 |
|
336 |
$index = array_search("lightbox_text_align", $setting_keys);
|
337 |
+
$lightbox_text_align = esc_attr($album_css[$index]->setting_value);
|
338 |
|
339 |
$index = array_search("lightbox_font_family", $setting_keys);
|
340 |
+
$lightbox_font_family = esc_attr($album_css[$index]->setting_value);
|
341 |
|
342 |
$index = array_search("lightbox_heading_font_size", $setting_keys);
|
343 |
$lightbox_heading_font_size = intval($album_css[$index]->setting_value);
|
370 |
break;
|
371 |
case "grid" || "list" || "individual":
|
372 |
$index = array_search("cover_thumbnail_width", $setting_keys);
|
373 |
+
$cover_thumbnail_width = esc_attr($album_css[$index]->setting_value);
|
374 |
|
375 |
$index = array_search("cover_thumbnail_height", $setting_keys);
|
376 |
+
$cover_thumbnail_height = esc_attr($album_css[$index]->setting_value);
|
377 |
|
378 |
$index = array_search("cover_thumbnail_opacity", $setting_keys);
|
379 |
+
$cover_thumbnail_opacity = esc_attr($album_css[$index]->setting_value);
|
380 |
|
381 |
$index = array_search("cover_thumbnail_border_size", $setting_keys);
|
382 |
+
$cover_thumbnail_border_size = esc_attr($album_css[$index]->setting_value);
|
383 |
|
384 |
|
385 |
$index = array_search("cover_thumbnail_border_radius", $setting_keys);
|
386 |
+
$cover_thumbnail_border_radius = esc_attr($album_css[$index]->setting_value);
|
387 |
|
388 |
$index = array_search("cover_thumbnail_border_color", $setting_keys);
|
389 |
+
$cover_thumbnail_border_color = esc_attr($album_css[$index]->setting_value);
|
390 |
|
391 |
$index = array_search("margin_btw_cover_thumbnails", $setting_keys);
|
392 |
+
$margin_btw_cover_thumbnails = esc_attr($album_css[$index]->setting_value);
|
393 |
$margin = $margin_btw_cover_thumbnails + 10;
|
394 |
|
395 |
$index = array_search("album_text_align", $setting_keys);
|
396 |
+
$album_text_align = esc_attr($album_css[$index]->setting_value);
|
397 |
|
398 |
$index = array_search("album_font_family", $setting_keys);
|
399 |
+
$album_font_family = esc_attr($album_css[$index]->setting_value);
|
400 |
|
401 |
$index = array_search("album_heading_font_size", $setting_keys);
|
402 |
$album_heading_font_size = intval($album_css[$index]->setting_value);
|
405 |
$album_text_font_size = intval($album_css[$index]->setting_value);
|
406 |
|
407 |
$index = array_search("album_click_text", $setting_keys);
|
408 |
+
$album_click_text = esc_attr($album_css[$index]->setting_value);
|
409 |
|
410 |
$index = array_search("album_text_color", $setting_keys);
|
411 |
+
$album_text_color = esc_attr($album_css[$index]->setting_value);
|
412 |
|
413 |
$index = array_search("album_desc_length", $setting_keys);
|
414 |
+
$album_desc_length = esc_attr($album_css[$index]->setting_value);
|
415 |
|
416 |
$index = array_search("back_button_text", $setting_keys);
|
417 |
+
$back_button_text = esc_attr($album_css[$index]->setting_value);
|
418 |
|
419 |
$index = array_search("button_color", $setting_keys);
|
420 |
+
$button_color = esc_attr($album_css[$index]->setting_value);
|
421 |
|
422 |
$index = array_search("button_text_color", $setting_keys);
|
423 |
+
$button_text_color = esc_attr($album_css[$index]->setting_value);
|
424 |
|
425 |
$index = array_search("album_seperator", $setting_keys);
|
426 |
$album_seperator = intval($album_css[$index]->setting_value);
|
427 |
|
428 |
$index = array_search("language_direction", $setting_keys);
|
429 |
+
$lang_dir_setting = esc_attr($album_css[$index]->setting_value);
|
430 |
|
431 |
break;
|
432 |
}
|
440 |
{
|
441 |
case "images":
|
442 |
?>
|
443 |
+
|
444 |
/*noinspection ALL*/
|
445 |
.dynamic_css
|
446 |
{
|
555 |
if($widget != "true")
|
556 |
{
|
557 |
?>
|
558 |
+
|
559 |
@media screen and (min-width:970px)
|
560 |
{
|
561 |
.imgLiquidFill
|
front_views/listed-album.php
CHANGED
@@ -20,27 +20,27 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
20 |
?>
|
21 |
<div class="list_album_content_div<?php echo $unique_id; ?>" id="ux_main_div<?php echo $unique_id; ?>">
|
22 |
<div class="gallery-bank-hover-details">
|
23 |
-
<div class="imgLiquid dynamic_cover_css" onclick="view_listed_album_images<?php echo $unique_id; ?>(<?php echo $album[$flag]->album_id; ?>,<?php echo $unique_id; ?>)">
|
24 |
<?php
|
25 |
if (count($albumCover) != 0)
|
26 |
{
|
27 |
-
if ($albumCover->album_cover == 0)
|
28 |
{
|
29 |
?>
|
30 |
-
<img id="albumOrder_<?php echo $album[$flag]->album_id; ?>" src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>" style="height:<?php echo $cover_thumbnail_height; ?>px;"/>
|
31 |
<?php
|
32 |
}
|
33 |
else
|
34 |
{
|
35 |
?>
|
36 |
-
<img id="albumOrder_<?php echo $album[$flag]->album_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_ALBUM_THUMB_URL . $albumCover->thumbnail_url); ?>"/>
|
37 |
<?php
|
38 |
}
|
39 |
}
|
40 |
else
|
41 |
{
|
42 |
?>
|
43 |
-
<img id="albumOrder_<?php echo $album[$flag]->album_id; ?>" src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>" style="height:<?php echo $cover_thumbnail_height; ?>px;"/>
|
44 |
<?php
|
45 |
}
|
46 |
?>
|
@@ -49,7 +49,7 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
49 |
</div>
|
50 |
<div class="content_holder">
|
51 |
<?php
|
52 |
-
if ($album[$flag]->album_name != "Untitled Album" && $img_title == "true")
|
53 |
{
|
54 |
?>
|
55 |
<h5><?php echo stripcslashes($album[$flag]->album_name); ?></h5>
|
@@ -65,7 +65,7 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
65 |
}
|
66 |
?>
|
67 |
<div class="view_link">
|
68 |
-
<a onclick="view_listed_album_images<?php echo $unique_id; ?>(<?php echo $album[$flag]->album_id; ?>,<?php echo $unique_id; ?>)"><?php echo $album_click_text; ?></a>
|
69 |
</div>
|
70 |
</div>
|
71 |
</div>
|
20 |
?>
|
21 |
<div class="list_album_content_div<?php echo $unique_id; ?>" id="ux_main_div<?php echo $unique_id; ?>">
|
22 |
<div class="gallery-bank-hover-details">
|
23 |
+
<div class="imgLiquid dynamic_cover_css" onclick="view_listed_album_images<?php echo $unique_id; ?>(<?php echo intval($album[$flag]->album_id); ?>,<?php echo $unique_id; ?>)">
|
24 |
<?php
|
25 |
if (count($albumCover) != 0)
|
26 |
{
|
27 |
+
if (intval($albumCover->album_cover) == 0)
|
28 |
{
|
29 |
?>
|
30 |
+
<img id="albumOrder_<?php echo intval($album[$flag]->album_id); ?>" src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>" style="height:<?php echo $cover_thumbnail_height; ?>px;"/>
|
31 |
<?php
|
32 |
}
|
33 |
else
|
34 |
{
|
35 |
?>
|
36 |
+
<img id="albumOrder_<?php echo intval($album[$flag]->album_id); ?>" src="<?php echo stripcslashes(GALLERY_BK_ALBUM_THUMB_URL . $albumCover->thumbnail_url); ?>"/>
|
37 |
<?php
|
38 |
}
|
39 |
}
|
40 |
else
|
41 |
{
|
42 |
?>
|
43 |
+
<img id="albumOrder_<?php echo intval($album[$flag]->album_id); ?>" src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>" style="height:<?php echo $cover_thumbnail_height; ?>px;"/>
|
44 |
<?php
|
45 |
}
|
46 |
?>
|
49 |
</div>
|
50 |
<div class="content_holder">
|
51 |
<?php
|
52 |
+
if (esc_html($album[$flag]->album_name) != "Untitled Album" && $img_title == "true")
|
53 |
{
|
54 |
?>
|
55 |
<h5><?php echo stripcslashes($album[$flag]->album_name); ?></h5>
|
65 |
}
|
66 |
?>
|
67 |
<div class="view_link">
|
68 |
+
<a onclick="view_listed_album_images<?php echo $unique_id; ?>(<?php echo intval($album[$flag]->album_id); ?>,<?php echo $unique_id; ?>)"><?php echo $album_click_text; ?></a>
|
69 |
</div>
|
70 |
</div>
|
71 |
</div>
|
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.1.
|
8 |
* Author URI: http://tech-banker.com
|
9 |
* License: GPLv3 or later
|
10 |
* Text Domain: gallery-bank
|
@@ -25,9 +25,8 @@ if (!defined("GALLERY_BK_THUMB_URL")) define("GALLERY_BK_THUMB_URL", content_url
|
|
25 |
if (!defined("GALLERY_BK_THUMB_SMALL_URL")) define("GALLERY_BK_THUMB_SMALL_URL", content_url()."/gallery-bank/thumbs/");
|
26 |
if (!defined("GALLERY_BK_ALBUM_THUMB_URL")) define("GALLERY_BK_ALBUM_THUMB_URL", content_url()."/gallery-bank/album-thumbs/");
|
27 |
if (!defined("GALLERY_BK_PLUGIN_BASENAME")) define("GALLERY_BK_PLUGIN_BASENAME", plugin_basename(__FILE__));
|
28 |
-
if(!defined("tech_banker_stats_url")) define("tech_banker_stats_url", "stats.tech-banker-services.org");
|
29 |
-
if(!defined("gallery_bank_version_number")) define("gallery_bank_version_number","3.1.
|
30 |
-
if(!defined("GALLERY_BK_ERROR_LOGS_FILE")) define("GALLERY_BK_ERROR_LOGS_FILE",GALLERY_MAIN_DIR."/error-logs.txt");
|
31 |
|
32 |
|
33 |
if (!is_dir(GALLERY_MAIN_DIR))
|
@@ -47,9 +46,6 @@ if (!is_dir(GALLERY_MAIN_ALB_THUMB_DIR))
|
|
47 |
wp_mkdir_p(GALLERY_MAIN_ALB_THUMB_DIR);
|
48 |
}
|
49 |
|
50 |
-
@ini_set("log_errors",1);
|
51 |
-
@ini_set("error_log",GALLERY_BK_ERROR_LOGS_FILE);
|
52 |
-
|
53 |
$memory_limit_gallery_bank = intval(ini_get("memory_limit"));
|
54 |
if (!extension_loaded('suhosin') && $memory_limit_gallery_bank < 512)
|
55 |
{
|
@@ -59,626 +55,431 @@ if (!extension_loaded('suhosin') && $memory_limit_gallery_bank < 512)
|
|
59 |
@ini_set("max_execution_time", 6000);
|
60 |
@ini_set("max_input_vars", 10000);
|
61 |
|
62 |
-
|
63 |
-
if(!function_exists("gallery_bank_error_log_file"))
|
64 |
-
{
|
65 |
-
function gallery_bank_error_log_file()
|
66 |
-
{
|
67 |
-
if(!file_exists(GALLERY_BK_ERROR_LOGS_FILE))
|
68 |
-
{
|
69 |
-
$error_file = fopen(GALLERY_BK_ERROR_LOGS_FILE, 'wb');
|
70 |
-
fclose($error_file);
|
71 |
-
}
|
72 |
-
}
|
73 |
-
}
|
74 |
/*************************************************************************************/
|
75 |
if (file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/gallery-bank-class.php"))
|
76 |
{
|
77 |
require_once(GALLERY_BK_PLUGIN_DIR . "/lib/gallery-bank-class.php");
|
78 |
}
|
79 |
/*************************************************************************************/
|
80 |
-
|
|
|
81 |
{
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
}
|
118 |
-
}
|
119 |
-
}
|
120 |
}
|
121 |
|
|
|
122 |
/*************************************************************************************/
|
123 |
-
|
124 |
-
|
125 |
-
class class_plugin_info_gallery_bank
|
126 |
-
{
|
127 |
-
function get_plugin_info()
|
128 |
-
{
|
129 |
-
$active_plugins = (array)get_option("active_plugins", array());
|
130 |
-
if (is_multisite())
|
131 |
-
$active_plugins = array_merge($active_plugins, get_site_option("active_sitewide_plugins", array()));
|
132 |
-
$plugins = array();
|
133 |
-
if(count($active_plugins) > 0)
|
134 |
-
{
|
135 |
-
$get_plugins = array();
|
136 |
-
foreach ($active_plugins as $plugin)
|
137 |
-
{
|
138 |
-
$plugin_data = @get_plugin_data(WP_PLUGIN_DIR . "/" . $plugin);
|
139 |
-
|
140 |
-
$get_plugins["plugin_name"] = strip_tags($plugin_data["Name"]);
|
141 |
-
$get_plugins["plugin_author"] = strip_tags($plugin_data["Author"]);
|
142 |
-
$get_plugins["plugin_version"] = strip_tags($plugin_data["Version"]);
|
143 |
-
array_push($plugins,$get_plugins);
|
144 |
-
}
|
145 |
-
return $plugins;
|
146 |
-
}
|
147 |
-
}
|
148 |
-
}
|
149 |
-
}
|
150 |
-
if(!function_exists("deactivation_function_for_gallery_bank"))
|
151 |
{
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
$
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
$plugin_stat_data["plugin_slug"] = "gallery-bank";
|
174 |
-
$plugin_stat_data["type"] = "standard_edition";
|
175 |
-
$plugin_stat_data["version_number"] = gallery_bank_version_number;
|
176 |
-
$plugin_stat_data["status"] = $type;
|
177 |
-
$plugin_stat_data["event"] = "de-activate";
|
178 |
-
$plugin_stat_data["domain_url"] = site_url();
|
179 |
-
$plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
|
180 |
-
|
181 |
-
$plugin_stat_data["email"] = get_option("admin_email");
|
182 |
-
$plugin_stat_data["wp_version"] = $wp_version;
|
183 |
-
$plugin_stat_data["php_version"] = esc_html(phpversion());
|
184 |
-
$plugin_stat_data["mysql_version"] = $wpdb->db_version();
|
185 |
-
$plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
|
186 |
-
$plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
|
187 |
-
$plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
|
188 |
-
$plugin_stat_data["extensions"] = get_loaded_extensions();
|
189 |
-
$plugin_stat_data["plugins"] = $class_plugin_info_gallery_bank->get_plugin_info();
|
190 |
-
$plugin_stat_data["themes"] = $theme_details;
|
191 |
-
|
192 |
-
if(function_exists("curl_init"))
|
193 |
-
{
|
194 |
-
$ch = curl_init();
|
195 |
-
curl_setopt($ch, CURLOPT_URL, $url);
|
196 |
-
curl_setopt($ch, CURLOPT_POST, 1);
|
197 |
-
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
|
198 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
|
199 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
200 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
201 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS,
|
202 |
-
http_build_query(array( "data" => serialize($plugin_stat_data), "site_id" => get_option("gallery_bank_site_id") !="" ? get_option("gallery_bank_site_id") : "", "action"=>"plugin_analysis_data")));
|
203 |
-
$result = curl_exec($ch);
|
204 |
-
update_option("gallery_bank_site_id",$result);
|
205 |
-
curl_close($ch);
|
206 |
-
}
|
207 |
-
else
|
208 |
-
{
|
209 |
-
$response = wp_safe_remote_post($url, array
|
210 |
-
(
|
211 |
-
"method" => "POST",
|
212 |
-
"timeout" => 45,
|
213 |
-
"redirection" => 5,
|
214 |
-
"httpversion" => "1.0",
|
215 |
-
"blocking" => true,
|
216 |
-
"headers" => array(),
|
217 |
-
"body" => array( "data" => serialize($plugin_stat_data), "site_id" => get_option("gallery_bank_site_id") != "" ? get_option("gallery_bank_site_id") : "","action"=>"plugin_analysis_data")
|
218 |
-
));
|
219 |
-
|
220 |
-
if(!is_wp_error($response))
|
221 |
-
{
|
222 |
-
$response["body"] != "" ? update_option("gallery_bank_site_id", $response["body"]) : "";
|
223 |
-
}
|
224 |
-
else
|
225 |
-
{
|
226 |
-
update_option("gallery_bank_site_id", "error");
|
227 |
-
}
|
228 |
-
}
|
229 |
-
}
|
230 |
-
}
|
231 |
}
|
232 |
|
|
|
233 |
|
234 |
-
|
235 |
{
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
update_option("gallery_bank_site_id",$result);
|
290 |
-
curl_close($ch);
|
291 |
-
}
|
292 |
-
else
|
293 |
-
{
|
294 |
-
$response = wp_safe_remote_post($url, array
|
295 |
-
(
|
296 |
-
"method" => "POST",
|
297 |
-
"timeout" => 45,
|
298 |
-
"redirection" => 5,
|
299 |
-
"httpversion" => "1.0",
|
300 |
-
"blocking" => true,
|
301 |
-
"headers" => array(),
|
302 |
-
"body" => array( "data" => serialize($plugin_stat_data), "site_id" => get_option("gallery_bank_site_id") != "" ? get_option("gallery_bank_site_id") : "","action"=>"plugin_analysis_data")
|
303 |
-
));
|
304 |
-
|
305 |
-
if(!is_wp_error($response))
|
306 |
-
{
|
307 |
-
$response["body"] != "" ? update_option("gallery_bank_site_id", $response["body"]) : "";
|
308 |
-
}
|
309 |
-
else
|
310 |
-
{
|
311 |
-
update_option("gallery_bank_site_id", "error");
|
312 |
-
}
|
313 |
-
}
|
314 |
-
}
|
315 |
-
}
|
316 |
}
|
|
|
|
|
317 |
/*************************************************************************************/
|
318 |
-
|
|
|
319 |
{
|
320 |
-
|
321 |
-
{
|
322 |
-
if (function_exists("load_plugin_textdomain"))
|
323 |
-
{
|
324 |
-
load_plugin_textdomain("gallery-bank", false, GALLERY_BK_PLUGIN_DIRNAME . "/lang");
|
325 |
-
}
|
326 |
-
}
|
327 |
}
|
|
|
328 |
/*************************************************************************************/
|
329 |
-
|
|
|
330 |
{
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
break;
|
582 |
-
}
|
583 |
-
}
|
584 |
}
|
585 |
-
|
|
|
|
|
|
|
|
|
586 |
{
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
}
|
597 |
-
return (array)$links;
|
598 |
-
}
|
599 |
}
|
600 |
|
|
|
601 |
$version = get_option("gallery-bank-pro-edition");
|
602 |
if($version != "")
|
603 |
{
|
604 |
add_action("admin_init", "plugin_install_script_for_gallery_bank");
|
605 |
}
|
606 |
-
//--------------------------------------------------------------------------------------------------------------//
|
607 |
-
// CODE FOR PLUGIN UPDATE MESSAGE
|
608 |
-
//--------------------------------------------------------------------------------------------------------------//
|
609 |
-
if(!function_exists("gallery_bank_plugin_update_message"))
|
610 |
-
{
|
611 |
-
function gallery_bank_plugin_update_message($args)
|
612 |
-
{
|
613 |
-
$response = wp_remote_get( 'https://plugins.svn.wordpress.org/gallery-bank/trunk/readme.txt' );
|
614 |
-
if ( ! is_wp_error( $response ) && ! empty( $response['body'] ) )
|
615 |
-
{
|
616 |
-
// Output Upgrade Notice
|
617 |
-
$matches= null;
|
618 |
-
$regexp = '~==\s*Changelog\s*==\s*=\s*[0-9.]+\s*=(.*)(=\s*' . preg_quote($args['Version']) . '\s*=|$)~Uis';
|
619 |
-
$upgrade_notice = '';
|
620 |
-
if ( preg_match( $regexp, $response['body'], $matches ) ) {
|
621 |
-
$changelog = (array) preg_split('~[\r\n]+~', trim($matches[1]));
|
622 |
-
$upgrade_notice .= '<div class="gallery_plugin_message">';
|
623 |
-
foreach ( $changelog as $index => $line ) {
|
624 |
-
$upgrade_notice .= "<p>".$line."</p>";
|
625 |
-
}
|
626 |
-
$upgrade_notice .= '</div> ';
|
627 |
-
echo $upgrade_notice;
|
628 |
-
}
|
629 |
-
}
|
630 |
-
}
|
631 |
-
}
|
632 |
-
|
633 |
-
//--------------------------------------------------------------------------------------------------------------//
|
634 |
-
// CODE FOR PLUGIN AUTOMATIC UPDATE
|
635 |
-
//--------------------------------------------------------------------------------------------------------------//
|
636 |
-
$is_option_auto_update = get_option("gallery-bank-automatic_update");
|
637 |
-
|
638 |
-
if($is_option_auto_update == "" || $is_option_auto_update == "1")
|
639 |
-
{
|
640 |
-
if (!wp_next_scheduled("gallery_bank_auto_update"))
|
641 |
-
{
|
642 |
-
wp_schedule_event(time(), "daily", "gallery_bank_auto_update");
|
643 |
-
}
|
644 |
-
add_action("gallery_bank_auto_update", "plugin_autoUpdate");
|
645 |
-
}
|
646 |
-
else
|
647 |
-
{
|
648 |
-
wp_clear_scheduled_hook("gallery_bank_auto_update");
|
649 |
-
}
|
650 |
-
if(!function_exists("plugin_autoUpdate"))
|
651 |
-
{
|
652 |
-
function plugin_autoUpdate()
|
653 |
-
{
|
654 |
-
try
|
655 |
-
{
|
656 |
-
require_once(ABSPATH . "wp-admin/includes/class-wp-upgrader.php");
|
657 |
-
require_once(ABSPATH . "wp-admin/includes/misc.php");
|
658 |
-
define("FS_METHOD", "direct");
|
659 |
-
require_once(ABSPATH . "wp-includes/update.php");
|
660 |
-
require_once(ABSPATH . "wp-admin/includes/file.php");
|
661 |
-
wp_update_plugins();
|
662 |
-
ob_start();
|
663 |
-
$plugin_upgrader = new Plugin_Upgrader();
|
664 |
-
$plugin_upgrader->upgrade("gallery-bank/gallery-bank.php");
|
665 |
-
$output = @ob_get_contents();
|
666 |
-
@ob_end_clean();
|
667 |
-
}
|
668 |
-
catch(Exception $e)
|
669 |
-
{
|
670 |
-
|
671 |
-
}
|
672 |
-
}
|
673 |
-
}
|
674 |
|
675 |
add_filter("plugin_row_meta","gallery_bank_custom_plugin_row", 10, 2);
|
676 |
add_action("admin_bar_menu", "add_gallery_bank_icon", 100);
|
677 |
add_action("plugins_loaded", "gallery_bank_plugin_load_text_domain");
|
678 |
-
add_action("in_plugin_update_message-".GALLERY_FILE,"gallery_bank_plugin_update_message");
|
679 |
register_activation_hook(__FILE__, "plugin_install_script_for_gallery_bank");
|
680 |
register_deactivation_hook(__FILE__, "deactivation_function_for_gallery_bank");
|
681 |
-
register_uninstall_hook(__FILE__, "plugin_uninstall_script_for_gallery_bank");
|
682 |
-
add_action("init","gallery_bank_error_log_file");
|
683 |
/*************************************************************************************/
|
684 |
-
?>
|
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.1.38
|
8 |
* Author URI: http://tech-banker.com
|
9 |
* License: GPLv3 or later
|
10 |
* Text Domain: gallery-bank
|
25 |
if (!defined("GALLERY_BK_THUMB_SMALL_URL")) define("GALLERY_BK_THUMB_SMALL_URL", content_url()."/gallery-bank/thumbs/");
|
26 |
if (!defined("GALLERY_BK_ALBUM_THUMB_URL")) define("GALLERY_BK_ALBUM_THUMB_URL", content_url()."/gallery-bank/album-thumbs/");
|
27 |
if (!defined("GALLERY_BK_PLUGIN_BASENAME")) define("GALLERY_BK_PLUGIN_BASENAME", plugin_basename(__FILE__));
|
28 |
+
if(!defined("tech_banker_stats_url")) define("tech_banker_stats_url", "http://stats.tech-banker-services.org");
|
29 |
+
if(!defined("gallery_bank_version_number")) define("gallery_bank_version_number","3.1.38");
|
|
|
30 |
|
31 |
|
32 |
if (!is_dir(GALLERY_MAIN_DIR))
|
46 |
wp_mkdir_p(GALLERY_MAIN_ALB_THUMB_DIR);
|
47 |
}
|
48 |
|
|
|
|
|
|
|
49 |
$memory_limit_gallery_bank = intval(ini_get("memory_limit"));
|
50 |
if (!extension_loaded('suhosin') && $memory_limit_gallery_bank < 512)
|
51 |
{
|
55 |
@ini_set("max_execution_time", 6000);
|
56 |
@ini_set("max_input_vars", 10000);
|
57 |
|
58 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
/*************************************************************************************/
|
60 |
if (file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/gallery-bank-class.php"))
|
61 |
{
|
62 |
require_once(GALLERY_BK_PLUGIN_DIR . "/lib/gallery-bank-class.php");
|
63 |
}
|
64 |
/*************************************************************************************/
|
65 |
+
|
66 |
+
function plugin_install_script_for_gallery_bank()
|
67 |
{
|
68 |
+
global $wpdb,$current_user;
|
69 |
+
if (!is_user_logged_in())
|
70 |
+
{
|
71 |
+
return;
|
72 |
+
}
|
73 |
+
if(is_super_admin())
|
74 |
+
{
|
75 |
+
$gb_role = "administrator";
|
76 |
+
}
|
77 |
+
else
|
78 |
+
{
|
79 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
80 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
81 |
+
$gb_role = $current_user->role[0];
|
82 |
+
}
|
83 |
+
if (is_multisite())
|
84 |
+
{
|
85 |
+
$blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
|
86 |
+
foreach($blog_ids as $blog_id)
|
87 |
+
{
|
88 |
+
switch_to_blog($blog_id);
|
89 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR. "/lib/install-script.php"))
|
90 |
+
{
|
91 |
+
include GALLERY_BK_PLUGIN_DIR . "/lib/install-script.php";
|
92 |
+
}
|
93 |
+
restore_current_blog();
|
94 |
+
}
|
95 |
+
}
|
96 |
+
else
|
97 |
+
{
|
98 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR. "/lib/install-script.php"))
|
99 |
+
{
|
100 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/lib/install-script.php";
|
101 |
+
}
|
102 |
+
}
|
|
|
|
|
|
|
103 |
}
|
104 |
|
105 |
+
|
106 |
/*************************************************************************************/
|
107 |
+
|
108 |
+
class class_plugin_info_gallery_bank
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
{
|
110 |
+
function get_plugin_info()
|
111 |
+
{
|
112 |
+
$active_plugins = (array)get_option("active_plugins", array());
|
113 |
+
if (is_multisite())
|
114 |
+
$active_plugins = array_merge($active_plugins, get_site_option("active_sitewide_plugins", array()));
|
115 |
+
$plugins = array();
|
116 |
+
if(count($active_plugins) > 0)
|
117 |
+
{
|
118 |
+
$get_plugins = array();
|
119 |
+
foreach ($active_plugins as $plugin)
|
120 |
+
{
|
121 |
+
$plugin_data = @get_plugin_data(WP_PLUGIN_DIR . "/" . $plugin);
|
122 |
+
|
123 |
+
$get_plugins["plugin_name"] = strip_tags($plugin_data["Name"]);
|
124 |
+
$get_plugins["plugin_author"] = strip_tags($plugin_data["Author"]);
|
125 |
+
$get_plugins["plugin_version"] = strip_tags($plugin_data["Version"]);
|
126 |
+
array_push($plugins,$get_plugins);
|
127 |
+
}
|
128 |
+
return $plugins;
|
129 |
+
}
|
130 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
+
/*************************************************************************************/
|
134 |
|
135 |
+
function deactivation_function_for_gallery_bank()
|
136 |
{
|
137 |
+
$type = get_option("gallery-bank-wizard");
|
138 |
+
if($type == "opt_in")
|
139 |
+
{
|
140 |
+
$class_plugin_info_gallery_bank = new class_plugin_info_gallery_bank();
|
141 |
+
global $wp_version,$wpdb;
|
142 |
+
|
143 |
+
$url = tech_banker_stats_url."/wp-admin/admin-ajax.php";
|
144 |
+
|
145 |
+
$theme_details = array();
|
146 |
+
|
147 |
+
if($wp_version >= 3.4)
|
148 |
+
{
|
149 |
+
$active_theme = wp_get_theme();
|
150 |
+
$theme_details["theme_name"] = strip_tags($active_theme->Name);
|
151 |
+
$theme_details["theme_version"] = strip_tags($active_theme->Version);
|
152 |
+
$theme_details["author_url"] = strip_tags($active_theme->{"Author URI"});
|
153 |
+
}
|
154 |
+
|
155 |
+
$plugin_stat_data = array();
|
156 |
+
$plugin_stat_data["plugin_slug"] = "gallery-bank";
|
157 |
+
$plugin_stat_data["type"] = "standard_edition";
|
158 |
+
$plugin_stat_data["version_number"] = gallery_bank_version_number;
|
159 |
+
$plugin_stat_data["status"] = $type;
|
160 |
+
$plugin_stat_data["event"] = "de-activate";
|
161 |
+
$plugin_stat_data["domain_url"] = site_url();
|
162 |
+
$plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
|
163 |
+
|
164 |
+
$plugin_stat_data["email"] = get_option("admin_email");
|
165 |
+
$plugin_stat_data["wp_version"] = $wp_version;
|
166 |
+
$plugin_stat_data["php_version"] = esc_html(phpversion());
|
167 |
+
$plugin_stat_data["mysql_version"] = $wpdb->db_version();
|
168 |
+
$plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
|
169 |
+
$plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
|
170 |
+
$plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
|
171 |
+
$plugin_stat_data["extensions"] = get_loaded_extensions();
|
172 |
+
$plugin_stat_data["plugins"] = $class_plugin_info_gallery_bank->get_plugin_info();
|
173 |
+
$plugin_stat_data["themes"] = $theme_details;
|
174 |
+
|
175 |
+
$response = wp_safe_remote_post($url, array
|
176 |
+
(
|
177 |
+
"method" => "POST",
|
178 |
+
"timeout" => 45,
|
179 |
+
"redirection" => 5,
|
180 |
+
"httpversion" => "1.0",
|
181 |
+
"blocking" => true,
|
182 |
+
"headers" => array(),
|
183 |
+
"body" => array( "data" => serialize($plugin_stat_data), "site_id" => get_option("gallery_bank_site_id") != "" ? get_option("gallery_bank_site_id") : "","action"=>"plugin_analysis_data")
|
184 |
+
));
|
185 |
+
if(!is_wp_error($response))
|
186 |
+
{
|
187 |
+
$response["body"] != "" ? update_option("gallery_bank_site_id", $response["body"]) : "";
|
188 |
+
}
|
189 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
}
|
191 |
+
|
192 |
+
|
193 |
/*************************************************************************************/
|
194 |
+
|
195 |
+
function gallery_bank_plugin_load_text_domain()
|
196 |
{
|
197 |
+
load_plugin_textdomain("gallery-bank", false, GALLERY_BK_PLUGIN_DIRNAME . "/lang");
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
}
|
199 |
+
|
200 |
/*************************************************************************************/
|
201 |
+
|
202 |
+
function add_gallery_bank_icon($meta = TRUE)
|
203 |
{
|
204 |
+
global $wp_admin_bar,$wpdb,$current_user;
|
205 |
+
if (!is_user_logged_in())
|
206 |
+
{
|
207 |
+
return;
|
208 |
+
}
|
209 |
+
if(is_super_admin())
|
210 |
+
{
|
211 |
+
$gb_role = "administrator";
|
212 |
+
}
|
213 |
+
else
|
214 |
+
{
|
215 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
216 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
217 |
+
$gb_role = $current_user->role[0];
|
218 |
+
}
|
219 |
+
switch ($gb_role)
|
220 |
+
{
|
221 |
+
case "administrator":
|
222 |
+
$wp_admin_bar->add_menu(array(
|
223 |
+
"id" => "gallery_bank_links",
|
224 |
+
"title" => __("<img src=\"" . plugins_url("/assets/images/icon.png",__FILE__)."\" width=\"25\"
|
225 |
+
height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Gallery Bank"),
|
226 |
+
"href" => __(site_url() . "/wp-admin/admin.php?page=gallery_bank"),
|
227 |
+
));
|
228 |
+
|
229 |
+
$wp_admin_bar->add_menu(array(
|
230 |
+
"parent" => "gallery_bank_links",
|
231 |
+
"id" => "gallery_dashboard_links",
|
232 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank",
|
233 |
+
"title" => __("Dashboard", "gallery-bank"))
|
234 |
+
);
|
235 |
+
|
236 |
+
$wp_admin_bar->add_menu(array(
|
237 |
+
"parent" => "gallery_bank_links",
|
238 |
+
"id" => "shortcode_links",
|
239 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_shortcode",
|
240 |
+
"title" => __("Short-Codes", "gallery-bank"))
|
241 |
+
);
|
242 |
+
|
243 |
+
$wp_admin_bar->add_menu(array(
|
244 |
+
"parent" => "gallery_bank_links",
|
245 |
+
"id" => "sorting_links",
|
246 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_album_sorting",
|
247 |
+
"title" => __("Album Sorting", "gallery-bank"))
|
248 |
+
);
|
249 |
+
|
250 |
+
$wp_admin_bar->add_menu(array(
|
251 |
+
"parent" => "gallery_bank_links",
|
252 |
+
"id" => "global_settings_links",
|
253 |
+
"href" => site_url() . "/wp-admin/admin.php?page=global_settings",
|
254 |
+
"title" => __("Global Settings", "gallery-bank"))
|
255 |
+
);
|
256 |
+
|
257 |
+
$wp_admin_bar->add_menu(array(
|
258 |
+
"parent" => "gallery_bank_links",
|
259 |
+
"id" => "gallery_bank_other_setings_link",
|
260 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_other_setings",
|
261 |
+
"title" => __("Other Settings", "gallery-bank"))
|
262 |
+
);
|
263 |
+
$wp_admin_bar->add_menu(array(
|
264 |
+
"parent" => "gallery_bank_links",
|
265 |
+
"id" => "gallery_feature_request_links",
|
266 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_feature_request",
|
267 |
+
"title" => __("Feature Requests", "gallery-bank"))
|
268 |
+
);
|
269 |
+
$wp_admin_bar->add_menu(array(
|
270 |
+
"parent" => "gallery_bank_links",
|
271 |
+
"id" => "system_status_links",
|
272 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_system_status",
|
273 |
+
"title" => __("System Status", "gallery-bank"))
|
274 |
+
);
|
275 |
+
|
276 |
+
$wp_admin_bar->add_menu(array(
|
277 |
+
"parent" => "gallery_bank_links",
|
278 |
+
"id" => "gallery_bank_recommended_plugins_links",
|
279 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_recommended_plugins",
|
280 |
+
"title" => __("Recommendations", "gallery-bank"))
|
281 |
+
);
|
282 |
+
|
283 |
+
$wp_admin_bar->add_menu(array(
|
284 |
+
"parent" => "gallery_bank_links",
|
285 |
+
"id" => "purchase_pro_version_links",
|
286 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_purchase",
|
287 |
+
"title" => __("Premium Editions", "gallery-bank"))
|
288 |
+
);
|
289 |
+
|
290 |
+
$wp_admin_bar->add_menu(array(
|
291 |
+
"parent" => "gallery_bank_links",
|
292 |
+
"id" => "gallery_bank_other_services_links",
|
293 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_other_services",
|
294 |
+
"title" => __("Our Other Services", "gallery-bank"))
|
295 |
+
);
|
296 |
+
break;
|
297 |
+
case "editor":
|
298 |
+
$wp_admin_bar->add_menu(array(
|
299 |
+
"id" => "gallery_bank_links",
|
300 |
+
"title" => __("<img src=\"" . plugins_url("/assets/images/icon.png",__FILE__)."\" width=\"25\"
|
301 |
+
height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Gallery Bank"),
|
302 |
+
"href" => __(site_url() . "/wp-admin/admin.php?page=gallery_bank"),
|
303 |
+
));
|
304 |
+
|
305 |
+
$wp_admin_bar->add_menu(array(
|
306 |
+
"parent" => "gallery_bank_links",
|
307 |
+
"id" => "gallery_dashboard_links",
|
308 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank",
|
309 |
+
"title" => __("Dashboard", "gallery-bank"))
|
310 |
+
);
|
311 |
+
|
312 |
+
$wp_admin_bar->add_menu(array(
|
313 |
+
"parent" => "gallery_bank_links",
|
314 |
+
"id" => "shortcode_links",
|
315 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_shortcode",
|
316 |
+
"title" => __("Short-Codes", "gallery-bank"))
|
317 |
+
);
|
318 |
+
|
319 |
+
$wp_admin_bar->add_menu(array(
|
320 |
+
"parent" => "gallery_bank_links",
|
321 |
+
"id" => "sorting_links",
|
322 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_album_sorting",
|
323 |
+
"title" => __("Album Sorting", "gallery-bank"))
|
324 |
+
);
|
325 |
+
|
326 |
+
$wp_admin_bar->add_menu(array(
|
327 |
+
"parent" => "gallery_bank_links",
|
328 |
+
"id" => "global_settings_links",
|
329 |
+
"href" => site_url() . "/wp-admin/admin.php?page=global_settings",
|
330 |
+
"title" => __("Global Settings", "gallery-bank"))
|
331 |
+
);
|
332 |
+
|
333 |
+
$wp_admin_bar->add_menu(array(
|
334 |
+
"parent" => "gallery_bank_links",
|
335 |
+
"id" => "gallery_bank_other_setings_link",
|
336 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_other_setings",
|
337 |
+
"title" => __("Other Settings", "gallery-bank"))
|
338 |
+
);
|
339 |
+
|
340 |
+
$wp_admin_bar->add_menu(array(
|
341 |
+
"parent" => "gallery_bank_links",
|
342 |
+
"id" => "gallery_feature_request_links",
|
343 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_feature_request",
|
344 |
+
"title" => __("Feature Requests", "gallery-bank"))
|
345 |
+
);
|
346 |
+
|
347 |
+
$wp_admin_bar->add_menu(array(
|
348 |
+
"parent" => "gallery_bank_links",
|
349 |
+
"id" => "system_status_links",
|
350 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_system_status",
|
351 |
+
"title" => __("System Status", "gallery-bank"))
|
352 |
+
);
|
353 |
+
|
354 |
+
$wp_admin_bar->add_menu(array(
|
355 |
+
"parent" => "gallery_bank_links",
|
356 |
+
"id" => "gallery_bank_recommended_plugins_links",
|
357 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_recommended_plugins",
|
358 |
+
"title" => __("Recommendations", "gallery-bank"))
|
359 |
+
);
|
360 |
+
|
361 |
+
$wp_admin_bar->add_menu(array(
|
362 |
+
"parent" => "gallery_bank_links",
|
363 |
+
"id" => "purchase_pro_version_links",
|
364 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_purchase",
|
365 |
+
"title" => __("Premium Editions", "gallery-bank"))
|
366 |
+
);
|
367 |
+
|
368 |
+
$wp_admin_bar->add_menu(array(
|
369 |
+
"parent" => "gallery_bank_links",
|
370 |
+
"id" => "gallery_bank_other_services_links",
|
371 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_other_services",
|
372 |
+
"title" => __("Our Other Services", "gallery-bank"))
|
373 |
+
);
|
374 |
+
break;
|
375 |
+
case "author":
|
376 |
+
$wp_admin_bar->add_menu(array(
|
377 |
+
"id" => "gallery_bank_links",
|
378 |
+
"title" => __("<img src=\"" . plugins_url("/assets/images/icon.png",__FILE__)."\" width=\"25\"
|
379 |
+
height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Gallery Bank"),
|
380 |
+
"href" => __(site_url() . "/wp-admin/admin.php?page=gallery_bank"),
|
381 |
+
));
|
382 |
+
|
383 |
+
$wp_admin_bar->add_menu(array(
|
384 |
+
"parent" => "gallery_bank_links",
|
385 |
+
"id" => "gallery_dashboard_links",
|
386 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank",
|
387 |
+
"title" => __("Dashboard", "gallery-bank"))
|
388 |
+
);
|
389 |
+
|
390 |
+
$wp_admin_bar->add_menu(array(
|
391 |
+
"parent" => "gallery_bank_links",
|
392 |
+
"id" => "shortcode_links",
|
393 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_shortcode",
|
394 |
+
"title" => __("Short-Codes", "gallery-bank"))
|
395 |
+
);
|
396 |
+
|
397 |
+
$wp_admin_bar->add_menu(array(
|
398 |
+
"parent" => "gallery_bank_links",
|
399 |
+
"id" => "sorting_links",
|
400 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_album_sorting",
|
401 |
+
"title" => __("Album Sorting", "gallery-bank"))
|
402 |
+
);
|
403 |
+
|
404 |
+
$wp_admin_bar->add_menu(array(
|
405 |
+
"parent" => "gallery_bank_links",
|
406 |
+
"id" => "global_settings_links",
|
407 |
+
"href" => site_url() . "/wp-admin/admin.php?page=global_settings",
|
408 |
+
"title" => __("Global Settings", "gallery-bank"))
|
409 |
+
);
|
410 |
+
|
411 |
+
$wp_admin_bar->add_menu(array(
|
412 |
+
"parent" => "gallery_bank_links",
|
413 |
+
"id" => "gallery_bank_other_setings_link",
|
414 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_other_setings",
|
415 |
+
"title" => __("Other Settings", "gallery-bank"))
|
416 |
+
);
|
417 |
+
|
418 |
+
$wp_admin_bar->add_menu(array(
|
419 |
+
"parent" => "gallery_bank_links",
|
420 |
+
"id" => "gallery_feature_request_links",
|
421 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_feature_request",
|
422 |
+
"title" => __("Feature Requests", "gallery-bank"))
|
423 |
+
);
|
424 |
+
|
425 |
+
$wp_admin_bar->add_menu(array(
|
426 |
+
"parent" => "gallery_bank_links",
|
427 |
+
"id" => "system_status_links",
|
428 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_system_status",
|
429 |
+
"title" => __("System Status", "gallery-bank"))
|
430 |
+
);
|
431 |
+
|
432 |
+
$wp_admin_bar->add_menu(array(
|
433 |
+
"parent" => "gallery_bank_links",
|
434 |
+
"id" => "gallery_bank_recommended_plugins_links",
|
435 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_recommended_plugins",
|
436 |
+
"title" => __("Recommendations", "gallery-bank"))
|
437 |
+
);
|
438 |
+
|
439 |
+
$wp_admin_bar->add_menu(array(
|
440 |
+
"parent" => "gallery_bank_links",
|
441 |
+
"id" => "purchase_pro_version_links",
|
442 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_purchase",
|
443 |
+
"title" => __("Premium Editions", "gallery-bank"))
|
444 |
+
);
|
445 |
+
|
446 |
+
$wp_admin_bar->add_menu(array(
|
447 |
+
"parent" => "gallery_bank_links",
|
448 |
+
"id" => "gallery_bank_other_services_links",
|
449 |
+
"href" => site_url() . "/wp-admin/admin.php?page=gallery_bank_other_services",
|
450 |
+
"title" => __("Our Other Services", "gallery-bank"))
|
451 |
+
);
|
452 |
+
break;
|
453 |
+
}
|
|
|
|
|
|
|
454 |
}
|
455 |
+
|
456 |
+
/*************************************************************************************/
|
457 |
+
|
458 |
+
|
459 |
+
function gallery_bank_custom_plugin_row($links,$file)
|
460 |
{
|
461 |
+
if ($file == GALLERY_BK_PLUGIN_BASENAME)
|
462 |
+
{
|
463 |
+
$gallery_bank_row_meta = array(
|
464 |
+
"docs" => "<a href='".esc_url( apply_filters("gallery_bank_docs_url","http://tech-banker.com/products/wp-gallery-bank/knowledge-base/"))."' title='".esc_attr(__( "View Gallery Bank Documentation", "gallery-bank"))."'>".__("Docs", "gallery-bank")."</a>",
|
465 |
+
"gopremium" => "<a href='" .esc_url( apply_filters("gallery_bank_premium_editions_url", "http://tech-banker.com/products/wp-gallery-bank/pricing/"))."' title='".esc_attr(__( "View Gallery Bank Premium Editions", "gallery-bank"))."'>".__("Go for Premium!", "gallery-bank")."</a>",
|
466 |
+
);
|
467 |
+
return array_merge($links,$gallery_bank_row_meta);
|
468 |
+
}
|
469 |
+
return (array)$links;
|
|
|
|
|
|
|
470 |
}
|
471 |
|
472 |
+
/*************************************************************************************/
|
473 |
$version = get_option("gallery-bank-pro-edition");
|
474 |
if($version != "")
|
475 |
{
|
476 |
add_action("admin_init", "plugin_install_script_for_gallery_bank");
|
477 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
478 |
|
479 |
add_filter("plugin_row_meta","gallery_bank_custom_plugin_row", 10, 2);
|
480 |
add_action("admin_bar_menu", "add_gallery_bank_icon", 100);
|
481 |
add_action("plugins_loaded", "gallery_bank_plugin_load_text_domain");
|
|
|
482 |
register_activation_hook(__FILE__, "plugin_install_script_for_gallery_bank");
|
483 |
register_deactivation_hook(__FILE__, "deactivation_function_for_gallery_bank");
|
|
|
|
|
484 |
/*************************************************************************************/
|
485 |
+
?>
|
lib/add-new-album-class.php
CHANGED
@@ -20,138 +20,137 @@ if (!current_user_can($user_role_permission))
|
|
20 |
}
|
21 |
else
|
22 |
{
|
23 |
-
if(!class_exists("class_plugin_info_gallery_bank"))
|
24 |
-
{
|
25 |
-
class class_plugin_info_gallery_bank
|
26 |
-
{
|
27 |
-
function get_plugin_info()
|
28 |
-
{
|
29 |
-
$active_plugins = (array)get_option("active_plugins", array());
|
30 |
-
if (is_multisite())
|
31 |
-
$active_plugins = array_merge($active_plugins, get_site_option("active_sitewide_plugins", array()));
|
32 |
-
$plugins = array();
|
33 |
-
if(count($active_plugins) > 0)
|
34 |
-
{
|
35 |
-
$get_plugins = array();
|
36 |
-
foreach ($active_plugins as $plugin)
|
37 |
-
{
|
38 |
-
$plugin_data = @get_plugin_data(WP_PLUGIN_DIR . "/" . $plugin);
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
55 |
-
$temp_image_name = $image;
|
56 |
-
list(, , $temp_image_type) = getimagesize($temp_image_path);
|
57 |
-
if ($temp_image_type === NULL) {
|
58 |
-
return false;
|
59 |
-
}
|
60 |
-
$uploaded_image_path = GALLERY_MAIN_UPLOAD_DIR . $temp_image_name;
|
61 |
-
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
62 |
-
$type = explode(".", $image);
|
63 |
-
$thumbnail_image_path = GALLERY_MAIN_THUMB_DIR . preg_replace("{\\.[^\\.]+$}", ".".$type[1], $temp_image_name);
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
/******************************************Code for Album cover thumbs Creation**********************/
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
$thumbnail_image_path = GALLERY_MAIN_ALB_THUMB_DIR . preg_replace("{\\.[^\\.]+$}", ".".$type[1], $temp_image_name);
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
|
117 |
-
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
|
123 |
-
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
|
|
|
|
155 |
if (isset($_REQUEST["param"]))
|
156 |
{
|
157 |
switch(esc_attr($_REQUEST["param"]))
|
@@ -163,15 +162,10 @@ else
|
|
163 |
update_option("gallery-bank-wizard", $type);
|
164 |
if($type == "opt_in")
|
165 |
{
|
166 |
-
$
|
167 |
global $wp_version;
|
168 |
-
|
169 |
$url = tech_banker_stats_url."/wp-admin/admin-ajax.php";
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
$theme_details = array();
|
174 |
-
|
175 |
if($wp_version >= 3.4)
|
176 |
{
|
177 |
$active_theme = wp_get_theme();
|
@@ -179,7 +173,6 @@ else
|
|
179 |
$theme_details["theme_version"] = strip_tags($active_theme->Version);
|
180 |
$theme_details["author_url"] = strip_tags($active_theme->{"Author URI"});
|
181 |
}
|
182 |
-
|
183 |
$plugin_stat_data = array();
|
184 |
$plugin_stat_data["plugin_slug"] = "gallery-bank";
|
185 |
$plugin_stat_data["type"] = "standard_edition";
|
@@ -196,45 +189,22 @@ else
|
|
196 |
$plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
|
197 |
$plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
|
198 |
$plugin_stat_data["extensions"] = get_loaded_extensions();
|
199 |
-
$plugin_stat_data["plugins"] = $
|
200 |
$plugin_stat_data["themes"] = $theme_details;
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
}
|
216 |
-
else
|
217 |
-
{
|
218 |
-
$response = wp_safe_remote_post($url, array
|
219 |
-
(
|
220 |
-
"method" => "POST",
|
221 |
-
"timeout" => 45,
|
222 |
-
"redirection" => 5,
|
223 |
-
"httpversion" => "1.0",
|
224 |
-
"blocking" => true,
|
225 |
-
"headers" => array(),
|
226 |
-
"body" => array( "data" => serialize($plugin_stat_data), "site_id" => get_option("gallery_bank_site_id") != "" ? get_option("gallery_bank_site_id") : "","action"=>"plugin_analysis_data")
|
227 |
-
));
|
228 |
-
|
229 |
-
if(!is_wp_error($response))
|
230 |
-
{
|
231 |
-
$response["body"] != "" ? update_option("gallery_bank_site_id", $response["body"]) : "";
|
232 |
-
}
|
233 |
-
else
|
234 |
-
{
|
235 |
-
update_option("gallery_bank_site_id", "error");
|
236 |
-
}
|
237 |
-
}
|
238 |
}
|
239 |
}
|
240 |
break;
|
@@ -409,10 +379,9 @@ else
|
|
409 |
);
|
410 |
|
411 |
break;
|
412 |
-
case "
|
413 |
-
$
|
414 |
-
|
415 |
-
|
416 |
break;
|
417 |
}
|
418 |
die();
|
20 |
}
|
21 |
else
|
22 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
+
class class_installed_plugin_info_gallery_bank
|
25 |
+
{
|
26 |
+
function get_plugin_info()
|
27 |
+
{
|
28 |
+
$active_plugins = (array)get_option("active_plugins", array());
|
29 |
+
if (is_multisite())
|
30 |
+
$active_plugins = array_merge($active_plugins, get_site_option("active_sitewide_plugins", array()));
|
31 |
+
$plugins = array();
|
32 |
+
if(count($active_plugins) > 0)
|
33 |
+
{
|
34 |
+
$get_plugins = array();
|
35 |
+
foreach ($active_plugins as $plugin)
|
36 |
+
{
|
37 |
+
$plugin_data = @get_plugin_data(WP_PLUGIN_DIR . "/" . $plugin);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
+
$get_plugins["plugin_name"] = strip_tags($plugin_data["Name"]);
|
40 |
+
$get_plugins["plugin_author"] = strip_tags($plugin_data["Author"]);
|
41 |
+
$get_plugins["plugin_version"] = strip_tags($plugin_data["Version"]);
|
42 |
+
array_push($plugins,$get_plugins);
|
43 |
+
}
|
44 |
+
return $plugins;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
/******************************************Code for process_image_upload**********************/
|
50 |
+
function process_image_upload($image, $width, $height)
|
51 |
+
{
|
52 |
+
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
53 |
+
$temp_image_name = $image;
|
54 |
+
list(, , $temp_image_type) = getimagesize($temp_image_path);
|
55 |
+
if ($temp_image_type === NULL) {
|
56 |
+
return false;
|
57 |
+
}
|
58 |
+
$uploaded_image_path = GALLERY_MAIN_UPLOAD_DIR . $temp_image_name;
|
59 |
+
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
60 |
+
$type = explode(".", $image);
|
61 |
+
$thumbnail_image_path = GALLERY_MAIN_THUMB_DIR . preg_replace("{\\.[^\\.]+$}", ".".$type[1], $temp_image_name);
|
62 |
+
|
63 |
+
$result = generate_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
64 |
+
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
65 |
+
}
|
66 |
+
|
67 |
/******************************************Code for Album cover thumbs Creation**********************/
|
68 |
+
|
69 |
+
function process_album_upload($album_image, $width, $height)
|
70 |
+
{
|
71 |
+
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
72 |
+
$temp_image_name = $album_image;
|
73 |
+
list(, , $temp_image_type) = getimagesize($temp_image_path);
|
74 |
+
if ($temp_image_type === NULL) {
|
75 |
+
return false;
|
76 |
+
}
|
77 |
+
$uploaded_image_path = GALLERY_MAIN_UPLOAD_DIR . $temp_image_name;
|
78 |
+
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
79 |
+
$type = explode(".", $album_image);
|
80 |
+
$thumbnail_image_path = GALLERY_MAIN_ALB_THUMB_DIR . preg_replace("{\\.[^\\.]+$}", ".".$type[1], $temp_image_name);
|
|
|
81 |
|
82 |
+
$result = generate_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
83 |
+
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
84 |
+
}
|
85 |
+
|
86 |
+
/******************************************Code for generate_thumbnail**********************/
|
87 |
+
|
88 |
+
function generate_thumbnail($source_image_path, $thumbnail_image_path, $imageWidth, $imageHeight)
|
89 |
+
{
|
90 |
+
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path);
|
91 |
+
$source_gd_image = false;
|
92 |
+
switch ($source_image_type) {
|
93 |
+
case IMAGETYPE_GIF:
|
94 |
+
$source_gd_image = imagecreatefromgif($source_image_path);
|
95 |
+
break;
|
96 |
+
case IMAGETYPE_JPEG:
|
97 |
+
$source_gd_image = imagecreatefromjpeg($source_image_path);
|
98 |
+
break;
|
99 |
+
case IMAGETYPE_PNG:
|
100 |
+
$source_gd_image = imagecreatefrompng($source_image_path);
|
101 |
+
break;
|
102 |
+
}
|
103 |
+
if ($source_gd_image === false) {
|
104 |
+
return false;
|
105 |
+
}
|
106 |
+
$source_aspect_ratio = $source_image_width / $source_image_height;
|
107 |
+
if ($source_image_width > $source_image_height) {
|
108 |
+
$real_height = $imageHeight;
|
109 |
+
$real_width = $imageHeight * $source_aspect_ratio;
|
110 |
+
} else if ($source_image_height > $source_image_width) {
|
111 |
+
$real_height = $imageWidth / $source_aspect_ratio;
|
112 |
+
$real_width = $imageWidth;
|
113 |
|
114 |
+
} else {
|
115 |
|
116 |
+
$real_height = $imageHeight > $imageWidth ? $imageHeight : $imageWidth;
|
117 |
+
$real_width = $imageWidth > $imageHeight ? $imageWidth : $imageHeight;
|
118 |
+
}
|
119 |
|
120 |
+
$thumbnail_gd_image = imagecreatetruecolor($real_width, $real_height);
|
121 |
|
122 |
+
if(($source_image_type == 1) || ($source_image_type==3)){
|
123 |
+
imagealphablending($thumbnail_gd_image, false);
|
124 |
+
imagesavealpha($thumbnail_gd_image, true);
|
125 |
+
$transparent = imagecolorallocatealpha($thumbnail_gd_image, 255, 255, 255, 127);
|
126 |
+
imagecolortransparent($thumbnail_gd_image, $transparent);
|
127 |
+
imagefilledrectangle($thumbnail_gd_image, 0, 0, $real_width, $real_height, $transparent);
|
128 |
+
}
|
129 |
+
else
|
130 |
+
{
|
131 |
+
$bg_color = imagecolorallocate($thumbnail_gd_image, 255, 255, 255);
|
132 |
+
imagefilledrectangle($thumbnail_gd_image, 0, 0, $real_width, $real_height, $bg_color);
|
133 |
+
}
|
134 |
+
imagecopyresampled($thumbnail_gd_image, $source_gd_image, 0, 0, 0, 0, $real_width, $real_height, $source_image_width, $source_image_height);
|
135 |
+
switch ($source_image_type)
|
136 |
+
{
|
137 |
+
case IMAGETYPE_GIF:
|
138 |
+
imagepng($thumbnail_gd_image, $thumbnail_image_path, 9 );
|
139 |
+
break;
|
140 |
+
case IMAGETYPE_JPEG:
|
141 |
+
imagejpeg($thumbnail_gd_image, $thumbnail_image_path, 100);
|
142 |
+
break;
|
143 |
+
case IMAGETYPE_PNG:
|
144 |
+
imagepng($thumbnail_gd_image, $thumbnail_image_path, 9 );
|
145 |
+
break;
|
146 |
+
}
|
147 |
+
imagedestroy($source_gd_image);
|
148 |
+
imagedestroy($thumbnail_gd_image);
|
149 |
+
return true;
|
150 |
+
}
|
151 |
+
|
152 |
+
/******************************************Code for generate_thumbnail**********************/
|
153 |
+
|
154 |
if (isset($_REQUEST["param"]))
|
155 |
{
|
156 |
switch(esc_attr($_REQUEST["param"]))
|
162 |
update_option("gallery-bank-wizard", $type);
|
163 |
if($type == "opt_in")
|
164 |
{
|
165 |
+
$class_installed_plugin_info_gallery_bank = new class_installed_plugin_info_gallery_bank();
|
166 |
global $wp_version;
|
|
|
167 |
$url = tech_banker_stats_url."/wp-admin/admin-ajax.php";
|
|
|
|
|
|
|
168 |
$theme_details = array();
|
|
|
169 |
if($wp_version >= 3.4)
|
170 |
{
|
171 |
$active_theme = wp_get_theme();
|
173 |
$theme_details["theme_version"] = strip_tags($active_theme->Version);
|
174 |
$theme_details["author_url"] = strip_tags($active_theme->{"Author URI"});
|
175 |
}
|
|
|
176 |
$plugin_stat_data = array();
|
177 |
$plugin_stat_data["plugin_slug"] = "gallery-bank";
|
178 |
$plugin_stat_data["type"] = "standard_edition";
|
189 |
$plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
|
190 |
$plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
|
191 |
$plugin_stat_data["extensions"] = get_loaded_extensions();
|
192 |
+
$plugin_stat_data["plugins"] = $class_installed_plugin_info_gallery_bank->get_plugin_info();
|
193 |
$plugin_stat_data["themes"] = $theme_details;
|
194 |
+
$response = wp_safe_remote_post($url, array
|
195 |
+
(
|
196 |
+
"method" => "POST",
|
197 |
+
"timeout" => 45,
|
198 |
+
"redirection" => 5,
|
199 |
+
"httpversion" => "1.0",
|
200 |
+
"blocking" => true,
|
201 |
+
"headers" => array(),
|
202 |
+
"body" => array( "data" => serialize($plugin_stat_data), "site_id" => get_option("gallery_bank_site_id") != "" ? get_option("gallery_bank_site_id") : "","action"=>"plugin_analysis_data")
|
203 |
+
));
|
204 |
+
if(!is_wp_error($response))
|
205 |
+
{
|
206 |
+
$response["body"] != "" ? update_option("gallery_bank_site_id", $response["body"]) : "";
|
207 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
}
|
209 |
}
|
210 |
break;
|
379 |
);
|
380 |
|
381 |
break;
|
382 |
+
case "gallery_plugin_settings":
|
383 |
+
$gallery_other_settings = isset($_REQUEST["gallery_other_settings"]) ? intval($_REQUEST["gallery_other_settings"]) : 0;
|
384 |
+
update_option("gallery-bank-remove-tables-uninstall",$gallery_other_settings);
|
|
|
385 |
break;
|
386 |
}
|
387 |
die();
|
lib/gallery-bank-class.php
CHANGED
@@ -3,555 +3,531 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
3 |
//--------------------------------------------------------------------------------------------------------------//
|
4 |
// CODE FOR CREATING MENUS
|
5 |
//---------------------------------------------------------------------------------------------------------------//
|
6 |
-
|
|
|
7 |
{
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
break;
|
100 |
-
}
|
101 |
-
}
|
102 |
}
|
|
|
103 |
//--------------------------------------------------------------------------------------------------------------//
|
104 |
// FUNCTIONS FOR REPLACING TABLE NAMES
|
105 |
//--------------------------------------------------------------------------------------------------------------//
|
106 |
-
|
|
|
107 |
{
|
108 |
-
|
109 |
-
|
110 |
-
global $wpdb;
|
111 |
-
return $wpdb->prefix . "gallery_albums";
|
112 |
-
}
|
113 |
}
|
114 |
-
|
|
|
|
|
115 |
{
|
116 |
-
|
117 |
-
|
118 |
-
global $wpdb;
|
119 |
-
return $wpdb->prefix . "gallery_pics";
|
120 |
-
}
|
121 |
}
|
122 |
-
|
|
|
|
|
123 |
{
|
124 |
-
|
125 |
-
|
126 |
-
global $wpdb;
|
127 |
-
return $wpdb->prefix . "gallery_settings";
|
128 |
-
}
|
129 |
}
|
130 |
|
|
|
131 |
//--------------------------------------------------------------------------------------------------------------//
|
132 |
// CODE FOR CREATING PAGES
|
133 |
//---------------------------------------------------------------------------------------------------------------//
|
134 |
-
|
|
|
135 |
{
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/wizard.php";
|
152 |
-
}
|
153 |
-
}
|
154 |
}
|
155 |
-
|
|
|
156 |
{
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/dashboard.php";
|
177 |
-
}
|
178 |
-
}
|
179 |
}
|
180 |
-
|
|
|
|
|
181 |
{
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/shortcode.php";
|
202 |
-
}
|
203 |
-
}
|
204 |
}
|
205 |
-
|
|
|
|
|
206 |
{
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
header("Location:admin.php?page=gallery_bank");
|
238 |
-
}
|
239 |
-
}
|
240 |
}
|
241 |
-
|
|
|
|
|
242 |
{
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/settings.php";
|
263 |
-
}
|
264 |
-
}
|
265 |
}
|
266 |
-
|
|
|
|
|
267 |
{
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/album-sorting.php";
|
288 |
-
}
|
289 |
-
}
|
290 |
}
|
291 |
-
|
|
|
|
|
292 |
{
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/images-sorting.php";
|
313 |
-
}
|
314 |
-
}
|
315 |
}
|
316 |
-
|
|
|
317 |
{
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/album-preview.php";
|
338 |
-
}
|
339 |
-
}
|
340 |
}
|
341 |
-
|
|
|
|
|
342 |
{
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/gallery-bank-system-report.php";
|
363 |
-
}
|
364 |
-
}
|
365 |
}
|
366 |
-
|
|
|
|
|
367 |
{
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/purchase_pro_version.php";
|
388 |
-
}
|
389 |
-
}
|
390 |
}
|
391 |
-
|
|
|
|
|
392 |
{
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/recommended-plugins.php";
|
413 |
-
}
|
414 |
-
}
|
415 |
}
|
416 |
-
|
|
|
|
|
417 |
{
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/other-services.php";
|
438 |
-
}
|
439 |
-
}
|
440 |
}
|
441 |
-
|
|
|
|
|
442 |
{
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/automatic-plugin-update.php";
|
463 |
-
}
|
464 |
-
}
|
465 |
}
|
466 |
-
|
|
|
|
|
467 |
{
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
include_once GALLERY_BK_PLUGIN_DIR . "/views/gallery-feedback.php";
|
488 |
-
}
|
489 |
-
}
|
490 |
}
|
491 |
|
|
|
492 |
//--------------------------------------------------------------------------------------------------------------//
|
493 |
//CODE FOR CALLING JAVASCRIPT FUNCTIONS
|
494 |
//--------------------------------------------------------------------------------------------------------------//
|
495 |
-
|
|
|
496 |
{
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
wp_enqueue_script("jquery.pretty-photo.js", plugins_url("/assets/js/jquery.pretty-photo.js",dirname(__FILE__)));
|
512 |
-
wp_enqueue_style("google-fonts-roboto", "http://fonts.googleapis.com/css?family=Roboto Condensed:300|Roboto Condensed:300|Roboto Condensed:300|Roboto Condensed:regular|Roboto Condensed:300");
|
513 |
-
}
|
514 |
}
|
515 |
-
|
|
|
|
|
516 |
{
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
wp_enqueue_script("img-liquid", plugins_url("/assets/js/img-liquid.js",dirname(__FILE__)));
|
523 |
-
wp_enqueue_script("jquery.pretty-photo.js", plugins_url("/assets/js/jquery.pretty-photo.js",dirname(__FILE__)));
|
524 |
-
}
|
525 |
}
|
|
|
526 |
//--------------------------------------------------------------------------------------------------------------//
|
527 |
// CODE FOR CALLING STYLE SHEETS
|
528 |
//--------------------------------------------------------------------------------------------------------------//
|
529 |
-
|
|
|
530 |
{
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
wp_enqueue_style("premium-edition.css", plugins_url("/assets/css/premium-edition.css",dirname(__FILE__)));
|
543 |
-
wp_enqueue_style("responsive.css", plugins_url("/assets/css/responsive.css",dirname(__FILE__)));
|
544 |
-
}
|
545 |
}
|
546 |
-
|
|
|
|
|
547 |
{
|
548 |
-
|
549 |
-
|
550 |
-
wp_enqueue_style("gallery-bank.css", plugins_url("/assets/css/gallery-bank.css",dirname(__FILE__)));
|
551 |
-
wp_enqueue_style("pretty-photo.css", plugins_url("/assets/css/pretty-photo.css",dirname(__FILE__)));
|
552 |
-
}
|
553 |
}
|
554 |
|
|
|
555 |
//--------------------------------------------------------------------------------------------------------------//
|
556 |
// REGISTER AJAX BASED FUNCTIONS TO BE CALLED ON ACTION TYPE AS PER WORDPRESS GUIDELINES
|
557 |
//--------------------------------------------------------------------------------------------------------------//
|
@@ -559,183 +535,172 @@ if (isset($_REQUEST["action"])) {
|
|
559 |
switch (esc_attr($_REQUEST["action"])) {
|
560 |
case "add_new_album_library":
|
561 |
add_action("admin_init", "album_gallery_library");
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
}
|
583 |
-
}
|
584 |
break;
|
585 |
case "front_view_all_albums_library":
|
586 |
add_action("admin_init", "front_view_all_albums_library");
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
}
|
597 |
break;
|
598 |
case "upload_library":
|
599 |
add_action("admin_init", "upload_library");
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
}
|
621 |
break;
|
622 |
}
|
623 |
}
|
624 |
|
625 |
/**************************************************************************************************/
|
626 |
add_action("media_buttons_context", "add_gallery_shortcode_button", 1);
|
627 |
-
|
628 |
{
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
title=\"" . __("Add Gallery using Gallery Bank", "gallery-bank") . "\"><span class=\"gallery_icon\"></span> Gallery Bank</a>";
|
634 |
-
return $context;
|
635 |
-
}
|
636 |
}
|
637 |
|
|
|
638 |
add_action("admin_footer", "add_gallery_bank_popup");
|
639 |
-
|
640 |
{
|
641 |
-
|
642 |
-
|
643 |
-
add_thickbox();
|
644 |
-
require_once GALLERY_BK_PLUGIN_DIR . "/front_views/gallery-bank-shortcode.php";
|
645 |
-
}
|
646 |
}
|
647 |
-
|
|
|
|
|
648 |
{
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
return extract_short_code_for_gallery_images(intval($album_id), $type, $format, $title, $desc, $img_in_row, $responsive, $albums_in_row, $special_effect, $animation_effect, $image_width, $album_title, urldecode($show_albums), $thumb_width, $thumb_height, $display, intval($no_of_images), $sort_by, $widget);
|
676 |
-
}
|
677 |
-
}
|
678 |
}
|
679 |
-
|
|
|
680 |
{
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
return $gallery_bank_output_album;
|
735 |
-
}
|
736 |
-
}
|
737 |
}
|
738 |
|
|
|
739 |
/*****************************************************************************************************************/
|
740 |
add_shortcode("gallery_bank", "gallery_bank_short_code");
|
741 |
add_action("admin_init", "backend_scripts_calls");
|
@@ -743,4 +708,4 @@ add_action("admin_init", "backend_css_calls");
|
|
743 |
add_action("init", "frontend_plugin_js_scripts_gallery_bank");
|
744 |
add_action("init", "frontend_plugin_css_scripts_gallery_bank");
|
745 |
add_action("admin_menu", "create_global_menus_for_gallery_bank");
|
746 |
-
add_action( "network_admin_menu", "create_global_menus_for_gallery_bank" );
|
3 |
//--------------------------------------------------------------------------------------------------------------//
|
4 |
// CODE FOR CREATING MENUS
|
5 |
//---------------------------------------------------------------------------------------------------------------//
|
6 |
+
|
7 |
+
function create_global_menus_for_gallery_bank()
|
8 |
{
|
9 |
+
global $wpdb,$current_user;
|
10 |
+
if(is_super_admin())
|
11 |
+
{
|
12 |
+
$gb_role = "administrator";
|
13 |
+
}
|
14 |
+
else
|
15 |
+
{
|
16 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
17 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
18 |
+
$gb_role = $current_user->role[0];
|
19 |
+
}
|
20 |
+
$gallery_bank_wizard = get_option("gallery-bank-wizard");
|
21 |
+
global $wp_version;
|
22 |
+
|
23 |
+
switch ($gb_role) {
|
24 |
+
case "administrator":
|
25 |
+
if(get_option("gallery-bank-wizard"))
|
26 |
+
{
|
27 |
+
add_menu_page("Gallery Bank", __("Gallery Bank", "gallery-bank"), "read", "gallery_bank", "", plugins_url("/assets/images/icon.png" , dirname(__FILE__)));
|
28 |
+
}
|
29 |
+
else
|
30 |
+
{
|
31 |
+
add_menu_page("Gallery Bank", __("Gallery Bank", "gallery-bank"), "read","gallery_bank_wizard","",plugins_url("assets/images/icon.png",dirname(__FILE__)));
|
32 |
+
add_submenu_page("Gallery Bank", __("Gallery Bank", "gallery-bank") ,"","read","gallery_bank_wizard", "gallery_bank_wizard");
|
33 |
+
}
|
34 |
+
add_submenu_page("gallery_bank", "Dashboard", __("Dashboard", "gallery-bank"), "read", "gallery_bank", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank");
|
35 |
+
add_submenu_page("gallery_bank", "Short-Codes", __("Short-Codes", "gallery-bank"), "read", "gallery_bank_shortcode", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_shortcode");
|
36 |
+
add_submenu_page("gallery_bank", "Album Sorting", __("Album Sorting", "gallery-bank"), "read", "gallery_album_sorting", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_album_sorting");
|
37 |
+
add_submenu_page("gallery_bank", "Global Settings", __("Global Settings", "gallery-bank"), "read", "global_settings", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "global_settings");
|
38 |
+
add_submenu_page("gallery_bank", "Other Settings", __("Other Settings", "gallery-bank"), "read", "gallery_bank_other_setings", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_other_setings");
|
39 |
+
add_submenu_page("gallery_bank", "Feature Requests", __("Feature Requests", "gallery-bank"), "read", "gallery_bank_feature_request", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_feature_request");
|
40 |
+
add_submenu_page("gallery_bank", "System Status", __("System Status", "gallery-bank"), "read", "gallery_bank_system_status", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_system_status");
|
41 |
+
add_submenu_page("gallery_bank", "Recommendations", __("Recommendations", "gallery-bank"), "read", "gallery_bank_recommended_plugins", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_recommended_plugins");
|
42 |
+
add_submenu_page("gallery_bank", "Premium Editions", __("Premium Editions", "gallery-bank"), "read", "gallery_bank_purchase", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_purchase");
|
43 |
+
add_submenu_page("gallery_bank", " Our Other Services ", __("Our Other Services", "gallery-bank"), "read", "gallery_bank_other_services", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_other_services");
|
44 |
+
add_submenu_page("", "", "", "read", "view_album", "view_album");
|
45 |
+
add_submenu_page("", "", "", "read", "album_preview", "album_preview");
|
46 |
+
add_submenu_page("", "", "", "read", "save_album", "save_album");
|
47 |
+
add_submenu_page("", "", "", "read", "images_sorting", "images_sorting");
|
48 |
+
break;
|
49 |
+
case "editor":
|
50 |
+
if(get_option("gallery-bank-wizard"))
|
51 |
+
{
|
52 |
+
add_menu_page("Gallery Bank", __("Gallery Bank", "gallery-bank"), "read", "gallery_bank", "", plugins_url("/assets/images/icon.png" , dirname(__FILE__)));
|
53 |
+
}
|
54 |
+
else
|
55 |
+
{
|
56 |
+
add_menu_page("Gallery Bank", __("Gallery Bank", "gallery-bank"), "read","gallery_bank_wizard","",plugins_url("assets/global/img/icon.png",dirname(__FILE__)));
|
57 |
+
add_submenu_page("Gallery Bank", __("Gallery Bank", "gallery-bank") ,"","read","gallery_bank_wizard", "gallery_bank_wizard");
|
58 |
+
}
|
59 |
+
add_submenu_page("gallery_bank", "Dashboard", __("Dashboard", "gallery-bank"), "read", "gallery_bank", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank");
|
60 |
+
add_submenu_page("gallery_bank", "Short-Codes", __("Short-Codes", "gallery-bank"), "read", "gallery_bank_shortcode", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_shortcode");
|
61 |
+
add_submenu_page("gallery_bank", "Album Sorting", __("Album Sorting", "gallery-bank"), "read", "gallery_album_sorting", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_album_sorting");
|
62 |
+
add_submenu_page("gallery_bank", "Global Settings", __("Global Settings", "gallery-bank"), "read", "global_settings", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "global_settings");
|
63 |
+
add_submenu_page("gallery_bank", "Other Settings", __("Other Settings", "gallery-bank"), "read", "gallery_bank_other_setings", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_other_setings");
|
64 |
+
add_submenu_page("gallery_bank", "Feature Requests", __("Feature Requests", "gallery-bank"), "read", "gallery_bank_feature_request", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_feature_request");
|
65 |
+
add_submenu_page("gallery_bank", "System Status", __("System Status", "gallery-bank"), "read", "gallery_bank_system_status", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_system_status");
|
66 |
+
add_submenu_page("gallery_bank", "Recommendations", __("Recommendations", "gallery-bank"), "read", "gallery_bank_recommended_plugins", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_recommended_plugins");
|
67 |
+
add_submenu_page("gallery_bank", "Premium Editions", __("Premium Editions", "gallery-bank"), "read", "gallery_bank_purchase", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_purchase");
|
68 |
+
add_submenu_page("gallery_bank", " Our Other Services ", __("Our Other Services", "gallery-bank"), "read", "gallery_bank_other_services", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_other_services");
|
69 |
+
add_submenu_page("", "", "", "read", "view_album", "view_album");
|
70 |
+
add_submenu_page("", "", "", "read", "album_preview", "album_preview");
|
71 |
+
add_submenu_page("", "", "", "read", "save_album", "save_album");
|
72 |
+
add_submenu_page("", "", "", "read", "images_sorting", "images_sorting");
|
73 |
+
break;
|
74 |
+
case "author":
|
75 |
+
if(get_option("gallery-bank-wizard"))
|
76 |
+
{
|
77 |
+
add_menu_page("Gallery Bank", __("Gallery Bank", "gallery-bank"), "read", "gallery_bank", "", plugins_url("/assets/images/icon.png" , dirname(__FILE__)));
|
78 |
+
}
|
79 |
+
else
|
80 |
+
{
|
81 |
+
add_menu_page("Gallery Bank", __("Gallery Bank", "gallery-bank"), "read","gallery_bank_wizard","",plugins_url("assets/global/img/icon.png",dirname(__FILE__)));
|
82 |
+
add_submenu_page("Gallery Bank", __("Gallery Bank", "gallery-bank") ,"","read","gallery_bank_wizard", "gallery_bank_wizard");
|
83 |
+
}
|
84 |
+
add_submenu_page("gallery_bank", "Dashboard", __("Dashboard", "gallery-bank"), "read", "gallery_bank", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank");
|
85 |
+
add_submenu_page("gallery_bank", "Short-Codes", __("Short-Codes", "gallery-bank"), "read", "gallery_bank_shortcode", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_shortcode");
|
86 |
+
add_submenu_page("gallery_bank", "Album Sorting", __("Album Sorting", "gallery-bank"), "read", "gallery_album_sorting", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_album_sorting");
|
87 |
+
add_submenu_page("gallery_bank", "Global Settings", __("Global Settings", "gallery-bank"), "read", "global_settings", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "global_settings");
|
88 |
+
add_submenu_page("gallery_bank", "Other Settings", __("Other Settings", "gallery-bank"), "read", "gallery_bank_other_setings", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_other_setings");
|
89 |
+
add_submenu_page("gallery_bank", "Feature Requests", __("Feature Requests", "gallery-bank"), "read", "gallery_bank_feature_request", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_feature_request");
|
90 |
+
add_submenu_page("gallery_bank", "System Status", __("System Status", "gallery-bank"), "read", "gallery_bank_system_status", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_system_status");
|
91 |
+
add_submenu_page("gallery_bank", "Recommendations", __("Recommendations", "gallery-bank"), "read", "gallery_bank_recommended_plugins", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_recommended_plugins");
|
92 |
+
add_submenu_page("gallery_bank", "Premium Editions", __("Premium Editions", "gallery-bank"), "read", "gallery_bank_purchase", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_purchase");
|
93 |
+
add_submenu_page("gallery_bank", " Our Other Services ", __("Our Other Services", "gallery-bank"), "read", "gallery_bank_other_services", $gallery_bank_wizard == "" ? "gallery_bank_wizard" : "gallery_bank_other_services");
|
94 |
+
add_submenu_page("", "", "", "read", "view_album", "view_album");
|
95 |
+
add_submenu_page("", "", "", "read", "album_preview", "album_preview");
|
96 |
+
add_submenu_page("", "", "", "read", "save_album", "save_album");
|
97 |
+
add_submenu_page("", "", "", "read", "images_sorting", "images_sorting");
|
98 |
+
break;
|
99 |
+
}
|
|
|
|
|
|
|
100 |
}
|
101 |
+
|
102 |
//--------------------------------------------------------------------------------------------------------------//
|
103 |
// FUNCTIONS FOR REPLACING TABLE NAMES
|
104 |
//--------------------------------------------------------------------------------------------------------------//
|
105 |
+
|
106 |
+
function gallery_bank_albums()
|
107 |
{
|
108 |
+
global $wpdb;
|
109 |
+
return $wpdb->prefix . "gallery_albums";
|
|
|
|
|
|
|
110 |
}
|
111 |
+
|
112 |
+
|
113 |
+
function gallery_bank_pics()
|
114 |
{
|
115 |
+
global $wpdb;
|
116 |
+
return $wpdb->prefix . "gallery_pics";
|
|
|
|
|
|
|
117 |
}
|
118 |
+
|
119 |
+
|
120 |
+
function gallery_bank_settings()
|
121 |
{
|
122 |
+
global $wpdb;
|
123 |
+
return $wpdb->prefix . "gallery_settings";
|
|
|
|
|
|
|
124 |
}
|
125 |
|
126 |
+
|
127 |
//--------------------------------------------------------------------------------------------------------------//
|
128 |
// CODE FOR CREATING PAGES
|
129 |
//---------------------------------------------------------------------------------------------------------------//
|
130 |
+
|
131 |
+
function gallery_bank_wizard()
|
132 |
{
|
133 |
+
global $wpdb,$current_user,$user_role_permission;
|
134 |
+
if(is_super_admin())
|
135 |
+
{
|
136 |
+
$gb_role = "administrator";
|
137 |
+
}
|
138 |
+
else
|
139 |
+
{
|
140 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
141 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
142 |
+
$gb_role = $current_user->role[0];
|
143 |
+
}
|
144 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/wizard.php"))
|
145 |
+
{
|
146 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/wizard.php";
|
147 |
+
}
|
|
|
|
|
|
|
148 |
}
|
149 |
+
|
150 |
+
function gallery_bank()
|
151 |
{
|
152 |
+
global $wpdb,$current_user,$user_role_permission;
|
153 |
+
if(is_super_admin())
|
154 |
+
{
|
155 |
+
$gb_role = "administrator";
|
156 |
+
}
|
157 |
+
else
|
158 |
+
{
|
159 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
160 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
161 |
+
$gb_role = $current_user->role[0];
|
162 |
+
}
|
163 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
164 |
+
{
|
165 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
166 |
+
}
|
167 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/dashboard.php"))
|
168 |
+
{
|
169 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/dashboard.php";
|
170 |
+
}
|
|
|
|
|
|
|
171 |
}
|
172 |
+
|
173 |
+
|
174 |
+
function gallery_bank_shortcode()
|
175 |
{
|
176 |
+
global $wpdb, $current_user,$wp_version;
|
177 |
+
if(is_super_admin())
|
178 |
+
{
|
179 |
+
$gb_role = "administrator";
|
180 |
+
}
|
181 |
+
else
|
182 |
+
{
|
183 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
184 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
185 |
+
$gb_role = $current_user->role[0];
|
186 |
+
}
|
187 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
188 |
+
{
|
189 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
190 |
+
}
|
191 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/shortcode.php"))
|
192 |
+
{
|
193 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/shortcode.php";
|
194 |
+
}
|
|
|
|
|
|
|
195 |
}
|
196 |
+
|
197 |
+
|
198 |
+
function save_album()
|
199 |
{
|
200 |
+
global $wpdb,$current_user,$user_role_permission;
|
201 |
+
if(is_super_admin())
|
202 |
+
{
|
203 |
+
$gb_role = "administrator";
|
204 |
+
}
|
205 |
+
else
|
206 |
+
{
|
207 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
208 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
209 |
+
$gb_role = $current_user->role[0];
|
210 |
+
}
|
211 |
+
$album_count = $wpdb->get_var
|
212 |
+
(
|
213 |
+
"SELECT count(album_id) FROM ".gallery_bank_albums()
|
214 |
+
);
|
215 |
+
if($album_count <= 3)
|
216 |
+
{
|
217 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
218 |
+
{
|
219 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
220 |
+
}
|
221 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/edit-album.php"))
|
222 |
+
{
|
223 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/edit-album.php";
|
224 |
+
}
|
225 |
+
}
|
226 |
+
else
|
227 |
+
{
|
228 |
+
header("Location:admin.php?page=gallery_bank");
|
229 |
+
}
|
|
|
|
|
|
|
230 |
}
|
231 |
+
|
232 |
+
|
233 |
+
function global_settings()
|
234 |
{
|
235 |
+
global $wpdb, $current_user,$wp_version;
|
236 |
+
if(is_super_admin())
|
237 |
+
{
|
238 |
+
$gb_role = "administrator";
|
239 |
+
}
|
240 |
+
else
|
241 |
+
{
|
242 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
243 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
244 |
+
$gb_role = $current_user->role[0];
|
245 |
+
}
|
246 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
247 |
+
{
|
248 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
249 |
+
}
|
250 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/settings.php"))
|
251 |
+
{
|
252 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/settings.php";
|
253 |
+
}
|
|
|
|
|
|
|
254 |
}
|
255 |
+
|
256 |
+
|
257 |
+
function gallery_album_sorting()
|
258 |
{
|
259 |
+
global $wpdb,$current_user,$user_role_permission;
|
260 |
+
if(is_super_admin())
|
261 |
+
{
|
262 |
+
$gb_role = "administrator";
|
263 |
+
}
|
264 |
+
else
|
265 |
+
{
|
266 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
267 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
268 |
+
$gb_role = $current_user->role[0];
|
269 |
+
}
|
270 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
271 |
+
{
|
272 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
273 |
+
}
|
274 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/album-sorting.php"))
|
275 |
+
{
|
276 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/album-sorting.php";
|
277 |
+
}
|
|
|
|
|
|
|
278 |
}
|
279 |
+
|
280 |
+
|
281 |
+
function images_sorting()
|
282 |
{
|
283 |
+
global $wpdb,$current_user,$user_role_permission;
|
284 |
+
if(is_super_admin())
|
285 |
+
{
|
286 |
+
$gb_role = "administrator";
|
287 |
+
}
|
288 |
+
else
|
289 |
+
{
|
290 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
291 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
292 |
+
$gb_role = $current_user->role[0];
|
293 |
+
}
|
294 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
295 |
+
{
|
296 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
297 |
+
}
|
298 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/images-sorting.php"))
|
299 |
+
{
|
300 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/images-sorting.php";
|
301 |
+
}
|
|
|
|
|
|
|
302 |
}
|
303 |
+
|
304 |
+
function album_preview()
|
305 |
{
|
306 |
+
global $wpdb,$current_user,$user_role_permission;
|
307 |
+
if(is_super_admin())
|
308 |
+
{
|
309 |
+
$gb_role = "administrator";
|
310 |
+
}
|
311 |
+
else
|
312 |
+
{
|
313 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
314 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
315 |
+
$gb_role = $current_user->role[0];
|
316 |
+
}
|
317 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
318 |
+
{
|
319 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
320 |
+
}
|
321 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/album-preview.php"))
|
322 |
+
{
|
323 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/album-preview.php";
|
324 |
+
}
|
|
|
|
|
|
|
325 |
}
|
326 |
+
|
327 |
+
|
328 |
+
function gallery_bank_system_status()
|
329 |
{
|
330 |
+
global $wpdb,$wp_version,$current_user,$user_role_permission;
|
331 |
+
if(is_super_admin())
|
332 |
+
{
|
333 |
+
$gb_role = "administrator";
|
334 |
+
}
|
335 |
+
else
|
336 |
+
{
|
337 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
338 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
339 |
+
$gb_role = $current_user->role[0];
|
340 |
+
}
|
341 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
342 |
+
{
|
343 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
344 |
+
}
|
345 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/gallery-bank-system-report.php"))
|
346 |
+
{
|
347 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/gallery-bank-system-report.php";
|
348 |
+
}
|
|
|
|
|
|
|
349 |
}
|
350 |
+
|
351 |
+
|
352 |
+
function gallery_bank_purchase()
|
353 |
{
|
354 |
+
global $wpdb,$current_user,$user_role_permission;
|
355 |
+
if(is_super_admin())
|
356 |
+
{
|
357 |
+
$gb_role = "administrator";
|
358 |
+
}
|
359 |
+
else
|
360 |
+
{
|
361 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
362 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
363 |
+
$gb_role = $current_user->role[0];
|
364 |
+
}
|
365 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
366 |
+
{
|
367 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
368 |
+
}
|
369 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/purchase_pro_version.php"))
|
370 |
+
{
|
371 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/purchase_pro_version.php";
|
372 |
+
}
|
|
|
|
|
|
|
373 |
}
|
374 |
+
|
375 |
+
|
376 |
+
function gallery_bank_recommended_plugins()
|
377 |
{
|
378 |
+
global $wpdb,$current_user,$user_role_permission;
|
379 |
+
if(is_super_admin())
|
380 |
+
{
|
381 |
+
$gb_role = "administrator";
|
382 |
+
}
|
383 |
+
else
|
384 |
+
{
|
385 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
386 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
387 |
+
$gb_role = $current_user->role[0];
|
388 |
+
}
|
389 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
390 |
+
{
|
391 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
392 |
+
}
|
393 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/recommended-plugins.php"))
|
394 |
+
{
|
395 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/recommended-plugins.php";
|
396 |
+
}
|
|
|
|
|
|
|
397 |
}
|
398 |
+
|
399 |
+
|
400 |
+
function gallery_bank_other_services()
|
401 |
{
|
402 |
+
global $wpdb,$current_user,$user_role_permission;
|
403 |
+
if(is_super_admin())
|
404 |
+
{
|
405 |
+
$gb_role = "administrator";
|
406 |
+
}
|
407 |
+
else
|
408 |
+
{
|
409 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
410 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
411 |
+
$gb_role = $current_user->role[0];
|
412 |
+
}
|
413 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
414 |
+
{
|
415 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
416 |
+
}
|
417 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/other-services.php"))
|
418 |
+
{
|
419 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/other-services.php";
|
420 |
+
}
|
|
|
|
|
|
|
421 |
}
|
422 |
+
|
423 |
+
|
424 |
+
function gallery_bank_other_setings()
|
425 |
{
|
426 |
+
global $wpdb,$current_user,$user_role_permission;
|
427 |
+
if(is_super_admin())
|
428 |
+
{
|
429 |
+
$gb_role = "administrator";
|
430 |
+
}
|
431 |
+
else
|
432 |
+
{
|
433 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
434 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
435 |
+
$gb_role = $current_user->role[0];
|
436 |
+
}
|
437 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
438 |
+
{
|
439 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
440 |
+
}
|
441 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/other-settings.php"))
|
442 |
+
{
|
443 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/other-settings.php";
|
444 |
+
}
|
|
|
|
|
|
|
445 |
}
|
446 |
+
|
447 |
+
|
448 |
+
function gallery_bank_feature_request()
|
449 |
{
|
450 |
+
global $wpdb,$current_user,$user_role_permission;
|
451 |
+
if(is_super_admin())
|
452 |
+
{
|
453 |
+
$gb_role = "administrator";
|
454 |
+
}
|
455 |
+
else
|
456 |
+
{
|
457 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
458 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
459 |
+
$gb_role = $current_user->role[0];
|
460 |
+
}
|
461 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
462 |
+
{
|
463 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
464 |
+
}
|
465 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/gallery-feedback.php"))
|
466 |
+
{
|
467 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/gallery-feedback.php";
|
468 |
+
}
|
|
|
|
|
|
|
469 |
}
|
470 |
|
471 |
+
|
472 |
//--------------------------------------------------------------------------------------------------------------//
|
473 |
//CODE FOR CALLING JAVASCRIPT FUNCTIONS
|
474 |
//--------------------------------------------------------------------------------------------------------------//
|
475 |
+
|
476 |
+
function backend_scripts_calls()
|
477 |
{
|
478 |
+
wp_enqueue_script("jquery");
|
479 |
+
wp_enqueue_script("jquery-ui-draggable");
|
480 |
+
wp_enqueue_script("jquery-ui-sortable");
|
481 |
+
wp_enqueue_script("jquery-ui-dialog");
|
482 |
+
wp_enqueue_script("farbtastic");
|
483 |
+
wp_enqueue_script("img-liquid", plugins_url("/assets/js/img-liquid.js",dirname(__FILE__)));
|
484 |
+
wp_enqueue_script("plupload.full.min.js", plugins_url("/assets/js/plupload.full.min.js",dirname(__FILE__)), array("jquery-ui-widget","jquery-ui-progressbar"),false);
|
485 |
+
wp_enqueue_script("jquery.data-tables.min.js", plugins_url("/assets/js/jquery.data-tables.min.js",dirname(__FILE__)));
|
486 |
+
wp_enqueue_script("jquery.validate.min.js", plugins_url("/assets/js/jquery.validate.min.js",dirname(__FILE__)));
|
487 |
+
wp_enqueue_script("jquery.ui.plupload.js", plugins_url("/assets/js/jquery.ui.plupload.js",dirname(__FILE__)));
|
488 |
+
wp_enqueue_script("jquery.tooltip.js", plugins_url("/assets/js/jquery.tooltip.js",dirname(__FILE__)));
|
489 |
+
wp_enqueue_script("bootstrap.js", plugins_url("/assets/js/bootstrap.js",dirname(__FILE__)));
|
490 |
+
wp_enqueue_script("jquery.pretty-photo.js", plugins_url("/assets/js/jquery.pretty-photo.js",dirname(__FILE__)));
|
491 |
+
wp_enqueue_style("google-fonts-roboto", "http://fonts.googleapis.com/css?family=Roboto Condensed:300|Roboto Condensed:300|Roboto Condensed:300|Roboto Condensed:regular|Roboto Condensed:300");
|
|
|
|
|
|
|
492 |
}
|
493 |
+
|
494 |
+
|
495 |
+
function frontend_plugin_js_scripts_gallery_bank()
|
496 |
{
|
497 |
+
wp_enqueue_script("jquery");
|
498 |
+
wp_enqueue_script("jquery.masonry.min.js", plugins_url("/assets/js/jquery.masonry.min.js",dirname(__FILE__)));
|
499 |
+
wp_enqueue_script("isotope.pkgd.js", plugins_url("/assets/js/isotope.pkgd.js",dirname(__FILE__)));
|
500 |
+
wp_enqueue_script("img-liquid", plugins_url("/assets/js/img-liquid.js",dirname(__FILE__)));
|
501 |
+
wp_enqueue_script("jquery.pretty-photo.js", plugins_url("/assets/js/jquery.pretty-photo.js",dirname(__FILE__)));
|
|
|
|
|
|
|
502 |
}
|
503 |
+
|
504 |
//--------------------------------------------------------------------------------------------------------------//
|
505 |
// CODE FOR CALLING STYLE SHEETS
|
506 |
//--------------------------------------------------------------------------------------------------------------//
|
507 |
+
|
508 |
+
function backend_css_calls()
|
509 |
{
|
510 |
+
wp_enqueue_style("farbtastic");
|
511 |
+
wp_enqueue_style("wp-jquery-ui-dialog");
|
512 |
+
wp_enqueue_style("jquery-ui.css", plugins_url("/assets/css/jquery-ui.css",dirname(__FILE__)));
|
513 |
+
wp_enqueue_style("jquery.ui.plupload.css", plugins_url("/assets/css/jquery.ui.plupload.css",dirname(__FILE__)));
|
514 |
+
wp_enqueue_style("stylesheet.css", plugins_url("/assets/css/stylesheet.css",dirname(__FILE__)));
|
515 |
+
wp_enqueue_style("simple-line-icons.css", plugins_url("/assets/css/icons/icons.css",dirname(__FILE__)));
|
516 |
+
wp_enqueue_style("system-message.css", plugins_url("/assets/css/system-message.css",dirname(__FILE__)));
|
517 |
+
wp_enqueue_style("gallery-bank.css", plugins_url("/assets/css/gallery-bank.css",dirname(__FILE__)));
|
518 |
+
wp_enqueue_style("pretty-photo.css", plugins_url("/assets/css/pretty-photo.css",dirname(__FILE__)));
|
519 |
+
wp_enqueue_style("premium-edition.css", plugins_url("/assets/css/premium-edition.css",dirname(__FILE__)));
|
520 |
+
wp_enqueue_style("responsive.css", plugins_url("/assets/css/responsive.css",dirname(__FILE__)));
|
|
|
|
|
|
|
521 |
}
|
522 |
+
|
523 |
+
|
524 |
+
function frontend_plugin_css_scripts_gallery_bank()
|
525 |
{
|
526 |
+
wp_enqueue_style("gallery-bank.css", plugins_url("/assets/css/gallery-bank.css",dirname(__FILE__)));
|
527 |
+
wp_enqueue_style("pretty-photo.css", plugins_url("/assets/css/pretty-photo.css",dirname(__FILE__)));
|
|
|
|
|
|
|
528 |
}
|
529 |
|
530 |
+
|
531 |
//--------------------------------------------------------------------------------------------------------------//
|
532 |
// REGISTER AJAX BASED FUNCTIONS TO BE CALLED ON ACTION TYPE AS PER WORDPRESS GUIDELINES
|
533 |
//--------------------------------------------------------------------------------------------------------------//
|
535 |
switch (esc_attr($_REQUEST["action"])) {
|
536 |
case "add_new_album_library":
|
537 |
add_action("admin_init", "album_gallery_library");
|
538 |
+
|
539 |
+
function album_gallery_library()
|
540 |
+
{
|
541 |
+
global $wpdb,$current_user,$user_role_permission;
|
542 |
+
if(is_super_admin())
|
543 |
+
{
|
544 |
+
$gb_role = "administrator";
|
545 |
+
}
|
546 |
+
else
|
547 |
+
{
|
548 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
549 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
550 |
+
$gb_role = $current_user->role[0];
|
551 |
+
}
|
552 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/add-new-album-class.php"))
|
553 |
+
{
|
554 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/lib/add-new-album-class.php";
|
555 |
+
}
|
556 |
+
}
|
557 |
+
|
|
|
|
|
558 |
break;
|
559 |
case "front_view_all_albums_library":
|
560 |
add_action("admin_init", "front_view_all_albums_library");
|
561 |
+
|
562 |
+
function front_view_all_albums_library()
|
563 |
+
{
|
564 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/front-view-all-albums-class.php"))
|
565 |
+
{
|
566 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/lib/front-view-all-albums-class.php";
|
567 |
+
}
|
568 |
+
}
|
569 |
+
|
|
|
570 |
break;
|
571 |
case "upload_library":
|
572 |
add_action("admin_init", "upload_library");
|
573 |
+
|
574 |
+
function upload_library()
|
575 |
+
{
|
576 |
+
global $wpdb,$current_user,$user_role_permission;
|
577 |
+
if(is_super_admin())
|
578 |
+
{
|
579 |
+
$gb_role = "administrator";
|
580 |
+
}
|
581 |
+
else
|
582 |
+
{
|
583 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
584 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
585 |
+
$gb_role = $current_user->role[0];
|
586 |
+
}
|
587 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/upload.php"))
|
588 |
+
{
|
589 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/lib/upload.php";
|
590 |
+
}
|
591 |
+
}
|
592 |
+
|
|
|
593 |
break;
|
594 |
}
|
595 |
}
|
596 |
|
597 |
/**************************************************************************************************/
|
598 |
add_action("media_buttons_context", "add_gallery_shortcode_button", 1);
|
599 |
+
function add_gallery_shortcode_button($context)
|
600 |
{
|
601 |
+
add_thickbox();
|
602 |
+
$context .= "<a href=\"#TB_inline?width=800&height=530&inlineId=my-gallery-content-id\" class=\"button thickbox\"
|
603 |
+
title=\"" . __("Add Gallery using Gallery Bank", "gallery-bank") . "\"><span class=\"gallery_icon\"></span> Gallery Bank</a>";
|
604 |
+
return $context;
|
|
|
|
|
|
|
605 |
}
|
606 |
|
607 |
+
|
608 |
add_action("admin_footer", "add_gallery_bank_popup");
|
609 |
+
function add_gallery_bank_popup()
|
610 |
{
|
611 |
+
add_thickbox();
|
612 |
+
require_once GALLERY_BK_PLUGIN_DIR . "/front_views/gallery-bank-shortcode.php";
|
|
|
|
|
|
|
613 |
}
|
614 |
+
|
615 |
+
|
616 |
+
function gallery_bank_short_code($atts)
|
617 |
{
|
618 |
+
extract(shortcode_atts(array(
|
619 |
+
"album_id" => "",
|
620 |
+
"type" => "",
|
621 |
+
"format" => "",
|
622 |
+
"title" => "",
|
623 |
+
"desc" => "",
|
624 |
+
"img_in_row" => "",
|
625 |
+
"responsive" => "",
|
626 |
+
"albums_in_row" => "",
|
627 |
+
"special_effect" => "",
|
628 |
+
"animation_effect" => "",
|
629 |
+
"image_width" => "",
|
630 |
+
"album_title" => "",
|
631 |
+
"show_albums" => "",
|
632 |
+
"thumb_width" => "",
|
633 |
+
"thumb_height" => "",
|
634 |
+
"display" => "",
|
635 |
+
"no_of_images" => "",
|
636 |
+
"sort_by" => "",
|
637 |
+
"widget" => "",
|
638 |
+
), $atts));
|
639 |
+
|
640 |
+
if(!is_feed())
|
641 |
+
{
|
642 |
+
return extract_short_code_for_gallery_images(intval($album_id), $type, $format, $title, $desc, $img_in_row, $responsive, $albums_in_row, $special_effect, $animation_effect, $image_width, $album_title, urldecode($show_albums), $thumb_width, $thumb_height, $display, intval($no_of_images), $sort_by, $widget);
|
643 |
+
}
|
|
|
|
|
|
|
644 |
}
|
645 |
+
|
646 |
+
function extract_short_code_for_gallery_images($album_id, $album_type, $gallery_type, $img_title, $img_desc, $img_in_row, $responsive, $albums_in_row, $special_effect, $animation_effect, $image_width, $album_title, $show_albums, $thumb_width, $thumb_height, $display, $no_of_images, $sort_by, $widget)
|
647 |
{
|
648 |
+
if(preg_match("/^\d+(?:,\d+)*$/", $show_albums) || $show_albums == "all" || $show_albums == "")
|
649 |
+
{
|
650 |
+
ob_start();
|
651 |
+
global $wpdb;
|
652 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_before.php"))
|
653 |
+
{
|
654 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_before.php";
|
655 |
+
}
|
656 |
+
switch ($album_type) {
|
657 |
+
case "images":
|
658 |
+
switch ($gallery_type) {
|
659 |
+
case "masonry":
|
660 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/masonry-gallery.php"))
|
661 |
+
{
|
662 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/masonry-gallery.php";
|
663 |
+
}
|
664 |
+
break;
|
665 |
+
case "thumbnail":
|
666 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/thumbnail-gallery.php"))
|
667 |
+
{
|
668 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/thumbnail-gallery.php";
|
669 |
+
}
|
670 |
+
break;
|
671 |
+
}
|
672 |
+
break;
|
673 |
+
case "grid":
|
674 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/grid-albums.php"))
|
675 |
+
{
|
676 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/grid-albums.php";
|
677 |
+
}
|
678 |
+
break;
|
679 |
+
case "list":
|
680 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/listed-album.php"))
|
681 |
+
{
|
682 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/listed-album.php";
|
683 |
+
}
|
684 |
+
break;
|
685 |
+
case "individual":
|
686 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/single-album.php"))
|
687 |
+
{
|
688 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/single-album.php";
|
689 |
+
}
|
690 |
+
break;
|
691 |
+
}
|
692 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_after.php"))
|
693 |
+
{
|
694 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_after.php";
|
695 |
+
}
|
696 |
+
|
697 |
+
$gallery_bank_output_album = ob_get_clean();
|
698 |
+
wp_reset_query();
|
699 |
+
return $gallery_bank_output_album;
|
700 |
+
}
|
|
|
|
|
|
|
701 |
}
|
702 |
|
703 |
+
|
704 |
/*****************************************************************************************************************/
|
705 |
add_shortcode("gallery_bank", "gallery_bank_short_code");
|
706 |
add_action("admin_init", "backend_scripts_calls");
|
708 |
add_action("init", "frontend_plugin_js_scripts_gallery_bank");
|
709 |
add_action("init", "frontend_plugin_css_scripts_gallery_bank");
|
710 |
add_action("admin_menu", "create_global_menus_for_gallery_bank");
|
711 |
+
add_action( "network_admin_menu", "create_global_menus_for_gallery_bank" );
|
lib/install-script.php
CHANGED
@@ -18,167 +18,167 @@ if (!current_user_can($user_role_permission))
|
|
18 |
}
|
19 |
else
|
20 |
{
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
$thumbnail_image_path = GALLERY_MAIN_THUMB_DIR . preg_replace('{\\.[^\\.]+$}', '.'.$type[1], $temp_image_name);
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
switch ($source_image_type) {
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
|
90 |
-
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
}
|
106 |
-
/******************************************End of Code for Thumbnails Creation **********************/
|
107 |
|
108 |
-
|
109 |
-
if(!function_exists("create_table_albums"))
|
110 |
-
{
|
111 |
-
function create_table_albums()
|
112 |
-
{
|
113 |
-
$sql = "CREATE TABLE " . gallery_bank_albums() . "(
|
114 |
-
album_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
115 |
-
album_name TEXT,
|
116 |
-
author VARCHAR(100),
|
117 |
-
album_date DATE,
|
118 |
-
description TEXT ,
|
119 |
-
album_order INTEGER(10),
|
120 |
-
PRIMARY KEY (album_id)
|
121 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
122 |
-
dbDelta($sql);
|
123 |
-
}
|
124 |
-
}
|
125 |
-
if(!function_exists("create_table_album_pics"))
|
126 |
-
{
|
127 |
-
function create_table_album_pics()
|
128 |
-
{
|
129 |
-
$sql = "CREATE TABLE " . gallery_bank_pics() . "(
|
130 |
-
pic_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
131 |
-
album_id INTEGER(10) UNSIGNED NOT NULL,
|
132 |
-
title TEXT,
|
133 |
-
description TEXT,
|
134 |
-
thumbnail_url TEXT NOT NULL,
|
135 |
-
sorting_order INTEGER(20),
|
136 |
-
date DATE,
|
137 |
-
url VARCHAR(250),
|
138 |
-
video INTEGER(10) NOT NULL,
|
139 |
-
tags TEXT,
|
140 |
-
pic_name TEXT NOT NULL,
|
141 |
-
album_cover INTEGER(1) NOT NULL,
|
142 |
-
PRIMARY KEY(pic_id)
|
143 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
144 |
-
dbDelta($sql);
|
145 |
-
}
|
146 |
-
}
|
147 |
-
if(!function_exists("create_table_album_settings"))
|
148 |
-
{
|
149 |
-
function create_table_album_settings()
|
150 |
-
{
|
151 |
-
global $wpdb;
|
152 |
-
$sql = "CREATE TABLE " . gallery_bank_settings() . "(
|
153 |
-
setting_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
154 |
-
setting_key VARCHAR(100) NOT NULL,
|
155 |
-
setting_value TEXT NOT NULL,
|
156 |
-
PRIMARY KEY (setting_id)
|
157 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
158 |
-
dbDelta($sql);
|
159 |
-
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php"))
|
160 |
-
{
|
161 |
-
global $wpdb,$current_user;
|
162 |
-
if (!is_user_logged_in())
|
163 |
-
{
|
164 |
-
return;
|
165 |
-
}
|
166 |
-
if(is_super_admin())
|
167 |
-
{
|
168 |
-
$gb_role = "administrator";
|
169 |
-
}
|
170 |
-
else
|
171 |
-
{
|
172 |
-
$gb_role = $wpdb->prefix . "capabilities";
|
173 |
-
$current_user->role = array_keys($current_user->$gb_role);
|
174 |
-
$gb_role = $current_user->role[0];
|
175 |
-
}
|
176 |
-
include GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php";
|
177 |
-
}
|
178 |
|
179 |
-
|
180 |
-
|
181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
global $wpdb;
|
183 |
require_once(ABSPATH . "wp-admin/includes/upgrade.php");
|
184 |
update_option("gallery-bank-updation-check-url","http://tech-banker.com/wp-admin/admin-ajax.php");
|
@@ -333,6 +333,7 @@ else
|
|
333 |
create_table_album_settings();
|
334 |
}
|
335 |
update_option("gallery-bank-pro-edition", "3.1");
|
|
|
336 |
}
|
337 |
else
|
338 |
{
|
@@ -345,6 +346,10 @@ else
|
|
345 |
}
|
346 |
update_option("gallery-bank-pro-edition", "3.1");
|
347 |
}
|
348 |
-
|
|
|
|
|
|
|
|
|
349 |
}
|
350 |
?>
|
18 |
}
|
19 |
else
|
20 |
{
|
21 |
+
/******************************************Code for Thumbnails Creation**********************/
|
22 |
+
|
23 |
+
function process_gallery_image_upload($image, $width, $height)
|
24 |
+
{
|
25 |
+
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
26 |
+
$temp_image_name = $image;
|
27 |
+
list(, , $temp_image_type) = getimagesize($temp_image_path);
|
28 |
+
if ($temp_image_type === NULL) {
|
29 |
+
return false;
|
30 |
+
}
|
31 |
+
$uploaded_image_path = GALLERY_MAIN_UPLOAD_DIR . $temp_image_name;
|
32 |
+
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
33 |
+
$type = explode(".", $image);
|
34 |
+
$thumbnail_image_path = GALLERY_MAIN_THUMB_DIR . preg_replace('{\\.[^\\.]+$}', '.'.$type[1], $temp_image_name);
|
|
|
35 |
|
36 |
+
$result = generate_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
37 |
+
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
38 |
+
}
|
39 |
+
|
40 |
+
/****************************************** Code for process_gallery_album_upload **********************/
|
41 |
+
|
42 |
+
function process_gallery_album_upload($album_image, $width, $height)
|
43 |
+
{
|
44 |
+
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
45 |
+
$temp_image_name = $album_image;
|
46 |
+
list(, , $temp_image_type) = getimagesize($temp_image_path);
|
47 |
+
if ($temp_image_type === NULL) {
|
48 |
+
return false;
|
49 |
+
}
|
50 |
+
$uploaded_image_path = GALLERY_MAIN_UPLOAD_DIR . $temp_image_name;
|
51 |
+
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
52 |
+
$type = explode(".", $album_image);
|
53 |
+
$thumbnail_image_path = GALLERY_MAIN_ALB_THUMB_DIR . preg_replace("{\\.[^\\.]+$}", ".".$type[1], $temp_image_name);
|
54 |
|
55 |
+
$result = generate_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
56 |
+
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
57 |
+
}
|
58 |
+
|
59 |
+
/****************************** COMMON FUNCTION TO GENERATE THUMBNAILS********************************/
|
60 |
+
|
61 |
+
function generate_gallery_thumbnail($source_image_path, $thumbnail_image_path, $imageWidth, $imageHeight)
|
62 |
+
{
|
63 |
+
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path);
|
64 |
+
$source_gd_image = false;
|
65 |
+
switch ($source_image_type) {
|
|
|
66 |
|
67 |
+
case IMAGETYPE_GIF:
|
68 |
+
$source_gd_image = imagecreatefromgif($source_image_path);
|
69 |
+
break;
|
70 |
+
case IMAGETYPE_JPEG:
|
71 |
+
$source_gd_image = imagecreatefromjpeg($source_image_path);
|
72 |
+
break;
|
73 |
+
case IMAGETYPE_PNG:
|
74 |
+
$source_gd_image = imagecreatefrompng($source_image_path);
|
75 |
+
break;
|
76 |
+
}
|
77 |
+
if ($source_gd_image === false) {
|
78 |
+
return false;
|
79 |
+
}
|
80 |
+
$source_aspect_ratio = $source_image_width / $source_image_height;
|
81 |
+
if ($source_image_width > $source_image_height) {
|
82 |
+
(int)$real_height = $imageHeight;
|
83 |
+
(int)$real_width = $imageHeight * $source_aspect_ratio;
|
84 |
+
} else if ($source_image_height > $source_image_width) {
|
85 |
+
(int)$real_height = $imageWidth / $source_aspect_ratio;
|
86 |
+
(int)$real_width = $imageWidth;
|
87 |
|
88 |
+
} else {
|
89 |
|
90 |
+
(int)$real_height = $imageHeight > $imageWidth ? $imageHeight : $imageWidth;
|
91 |
+
(int)$real_width = $imageWidth > $imageHeight ? $imageWidth : $imageHeight;
|
92 |
+
}
|
93 |
+
$thumbnail_gd_image = imagecreatetruecolor($real_width, $real_height);
|
94 |
+
$bg_color = imagecolorallocate($thumbnail_gd_image, 255, 255, 255);
|
95 |
+
imagefilledrectangle($thumbnail_gd_image, 0, 0, $real_width, $real_height, $bg_color);
|
96 |
+
imagecopyresampled($thumbnail_gd_image, $source_gd_image, 0, 0, 0, 0, $real_width, $real_height, $source_image_width, $source_image_height);
|
97 |
|
98 |
+
imagejpeg($thumbnail_gd_image, $thumbnail_image_path, 100);
|
99 |
+
imagedestroy($source_gd_image);
|
100 |
+
imagedestroy($thumbnail_gd_image);
|
101 |
+
return true;
|
102 |
+
}
|
|
|
|
|
103 |
|
104 |
+
/******************************************End of Code for Thumbnails Creation **********************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
+
/****************************************** Code for create_table_albums **********************/
|
107 |
+
|
108 |
+
function create_table_albums()
|
109 |
+
{
|
110 |
+
$sql = "CREATE TABLE " . gallery_bank_albums() . "(
|
111 |
+
album_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
112 |
+
album_name TEXT,
|
113 |
+
author VARCHAR(100),
|
114 |
+
album_date DATE,
|
115 |
+
description TEXT ,
|
116 |
+
album_order INTEGER(10),
|
117 |
+
PRIMARY KEY (album_id)
|
118 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
119 |
+
dbDelta($sql);
|
120 |
+
}
|
121 |
+
|
122 |
+
/****************************************** Code for create_table_album_pics **********************/
|
123 |
+
|
124 |
+
|
125 |
+
function create_table_album_pics()
|
126 |
+
{
|
127 |
+
$sql = "CREATE TABLE " . gallery_bank_pics() . "(
|
128 |
+
pic_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
129 |
+
album_id INTEGER(10) UNSIGNED NOT NULL,
|
130 |
+
title TEXT,
|
131 |
+
description TEXT,
|
132 |
+
thumbnail_url TEXT NOT NULL,
|
133 |
+
sorting_order INTEGER(20),
|
134 |
+
date DATE,
|
135 |
+
url VARCHAR(250),
|
136 |
+
video INTEGER(10) NOT NULL,
|
137 |
+
tags TEXT,
|
138 |
+
pic_name TEXT NOT NULL,
|
139 |
+
album_cover INTEGER(1) NOT NULL,
|
140 |
+
PRIMARY KEY(pic_id)
|
141 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
142 |
+
dbDelta($sql);
|
143 |
+
}
|
144 |
+
|
145 |
+
/****************************************** Code for create_table_album_settings **********************/
|
146 |
+
|
147 |
+
|
148 |
+
function create_table_album_settings()
|
149 |
+
{
|
150 |
+
global $wpdb;
|
151 |
+
$sql = "CREATE TABLE " . gallery_bank_settings() . "(
|
152 |
+
setting_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
153 |
+
setting_key VARCHAR(100) NOT NULL,
|
154 |
+
setting_value TEXT NOT NULL,
|
155 |
+
PRIMARY KEY (setting_id)
|
156 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
157 |
+
dbDelta($sql);
|
158 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php"))
|
159 |
+
{
|
160 |
+
global $wpdb,$current_user;
|
161 |
+
if (!is_user_logged_in())
|
162 |
+
{
|
163 |
+
return;
|
164 |
+
}
|
165 |
+
if(is_super_admin())
|
166 |
+
{
|
167 |
+
$gb_role = "administrator";
|
168 |
+
}
|
169 |
+
else
|
170 |
+
{
|
171 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
172 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
173 |
+
$gb_role = $current_user->role[0];
|
174 |
+
}
|
175 |
+
include GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php";
|
176 |
+
}
|
177 |
+
|
178 |
+
}
|
179 |
+
|
180 |
+
/******************************************End of Code for Table Creation**********************/
|
181 |
+
|
182 |
global $wpdb;
|
183 |
require_once(ABSPATH . "wp-admin/includes/upgrade.php");
|
184 |
update_option("gallery-bank-updation-check-url","http://tech-banker.com/wp-admin/admin-ajax.php");
|
333 |
create_table_album_settings();
|
334 |
}
|
335 |
update_option("gallery-bank-pro-edition", "3.1");
|
336 |
+
|
337 |
}
|
338 |
else
|
339 |
{
|
346 |
}
|
347 |
update_option("gallery-bank-pro-edition", "3.1");
|
348 |
}
|
349 |
+
$gallery_remove_tables = get_option("gallery-bank-remove-tables-uninstall");
|
350 |
+
if($gallery_remove_tables == "")
|
351 |
+
{
|
352 |
+
update_option("gallery-bank-remove-tables-uninstall","0");
|
353 |
+
}
|
354 |
}
|
355 |
?>
|
lib/uninstall-script.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
-
global $wpdb,$current_user;
|
4 |
-
if (!is_user_logged_in()) {
|
5 |
-
return;
|
6 |
-
}
|
7 |
-
|
8 |
-
$sql = "DROP TABLE " . gallery_bank_albums();
|
9 |
-
$wpdb->query($sql);
|
10 |
-
|
11 |
-
$sql = "DROP TABLE " . gallery_bank_pics();
|
12 |
-
$wpdb->query($sql);
|
13 |
-
|
14 |
-
$sql = "DROP TABLE " . gallery_bank_settings();
|
15 |
-
$wpdb->query($sql);
|
16 |
-
|
17 |
-
delete_option("gallery-bank-pro-edition");
|
18 |
-
delete_option("allow_tracking_gb");
|
19 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,18 +1,16 @@
|
|
1 |
-
=== Responsive Photo Gallery by Gallery Bank
|
2 |
Contributors: Gallery-Bank, contact-banker
|
3 |
-
Tags:
|
4 |
Requires at least: 3.4
|
5 |
-
Tested up to: 4.
|
6 |
Stable Tag: trunk
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
10 |
-
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
Gallery Bank is a fully responsive WordPress gallery plugin with advanced functionality.
|
15 |
-
|
16 |
**Gallery Bank** is a WordPress Gallery Plugin designed to create Elegant and Beautiful **Photo Gallery Albums** along with Images and videos using Grid Albums, List Albums, Individual Albums, Masonry Layouts and Thumbnail Layouts along with Special Effects and Animation Effects.
|
17 |
|
18 |
**Gallery Bank** is the only available WordPress Plugin in the market with extra-ordinary features. It is loaded with 200+ features and creates stunning Photo Galleries on any WordPress site.
|
@@ -21,52 +19,52 @@ Gallery Bank is a fully responsive WordPress gallery plugin with advanced functi
|
|
21 |
|
22 |
Gallery Bank Regularly updates and simplicity of usage along with efficient functionality makes it a perfect choice for your wordpress site to have stunning look. There are also Premium Editions of the plugin with more useful features available.
|
23 |
|
24 |
-
> #### **Live Demos - Gallery Bank**
|
25 |
-
|
26 |
-
> * [Gallery Bank - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/)
|
27 |
-
> * [Gallery Bank Demos - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/)
|
28 |
-
> * [Demo Using Masonry Layout in Individual Images - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-masonry-layout/)
|
29 |
-
> * [Demo Using Masonry Layout in Individual Videos - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-videos-with-title-using-masonry-layout/)
|
30 |
-
> * [Demo Using Masonry Layout in Individual Album - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-album-with-title-masonry-layout/)
|
31 |
-
> * [Demo Using Masonry Layout with Albums in Grid Format - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-grid-format-with-title-masonry-layout/)
|
32 |
-
> * [Demo Using Masonry Layout with Albums in List Format - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-list-format-with-title-masonry-layout/)
|
33 |
-
> * [Demo Using Masonry Layout with Animation Effects - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-pulse-effect-masonry-layout/)
|
34 |
-
> * [Demo Using Masonry Layout with Different Lightboxes - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-foo-box-masonry-layout/)
|
35 |
-
> * [Demo Using Masonry Layout with Filters - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-filters-masonry-layout/)
|
36 |
-
> * [Demo Using Thumbnail Layout in Individual Images - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-thumbnail-layout/)
|
37 |
-
> * [Demo Using Thumbnail Layout in Individual Videos - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-videos-with-title-using-thumbnail-layout/)
|
38 |
-
> * [Demo Using Thumbnail Layout in Individual Album - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-album-with-title-thumbnails-layout/)
|
39 |
-
> * [Demo Using Thumbnail Layout with Albums in Grid Format - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-grid-format-with-title-thumbnails-layout/)
|
40 |
-
> * [Demo Using Thumbnail Layout with Albums in List Format - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-list-format-with-title-thumbnails-layout/)
|
41 |
-
> * [Demo Using Thumbnail Layout with Animation Effects - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-pulse-effect-thumbnail-layout/)
|
42 |
-
> * [Demo Using Thumbnail Layout with Different Lightboxes - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/vindividual-images-with-title-using-foo-box-thumbnail-layout/)
|
43 |
-
> * [Demo Using Thumbnail Layout with Filters - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-with-filters-thumbnail-layout/)
|
44 |
-
> * [Demo Using Thumbnail Layout with Pagination - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-with-pagination-thumbnail-layout/)
|
45 |
-
> * [Demo Using Thumbnail Layout with Special Effects - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-without-title-and-description-using-lomo-effect-thumbnail-layout/)
|
46 |
-
> * [Demo Using Filmstrip Layout in Individual Images - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-filmstrip-layout/)
|
47 |
-
> * [Demo Using Filmstrip Layout in Individual Videos - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-videos-with-title-using-filmstrip-layout/)
|
48 |
-
> * [Demo Using Filmstrip Layout in Individual Album - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-album-with-title-filmstrip-layout/)
|
49 |
-
> * [Demo Using Filmstrip Layout with Albums in Grid Format - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-grid-format-with-title-filmstrip-layout/)
|
50 |
-
> * [Demo Using Filmstrip Layout with Albums in List Format - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-list-format-with-title-filmstrip-layout/)
|
51 |
-
> * [Demo Using Filmstrip Layout with Animation Effects - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-slide-in-down-effect-filmstrip-layout/)
|
52 |
-
> * [Demo Using Slideshow Layout in Individual Videos - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-videos-with-title-using-slideshow-layout/)
|
53 |
-
> * [Demo Using Slideshow Layout in Individual Album - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-album-with-title-slideshow-layout/)
|
54 |
-
> * [Demo Using Slideshow Layout with Albums in Grid Format - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-grid-format-with-title-slideshow-layout/)
|
55 |
-
> * [Demo Using Slideshow Layout with Albums in List Format - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-list-format-with-title-slideshow-layout/)
|
56 |
-
> * [Demo Using Blog Style Layout in Individual Images - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-blog-style-layout/)
|
57 |
-
> * [Demo Using Blog Style Layout in Individual Videos - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-videos-with-title-using-blog-layout/)
|
58 |
-
> * [Demo Using Blog Style Layout in Individual Album - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-album-with-title-blog-style-layout/)
|
59 |
-
> * [Demo Using Blog Style Layout with Albums in Grid Format - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-grid-format-with-title-blog-style-layout/)
|
60 |
-
> * [Demo Using Blog Style Layout with Albums in List Format - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-list-format-with-title-blog-style-layout/)
|
61 |
-
> * [Demo Using Blog Style Layout with Animation Effects - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-slide-in-right-blog-style-layout/)
|
62 |
-
> * [Demo Using Blog Style Layout with Different Lightboxes - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-pretty-photo-blog-style-layout/)
|
63 |
-
> * [Demo Using Blog Style Layout with Filters - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-with-filters-blog-style-layout/)
|
64 |
-
> * [Demo Using Blog Style Layout with Pagination - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-pagination-blog-style-layout/)
|
65 |
-
> * [Demo Using Blog Style Layout with Special Effects - Photo Gallery Plugin](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-grayscale-effect-blog-style-layout/)
|
66 |
-
|
67 |
[vimeo https://vimeo.com/92378296]
|
68 |
|
69 |
-
**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
**[Knowledge Base](http://tech-banker.com/products/wp-gallery-bank/knowledge-base/)**
|
72 |
|
@@ -75,16 +73,16 @@ Gallery Bank Regularly updates and simplicity of usage along with efficient func
|
|
75 |
**[Like & Support Us on Facebook](https://www.facebook.com/TechBanker/)**
|
76 |
|
77 |
= **Key Features in Gallery Bank Lite Edition** =
|
78 |
-
|
79 |
* Multi-Lingual. Available now in 36 Languages.
|
80 |
* Responsive Photo Gallery
|
81 |
-
*
|
82 |
* Unlimited Albums Creation(Premium Versions). With Free Standard Version, you can only create upto 3 albums.
|
83 |
* Unlimited Images in each Album.
|
84 |
-
* Edit Albums and add/
|
85 |
* Bulk Upload of Images
|
86 |
* Url Redirect to redirect on click of an image.
|
87 |
-
* Upload Videos from Youtube,
|
88 |
* Set Cover Image
|
89 |
* Compact Albums
|
90 |
* Extended Albums
|
@@ -97,47 +95,47 @@ Gallery Bank Regularly updates and simplicity of usage along with efficient func
|
|
97 |
|
98 |
Take your media to the next level with [Gallery Bank Premium Editions](http://tech-banker.com/products/wp-gallery-bank/), which gives you 200+ features such as:
|
99 |
|
100 |
-
* Unlimited Albums Creation
|
101 |
* Filmstrip Gallery Format
|
102 |
* Slideshow Gallery
|
103 |
* Special Effects on Images & Albums
|
104 |
* Animation Effects on Images & Albums
|
105 |
* Bulk Deletion of Images
|
106 |
-
* Fully CSS3 compliant with text shadowing, box shadowing, gradients, etc
|
107 |
* Sorting of Images
|
108 |
* Sorting of Albums
|
109 |
* Social Sharing
|
110 |
* Commenting on Images
|
111 |
* Widgets
|
112 |
-
* Tags for each Image to make
|
113 |
* Bulk Deletion of Albums
|
114 |
* Purging Albums and Images
|
115 |
* Restore Factory Settings
|
116 |
* Global Settings
|
117 |
* Thumbnail Settings
|
118 |
* Album Settings
|
119 |
-
*
|
120 |
-
* Different
|
121 |
* Pagination
|
122 |
* Filter Settings
|
123 |
* Roles & Capabilities
|
124 |
* Front End Layout Settings
|
125 |
* See your media on different theme and more.
|
126 |
-
*
|
127 |
* 24/7 Technical Support
|
128 |
|
129 |
Visit [here](http://tech-banker.com/products/wp-gallery-bank/) to upgrade to Pro Editions now.
|
130 |
|
131 |
= Add New Albums using Gallery Bank =
|
132 |
|
133 |
-
You can add
|
134 |
|
135 |
= Editing Albums using Gallery Bank =
|
136 |
|
137 |
In albums, editing can be done easily. You can edit or add more images/ pictures in your albums. You can change title/description of an album as well as title/description of each image uploaded in a particular album.
|
138 |
|
139 |
= Sorting of Images in an Album using Gallery Bank =
|
140 |
-
|
141 |
Sorting of Images can be done in your albums. With this feature, you can change the order of pictures according to your requirement/choice.
|
142 |
|
143 |
= Sorting of Albums using Gallery Bank =
|
@@ -146,19 +144,19 @@ Sorting of Albums can be done in your albums. With this feature, you can re-arra
|
|
146 |
|
147 |
= Album Preview using Gallery Bank =
|
148 |
|
149 |
-
In album preview you can view the pictures/images on your back-end before implementing the
|
150 |
|
151 |
= Cover Image using Gallery Bank =
|
152 |
|
153 |
-
You can easily set the cover image in your album. This cover image would be used to display on your Pages/Post when using the Album
|
154 |
|
155 |
= Short Codes using Gallery Bank =
|
156 |
|
157 |
-
There is a
|
158 |
|
159 |
= Global Settings using Gallery Bank =
|
160 |
|
161 |
-
With Global Settings, you can define different settings for Thumbnails, Albums,
|
162 |
|
163 |
= Gallery Bank is now available in the following Languages =
|
164 |
|
@@ -220,25 +218,25 @@ If any problem occurs, please contact us at [support@tech-banker.com](mailto:sup
|
|
220 |
|
221 |
### Performing a new installation for Gallery Bank.
|
222 |
|
223 |
-
After downloading the ZIP file,
|
224 |
|
225 |
-
1. Log in to the administrator panel.
|
226 |
-
2. Go to Plugins Add > New > Upload.
|
227 |
-
3. Click "Choose file" ("Browse") and select the downloaded zip file.
|
228 |
|
229 |
-
**For Mac Users**
|
230 |
-
> * Go to your Downloads folder and locate the folder with the plugin.
|
231 |
-
> * Right-click on the folder and select Compress.
|
232 |
-
> * Now you have a newly created .zip file which can be installed as described here.*
|
233 |
-
> * Click "Install Now" button.
|
234 |
-
> * Click "Activate Plugin" button for activating the plugin.
|
235 |
|
236 |
== Other Notes ==
|
237 |
|
238 |
-
= Minimum requirements for Gallery Bank. =
|
239 |
-
*
|
240 |
-
* PHP 5.x
|
241 |
-
* MySQL 5.x
|
242 |
|
243 |
If any problem occurs, please contact us at [support@tech-banker.com](mailto:support@tech-banker.com).
|
244 |
|
@@ -303,7 +301,7 @@ Click on "OK" to proceed and your Album would be deleted.
|
|
303 |
|
304 |
= How to set Short code for Masonry Gallery? =
|
305 |
|
306 |
-
In order to set
|
307 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
308 |
|
309 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
@@ -319,14 +317,14 @@ Once you click on the Pages, there will be two options. Click on Add New button
|
|
319 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/masonry3-1024x451.png)
|
320 |
|
321 |
NOTE: You can set Images in Row for Masonry Gallery only if Show Responsive Gallery
|
322 |
-
option is False in
|
323 |
|
324 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/masonry4-1024x657.png)
|
325 |
|
326 |
|
327 |
= How to set Short code for Thumbnail Gallery? =
|
328 |
|
329 |
-
In order to set
|
330 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
331 |
|
332 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
@@ -342,14 +340,14 @@ Once you click on the Pages, there will be two options. Click on Add New button
|
|
342 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/thumbnail1-1024x493.png)
|
343 |
|
344 |
NOTE: You can set Images in Row for Thumbnail Gallery only if Show Responsive Gallery option
|
345 |
-
is False in
|
346 |
|
347 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/thmbnail2-1024x450.png)
|
348 |
|
349 |
|
350 |
= How to set Short code for Grid Album using Masonry Gallery? =
|
351 |
|
352 |
-
In order to set
|
353 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
354 |
|
355 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
@@ -365,14 +363,14 @@ Once you click on the Pages, there will be two options. Click on Add New button
|
|
365 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/grid_masonry1-1024x541.png)
|
366 |
|
367 |
Note: You can set Images in Row for Masonry Gallery only if Show Responsive Gallery option
|
368 |
-
is False in
|
369 |
|
370 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/grid_masonry2-1024x573.png)
|
371 |
|
372 |
|
373 |
= How to set Short code for Grid Album using Thumbnail Gallery? =
|
374 |
|
375 |
-
In order to set
|
376 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
377 |
|
378 |
Once you click on the Pages, this page would open. Click on Add New button to add a new page.
|
@@ -388,14 +386,14 @@ Once you click on the Pages, this page would open. Click on Add New button to ad
|
|
388 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/grid_thumbnail2-1024x574.png)
|
389 |
|
390 |
NOTE: You can set Images in Row for Thumbnail Gallery only if Show Responsive Gallery
|
391 |
-
option is False in
|
392 |
|
393 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/grid_thumbnail2-1024x574.png)
|
394 |
|
395 |
|
396 |
= How to set Short code for List Album using Masonry Gallery? =
|
397 |
|
398 |
-
In order to set
|
399 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
400 |
|
401 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
@@ -413,7 +411,7 @@ Once you click on the Pages, there will be two options. Click on Add New button
|
|
413 |
|
414 |
= How to set Short code for List Album using Thumbnail Gallery? =
|
415 |
|
416 |
-
In order to set
|
417 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
418 |
|
419 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
@@ -429,14 +427,14 @@ Once you click on the Pages, there will be two options. Click on Add New button
|
|
429 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/thumbnail_list_1-1024x467.png)
|
430 |
|
431 |
NOTE: You can set Images in Row for Thumbnail Gallery only if Show Responsive Gallery option
|
432 |
-
is False in
|
433 |
|
434 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/thumbnail_list_2-1024x462.png)
|
435 |
|
436 |
|
437 |
= How to set Short code for Individual Album using Masonry Gallery? =
|
438 |
|
439 |
-
In order to set
|
440 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
441 |
|
442 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
@@ -452,14 +450,14 @@ Once you click on the Pages, there will be two options. Click on Add New button
|
|
452 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/individual_masonry1-1024x495.png)
|
453 |
|
454 |
NOTE: You can set Images in Row for Masonry Gallery only if Show Responsive Gallery option
|
455 |
-
is False in
|
456 |
|
457 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/individual_masonry_2-1024x559.png)
|
458 |
|
459 |
|
460 |
= How to set Short code for Individual Album using Thumbnail Gallery? =
|
461 |
|
462 |
-
In order to set
|
463 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
464 |
|
465 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
@@ -484,29 +482,33 @@ is False in shortcode.
|
|
484 |
|
485 |
1. Gallery Bank Dashboard Page
|
486 |
2. Add New Album
|
487 |
-
3. How to create
|
488 |
-
4.
|
489 |
-
5.
|
490 |
-
6.
|
491 |
-
7.
|
492 |
-
8.
|
493 |
-
9.
|
494 |
-
10.
|
495 |
-
11.
|
496 |
12. System Status
|
497 |
13. Displaying Images using Masonry Layout.
|
498 |
14. Displaying Images using Thumbnail Layout.
|
499 |
-
15. Displaying Grid Album with Images.
|
500 |
16. Displaying List Album with Images.
|
501 |
17. Displaying Individual Album with Images.
|
502 |
|
|
|
503 |
== Changelog ==
|
504 |
|
505 |
= 3.1.37 =
|
506 |
|
507 |
-
*
|
508 |
-
*
|
509 |
-
*
|
|
|
|
|
|
|
510 |
|
511 |
= 3.1.36 =
|
512 |
|
1 |
+
=== Responsive Photo Gallery Plugin for WordPress by Gallery Bank===
|
2 |
Contributors: Gallery-Bank, contact-banker
|
3 |
+
Tags: album, gallery, image, image gallery, images, lightbox, photo, photo gallery, photos, responsive, best gallery plugin, filterable gallery, gallery bank, responsive gallery, photo gallery
|
4 |
Requires at least: 3.4
|
5 |
+
Tested up to: 4.8
|
6 |
Stable Tag: trunk
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
10 |
+
Gallery Bank is an advanced photo gallery plugin that creates beautiful image galleries and albums for wordpress websites/blogs.
|
11 |
|
12 |
== Description ==
|
13 |
|
|
|
|
|
14 |
**Gallery Bank** is a WordPress Gallery Plugin designed to create Elegant and Beautiful **Photo Gallery Albums** along with Images and videos using Grid Albums, List Albums, Individual Albums, Masonry Layouts and Thumbnail Layouts along with Special Effects and Animation Effects.
|
15 |
|
16 |
**Gallery Bank** is the only available WordPress Plugin in the market with extra-ordinary features. It is loaded with 200+ features and creates stunning Photo Galleries on any WordPress site.
|
19 |
|
20 |
Gallery Bank Regularly updates and simplicity of usage along with efficient functionality makes it a perfect choice for your wordpress site to have stunning look. There are also Premium Editions of the plugin with more useful features available.
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
[vimeo https://vimeo.com/92378296]
|
23 |
|
24 |
+
> #### **Live Demos - Gallery Bank**
|
25 |
+
|
26 |
+
> * [Gallery Bank](http://tech-banker.com/products/wp-gallery-bank/)
|
27 |
+
> * [Gallery Bank Demos](http://tech-banker.com/products/wp-gallery-bank/demo/)
|
28 |
+
> * [Demo Using Masonry Layout in Individual Images](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-masonry-layout/)
|
29 |
+
> * [Demo Using Masonry Layout in Individual Videos](http://tech-banker.com/products/wp-gallery-bank/demo/individual-videos-with-title-using-masonry-layout/)
|
30 |
+
> * [Demo Using Masonry Layout in Individual Album](http://tech-banker.com/products/wp-gallery-bank/demo/individual-album-with-title-masonry-layout/)
|
31 |
+
> * [Demo Using Masonry Layout with Albums in Grid Format](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-grid-format-with-title-masonry-layout/)
|
32 |
+
> * [Demo Using Masonry Layout with Albums in List Format](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-list-format-with-title-masonry-layout/)
|
33 |
+
> * [Demo Using Masonry Layout with Animation Effects](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-pulse-effect-masonry-layout/)
|
34 |
+
> * [Demo Using Masonry Layout with Different Lightboxes](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-foo-box-masonry-layout/)
|
35 |
+
> * [Demo Using Masonry Layout with Filters](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-filters-masonry-layout/)
|
36 |
+
> * [Demo Using Thumbnail Layout in Individual Images](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-thumbnail-layout/)
|
37 |
+
> * [Demo Using Thumbnail Layout in Individual Videos](http://tech-banker.com/products/wp-gallery-bank/demo/individual-videos-with-title-using-thumbnail-layout/)
|
38 |
+
> * [Demo Using Thumbnail Layout in Individual Album](http://tech-banker.com/products/wp-gallery-bank/demo/individual-album-with-title-thumbnails-layout/)
|
39 |
+
> * [Demo Using Thumbnail Layout with Albums in Grid Format](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-grid-format-with-title-thumbnails-layout/)
|
40 |
+
> * [Demo Using Thumbnail Layout with Albums in List Format](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-list-format-with-title-thumbnails-layout/)
|
41 |
+
> * [Demo Using Thumbnail Layout with Animation Effects](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-pulse-effect-thumbnail-layout/)
|
42 |
+
> * [Demo Using Thumbnail Layout with Different Lightboxes](http://tech-banker.com/products/wp-gallery-bank/demo/vindividual-images-with-title-using-foo-box-thumbnail-layout/)
|
43 |
+
> * [Demo Using Thumbnail Layout with Filters](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-with-filters-thumbnail-layout/)
|
44 |
+
> * [Demo Using Thumbnail Layout with Pagination](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-with-pagination-thumbnail-layout/)
|
45 |
+
> * [Demo Using Thumbnail Layout with Special Effects](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-without-title-and-description-using-lomo-effect-thumbnail-layout/)
|
46 |
+
> * [Demo Using Filmstrip Layout in Individual Images](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-filmstrip-layout/)
|
47 |
+
> * [Demo Using Filmstrip Layout in Individual Videos](http://tech-banker.com/products/wp-gallery-bank/demo/individual-videos-with-title-using-filmstrip-layout/)
|
48 |
+
> * [Demo Using Filmstrip Layout in Individual Album](http://tech-banker.com/products/wp-gallery-bank/demo/individual-album-with-title-filmstrip-layout/)
|
49 |
+
> * [Demo Using Filmstrip Layout with Albums in Grid Format](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-grid-format-with-title-filmstrip-layout/)
|
50 |
+
> * [Demo Using Filmstrip Layout with Albums in List Format](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-list-format-with-title-filmstrip-layout/)
|
51 |
+
> * [Demo Using Filmstrip Layout with Animation Effects](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-slide-in-down-effect-filmstrip-layout/)
|
52 |
+
> * [Demo Using Slideshow Layout in Individual Videos](http://tech-banker.com/products/wp-gallery-bank/demo/individual-videos-with-title-using-slideshow-layout/)
|
53 |
+
> * [Demo Using Slideshow Layout in Individual Album](http://tech-banker.com/products/wp-gallery-bank/demo/individual-album-with-title-slideshow-layout/)
|
54 |
+
> * [Demo Using Slideshow Layout with Albums in Grid Format](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-grid-format-with-title-slideshow-layout/)
|
55 |
+
> * [Demo Using Slideshow Layout with Albums in List Format](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-list-format-with-title-slideshow-layout/)
|
56 |
+
> * [Demo Using Blog Style Layout in Individual Images](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-blog-style-layout/)
|
57 |
+
> * [Demo Using Blog Style Layout in Individual Videos](http://tech-banker.com/products/wp-gallery-bank/demo/individual-videos-with-title-using-blog-layout/)
|
58 |
+
> * [Demo Using Blog Style Layout in Individual Album](http://tech-banker.com/products/wp-gallery-bank/demo/individual-album-with-title-blog-style-layout/)
|
59 |
+
> * [Demo Using Blog Style Layout with Albums in Grid Format](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-grid-format-with-title-blog-style-layout/)
|
60 |
+
> * [Demo Using Blog Style Layout with Albums in List Format](http://tech-banker.com/products/wp-gallery-bank/demo/albums-in-list-format-with-title-blog-style-layout/)
|
61 |
+
> * [Demo Using Blog Style Layout with Animation Effects](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-slide-in-right-blog-style-layout/)
|
62 |
+
> * [Demo Using Blog Style Layout with Different Lightboxes](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-pretty-photo-blog-style-layout/)
|
63 |
+
> * [Demo Using Blog Style Layout with Filters](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-with-filters-blog-style-layout/)
|
64 |
+
> * [Demo Using Blog Style Layout with Pagination](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-pagination-blog-style-layout/)
|
65 |
+
> * [Demo Using Blog Style Layout with Special Effects](http://tech-banker.com/products/wp-gallery-bank/demo/individual-images-with-title-using-grayscale-effect-blog-style-layout/)
|
66 |
+
|
67 |
+
**[Support Desk - Feel Free to ask your Queries](http://tech-banker.com/forums/forum/gallery-bank-support/)**
|
68 |
|
69 |
**[Knowledge Base](http://tech-banker.com/products/wp-gallery-bank/knowledge-base/)**
|
70 |
|
73 |
**[Like & Support Us on Facebook](https://www.facebook.com/TechBanker/)**
|
74 |
|
75 |
= **Key Features in Gallery Bank Lite Edition** =
|
76 |
+
|
77 |
* Multi-Lingual. Available now in 36 Languages.
|
78 |
* Responsive Photo Gallery
|
79 |
+
* Shortcode Wizard in your Page/Post.
|
80 |
* Unlimited Albums Creation(Premium Versions). With Free Standard Version, you can only create upto 3 albums.
|
81 |
* Unlimited Images in each Album.
|
82 |
+
* Edit Albums and add/edite/delete images.
|
83 |
* Bulk Upload of Images
|
84 |
* Url Redirect to redirect on click of an image.
|
85 |
+
* Upload Videos from Youtube,Vimeo, etc.
|
86 |
* Set Cover Image
|
87 |
* Compact Albums
|
88 |
* Extended Albums
|
95 |
|
96 |
Take your media to the next level with [Gallery Bank Premium Editions](http://tech-banker.com/products/wp-gallery-bank/), which gives you 200+ features such as:
|
97 |
|
98 |
+
* Unlimited Albums Creation
|
99 |
* Filmstrip Gallery Format
|
100 |
* Slideshow Gallery
|
101 |
* Special Effects on Images & Albums
|
102 |
* Animation Effects on Images & Albums
|
103 |
* Bulk Deletion of Images
|
104 |
+
* Fully CSS3 compliant with text shadowing, box shadowing, gradients, etc
|
105 |
* Sorting of Images
|
106 |
* Sorting of Albums
|
107 |
* Social Sharing
|
108 |
* Commenting on Images
|
109 |
* Widgets
|
110 |
+
* Tags for each Image to make Filerable Gallery Album
|
111 |
* Bulk Deletion of Albums
|
112 |
* Purging Albums and Images
|
113 |
* Restore Factory Settings
|
114 |
* Global Settings
|
115 |
* Thumbnail Settings
|
116 |
* Album Settings
|
117 |
+
* Lightbox Settings
|
118 |
+
* Different Lightboxes like FooBox, ColorBox, FancyBox2, Lightbox2, Custom GB Lightbox, Pretty Photo
|
119 |
* Pagination
|
120 |
* Filter Settings
|
121 |
* Roles & Capabilities
|
122 |
* Front End Layout Settings
|
123 |
* See your media on different theme and more.
|
124 |
+
* Powerfull control panel and Shortcode Manager make getting started super easy
|
125 |
* 24/7 Technical Support
|
126 |
|
127 |
Visit [here](http://tech-banker.com/products/wp-gallery-bank/) to upgrade to Pro Editions now.
|
128 |
|
129 |
= Add New Albums using Gallery Bank =
|
130 |
|
131 |
+
You can add upto 3 albums with unlimited images in your Gallery Bank. After that you need to upgrade to one of the Premium Editions for unlimited access with different features available according to different packages of Gallery Bank.
|
132 |
|
133 |
= Editing Albums using Gallery Bank =
|
134 |
|
135 |
In albums, editing can be done easily. You can edit or add more images/ pictures in your albums. You can change title/description of an album as well as title/description of each image uploaded in a particular album.
|
136 |
|
137 |
= Sorting of Images in an Album using Gallery Bank =
|
138 |
+
|
139 |
Sorting of Images can be done in your albums. With this feature, you can change the order of pictures according to your requirement/choice.
|
140 |
|
141 |
= Sorting of Albums using Gallery Bank =
|
144 |
|
145 |
= Album Preview using Gallery Bank =
|
146 |
|
147 |
+
In album preview you can view the pictures/images on your back-end before implementing the shortcodes on your Pages/Posts.
|
148 |
|
149 |
= Cover Image using Gallery Bank =
|
150 |
|
151 |
+
You can easily set the cover image in your album. This cover image would be used to display on your Pages/Post when using the Album shortcodes.
|
152 |
|
153 |
= Short Codes using Gallery Bank =
|
154 |
|
155 |
+
There is a Shortcode Editor availble in your Page/Post where you want to implement the Gallery Bank Shortcode. You just need to go to your Page/Post where you want to implement it and then above your Text Editor/ WP Editor, there would be a button called Gallery Bank. Once you click on it, you can generate your shortcode easily and quickly.
|
156 |
|
157 |
= Global Settings using Gallery Bank =
|
158 |
|
159 |
+
With Global Settings, you can define different settings for Thumbnails, Albums, Lightboxes, Filters, Pagination and Slideshows.
|
160 |
|
161 |
= Gallery Bank is now available in the following Languages =
|
162 |
|
218 |
|
219 |
### Performing a new installation for Gallery Bank.
|
220 |
|
221 |
+
After downloading the ZIP file,
|
222 |
|
223 |
+
1. Log in to the administrator panel.
|
224 |
+
2. Go to Plugins Add > New > Upload.
|
225 |
+
3. Click "Choose file" ("Browse") and select the downloaded zip file.
|
226 |
|
227 |
+
**For Mac Users**
|
228 |
+
> * Go to your Downloads folder and locate the folder with the plugin.
|
229 |
+
> * Right-click on the folder and select Compress.
|
230 |
+
> * Now you have a newly created .zip file which can be installed as described here.*
|
231 |
+
> * Click "Install Now" button.
|
232 |
+
> * Click "Activate Plugin" button for activating the plugin.
|
233 |
|
234 |
== Other Notes ==
|
235 |
|
236 |
+
= Minimum requirements for Gallery Bank. =
|
237 |
+
* Wordpress 3.3+
|
238 |
+
* PHP 5.x
|
239 |
+
* MySQL 5.x
|
240 |
|
241 |
If any problem occurs, please contact us at [support@tech-banker.com](mailto:support@tech-banker.com).
|
242 |
|
301 |
|
302 |
= How to set Short code for Masonry Gallery? =
|
303 |
|
304 |
+
In order to set Shortcode for Masonry Gallery, you need to follow these steps :
|
305 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
306 |
|
307 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
317 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/masonry3-1024x451.png)
|
318 |
|
319 |
NOTE: You can set Images in Row for Masonry Gallery only if Show Responsive Gallery
|
320 |
+
option is False in shortcode.
|
321 |
|
322 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/masonry4-1024x657.png)
|
323 |
|
324 |
|
325 |
= How to set Short code for Thumbnail Gallery? =
|
326 |
|
327 |
+
In order to set Shortcode for Thumbnail Gallery, you need to follow these steps :
|
328 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
329 |
|
330 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
340 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/thumbnail1-1024x493.png)
|
341 |
|
342 |
NOTE: You can set Images in Row for Thumbnail Gallery only if Show Responsive Gallery option
|
343 |
+
is False in shortcode.
|
344 |
|
345 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/thmbnail2-1024x450.png)
|
346 |
|
347 |
|
348 |
= How to set Short code for Grid Album using Masonry Gallery? =
|
349 |
|
350 |
+
In order to set Shortcode for Grid Album with Masonry Gallery, you need to follow these steps :
|
351 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
352 |
|
353 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
363 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/grid_masonry1-1024x541.png)
|
364 |
|
365 |
Note: You can set Images in Row for Masonry Gallery only if Show Responsive Gallery option
|
366 |
+
is False in shortcode.
|
367 |
|
368 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/grid_masonry2-1024x573.png)
|
369 |
|
370 |
|
371 |
= How to set Short code for Grid Album using Thumbnail Gallery? =
|
372 |
|
373 |
+
In order to set Shortcode for Grid Album with Thumbnail Gallery, you need to follow these steps :
|
374 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
375 |
|
376 |
Once you click on the Pages, this page would open. Click on Add New button to add a new page.
|
386 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/grid_thumbnail2-1024x574.png)
|
387 |
|
388 |
NOTE: You can set Images in Row for Thumbnail Gallery only if Show Responsive Gallery
|
389 |
+
option is False in shortcode.
|
390 |
|
391 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/grid_thumbnail2-1024x574.png)
|
392 |
|
393 |
|
394 |
= How to set Short code for List Album using Masonry Gallery? =
|
395 |
|
396 |
+
In order to set Shortcode for List Album with Masonry Gallery, you need to follow these steps :
|
397 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
398 |
|
399 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
411 |
|
412 |
= How to set Short code for List Album using Thumbnail Gallery? =
|
413 |
|
414 |
+
In order to set Shortcode for List Album with Thumbnail Gallery, you need to follow these steps :
|
415 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
416 |
|
417 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
427 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/thumbnail_list_1-1024x467.png)
|
428 |
|
429 |
NOTE: You can set Images in Row for Thumbnail Gallery only if Show Responsive Gallery option
|
430 |
+
is False in shortcode.
|
431 |
|
432 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/thumbnail_list_2-1024x462.png)
|
433 |
|
434 |
|
435 |
= How to set Short code for Individual Album using Masonry Gallery? =
|
436 |
|
437 |
+
In order to set Shortcode for Individual Album with Masonry Gallery, you need to follow these steps :
|
438 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
439 |
|
440 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
450 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/individual_masonry1-1024x495.png)
|
451 |
|
452 |
NOTE: You can set Images in Row for Masonry Gallery only if Show Responsive Gallery option
|
453 |
+
is False in shortcode.
|
454 |
|
455 |
[Click here to view the Image](http://tech-banker.com/wp-content/uploads/2013/11/individual_masonry_2-1024x559.png)
|
456 |
|
457 |
|
458 |
= How to set Short code for Individual Album using Thumbnail Gallery? =
|
459 |
|
460 |
+
In order to set Shortcode for Individual Album with Thumbnail Gallery, you need to follow these steps :
|
461 |
1) Locate Pages Menu on the left side of WordPress Dashboard Menus and then click on Pages.
|
462 |
|
463 |
Once you click on the Pages, there will be two options. Click on Add New button to add a new page.
|
482 |
|
483 |
1. Gallery Bank Dashboard Page
|
484 |
2. Add New Album
|
485 |
+
3. How to create Shortcode using Shortcode Editor.
|
486 |
+
4. ShortCode Implementation for Images using Masonry Layout.
|
487 |
+
5. ShortCode Implementation for Images using Thumbnails Layout.
|
488 |
+
6. ShortCode Implementation for Grid Albums using Masonry Layout.
|
489 |
+
7. ShortCode Implementation for Grid Albums using Thumbnail Layout.
|
490 |
+
8. ShortCode Implementation for List Albums using Masonry Layout.
|
491 |
+
9. ShortCode Implementation for List Albums using Thumbnail Layout.
|
492 |
+
10. ShortCode Implementation for Individual Albums using Masonry Layout.
|
493 |
+
11. ShortCode Implementation for Individual Albums using Thumbnail Layout.
|
494 |
12. System Status
|
495 |
13. Displaying Images using Masonry Layout.
|
496 |
14. Displaying Images using Thumbnail Layout.
|
497 |
+
15. Displaying Grid Album with Images.
|
498 |
16. Displaying List Album with Images.
|
499 |
17. Displaying Individual Album with Images.
|
500 |
|
501 |
+
|
502 |
== Changelog ==
|
503 |
|
504 |
= 3.1.37 =
|
505 |
|
506 |
+
* FIX: Proper Sanitization, Escaping, Validation of all Post Calls
|
507 |
+
* FIX: Removal of all function_exists, class_exists, typeof from all the files.
|
508 |
+
* FIX: Uninstall File moved to root folder and changes done as per wordpress guidelines.
|
509 |
+
* FIX: Error Reporting in file Removed
|
510 |
+
* FIX: Auto Updates Removed
|
511 |
+
* FIX: Curl Calls Removed
|
512 |
|
513 |
= 3.1.36 =
|
514 |
|
uninstall.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!defined('WP_UNINSTALL_PLUGIN')) {
|
3 |
+
die;
|
4 |
+
}
|
5 |
+
if (!current_user_can("manage_options")) {
|
6 |
+
return;
|
7 |
+
} else {
|
8 |
+
global $wpdb,$current_user;
|
9 |
+
$gallery_bank_remove_table_uninstall = get_option("gallery-bank-remove-tables-uninstall");
|
10 |
+
if($gallery_bank_remove_table_uninstall == "1")
|
11 |
+
{
|
12 |
+
$wpdb->query("DROP TABLE IF EXISTS " .$wpdb->prefix ."gallery_albums");
|
13 |
+
$wpdb->query("DROP TABLE IF EXISTS " .$wpdb->prefix ."gallery_pics");
|
14 |
+
$wpdb->query("DROP TABLE IF EXISTS " .$wpdb->prefix ."gallery_settings");
|
15 |
+
|
16 |
+
delete_option("gallery-bank-wizard");
|
17 |
+
delete_option("gallery-bank-demo");
|
18 |
+
delete_option("gallery-bank-pro-edition");
|
19 |
+
delete_option("gallery-bank-remove-tables-uninstall");
|
20 |
+
|
21 |
+
}
|
22 |
+
}
|
23 |
+
?>
|
views/album-sorting.php
CHANGED
@@ -82,29 +82,29 @@ if(isset($album))
|
|
82 |
$setting_keys = array();
|
83 |
for ($flag = 0; $flag < count($album_css); $flag++)
|
84 |
{
|
85 |
-
array_push($setting_keys, $album_css[$flag]->setting_key);
|
86 |
}
|
87 |
$index = array_search("cover_thumbnail_width", $setting_keys);
|
88 |
-
$cover_thumbnail_width = $album_css[$index]->setting_value;
|
89 |
|
90 |
$index = array_search("cover_thumbnail_height", $setting_keys);
|
91 |
-
$cover_thumbnail_height = $album_css[$index]->setting_value;
|
92 |
|
93 |
$index = array_search("cover_thumbnail_opacity", $setting_keys);
|
94 |
-
$cover_thumbnail_opacity = $album_css[$index]->setting_value;
|
95 |
|
96 |
$index = array_search("cover_thumbnail_border_size", $setting_keys);
|
97 |
-
$cover_thumbnail_border_size = $album_css[$index]->setting_value;
|
98 |
$new_cover_width = $cover_thumbnail_width + ($cover_thumbnail_border_size * 4);
|
99 |
|
100 |
$index = array_search("cover_thumbnail_border_radius", $setting_keys);
|
101 |
-
$cover_thumbnail_border_radius = $album_css[$index]->setting_value;
|
102 |
|
103 |
$index = array_search("cover_thumbnail_border_color", $setting_keys);
|
104 |
-
$cover_thumbnail_border_color = $album_css[$index]->setting_value;
|
105 |
|
106 |
$index = array_search("margin_btw_cover_thumbnails", $setting_keys);
|
107 |
-
$margin_btw_cover_thumbnails = $album_css[$index]->setting_value;
|
108 |
|
109 |
?>
|
110 |
<!--suppress ALL -->
|
@@ -214,7 +214,7 @@ if(isset($album))
|
|
214 |
$wpdb->prepare
|
215 |
(
|
216 |
"SELECT album_cover,thumbnail_url,video FROM " . gallery_bank_pics() . " WHERE album_cover=1 and album_id = %d",
|
217 |
-
$album[$flag]->album_id
|
218 |
)
|
219 |
);
|
220 |
?>
|
@@ -224,18 +224,18 @@ if(isset($album))
|
|
224 |
if (count($albumCover) != 0) {
|
225 |
if ($albumCover->album_cover == 0) {
|
226 |
?>
|
227 |
-
<img id="albumOrder_<?php echo $album[$flag]->album_id; ?>"
|
228 |
src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>"/>
|
229 |
<?php
|
230 |
} else {
|
231 |
?>
|
232 |
-
<img id="albumOrder_<?php echo $album[$flag]->album_id; ?>"
|
233 |
src="<?php echo stripcslashes(GALLERY_BK_ALBUM_THUMB_URL . $albumCover->thumbnail_url); ?>"/>
|
234 |
<?php
|
235 |
}
|
236 |
} else {
|
237 |
?>
|
238 |
-
<img id="sortOrder_<?php echo $album[$flag]->album_id; ?>"
|
239 |
src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>"/>
|
240 |
<?php
|
241 |
}
|
82 |
$setting_keys = array();
|
83 |
for ($flag = 0; $flag < count($album_css); $flag++)
|
84 |
{
|
85 |
+
array_push($setting_keys, esc_attr($album_css[$flag]->setting_key));
|
86 |
}
|
87 |
$index = array_search("cover_thumbnail_width", $setting_keys);
|
88 |
+
$cover_thumbnail_width = intval($album_css[$index]->setting_value);
|
89 |
|
90 |
$index = array_search("cover_thumbnail_height", $setting_keys);
|
91 |
+
$cover_thumbnail_height = intval($album_css[$index]->setting_value);
|
92 |
|
93 |
$index = array_search("cover_thumbnail_opacity", $setting_keys);
|
94 |
+
$cover_thumbnail_opacity = intval($album_css[$index]->setting_value);
|
95 |
|
96 |
$index = array_search("cover_thumbnail_border_size", $setting_keys);
|
97 |
+
$cover_thumbnail_border_size = intval($album_css[$index]->setting_value);
|
98 |
$new_cover_width = $cover_thumbnail_width + ($cover_thumbnail_border_size * 4);
|
99 |
|
100 |
$index = array_search("cover_thumbnail_border_radius", $setting_keys);
|
101 |
+
$cover_thumbnail_border_radius = intval($album_css[$index]->setting_value);
|
102 |
|
103 |
$index = array_search("cover_thumbnail_border_color", $setting_keys);
|
104 |
+
$cover_thumbnail_border_color = esc_attr($album_css[$index]->setting_value);
|
105 |
|
106 |
$index = array_search("margin_btw_cover_thumbnails", $setting_keys);
|
107 |
+
$margin_btw_cover_thumbnails = esc_attr($album_css[$index]->setting_value);
|
108 |
|
109 |
?>
|
110 |
<!--suppress ALL -->
|
214 |
$wpdb->prepare
|
215 |
(
|
216 |
"SELECT album_cover,thumbnail_url,video FROM " . gallery_bank_pics() . " WHERE album_cover=1 and album_id = %d",
|
217 |
+
intval($album[$flag]->album_id)
|
218 |
)
|
219 |
);
|
220 |
?>
|
224 |
if (count($albumCover) != 0) {
|
225 |
if ($albumCover->album_cover == 0) {
|
226 |
?>
|
227 |
+
<img id="albumOrder_<?php echo intval($album[$flag]->album_id); ?>"
|
228 |
src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>"/>
|
229 |
<?php
|
230 |
} else {
|
231 |
?>
|
232 |
+
<img id="albumOrder_<?php echo intval($album[$flag]->album_id); ?>"
|
233 |
src="<?php echo stripcslashes(GALLERY_BK_ALBUM_THUMB_URL . $albumCover->thumbnail_url); ?>"/>
|
234 |
<?php
|
235 |
}
|
236 |
} else {
|
237 |
?>
|
238 |
+
<img id="sortOrder_<?php echo intval($album[$flag]->album_id); ?>"
|
239 |
src="<?php echo stripcslashes(plugins_url("/assets/images/album-cover.png",dirname(__FILE__))); ?>"/>
|
240 |
<?php
|
241 |
}
|
views/automatic-plugin-update.php
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
-
switch($gb_role)
|
4 |
-
{
|
5 |
-
case "administrator":
|
6 |
-
$user_role_permission = "manage_options";
|
7 |
-
break;
|
8 |
-
case "editor":
|
9 |
-
$user_role_permission = "publish_pages";
|
10 |
-
break;
|
11 |
-
case "author":
|
12 |
-
$user_role_permission = "publish_posts";
|
13 |
-
break;
|
14 |
-
}
|
15 |
-
if (!current_user_can($user_role_permission))
|
16 |
-
{
|
17 |
-
return;
|
18 |
-
}
|
19 |
-
else
|
20 |
-
{
|
21 |
-
?>
|
22 |
-
<form id="frm_auto_update" class="layout-form">
|
23 |
-
<div id="poststuff" style="width: 99% !important;">
|
24 |
-
<div id="post-body" class="metabox-holder">
|
25 |
-
<div id="postbox-container-2" class="postbox-container">
|
26 |
-
<div id="advanced" class="meta-box-sortables">
|
27 |
-
<div id="gallery_bank_get_started" class="postbox" >
|
28 |
-
<h3 class="hndle"><span><?php _e("Plugin Updates", "gallery-bank"); ?></span></h3>
|
29 |
-
<div class="inside">
|
30 |
-
<div id="ux_dashboard" class="gallery_bank_layout">
|
31 |
-
<div class="layout-control-group" style="margin: 10px 0 0 0 ;">
|
32 |
-
<label class="layout-control-label"><?php _e("Plugin Updates", "gallery-bank"); ?> :</label>
|
33 |
-
<div class="layout-controls-radio">
|
34 |
-
<?php $gallery_updates = get_option("gallery-bank-automatic_update");?>
|
35 |
-
<input type="radio" name="ux_gallery_update" id="ux_enable_update" onclick="gallery_bank_autoupdate(this);" <?php echo $gallery_updates == "1" ? "checked=\"checked\"" : "";?> value="1"><label style="vertical-align: baseline;"><?php _e("Enable", "gallery-bank"); ?></label>
|
36 |
-
<input type="radio" name="ux_gallery_update" id="ux_disable_update" onclick="gallery_bank_autoupdate(this);" <?php echo $gallery_updates == "0" ? "checked=\"checked\"" : "";?> style="margin-left: 10px;" value="0"><label style="vertical-align: baseline;"><?php _e("Disable", "gallery-bank"); ?></label>
|
37 |
-
</div>
|
38 |
-
</div>
|
39 |
-
<div class="layout-control-group" style="margin:10px 0 10px 0 ;">
|
40 |
-
<strong><i>This feature allows the plugin to update itself automatically when a new version is available on WordPress Repository.<br/>This allows to stay updated to the latest features. If you would like to disable automatic updates, choose the disable option above.</i></strong>
|
41 |
-
</div>
|
42 |
-
</div>
|
43 |
-
</div>
|
44 |
-
</div>
|
45 |
-
</div>
|
46 |
-
</div>
|
47 |
-
</div>
|
48 |
-
</div>
|
49 |
-
</form>
|
50 |
-
<script type="text/javascript">
|
51 |
-
function gallery_bank_autoupdate(control)
|
52 |
-
{
|
53 |
-
var gallery_updates = jQuery(control).val();
|
54 |
-
jQuery.post(ajaxurl, "gallery_updates="+gallery_updates+"¶m=gallery_plugin_updates&action=add_new_album_library", function(data)
|
55 |
-
{
|
56 |
-
});
|
57 |
-
}
|
58 |
-
|
59 |
-
</script>
|
60 |
-
<?php
|
61 |
-
}
|
62 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/dashboard.php
CHANGED
@@ -22,90 +22,87 @@
|
|
22 |
if($show_gallery_demo == "")
|
23 |
{
|
24 |
/******************************************Code for Thumbnails Creation**********************/
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
$thumbnail_image_path = GALLERY_MAIN_THUMB_DIR . preg_replace('{\\.[^\\.]+$}', '.'.$type[1], $temp_image_name);
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
$thumbnail_image_path = GALLERY_MAIN_ALB_THUMB_DIR . preg_replace("{\\.[^\\.]+$}", ".".$type[1], $temp_image_name);
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
/****************************** COMMON FUNCTION TO GENERATE THUMBNAILS********************************/
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
switch ($source_image_type) {
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
|
93 |
-
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
/******************************************End of Code for Thumbnails Creation **********************/
|
110 |
$total_albums = $wpdb->get_var
|
111 |
(
|
@@ -212,25 +209,25 @@
|
|
212 |
$setting_keys= array();
|
213 |
for($flag=0;$flag<count($album_css);$flag++)
|
214 |
{
|
215 |
-
array_push($setting_keys
|
216 |
}
|
217 |
$index = array_search("cover_thumbnail_width", $setting_keys);
|
218 |
-
$cover_thumbnail_width = $album_css[$index]->setting_value;
|
219 |
|
220 |
$index = array_search("cover_thumbnail_height", $setting_keys);
|
221 |
-
$cover_thumbnail_height = $album_css[$index]->setting_value;
|
222 |
|
223 |
$index = array_search("cover_thumbnail_opacity", $setting_keys);
|
224 |
-
$cover_thumbnail_opacity = $album_css[$index]->setting_value;
|
225 |
|
226 |
$index = array_search("cover_thumbnail_border_size", $setting_keys);
|
227 |
-
$cover_thumbnail_border_size = $album_css[$index]->setting_value;
|
228 |
|
229 |
$index = array_search("cover_thumbnail_border_radius", $setting_keys);
|
230 |
-
$cover_thumbnail_border_radius = $album_css[$index]->setting_value;
|
231 |
|
232 |
$index = array_search("cover_thumbnail_border_color", $setting_keys);
|
233 |
-
$cover_thumbnail_border_color = $album_css[$index]->setting_value;
|
234 |
}
|
235 |
|
236 |
?>
|
@@ -349,7 +346,7 @@
|
|
349 |
$wpdb->prepare
|
350 |
(
|
351 |
"SELECT count(".gallery_bank_albums().".album_id) FROM ".gallery_bank_albums()." join ".gallery_bank_pics()." on ".gallery_bank_albums().".album_id = ".gallery_bank_pics().".album_id where ".gallery_bank_albums().".album_id = %d ",
|
352 |
-
$album[$flag]->album_id
|
353 |
)
|
354 |
);
|
355 |
$albumCover = $wpdb->get_row
|
@@ -357,7 +354,7 @@
|
|
357 |
$wpdb->prepare
|
358 |
(
|
359 |
"SELECT album_cover,thumbnail_url,video FROM ".gallery_bank_pics()." WHERE album_cover=1 and album_id = %d",
|
360 |
-
$album[$flag]->album_id
|
361 |
)
|
362 |
);
|
363 |
?>
|
@@ -400,17 +397,17 @@
|
|
400 |
<td>
|
401 |
<ul class="layout-table-controls">
|
402 |
<li>
|
403 |
-
<a href="admin.php?page=save_album&album_id=<?php echo $album[$flag]->album_id;?>" class="btn hovertip" data-original-title="<?php _e( "Edit Album", "gallery-bank" ); ?>">
|
404 |
<i class="icon-custom-pencil" ></i>
|
405 |
</a>
|
406 |
</li>
|
407 |
<li>
|
408 |
-
<a href="admin.php?page=images_sorting&album_id=<?php echo $album[$flag]->album_id;?>&row=3" class="btn hovertip" data-original-title="<?php _e( "Re-Order Images", "gallery-bank" ); ?>">
|
409 |
<i class="icon-custom-grid"></i>
|
410 |
</a>
|
411 |
</li>
|
412 |
<li>
|
413 |
-
<a href="admin.php?page=album_preview&album_id=<?php echo $album[$flag]->album_id;?>" class="btn hovertip" data-original-title="<?php _e( "Preview Album", "gallery-bank" ); ?>">
|
414 |
<i class="icon-custom-eye"></i>
|
415 |
</a>
|
416 |
</li>
|
22 |
if($show_gallery_demo == "")
|
23 |
{
|
24 |
/******************************************Code for Thumbnails Creation**********************/
|
25 |
+
|
26 |
+
function uploading_gallery_image($image, $width, $height)
|
27 |
+
{
|
28 |
+
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
29 |
+
$temp_image_name = $image;
|
30 |
+
list(, , $temp_image_type) = getimagesize($temp_image_path);
|
31 |
+
if ($temp_image_type === NULL) {
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
$uploaded_image_path = GALLERY_MAIN_UPLOAD_DIR . $temp_image_name;
|
35 |
+
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
36 |
+
$type = explode(".", $image);
|
37 |
+
$thumbnail_image_path = GALLERY_MAIN_THUMB_DIR . preg_replace('{\\.[^\\.]+$}', '.'.$type[1], $temp_image_name);
|
|
|
38 |
|
39 |
+
$result = generating_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
40 |
+
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
function uploading_gallery_album($album_image, $width, $height)
|
45 |
+
{
|
46 |
+
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
47 |
+
$temp_image_name = $album_image;
|
48 |
+
list(, , $temp_image_type) = getimagesize($temp_image_path);
|
49 |
+
if ($temp_image_type === NULL) {
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
$uploaded_image_path = GALLERY_MAIN_UPLOAD_DIR . $temp_image_name;
|
53 |
+
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
54 |
+
$type = explode(".", $album_image);
|
55 |
+
$thumbnail_image_path = GALLERY_MAIN_ALB_THUMB_DIR . preg_replace("{\\.[^\\.]+$}", ".".$type[1], $temp_image_name);
|
|
|
56 |
|
57 |
+
$result = generating_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
58 |
+
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
59 |
+
}
|
60 |
+
|
61 |
/****************************** COMMON FUNCTION TO GENERATE THUMBNAILS********************************/
|
62 |
+
|
63 |
+
function generating_gallery_thumbnail($source_image_path, $thumbnail_image_path, $imageWidth, $imageHeight)
|
64 |
+
{
|
65 |
+
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path);
|
66 |
+
$source_gd_image = false;
|
67 |
+
switch ($source_image_type) {
|
|
|
68 |
|
69 |
+
case IMAGETYPE_GIF:
|
70 |
+
$source_gd_image = imagecreatefromgif($source_image_path);
|
71 |
+
break;
|
72 |
+
case IMAGETYPE_JPEG:
|
73 |
+
$source_gd_image = imagecreatefromjpeg($source_image_path);
|
74 |
+
break;
|
75 |
+
case IMAGETYPE_PNG:
|
76 |
+
$source_gd_image = imagecreatefrompng($source_image_path);
|
77 |
+
break;
|
78 |
+
}
|
79 |
+
if ($source_gd_image === false) {
|
80 |
+
return false;
|
81 |
+
}
|
82 |
+
$source_aspect_ratio = $source_image_width / $source_image_height;
|
83 |
+
if ($source_image_width > $source_image_height) {
|
84 |
+
(int)$real_height = $imageHeight;
|
85 |
+
(int)$real_width = $imageHeight * $source_aspect_ratio;
|
86 |
+
} else if ($source_image_height > $source_image_width) {
|
87 |
+
(int)$real_height = $imageWidth / $source_aspect_ratio;
|
88 |
+
(int)$real_width = $imageWidth;
|
89 |
|
90 |
+
} else {
|
91 |
|
92 |
+
(int)$real_height = $imageHeight > $imageWidth ? $imageHeight : $imageWidth;
|
93 |
+
(int)$real_width = $imageWidth > $imageHeight ? $imageWidth : $imageHeight;
|
94 |
+
}
|
95 |
+
$thumbnail_gd_image = imagecreatetruecolor($real_width, $real_height);
|
96 |
+
$bg_color = imagecolorallocate($thumbnail_gd_image, 255, 255, 255);
|
97 |
+
imagefilledrectangle($thumbnail_gd_image, 0, 0, $real_width, $real_height, $bg_color);
|
98 |
+
imagecopyresampled($thumbnail_gd_image, $source_gd_image, 0, 0, 0, 0, $real_width, $real_height, $source_image_width, $source_image_height);
|
99 |
|
100 |
+
imagejpeg($thumbnail_gd_image, $thumbnail_image_path, 100);
|
101 |
+
imagedestroy($source_gd_image);
|
102 |
+
imagedestroy($thumbnail_gd_image);
|
103 |
+
return true;
|
104 |
+
}
|
105 |
+
|
106 |
/******************************************End of Code for Thumbnails Creation **********************/
|
107 |
$total_albums = $wpdb->get_var
|
108 |
(
|
209 |
$setting_keys= array();
|
210 |
for($flag=0;$flag<count($album_css);$flag++)
|
211 |
{
|
212 |
+
array_push($setting_keys,esc_attr($album_css[$flag]->setting_key));
|
213 |
}
|
214 |
$index = array_search("cover_thumbnail_width", $setting_keys);
|
215 |
+
$cover_thumbnail_width = intval($album_css[$index]->setting_value);
|
216 |
|
217 |
$index = array_search("cover_thumbnail_height", $setting_keys);
|
218 |
+
$cover_thumbnail_height = intval($album_css[$index]->setting_value);
|
219 |
|
220 |
$index = array_search("cover_thumbnail_opacity", $setting_keys);
|
221 |
+
$cover_thumbnail_opacity = intval($album_css[$index]->setting_value);
|
222 |
|
223 |
$index = array_search("cover_thumbnail_border_size", $setting_keys);
|
224 |
+
$cover_thumbnail_border_size = intval($album_css[$index]->setting_value);
|
225 |
|
226 |
$index = array_search("cover_thumbnail_border_radius", $setting_keys);
|
227 |
+
$cover_thumbnail_border_radius = intval($album_css[$index]->setting_value);
|
228 |
|
229 |
$index = array_search("cover_thumbnail_border_color", $setting_keys);
|
230 |
+
$cover_thumbnail_border_color = esc_attr($album_css[$index]->setting_value);
|
231 |
}
|
232 |
|
233 |
?>
|
346 |
$wpdb->prepare
|
347 |
(
|
348 |
"SELECT count(".gallery_bank_albums().".album_id) FROM ".gallery_bank_albums()." join ".gallery_bank_pics()." on ".gallery_bank_albums().".album_id = ".gallery_bank_pics().".album_id where ".gallery_bank_albums().".album_id = %d ",
|
349 |
+
intval($album[$flag]->album_id)
|
350 |
)
|
351 |
);
|
352 |
$albumCover = $wpdb->get_row
|
354 |
$wpdb->prepare
|
355 |
(
|
356 |
"SELECT album_cover,thumbnail_url,video FROM ".gallery_bank_pics()." WHERE album_cover=1 and album_id = %d",
|
357 |
+
intval($album[$flag]->album_id)
|
358 |
)
|
359 |
);
|
360 |
?>
|
397 |
<td>
|
398 |
<ul class="layout-table-controls">
|
399 |
<li>
|
400 |
+
<a href="admin.php?page=save_album&album_id=<?php echo intval($album[$flag]->album_id);?>" class="btn hovertip" data-original-title="<?php _e( "Edit Album", "gallery-bank" ); ?>">
|
401 |
<i class="icon-custom-pencil" ></i>
|
402 |
</a>
|
403 |
</li>
|
404 |
<li>
|
405 |
+
<a href="admin.php?page=images_sorting&album_id=<?php echo intval($album[$flag]->album_id);?>&row=3" class="btn hovertip" data-original-title="<?php _e( "Re-Order Images", "gallery-bank" ); ?>">
|
406 |
<i class="icon-custom-grid"></i>
|
407 |
</a>
|
408 |
</li>
|
409 |
<li>
|
410 |
+
<a href="admin.php?page=album_preview&album_id=<?php echo intval($album[$flag]->album_id);?>" class="btn hovertip" data-original-title="<?php _e( "Preview Album", "gallery-bank" ); ?>">
|
411 |
<i class="icon-custom-eye"></i>
|
412 |
</a>
|
413 |
</li>
|
views/edit-album.php
CHANGED
@@ -32,6 +32,7 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
32 |
(
|
33 |
"SELECT count(album_id) FROM ".gallery_bank_albums()
|
34 |
);
|
|
|
35 |
if($album_count < 3)
|
36 |
{
|
37 |
if($last_albums_id == 0)
|
@@ -71,7 +72,7 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
71 |
}
|
72 |
}
|
73 |
else
|
74 |
-
{
|
75 |
$album = $wpdb->get_row
|
76 |
(
|
77 |
$wpdb->prepare
|
@@ -79,7 +80,7 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
79 |
"SELECT * FROM " . gallery_bank_albums() . " where album_id = %d",
|
80 |
$album_id
|
81 |
)
|
82 |
-
);
|
83 |
}
|
84 |
$pics = $wpdb->get_results
|
85 |
(
|
@@ -103,28 +104,28 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
103 |
}
|
104 |
|
105 |
$index = array_search("thumbnails_width", $setting_keys);
|
106 |
-
$thumbnails_width = $album_css[$index]->setting_value;
|
107 |
|
108 |
$index = array_search("thumbnails_height", $setting_keys);
|
109 |
-
$thumbnails_height = $album_css[$index]->setting_value;
|
110 |
|
111 |
$index = array_search("thumbnails_opacity", $setting_keys);
|
112 |
-
$thumbnails_opacity = $album_css[$index]->setting_value;
|
113 |
|
114 |
$index = array_search("thumbnails_border_size", $setting_keys);
|
115 |
-
$thumbnails_border_size = $album_css[$index]->setting_value;
|
116 |
|
117 |
$index = array_search("thumbnails_border_radius", $setting_keys);
|
118 |
-
$thumbnails_border_radius = $album_css[$index]->setting_value;
|
119 |
|
120 |
$index = array_search("thumbnails_border_color", $setting_keys);
|
121 |
-
$thumbnails_border_color = $album_css[$index]->setting_value;
|
122 |
|
123 |
$index = array_search("cover_thumbnail_width", $setting_keys);
|
124 |
-
$cover_thumbnail_width = $album_css[$index]->setting_value;
|
125 |
|
126 |
$index = array_search("cover_thumbnail_height", $setting_keys);
|
127 |
-
$cover_thumbnail_height = $album_css[$index]->setting_value;
|
128 |
|
129 |
$video_url = plugins_url("/assets/images/video.jpg",dirname(__FILE__));
|
130 |
|
@@ -286,15 +287,15 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
286 |
|
287 |
<td>
|
288 |
<input type="checkbox" id="ux_grp_select_items" name="ux_grp_select_items"
|
289 |
-
value="<?php echo $pics[$flag]->pic_id; ?>" />
|
290 |
</td>
|
291 |
<td>
|
292 |
<a href="javascript:void(0);" title="<?php echo $pics[$flag]->pic_name; ?>">
|
293 |
-
<img imageid="<?php echo $pics[$flag]->pic_id; ?>" type="video"
|
294 |
-
imgpath="<?php echo $pics[$flag]->pic_name; ?>"
|
295 |
src="<?php echo stripcslashes($video_url); ?>" id="ux_gb_img"
|
296 |
name="ux_gb_img" width="<?php echo $thumbnails_width; ?>px;"
|
297 |
-
class="dynamic_css" picId="<?php echo $pics[$flag]->pic_id; ?>"/>
|
298 |
</a><br/>
|
299 |
<?php $dateFormat = date("F j, Y", strtotime($pics[$flag]->date)); ?>
|
300 |
<label><strong>Video</strong></label><br/><label><?php echo $dateFormat; ?></label>
|
@@ -302,8 +303,8 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
302 |
<td>
|
303 |
<input placeholder="<?php _e("Enter your Title", "gallery-bank") ?>"
|
304 |
class="layout-span12 " type="text"
|
305 |
-
name="ux_edit_video_title_<?php echo $pics[$flag]->pic_id; ?>"
|
306 |
-
id="ux_edit_video_title_<?php echo $pics[$flag]->pic_id; ?>"
|
307 |
value="<?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->title))); ?>"/>
|
308 |
<textarea placeholder=" <?php _e("Enter your Description ", "gallery-bank") ?>"
|
309 |
style="margin-top:20px" rows="5" class="layout-span12"
|
@@ -313,8 +314,8 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
313 |
<td>
|
314 |
<input placeholder="<?php _e("Enter your Tags", "gallery-bank") ?>"
|
315 |
class="layout-span12" type="text" readonly="readonly"
|
316 |
-
name="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>"
|
317 |
-
id="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>" onkeypress="return preventDot(event);"
|
318 |
value="" />
|
319 |
</td>
|
320 |
<td>
|
@@ -323,7 +324,7 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
323 |
<a class="btn hovertip " id="ux_btn_delete" style="cursor: pointer;"
|
324 |
data-original-title="<?php _e("Delete Video", "gallery-bank") ?>"
|
325 |
onclick="deleteImage(this);"
|
326 |
-
controlId="<?php echo $pics[$flag]->pic_id; ?>">
|
327 |
<i class="icon-custom-trash"></i>
|
328 |
</a>
|
329 |
</td>
|
@@ -333,31 +334,31 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
333 |
?>
|
334 |
<td>
|
335 |
<input type="checkbox" id="ux_grp_select_items" name="ux_grp_select_items"
|
336 |
-
value="<?php echo $pics[$flag]->pic_id; ?>" />
|
337 |
</td>
|
338 |
<td>
|
339 |
-
<a href="javascript:void(0);" title="<?php echo $pics[$flag]->pic_name; ?>">
|
340 |
-
<img type="image" imgpath="<?php echo $pics[$flag]->thumbnail_url; ?>"
|
341 |
src="<?php echo stripcslashes(GALLERY_BK_THUMB_SMALL_URL . $pics[$flag]->thumbnail_url); ?>"
|
342 |
-
id="ux_gb_img" imageid="<?php echo $pics[$flag]->pic_id; ?>"
|
343 |
name="ux_gb_img" class=" dynamic_css"
|
344 |
width="<?php echo $thumbnails_width ?>"/>
|
345 |
</a>
|
346 |
<br/>
|
347 |
<?php $dateFormat = date("F j, Y", strtotime($pics[$flag]->date)); ?>
|
348 |
-
<label><strong><?php echo $pics[$flag]->pic_name; ?></strong></label><br/><label><?php echo $dateFormat; ?></label><br/>
|
349 |
<?php
|
350 |
if ($pics[$flag]->album_cover == 1) {
|
351 |
?>
|
352 |
<input type="radio" style="cursor: pointer;" onclick="select_one_radio(this);" checked="checked"
|
353 |
-
id="ux_edit_rdl_cover_<?php echo $pics[$flag]->pic_id; ?>"
|
354 |
name="ux_album_cover"/>
|
355 |
<label><?php _e(" Set as Album Cover", "gallery-bank") ?></label>
|
356 |
<?php
|
357 |
} else {
|
358 |
?>
|
359 |
<input type="radio" onclick="select_one_radio(this);" style="cursor: pointer;"
|
360 |
-
id="ux_edit_rdl_cover_<?php echo $pics[$flag]->pic_id; ?>"
|
361 |
name="ux_album_cover"/>
|
362 |
<label><?php _e(" Set as Album Cover", "gallery-bank") ?></label>
|
363 |
<?php
|
@@ -367,44 +368,44 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
367 |
<td>
|
368 |
<input placeholder="<?php _e("Enter your Title", "gallery-bank") ?>"
|
369 |
class="layout-span12 " type="text"
|
370 |
-
name="ux_edit_img_title_<?php echo $pics[$flag]->pic_id; ?>"
|
371 |
-
id="ux_edit_img_title_<?php echo $pics[$flag]->pic_id; ?>"
|
372 |
value="<?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->title))); ?>"/>
|
373 |
<textarea placeholder="<?php _e("Enter your Description ", "gallery-bank") ?>"
|
374 |
style="margin-top:20px" rows="5" class="layout-span12 "
|
375 |
-
name="ux_edit_txt_desc_<?php echo $pics[$flag]->pic_id; ?>"
|
376 |
-
id="ux_edit_txt_desc_<?php echo $pics[$flag]->pic_id; ?>"><?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->description))); ?></textarea>
|
377 |
</td>
|
378 |
<td>
|
379 |
<input placeholder="<?php _e("Enter your Tags", "gallery-bank") ?>"
|
380 |
class="layout-span12 " type="text" onkeypress="return preventDot(event);"
|
381 |
-
name="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>"
|
382 |
-
id="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>" readonly="readonly"
|
383 |
value=""/>
|
384 |
</td>
|
385 |
<td>
|
386 |
<?php
|
387 |
-
if ($pics[$flag]->url == "" || $pics[$flag]->url == "undefined") {
|
388 |
$domain = "http://";
|
389 |
} else {
|
390 |
-
$domain = str_replace("http://http://", "http://", $pics[$flag]->url);
|
391 |
}
|
392 |
?>
|
393 |
<input value="<?php echo $domain; ?>" type="text"
|
394 |
-
id="ux_edit_txt_url_<?php echo $pics[$flag]->pic_id; ?>"
|
395 |
-
name="ux_edit_txt_url_<?php echo $pics[$flag]->pic_id; ?>"
|
396 |
class="layout-span12 "/>
|
397 |
</td>
|
398 |
<td>
|
399 |
<a class="btn hovertip" id="ux_btn_delete" style="cursor: pointer;"
|
400 |
data-original-title="<?php _e("Delete Image", "gallery-bank") ?>"
|
401 |
onclick="deleteImage(this);"
|
402 |
-
controlId="<?php echo $pics[$flag]->pic_id; ?>">
|
403 |
<i class="icon-custom-trash"></i>
|
404 |
</a>
|
405 |
</td>
|
406 |
<td style="visibility: hidden">
|
407 |
-
<?php echo $pics[$flag]->pic_id; ?>
|
408 |
</td>
|
409 |
<?php
|
410 |
}
|
32 |
(
|
33 |
"SELECT count(album_id) FROM ".gallery_bank_albums()
|
34 |
);
|
35 |
+
|
36 |
if($album_count < 3)
|
37 |
{
|
38 |
if($last_albums_id == 0)
|
72 |
}
|
73 |
}
|
74 |
else
|
75 |
+
{
|
76 |
$album = $wpdb->get_row
|
77 |
(
|
78 |
$wpdb->prepare
|
80 |
"SELECT * FROM " . gallery_bank_albums() . " where album_id = %d",
|
81 |
$album_id
|
82 |
)
|
83 |
+
);
|
84 |
}
|
85 |
$pics = $wpdb->get_results
|
86 |
(
|
104 |
}
|
105 |
|
106 |
$index = array_search("thumbnails_width", $setting_keys);
|
107 |
+
$thumbnails_width = intval($album_css[$index]->setting_value);
|
108 |
|
109 |
$index = array_search("thumbnails_height", $setting_keys);
|
110 |
+
$thumbnails_height = intval($album_css[$index]->setting_value);
|
111 |
|
112 |
$index = array_search("thumbnails_opacity", $setting_keys);
|
113 |
+
$thumbnails_opacity = intval($album_css[$index]->setting_value);
|
114 |
|
115 |
$index = array_search("thumbnails_border_size", $setting_keys);
|
116 |
+
$thumbnails_border_size = intval($album_css[$index]->setting_value);
|
117 |
|
118 |
$index = array_search("thumbnails_border_radius", $setting_keys);
|
119 |
+
$thumbnails_border_radius = intval($album_css[$index]->setting_value);
|
120 |
|
121 |
$index = array_search("thumbnails_border_color", $setting_keys);
|
122 |
+
$thumbnails_border_color = esc_attr($album_css[$index]->setting_value);
|
123 |
|
124 |
$index = array_search("cover_thumbnail_width", $setting_keys);
|
125 |
+
$cover_thumbnail_width = intval($album_css[$index]->setting_value);
|
126 |
|
127 |
$index = array_search("cover_thumbnail_height", $setting_keys);
|
128 |
+
$cover_thumbnail_height = intval($album_css[$index]->setting_value);
|
129 |
|
130 |
$video_url = plugins_url("/assets/images/video.jpg",dirname(__FILE__));
|
131 |
|
287 |
|
288 |
<td>
|
289 |
<input type="checkbox" id="ux_grp_select_items" name="ux_grp_select_items"
|
290 |
+
value="<?php echo intval($pics[$flag]->pic_id); ?>" />
|
291 |
</td>
|
292 |
<td>
|
293 |
<a href="javascript:void(0);" title="<?php echo $pics[$flag]->pic_name; ?>">
|
294 |
+
<img imageid="<?php echo intval($pics[$flag]->pic_id); ?>" type="video"
|
295 |
+
imgpath="<?php echo esc_html($pics[$flag]->pic_name); ?>"
|
296 |
src="<?php echo stripcslashes($video_url); ?>" id="ux_gb_img"
|
297 |
name="ux_gb_img" width="<?php echo $thumbnails_width; ?>px;"
|
298 |
+
class="dynamic_css" picId="<?php echo intval($pics[$flag]->pic_id); ?>"/>
|
299 |
</a><br/>
|
300 |
<?php $dateFormat = date("F j, Y", strtotime($pics[$flag]->date)); ?>
|
301 |
<label><strong>Video</strong></label><br/><label><?php echo $dateFormat; ?></label>
|
303 |
<td>
|
304 |
<input placeholder="<?php _e("Enter your Title", "gallery-bank") ?>"
|
305 |
class="layout-span12 " type="text"
|
306 |
+
name="ux_edit_video_title_<?php echo intval($pics[$flag]->pic_id); ?>"
|
307 |
+
id="ux_edit_video_title_<?php echo intval($pics[$flag]->pic_id); ?>"
|
308 |
value="<?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->title))); ?>"/>
|
309 |
<textarea placeholder=" <?php _e("Enter your Description ", "gallery-bank") ?>"
|
310 |
style="margin-top:20px" rows="5" class="layout-span12"
|
314 |
<td>
|
315 |
<input placeholder="<?php _e("Enter your Tags", "gallery-bank") ?>"
|
316 |
class="layout-span12" type="text" readonly="readonly"
|
317 |
+
name="ux_edit_txt_tags_<?php echo intval($pics[$flag]->pic_id); ?>"
|
318 |
+
id="ux_edit_txt_tags_<?php echo intval($pics[$flag]->pic_id); ?>" onkeypress="return preventDot(event);"
|
319 |
value="" />
|
320 |
</td>
|
321 |
<td>
|
324 |
<a class="btn hovertip " id="ux_btn_delete" style="cursor: pointer;"
|
325 |
data-original-title="<?php _e("Delete Video", "gallery-bank") ?>"
|
326 |
onclick="deleteImage(this);"
|
327 |
+
controlId="<?php echo intval($pics[$flag]->pic_id); ?>">
|
328 |
<i class="icon-custom-trash"></i>
|
329 |
</a>
|
330 |
</td>
|
334 |
?>
|
335 |
<td>
|
336 |
<input type="checkbox" id="ux_grp_select_items" name="ux_grp_select_items"
|
337 |
+
value="<?php echo intval($pics[$flag]->pic_id); ?>" />
|
338 |
</td>
|
339 |
<td>
|
340 |
+
<a href="javascript:void(0);" title="<?php echo intval($pics[$flag]->pic_name); ?>">
|
341 |
+
<img type="image" imgpath="<?php echo esc_html($pics[$flag]->thumbnail_url); ?>"
|
342 |
src="<?php echo stripcslashes(GALLERY_BK_THUMB_SMALL_URL . $pics[$flag]->thumbnail_url); ?>"
|
343 |
+
id="ux_gb_img" imageid="<?php echo intval($pics[$flag]->pic_id); ?>"
|
344 |
name="ux_gb_img" class=" dynamic_css"
|
345 |
width="<?php echo $thumbnails_width ?>"/>
|
346 |
</a>
|
347 |
<br/>
|
348 |
<?php $dateFormat = date("F j, Y", strtotime($pics[$flag]->date)); ?>
|
349 |
+
<label><strong><?php echo esc_html($pics[$flag]->pic_name); ?></strong></label><br/><label><?php echo $dateFormat; ?></label><br/>
|
350 |
<?php
|
351 |
if ($pics[$flag]->album_cover == 1) {
|
352 |
?>
|
353 |
<input type="radio" style="cursor: pointer;" onclick="select_one_radio(this);" checked="checked"
|
354 |
+
id="ux_edit_rdl_cover_<?php echo intval($pics[$flag]->pic_id); ?>"
|
355 |
name="ux_album_cover"/>
|
356 |
<label><?php _e(" Set as Album Cover", "gallery-bank") ?></label>
|
357 |
<?php
|
358 |
} else {
|
359 |
?>
|
360 |
<input type="radio" onclick="select_one_radio(this);" style="cursor: pointer;"
|
361 |
+
id="ux_edit_rdl_cover_<?php echo intval($pics[$flag]->pic_id); ?>"
|
362 |
name="ux_album_cover"/>
|
363 |
<label><?php _e(" Set as Album Cover", "gallery-bank") ?></label>
|
364 |
<?php
|
368 |
<td>
|
369 |
<input placeholder="<?php _e("Enter your Title", "gallery-bank") ?>"
|
370 |
class="layout-span12 " type="text"
|
371 |
+
name="ux_edit_img_title_<?php echo intval($pics[$flag]->pic_id); ?>"
|
372 |
+
id="ux_edit_img_title_<?php echo intval($pics[$flag]->pic_id); ?>"
|
373 |
value="<?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->title))); ?>"/>
|
374 |
<textarea placeholder="<?php _e("Enter your Description ", "gallery-bank") ?>"
|
375 |
style="margin-top:20px" rows="5" class="layout-span12 "
|
376 |
+
name="ux_edit_txt_desc_<?php echo intval($pics[$flag]->pic_id); ?>"
|
377 |
+
id="ux_edit_txt_desc_<?php echo intval($pics[$flag]->pic_id); ?>"><?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->description))); ?></textarea>
|
378 |
</td>
|
379 |
<td>
|
380 |
<input placeholder="<?php _e("Enter your Tags", "gallery-bank") ?>"
|
381 |
class="layout-span12 " type="text" onkeypress="return preventDot(event);"
|
382 |
+
name="ux_edit_txt_tags_<?php echo intval($pics[$flag]->pic_id); ?>"
|
383 |
+
id="ux_edit_txt_tags_<?php echo intval($pics[$flag]->pic_id); ?>" readonly="readonly"
|
384 |
value=""/>
|
385 |
</td>
|
386 |
<td>
|
387 |
<?php
|
388 |
+
if (esc_html($pics[$flag]->url) == "" || esc_html($pics[$flag]->url) == "undefined") {
|
389 |
$domain = "http://";
|
390 |
} else {
|
391 |
+
$domain = str_replace("http://http://", "http://", esc_html($pics[$flag]->url));
|
392 |
}
|
393 |
?>
|
394 |
<input value="<?php echo $domain; ?>" type="text"
|
395 |
+
id="ux_edit_txt_url_<?php echo intval($pics[$flag]->pic_id); ?>"
|
396 |
+
name="ux_edit_txt_url_<?php echo intval($pics[$flag]->pic_id); ?>"
|
397 |
class="layout-span12 "/>
|
398 |
</td>
|
399 |
<td>
|
400 |
<a class="btn hovertip" id="ux_btn_delete" style="cursor: pointer;"
|
401 |
data-original-title="<?php _e("Delete Image", "gallery-bank") ?>"
|
402 |
onclick="deleteImage(this);"
|
403 |
+
controlId="<?php echo intval($pics[$flag]->pic_id); ?>">
|
404 |
<i class="icon-custom-trash"></i>
|
405 |
</a>
|
406 |
</td>
|
407 |
<td style="visibility: hidden">
|
408 |
+
<?php echo intval($pics[$flag]->pic_id); ?>
|
409 |
</td>
|
410 |
<?php
|
411 |
}
|
views/header.php
CHANGED
@@ -18,112 +18,103 @@ if (!current_user_can($user_role_permission))
|
|
18 |
}
|
19 |
else
|
20 |
{
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
if( ! function_exists( "memory_get_usage")) return "";
|
26 |
-
|
27 |
-
$server_memory_limit = 0;
|
28 |
-
$ini_memory_limit = gallery_convert_bytes( ini_get( "memory_limit" ) );
|
29 |
-
$php_configuration = gallery_convert_bytes( get_cfg_var( "memory_limit" ) );
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
|
35 |
-
|
|
|
|
|
36 |
|
37 |
-
|
38 |
-
$image_pixels = gallery_get_minisize() * gallery_get_minisize() * 3 / 4;
|
39 |
|
40 |
-
|
41 |
-
|
42 |
|
43 |
-
|
|
|
44 |
|
45 |
-
|
46 |
|
47 |
-
|
48 |
-
{
|
49 |
-
if ($x * $y <= $max_image_pixel) $result = true;
|
50 |
-
else $result = false;
|
51 |
-
}
|
52 |
-
else
|
53 |
-
{
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
{
|
63 |
-
$result["maxx"] = $max_x;
|
64 |
-
$result["maxy"] = $max_y;
|
65 |
-
$result["maxp"] = $max_image_pixel;
|
66 |
-
}
|
67 |
-
}
|
68 |
-
return $result;
|
69 |
-
}
|
70 |
-
}
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
?>
|
128 |
<div id="welcome-panel" class="welcome-panel" style="padding:0px !important;background-color: #f9f9f9 !important">
|
129 |
<div class="welcome-panel-content">
|
@@ -277,10 +268,10 @@ else
|
|
277 |
$page = "Recommendations";
|
278 |
break;
|
279 |
case "gallery_bank_other_services":
|
280 |
-
$page = "
|
281 |
break;
|
282 |
-
|
283 |
-
$page = "
|
284 |
break;
|
285 |
case "gallery_bank_feature_request":
|
286 |
$page = "Feature Request";
|
18 |
}
|
19 |
else
|
20 |
{
|
21 |
+
|
22 |
+
function check_server_configuration( $con = true, $x = "0", $y = "0" )
|
23 |
+
{
|
24 |
+
if( ! function_exists( "memory_get_usage")) return "";
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
$server_memory_limit = 0;
|
27 |
+
$ini_memory_limit = gallery_convert_bytes( ini_get( "memory_limit" ) );
|
28 |
+
$php_configuration = gallery_convert_bytes( get_cfg_var( "memory_limit" ) );
|
29 |
|
30 |
+
if ( $ini_memory_limit && $php_configuration ) $server_memory_limit = min( $ini_memory_limit, $php_configuration );
|
31 |
+
elseif($ini_memory_limit) $server_memory_limit = $ini_memory_limit;
|
32 |
+
else $server_memory_limit = $php_configuration;
|
33 |
|
34 |
+
if ( ! $server_memory_limit) return "";
|
|
|
35 |
|
36 |
+
$free_memory = $server_memory_limit - memory_get_usage( true );
|
37 |
+
$image_pixels = gallery_get_minisize() * gallery_get_minisize() * 3 / 4;
|
38 |
|
39 |
+
$bytes_per_pixel = $server_memory_limit / ( 1024 * 1024 );
|
40 |
+
$factor_result = "6.00" - "0.58" * ( $bytes_per_pixel / 104 );
|
41 |
|
42 |
+
$max_image_pixel = ( $free_memory / $factor_result ) - $image_pixels;
|
43 |
|
44 |
+
if ( $max_image_pixel < 0 ) return "";
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
if ( $x && $y )
|
47 |
+
{
|
48 |
+
if ($x * $y <= $max_image_pixel) $result = true;
|
49 |
+
else $result = false;
|
50 |
+
}
|
51 |
+
else
|
52 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
+
$max_x = sqrt($max_image_pixel / 12) * 4;
|
55 |
+
$max_y = sqrt($max_image_pixel / 12) * 3;
|
56 |
+
if($con)
|
57 |
+
{
|
58 |
+
$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 ));
|
59 |
+
}
|
60 |
+
else
|
61 |
+
{
|
62 |
+
$result["maxx"] = $max_x;
|
63 |
+
$result["maxy"] = $max_y;
|
64 |
+
$result["maxp"] = $max_image_pixel;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
return $result;
|
68 |
+
}
|
69 |
+
|
70 |
+
function gallery_convert_bytes($value)
|
71 |
+
{
|
72 |
+
if (is_numeric($value))
|
73 |
+
{
|
74 |
+
return max("0",$value);
|
75 |
+
}
|
76 |
+
else
|
77 |
+
{
|
78 |
+
$value_length = strlen($value);
|
79 |
+
$value_string = substr($value, 0, $value_length - 1);
|
80 |
+
$unit = strtolower(substr($value, $value_length - 1));
|
81 |
+
switch ($unit)
|
82 |
+
{
|
83 |
+
case "k":
|
84 |
+
$value_string *= 1024;
|
85 |
+
break;
|
86 |
+
case "m":
|
87 |
+
$value_string *= 1048576;
|
88 |
+
break;
|
89 |
+
case "g":
|
90 |
+
$value_string *= 1073741824;
|
91 |
+
break;
|
92 |
+
}
|
93 |
+
return max("0", $value_string);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
function gallery_get_minisize()
|
98 |
+
{
|
99 |
+
$result = "100";
|
100 |
+
$result = ceil($result / 25) * 25;
|
101 |
+
return $result;
|
102 |
+
}
|
103 |
+
|
104 |
+
function is_dir_empty($dir)
|
105 |
+
{
|
106 |
+
if (!is_readable($dir)) return NULL;
|
107 |
+
$handle = opendir($dir);
|
108 |
+
while (false !== ($entry = readdir($handle)))
|
109 |
+
{
|
110 |
+
if ($entry != "." && $entry != "..")
|
111 |
+
{
|
112 |
+
return FALSE;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
return TRUE;
|
116 |
+
}
|
117 |
+
|
118 |
?>
|
119 |
<div id="welcome-panel" class="welcome-panel" style="padding:0px !important;background-color: #f9f9f9 !important">
|
120 |
<div class="welcome-panel-content">
|
268 |
$page = "Recommendations";
|
269 |
break;
|
270 |
case "gallery_bank_other_services":
|
271 |
+
$page = "Other Settings";
|
272 |
break;
|
273 |
+
case "gallery_bank_other_setings":
|
274 |
+
$page = "Other Settings";
|
275 |
break;
|
276 |
case "gallery_bank_feature_request":
|
277 |
$page = "Feature Request";
|
views/images-sorting.php
CHANGED
@@ -124,29 +124,29 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
124 |
$setting_keys = array();
|
125 |
for ($flag = 0; $flag < count($album_css); $flag++)
|
126 |
{
|
127 |
-
array_push($setting_keys, $album_css[$flag]->setting_key);
|
128 |
}
|
129 |
$index = array_search("thumbnails_width", $setting_keys);
|
130 |
-
$thumbnails_width = $album_css[$index]->setting_value;
|
131 |
|
132 |
$index = array_search("thumbnails_height", $setting_keys);
|
133 |
-
$thumbnails_height = $album_css[$index]->setting_value;
|
134 |
|
135 |
$index = array_search("thumbnails_opacity", $setting_keys);
|
136 |
-
$thumbnails_opacity = $album_css[$index]->setting_value;
|
137 |
|
138 |
$index = array_search("thumbnails_border_size", $setting_keys);
|
139 |
-
$thumbnails_border_size = $album_css[$index]->setting_value;
|
140 |
$new_thumb_width = $thumbnails_width + ($thumbnails_border_size * 4);
|
141 |
|
142 |
$index = array_search("thumbnails_border_radius", $setting_keys);
|
143 |
-
$thumbnails_border_radius = $album_css[$index]->setting_value;
|
144 |
|
145 |
$index = array_search("thumbnails_border_color", $setting_keys);
|
146 |
-
$thumbnails_border_color = $album_css[$index]->setting_value;
|
147 |
|
148 |
$index = array_search("margin_btw_thumbnails", $setting_keys);
|
149 |
-
$margin_btw_thumbnails = $album_css[$index]->setting_value;
|
150 |
|
151 |
$video_thumb_url = plugins_url("/assets/images/video.jpg",dirname(__FILE__));
|
152 |
?>
|
@@ -263,13 +263,13 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
|
|
263 |
<?php
|
264 |
if ($pics_order[$flag]->video == 1) {
|
265 |
?>
|
266 |
-
<img id="imgOrder_<?php echo $pics_order[$flag]->pic_id; ?>"
|
267 |
src="<?php echo $video_thumb_url; ?>"/>
|
268 |
<?php
|
269 |
} else {
|
270 |
?>
|
271 |
-
<img id="imgOrder_<?php echo $pics_order[$flag]->pic_id; ?>"
|
272 |
-
src="<?php echo GALLERY_BK_THUMB_SMALL_URL . $pics_order[$flag]->thumbnail_url; ?>"/>
|
273 |
<?php
|
274 |
}
|
275 |
?>
|
124 |
$setting_keys = array();
|
125 |
for ($flag = 0; $flag < count($album_css); $flag++)
|
126 |
{
|
127 |
+
array_push($setting_keys, esc_attr($album_css[$flag]->setting_key));
|
128 |
}
|
129 |
$index = array_search("thumbnails_width", $setting_keys);
|
130 |
+
$thumbnails_width = intval($album_css[$index]->setting_value);
|
131 |
|
132 |
$index = array_search("thumbnails_height", $setting_keys);
|
133 |
+
$thumbnails_height = intval($album_css[$index]->setting_value);
|
134 |
|
135 |
$index = array_search("thumbnails_opacity", $setting_keys);
|
136 |
+
$thumbnails_opacity = intval($album_css[$index]->setting_value);
|
137 |
|
138 |
$index = array_search("thumbnails_border_size", $setting_keys);
|
139 |
+
$thumbnails_border_size = intval($album_css[$index]->setting_value);
|
140 |
$new_thumb_width = $thumbnails_width + ($thumbnails_border_size * 4);
|
141 |
|
142 |
$index = array_search("thumbnails_border_radius", $setting_keys);
|
143 |
+
$thumbnails_border_radius = intval($album_css[$index]->setting_value);
|
144 |
|
145 |
$index = array_search("thumbnails_border_color", $setting_keys);
|
146 |
+
$thumbnails_border_color = esc_attr($album_css[$index]->setting_value);
|
147 |
|
148 |
$index = array_search("margin_btw_thumbnails", $setting_keys);
|
149 |
+
$margin_btw_thumbnails = esc_attr($album_css[$index]->setting_value);
|
150 |
|
151 |
$video_thumb_url = plugins_url("/assets/images/video.jpg",dirname(__FILE__));
|
152 |
?>
|
263 |
<?php
|
264 |
if ($pics_order[$flag]->video == 1) {
|
265 |
?>
|
266 |
+
<img id="imgOrder_<?php echo intval($pics_order[$flag]->pic_id); ?>"
|
267 |
src="<?php echo $video_thumb_url; ?>"/>
|
268 |
<?php
|
269 |
} else {
|
270 |
?>
|
271 |
+
<img id="imgOrder_<?php echo intval($pics_order[$flag]->pic_id); ?>"
|
272 |
+
src="<?php echo GALLERY_BK_THUMB_SMALL_URL . esc_html($pics_order[$flag]->thumbnail_url); ?>"/>
|
273 |
<?php
|
274 |
}
|
275 |
?>
|
views/includes_common_before.php
CHANGED
@@ -57,29 +57,29 @@ else
|
|
57 |
array_push($setting_keys, $album_css[$flag]->setting_key);
|
58 |
}
|
59 |
$index = array_search("thumbnails_width", $setting_keys);
|
60 |
-
$thumbnails_width = $album_css[$index]->setting_value;
|
61 |
|
62 |
$index = array_search("thumbnails_height", $setting_keys);
|
63 |
-
$thumbnails_height = $album_css[$index]->setting_value;
|
64 |
|
65 |
$index = array_search("thumbnails_opacity", $setting_keys);
|
66 |
-
$thumbnails_opacity = $album_css[$index]->setting_value;
|
67 |
|
68 |
$index = array_search("thumbnails_border_size", $setting_keys);
|
69 |
-
$thumbnails_border_size = $album_css[$index]->setting_value;
|
70 |
|
71 |
$index = array_search("thumbnails_border_radius", $setting_keys);
|
72 |
-
$thumbnails_border_radius = $album_css[$index]->setting_value;
|
73 |
|
74 |
$index = array_search("thumbnails_border_color", $setting_keys);
|
75 |
-
$thumbnails_border_color = $album_css[$index]->setting_value;
|
76 |
|
77 |
$index = array_search("margin_btw_thumbnails", $setting_keys);
|
78 |
-
$margin_btw_thumbnails = $album_css[$index]->setting_value;
|
79 |
$newMargin = $margin_btw_thumbnails * 3;
|
80 |
|
81 |
$index = array_search("lightbox_type", $setting_keys);
|
82 |
-
$lightbox_type = $album_css[$index]->setting_value;
|
83 |
|
84 |
$index = array_search("lightbox_overlay_opacity", $setting_keys);
|
85 |
$lightbox_overlay_opacity = doubleval($album_css[$index]->setting_value);
|
@@ -91,17 +91,17 @@ else
|
|
91 |
$lightbox_overlay_border_radius = intval($album_css[$index]->setting_value);
|
92 |
|
93 |
$index = array_search("lightbox_text_color", $setting_keys);
|
94 |
-
$lightbox_text_color = $album_css[$index]->setting_value;
|
95 |
|
96 |
$index = array_search("lightbox_overlay_border_color", $setting_keys);
|
97 |
-
$lightbox_overlay_border_color = $album_css[$index]->setting_value;
|
98 |
$lightbox_border_color_value = $lightbox_overlay_border_size . "px solid " . $lightbox_overlay_border_color;
|
99 |
|
100 |
$index = array_search("lightbox_inline_bg_color", $setting_keys);
|
101 |
-
$lightbox_inline_bg_color = $album_css[$index]->setting_value;
|
102 |
|
103 |
$index = array_search("lightbox_overlay_bg_color", $setting_keys);
|
104 |
-
$lightbox_overlay_bg_color = $album_css[$index]->setting_value;
|
105 |
|
106 |
$index = array_search("lightbox_fade_in_time", $setting_keys);
|
107 |
$lightbox_fade_in_time = intval($album_css[$index]->setting_value);
|
@@ -110,10 +110,10 @@ else
|
|
110 |
$lightbox_fade_out_time = intval($album_css[$index]->setting_value);
|
111 |
|
112 |
$index = array_search("lightbox_text_align", $setting_keys);
|
113 |
-
$lightbox_text_align = $album_css[$index]->setting_value;
|
114 |
|
115 |
$index = array_search("lightbox_font_family", $setting_keys);
|
116 |
-
$lightbox_font_family = $album_css[$index]->setting_value;
|
117 |
|
118 |
$index = array_search("lightbox_heading_font_size", $setting_keys);
|
119 |
$lightbox_heading_font_size = intval($album_css[$index]->setting_value);
|
@@ -161,42 +161,7 @@ else
|
|
161 |
margin-right: <?php echo $margin_btw_thumbnails;?>px !important;
|
162 |
margin-bottom: <?php echo $margin_btw_thumbnails;?>px !important;
|
163 |
}
|
164 |
-
|
165 |
-
if($responsive != "true")
|
166 |
-
{
|
167 |
-
?>
|
168 |
-
.images-in-row_<?php echo $unique_id;?>
|
169 |
-
{
|
170 |
-
<?php
|
171 |
-
|
172 |
-
if($gallery_type != "masonry")
|
173 |
-
{
|
174 |
-
if($pagination_setting == 1)
|
175 |
-
{
|
176 |
-
?>
|
177 |
-
height: <?php echo ($thumbnails_height + $margin_btw_thumbnails) * ceil($images_per_page / $img_in_row) + 20 ;?>px !important;
|
178 |
-
<?php
|
179 |
-
}
|
180 |
-
else
|
181 |
-
{
|
182 |
-
?>
|
183 |
-
height: <?php echo ($thumbnails_height + $margin_btw_thumbnails) * ceil(count($pics) / $img_in_row) + 20 ;?>px !important;
|
184 |
-
<?php
|
185 |
-
}
|
186 |
-
?> width: <?php echo ($thumbnails_width + ($margin_btw_thumbnails * 2)) * $img_in_row ;?>px !important;
|
187 |
-
<?php
|
188 |
-
}
|
189 |
-
else if($gallery_type == "masonry")
|
190 |
-
{
|
191 |
-
|
192 |
-
?> width: <?php echo ($thumbnails_width + ($margin_btw_thumbnails * 2) + ($thumbnails_border_size * 2)) * $img_in_row ;?>px !important;
|
193 |
-
<?php
|
194 |
-
}
|
195 |
-
?> clear: both;
|
196 |
-
}
|
197 |
-
<?php
|
198 |
-
}
|
199 |
-
?>
|
200 |
.images-in-row_<?php echo $unique_id;?> a
|
201 |
{
|
202 |
text-decoration:none !important;
|
57 |
array_push($setting_keys, $album_css[$flag]->setting_key);
|
58 |
}
|
59 |
$index = array_search("thumbnails_width", $setting_keys);
|
60 |
+
$thumbnails_width = intval($album_css[$index]->setting_value);
|
61 |
|
62 |
$index = array_search("thumbnails_height", $setting_keys);
|
63 |
+
$thumbnails_height = intval($album_css[$index]->setting_value);
|
64 |
|
65 |
$index = array_search("thumbnails_opacity", $setting_keys);
|
66 |
+
$thumbnails_opacity = intval($album_css[$index]->setting_value);
|
67 |
|
68 |
$index = array_search("thumbnails_border_size", $setting_keys);
|
69 |
+
$thumbnails_border_size = intval($album_css[$index]->setting_value);
|
70 |
|
71 |
$index = array_search("thumbnails_border_radius", $setting_keys);
|
72 |
+
$thumbnails_border_radius = intval($album_css[$index]->setting_value);
|
73 |
|
74 |
$index = array_search("thumbnails_border_color", $setting_keys);
|
75 |
+
$thumbnails_border_color = esc_attr($album_css[$index]->setting_value);
|
76 |
|
77 |
$index = array_search("margin_btw_thumbnails", $setting_keys);
|
78 |
+
$margin_btw_thumbnails = esc_attr($album_css[$index]->setting_value);
|
79 |
$newMargin = $margin_btw_thumbnails * 3;
|
80 |
|
81 |
$index = array_search("lightbox_type", $setting_keys);
|
82 |
+
$lightbox_type = esc_attr($album_css[$index]->setting_value);
|
83 |
|
84 |
$index = array_search("lightbox_overlay_opacity", $setting_keys);
|
85 |
$lightbox_overlay_opacity = doubleval($album_css[$index]->setting_value);
|
91 |
$lightbox_overlay_border_radius = intval($album_css[$index]->setting_value);
|
92 |
|
93 |
$index = array_search("lightbox_text_color", $setting_keys);
|
94 |
+
$lightbox_text_color = esc_attr($album_css[$index]->setting_value);
|
95 |
|
96 |
$index = array_search("lightbox_overlay_border_color", $setting_keys);
|
97 |
+
$lightbox_overlay_border_color = esc_attr($album_css[$index]->setting_value);
|
98 |
$lightbox_border_color_value = $lightbox_overlay_border_size . "px solid " . $lightbox_overlay_border_color;
|
99 |
|
100 |
$index = array_search("lightbox_inline_bg_color", $setting_keys);
|
101 |
+
$lightbox_inline_bg_color = esc_attr($album_css[$index]->setting_value);
|
102 |
|
103 |
$index = array_search("lightbox_overlay_bg_color", $setting_keys);
|
104 |
+
$lightbox_overlay_bg_color = esc_attr($album_css[$index]->setting_value);
|
105 |
|
106 |
$index = array_search("lightbox_fade_in_time", $setting_keys);
|
107 |
$lightbox_fade_in_time = intval($album_css[$index]->setting_value);
|
110 |
$lightbox_fade_out_time = intval($album_css[$index]->setting_value);
|
111 |
|
112 |
$index = array_search("lightbox_text_align", $setting_keys);
|
113 |
+
$lightbox_text_align = esc_attr($album_css[$index]->setting_value);
|
114 |
|
115 |
$index = array_search("lightbox_font_family", $setting_keys);
|
116 |
+
$lightbox_font_family = esc_attr($album_css[$index]->setting_value);
|
117 |
|
118 |
$index = array_search("lightbox_heading_font_size", $setting_keys);
|
119 |
$lightbox_heading_font_size = intval($album_css[$index]->setting_value);
|
161 |
margin-right: <?php echo $margin_btw_thumbnails;?>px !important;
|
162 |
margin-bottom: <?php echo $margin_btw_thumbnails;?>px !important;
|
163 |
}
|
164 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
.images-in-row_<?php echo $unique_id;?> a
|
166 |
{
|
167 |
text-decoration:none !important;
|
views/other-settings.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
switch($gb_role)
|
4 |
+
{
|
5 |
+
case "administrator":
|
6 |
+
$user_role_permission = "manage_options";
|
7 |
+
break;
|
8 |
+
case "editor":
|
9 |
+
$user_role_permission = "publish_pages";
|
10 |
+
break;
|
11 |
+
case "author":
|
12 |
+
$user_role_permission = "publish_posts";
|
13 |
+
break;
|
14 |
+
}
|
15 |
+
if (!current_user_can($user_role_permission))
|
16 |
+
{
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
else
|
20 |
+
{
|
21 |
+
?>
|
22 |
+
<form id="frm_other_settings" class="layout-form">
|
23 |
+
<div id="poststuff" style="width: 99% !important;">
|
24 |
+
<div id="post-body" class="metabox-holder">
|
25 |
+
<div id="postbox-container-2" class="postbox-container">
|
26 |
+
<div id="advanced" class="meta-box-sortables">
|
27 |
+
<div id="gallery_bank_get_started" class="postbox" >
|
28 |
+
<h3 class="hndle"><span><?php _e("Other Settings", "gallery-bank"); ?></span></h3>
|
29 |
+
<div class="inside">
|
30 |
+
<div id="ux_dashboard" class="gallery_bank_layout">
|
31 |
+
<div class="layout-control-group" style="margin: 10px 0 0 0 ;">
|
32 |
+
<label class="layout-control-label" style="width: 170px !important;"><?php _e("Remove Tables at Uninstall", "gallery-bank"); ?> :</label>
|
33 |
+
<div class="layout-controls-radio">
|
34 |
+
<?php $other_settings = get_option("gallery-bank-remove-tables-uninstall");?>
|
35 |
+
<input type="radio" name="ux_gallery_remove_tables" id="ux_enable_remove_tables" onclick="gallery_bank_other_settings(this);" <?php echo $other_settings == "1" ? "checked=\"checked\"" : "";?> value="1"><label style="vertical-align: baseline;"><?php _e("Enable", "gallery-bank"); ?></label>
|
36 |
+
<input type="radio" name="ux_gallery_remove_tables" id="ux_disable_remove_tables" onclick="gallery_bank_other_settings(this);" <?php echo $other_settings == "0" ? "checked=\"checked\"" : "";?> style="margin-left: 10px;" value="0"><label style="vertical-align: baseline;"><?php _e("Disable", "gallery-bank"); ?></label>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
<div class="layout-control-group" style="margin:10px 0 10px 0 ;">
|
40 |
+
<strong><i>If you would like to remove tables during uninstallation of plugin then you would need to choose enable or vice versa</i></strong>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
</form>
|
50 |
+
<script type="text/javascript">
|
51 |
+
function gallery_bank_other_settings(control)
|
52 |
+
{
|
53 |
+
var gallery_other_settings = jQuery(control).val();
|
54 |
+
jQuery.post(ajaxurl, "gallery_other_settings="+gallery_other_settings+"¶m=gallery_plugin_settings&action=add_new_album_library", function(data)
|
55 |
+
{
|
56 |
+
});
|
57 |
+
}
|
58 |
+
|
59 |
+
</script>
|
60 |
+
<?php
|
61 |
+
}
|
62 |
+
?>
|
views/recommended-plugins.php
CHANGED
@@ -34,47 +34,46 @@ else
|
|
34 |
$arges = apply_filters( "install_plugins_table_api_args_$tab", $args );
|
35 |
$api = plugins_api( "query_plugins", $arges );
|
36 |
$item = $api->plugins;
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
$r = wp_parse_args( $args, $defaults );
|
47 |
|
48 |
-
|
49 |
-
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
?>
|
79 |
<form id="frmrecommendation" class="layout-form">
|
80 |
<div id="poststuff" style="width: 99% !important;">
|
34 |
$arges = apply_filters( "install_plugins_table_api_args_$tab", $args );
|
35 |
$api = plugins_api( "query_plugins", $arges );
|
36 |
$item = $api->plugins;
|
37 |
+
|
38 |
+
function wp_star_rating( $args = array() )
|
39 |
+
{
|
40 |
+
$defaults = array(
|
41 |
+
'rating' => 0,
|
42 |
+
'type' => 'rating',
|
43 |
+
'number' => 0,
|
44 |
+
);
|
45 |
+
$r = wp_parse_args( $args, $defaults );
|
|
|
46 |
|
47 |
+
// Non-english decimal places when the $rating is coming from a string
|
48 |
+
$rating = str_replace( ',', '.', $r['rating'] );
|
49 |
|
50 |
+
// Convert Percentage to star rating, 0..5 in .5 increments
|
51 |
+
if ( 'percent' == $r['type'] ) {
|
52 |
+
$rating = round( $rating / 10, 0 ) / 2;
|
53 |
+
}
|
54 |
|
55 |
+
// Calculate the number of each type of star needed
|
56 |
+
$full_stars = floor( $rating );
|
57 |
+
$half_stars = ceil( $rating - $full_stars );
|
58 |
+
$empty_stars = 5 - $full_stars - $half_stars;
|
59 |
|
60 |
+
if ( $r['number'] ) {
|
61 |
+
/* translators: 1: The rating, 2: The number of ratings */
|
62 |
+
$format = _n( '%1$s rating based on %2$s rating', '%1$s rating based on %2$s ratings', $r['number'] );
|
63 |
+
$title = sprintf( $format, number_format_i18n( $rating, 1 ), number_format_i18n( $r['number'] ) );
|
64 |
+
} else {
|
65 |
+
/* translators: 1: The rating */
|
66 |
+
$title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) );
|
67 |
+
}
|
68 |
|
69 |
+
echo '<div class="star-rating" title="' . esc_attr( $title ) . '">';
|
70 |
+
echo '<span class="screen-reader-text">' . $title . '</span>';
|
71 |
+
echo str_repeat( '<div class="star star-full"></div>', $full_stars );
|
72 |
+
echo str_repeat( '<div class="star star-half"></div>', $half_stars );
|
73 |
+
echo str_repeat( '<div class="star star-empty"></div>', $empty_stars);
|
74 |
+
echo '</div>';
|
75 |
+
}
|
76 |
+
|
77 |
?>
|
78 |
<form id="frmrecommendation" class="layout-form">
|
79 |
<div id="poststuff" style="width: 99% !important;">
|
views/settings.php
CHANGED
@@ -25,7 +25,7 @@ else
|
|
25 |
if (count($album_css) != 0) {
|
26 |
$setting_keys = array();
|
27 |
for ($flag = 0; $flag < count($album_css); $flag++) {
|
28 |
-
array_push($setting_keys, $album_css[$flag]->setting_key);
|
29 |
}
|
30 |
$index = array_search("thumbnails_custom_enable", $setting_keys);
|
31 |
$thumbnails_custom_enable = intval($album_css[$index]->setting_value);
|
@@ -46,19 +46,19 @@ else
|
|
46 |
$thumbnails_border_radius = intval($album_css[$index]->setting_value);
|
47 |
|
48 |
$index = array_search("thumbnails_border_color", $setting_keys);
|
49 |
-
$thumbnails_border_color = $album_css[$index]->setting_value;
|
50 |
|
51 |
$index = array_search("margin_btw_thumbnails", $setting_keys);
|
52 |
$margin_btw_thumbnails = intval($album_css[$index]->setting_value);
|
53 |
|
54 |
$index = array_search("thumbnail_text_color", $setting_keys);
|
55 |
-
$thumbnail_text_color = $album_css[$index]->setting_value;
|
56 |
|
57 |
$index = array_search("thumbnail_text_align", $setting_keys);
|
58 |
-
$thumbnail_text_align = $album_css[$index]->setting_value;
|
59 |
|
60 |
$index = array_search("thumbnail_font_family", $setting_keys);
|
61 |
-
$thumbnail_font_family = $album_css[$index]->setting_value;
|
62 |
|
63 |
$index = array_search("heading_font_size", $setting_keys);
|
64 |
$heading_font_size = intval($album_css[$index]->setting_value);
|
@@ -88,16 +88,16 @@ else
|
|
88 |
$cover_thumbnail_border_radius = intval($album_css[$index]->setting_value);
|
89 |
|
90 |
$index = array_search("cover_thumbnail_border_color", $setting_keys);
|
91 |
-
$cover_thumbnail_border_color = $album_css[$index]->setting_value;
|
92 |
|
93 |
$index = array_search("margin_btw_cover_thumbnails", $setting_keys);
|
94 |
$margin_btw_cover_thumbnails = intval($album_css[$index]->setting_value);
|
95 |
|
96 |
$index = array_search("album_text_align", $setting_keys);
|
97 |
-
$album_text_align = $album_css[$index]->setting_value;
|
98 |
|
99 |
$index = array_search("album_font_family", $setting_keys);
|
100 |
-
$album_font_family = $album_css[$index]->setting_value;
|
101 |
|
102 |
$index = array_search("album_heading_font_size", $setting_keys);
|
103 |
$album_heading_font_size = intval($album_css[$index]->setting_value);
|
@@ -106,10 +106,10 @@ else
|
|
106 |
$album_text_font_size = intval($album_css[$index]->setting_value);
|
107 |
|
108 |
$index = array_search("album_desc_length", $setting_keys);
|
109 |
-
$album_desc_length = $album_css[$index]->setting_value;
|
110 |
|
111 |
$index = array_search("lightbox_type", $setting_keys);
|
112 |
-
$lightbox_type = $album_css[$index]->setting_value;
|
113 |
|
114 |
$index = array_search("lightbox_overlay_opacity", $setting_keys);
|
115 |
$lightbox_overlay_opacity = doubleval($album_css[$index]->setting_value);
|
@@ -121,16 +121,16 @@ else
|
|
121 |
$lightbox_overlay_border_radius = intval($album_css[$index]->setting_value);
|
122 |
|
123 |
$index = array_search("lightbox_text_color", $setting_keys);
|
124 |
-
$lightbox_text_color = $album_css[$index]->setting_value;
|
125 |
|
126 |
$index = array_search("lightbox_overlay_border_color", $setting_keys);
|
127 |
-
$lightbox_overlay_border_color = $album_css[$index]->setting_value;
|
128 |
|
129 |
$index = array_search("lightbox_inline_bg_color", $setting_keys);
|
130 |
-
$lightbox_inline_bg_color = $album_css[$index]->setting_value;
|
131 |
|
132 |
$index = array_search("lightbox_overlay_bg_color", $setting_keys);
|
133 |
-
$lightbox_overlay_bg_color = $album_css[$index]->setting_value;
|
134 |
|
135 |
$index = array_search("lightbox_fade_in_time", $setting_keys);
|
136 |
$lightbox_fade_in_time = intval($album_css[$index]->setting_value);
|
@@ -139,10 +139,10 @@ else
|
|
139 |
$lightbox_fade_out_time = intval($album_css[$index]->setting_value);
|
140 |
|
141 |
$index = array_search("lightbox_text_align", $setting_keys);
|
142 |
-
$lightbox_text_align = $album_css[$index]->setting_value;
|
143 |
|
144 |
$index = array_search("lightbox_font_family", $setting_keys);
|
145 |
-
$lightbox_font_family = $album_css[$index]->setting_value;
|
146 |
|
147 |
$index = array_search("lightbox_heading_font_size", $setting_keys);
|
148 |
$lightbox_heading_font_size = intval($album_css[$index]->setting_value);
|
@@ -187,28 +187,28 @@ else
|
|
187 |
$back_button_text = $album_css[$index]->setting_value;
|
188 |
|
189 |
$index = array_search("album_click_text", $setting_keys);
|
190 |
-
$album_click_text = $album_css[$index]->setting_value;
|
191 |
|
192 |
$index = array_search("album_text_color", $setting_keys);
|
193 |
-
$album_text_color = $album_css[$index]->setting_value;
|
194 |
|
195 |
$index = array_search("button_color", $setting_keys);
|
196 |
-
$button_color = $album_css[$index]->setting_value;
|
197 |
|
198 |
$index = array_search("button_text_color", $setting_keys);
|
199 |
-
$button_text_color = $album_css[$index]->setting_value;
|
200 |
|
201 |
$index = array_search("filters_color", $setting_keys);
|
202 |
-
$filters_color = $album_css[$index]->setting_value;
|
203 |
|
204 |
$index = array_search("filters_text_color", $setting_keys);
|
205 |
-
$filters_text_color = $album_css[$index]->setting_value;
|
206 |
|
207 |
$index = array_search("album_seperator", $setting_keys);
|
208 |
$album_seperator = intval($album_css[$index]->setting_value);
|
209 |
|
210 |
$index = array_search("back_button_font_family", $setting_keys);
|
211 |
-
$back_button_font_family = $album_css[$index]->setting_value;
|
212 |
|
213 |
$index = array_search("back_button_font_size", $setting_keys);
|
214 |
$back_button_font_size = intval($album_css[$index]->setting_value);
|
25 |
if (count($album_css) != 0) {
|
26 |
$setting_keys = array();
|
27 |
for ($flag = 0; $flag < count($album_css); $flag++) {
|
28 |
+
array_push($setting_keys, esc_attr($album_css[$flag]->setting_key));
|
29 |
}
|
30 |
$index = array_search("thumbnails_custom_enable", $setting_keys);
|
31 |
$thumbnails_custom_enable = intval($album_css[$index]->setting_value);
|
46 |
$thumbnails_border_radius = intval($album_css[$index]->setting_value);
|
47 |
|
48 |
$index = array_search("thumbnails_border_color", $setting_keys);
|
49 |
+
$thumbnails_border_color = esc_attr($album_css[$index]->setting_value);
|
50 |
|
51 |
$index = array_search("margin_btw_thumbnails", $setting_keys);
|
52 |
$margin_btw_thumbnails = intval($album_css[$index]->setting_value);
|
53 |
|
54 |
$index = array_search("thumbnail_text_color", $setting_keys);
|
55 |
+
$thumbnail_text_color = esc_attr($album_css[$index]->setting_value);
|
56 |
|
57 |
$index = array_search("thumbnail_text_align", $setting_keys);
|
58 |
+
$thumbnail_text_align = esc_attr($album_css[$index]->setting_value);
|
59 |
|
60 |
$index = array_search("thumbnail_font_family", $setting_keys);
|
61 |
+
$thumbnail_font_family = esc_attr($album_css[$index]->setting_value);
|
62 |
|
63 |
$index = array_search("heading_font_size", $setting_keys);
|
64 |
$heading_font_size = intval($album_css[$index]->setting_value);
|
88 |
$cover_thumbnail_border_radius = intval($album_css[$index]->setting_value);
|
89 |
|
90 |
$index = array_search("cover_thumbnail_border_color", $setting_keys);
|
91 |
+
$cover_thumbnail_border_color = esc_attr($album_css[$index]->setting_value);
|
92 |
|
93 |
$index = array_search("margin_btw_cover_thumbnails", $setting_keys);
|
94 |
$margin_btw_cover_thumbnails = intval($album_css[$index]->setting_value);
|
95 |
|
96 |
$index = array_search("album_text_align", $setting_keys);
|
97 |
+
$album_text_align = esc_attr($album_css[$index]->setting_value);
|
98 |
|
99 |
$index = array_search("album_font_family", $setting_keys);
|
100 |
+
$album_font_family = esc_attr($album_css[$index]->setting_value);
|
101 |
|
102 |
$index = array_search("album_heading_font_size", $setting_keys);
|
103 |
$album_heading_font_size = intval($album_css[$index]->setting_value);
|
106 |
$album_text_font_size = intval($album_css[$index]->setting_value);
|
107 |
|
108 |
$index = array_search("album_desc_length", $setting_keys);
|
109 |
+
$album_desc_length = intval($album_css[$index]->setting_value);
|
110 |
|
111 |
$index = array_search("lightbox_type", $setting_keys);
|
112 |
+
$lightbox_type = esc_attr($album_css[$index]->setting_value);
|
113 |
|
114 |
$index = array_search("lightbox_overlay_opacity", $setting_keys);
|
115 |
$lightbox_overlay_opacity = doubleval($album_css[$index]->setting_value);
|
121 |
$lightbox_overlay_border_radius = intval($album_css[$index]->setting_value);
|
122 |
|
123 |
$index = array_search("lightbox_text_color", $setting_keys);
|
124 |
+
$lightbox_text_color = esc_attr($album_css[$index]->setting_value);
|
125 |
|
126 |
$index = array_search("lightbox_overlay_border_color", $setting_keys);
|
127 |
+
$lightbox_overlay_border_color = esc_attr($album_css[$index]->setting_value);
|
128 |
|
129 |
$index = array_search("lightbox_inline_bg_color", $setting_keys);
|
130 |
+
$lightbox_inline_bg_color = esc_attr($album_css[$index]->setting_value);
|
131 |
|
132 |
$index = array_search("lightbox_overlay_bg_color", $setting_keys);
|
133 |
+
$lightbox_overlay_bg_color = esc_attr($album_css[$index]->setting_value);
|
134 |
|
135 |
$index = array_search("lightbox_fade_in_time", $setting_keys);
|
136 |
$lightbox_fade_in_time = intval($album_css[$index]->setting_value);
|
139 |
$lightbox_fade_out_time = intval($album_css[$index]->setting_value);
|
140 |
|
141 |
$index = array_search("lightbox_text_align", $setting_keys);
|
142 |
+
$lightbox_text_align = esc_attr($album_css[$index]->setting_value);
|
143 |
|
144 |
$index = array_search("lightbox_font_family", $setting_keys);
|
145 |
+
$lightbox_font_family = esc_attr($album_css[$index]->setting_value);
|
146 |
|
147 |
$index = array_search("lightbox_heading_font_size", $setting_keys);
|
148 |
$lightbox_heading_font_size = intval($album_css[$index]->setting_value);
|
187 |
$back_button_text = $album_css[$index]->setting_value;
|
188 |
|
189 |
$index = array_search("album_click_text", $setting_keys);
|
190 |
+
$album_click_text = esc_attr($album_css[$index]->setting_value);
|
191 |
|
192 |
$index = array_search("album_text_color", $setting_keys);
|
193 |
+
$album_text_color = esc_attr($album_css[$index]->setting_value);
|
194 |
|
195 |
$index = array_search("button_color", $setting_keys);
|
196 |
+
$button_color = esc_attr($album_css[$index]->setting_value);
|
197 |
|
198 |
$index = array_search("button_text_color", $setting_keys);
|
199 |
+
$button_text_color = esc_attr($album_css[$index]->setting_value);
|
200 |
|
201 |
$index = array_search("filters_color", $setting_keys);
|
202 |
+
$filters_color = esc_attr($album_css[$index]->setting_value);
|
203 |
|
204 |
$index = array_search("filters_text_color", $setting_keys);
|
205 |
+
$filters_text_color = esc_attr($album_css[$index]->setting_value);
|
206 |
|
207 |
$index = array_search("album_seperator", $setting_keys);
|
208 |
$album_seperator = intval($album_css[$index]->setting_value);
|
209 |
|
210 |
$index = array_search("back_button_font_family", $setting_keys);
|
211 |
+
$back_button_font_family = esc_attr($album_css[$index]->setting_value);
|
212 |
|
213 |
$index = array_search("back_button_font_size", $setting_keys);
|
214 |
$back_button_font_size = intval($album_css[$index]->setting_value);
|
views/wizard.php
CHANGED
@@ -33,9 +33,10 @@ else
|
|
33 |
<div class="fluid-layout">
|
34 |
<div class="layout-span12 textalign">
|
35 |
<p>Hi there!</p>
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
39 |
</div>
|
40 |
</div>
|
41 |
<div class="fluid-layout">
|
@@ -111,39 +112,34 @@ else
|
|
111 |
</div>
|
112 |
</div>
|
113 |
<script type="text/javascript">
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
{
|
143 |
-
window.location.href = "admin.php?page=gallery_bank";
|
144 |
-
});
|
145 |
-
}
|
146 |
-
}
|
147 |
</script>
|
148 |
<?php
|
149 |
}
|
33 |
<div class="fluid-layout">
|
34 |
<div class="layout-span12 textalign">
|
35 |
<p>Hi there!</p>
|
36 |
+
<p>Don't ever miss an opportunity to opt in for Email Notifications / Announcements about exciting New Features and Update Releases.</p>
|
37 |
+
<p>Contribute in helping us making our plugin compatible with most plugins and themes by allowing to share non-sensitive information about your website.</p>
|
38 |
+
<p>If you're not ready to Opt-In, that's ok too!</p>
|
39 |
+
<p><strong>Gallery Bank will still work fine.</strong></p>
|
40 |
</div>
|
41 |
</div>
|
42 |
<div class="fluid-layout">
|
112 |
</div>
|
113 |
</div>
|
114 |
<script type="text/javascript">
|
115 |
+
function show_hide_details_gallery_bank()
|
116 |
+
{
|
117 |
+
if(jQuery("#ux_div_wizard_set_up").hasClass("wizard-set-up"))
|
118 |
+
{
|
119 |
+
jQuery("#ux_div_wizard_set_up").css("display","none");
|
120 |
+
jQuery("#ux_div_wizard_set_up").removeClass("wizard-set-up");
|
121 |
+
}
|
122 |
+
else
|
123 |
+
{
|
124 |
+
jQuery("#ux_div_wizard_set_up").css("display","block");
|
125 |
+
jQuery("#ux_div_wizard_set_up").addClass("wizard-set-up");
|
126 |
+
}
|
127 |
+
}
|
128 |
+
function plugin_stats(type)
|
129 |
+
{
|
130 |
+
jQuery.post(ajaxurl,
|
131 |
+
{
|
132 |
+
type: type,
|
133 |
+
param: "wizard_gallery",
|
134 |
+
action: "add_new_album_library",
|
135 |
+
_wp_nonce: "<?php echo $gallery_bank_check_status; ?>"
|
136 |
+
},
|
137 |
+
function(data)
|
138 |
+
{
|
139 |
+
window.location.href = "admin.php?page=gallery_bank";
|
140 |
+
});
|
141 |
+
}
|
142 |
+
|
|
|
|
|
|
|
|
|
|
|
143 |
</script>
|
144 |
<?php
|
145 |
}
|