Gallery Bank: WordPress Photo Gallery Plugin - Version 3.0.29

Version Description

  • Few Bugs Fixed
  • Added Functionality to support Bulk Images Upload
Download this release

Release Info

Developer Gallery-Bank
Plugin Icon 128x128 Gallery Bank: WordPress Photo Gallery Plugin
Version 3.0.29
Comparing to
See all releases

Code changes from version 3.0.28 to 3.0.29

assets/css/stylesheet.css CHANGED
@@ -1,4 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  .widget_premium_feature
3
  {
4
  color: #FF0000;
1
+ .gb_text_control
2
+ {
3
+ color: #FFF;
4
+ font-size: 15px;
5
+ line-height: 26px;
6
+ margin-top: 8px;
7
+ float: left;
8
+ width: auto;
9
+ margin-left: 10px;
10
+ }
11
+ .gb_buy_pro
12
+ {
13
+ cursor:pointer;
14
+ min-width: 800px;
15
+ border: 1px solid #1b6394;
16
+ padding: 5px;
17
+ margin: 12px 0;
18
+ background: #AE3A3A;
19
+ position: relative;
20
+ overflow: hidden;
21
+ }
22
+ .gb_text_control span {
23
+ font-size: 13px;
24
+ opacity: 0.8;
25
 
26
+ }
27
+ .gb_buy_pro .gb_message_buttons
28
+ {
29
+ float: right;
30
+ border: 1px solid #FF6D1E;
31
+ font-size: 13px;
32
+ margin: 12px;
33
+ padding: 4px 0;
34
+ color: #FFF;
35
+ text-shadow: 0 1px 3px #FF6D1E;
36
+ font-weight: bold;
37
+ background: #FF6D1E;
38
+ -moz-border-radius: 3px;
39
+ border-radius: 3px;
40
+ -webkit-border-radius: 3px;
41
+ text-decoration: none;
42
+ height: 35px;
43
+ text-align: center;
44
+ width: 110px;
45
+ -moz-box-shadow: 0px 1px 1px 0 #FF6D1E inset;
46
+ -webkit-box-shadow: 0px 1px 1px 0 #FF6D1E inset;
47
+ box-shadow: 0px 1px 1px 0 #FF6D1E inset;
48
+
49
+ }
50
+ .gb_buy_pro .gb_message_buttons:hover, .gb_buy_pro .gb_message_buttons:focus
51
+ {
52
+ background: #FF6D1E;
53
+ color: #FFF;
54
+ border: 1px solid #FF6D1E;
55
+ -moz-box-shadow: 0px 1px 1px 0 #FF6D1E inset;
56
+ -webkit-box-shadow: 0px 1px 1px 0 #FF6D1E inset;
57
+ box-shadow: 0px 1px 1px 0 #FF6D1E inset;
58
+ }
59
  .widget_premium_feature
60
  {
61
  color: #FF0000;
assets/images/img.png CHANGED
Binary file
gallery-bank.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://tech-banker.com
5
  Description: Gallery Bank is an easy to use Responsive WordPress Gallery Plugin for photos, videos, galleries and albums.
6
  Author: Tech Banker
7
- Version: 3.0.28
8
  Author URI: http://tech-banker.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -59,6 +59,7 @@ function plugin_install_script_for_gallery_bank()
59
  function plugin_uninstall_script_for_gallery_bank()
60
  {
61
  delete_option("gallery-bank-info-popup");
 
62
  }
63
  /*************************************************************************************/
64
  function gallery_bank_plugin_load_text_domain()
@@ -125,11 +126,32 @@ function add_gallery_bank_icon($meta = TRUE)
125
  );
126
  }
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  $version = get_option("gallery-bank-pro-edition");
129
  if($version == "" || $version == "3.0")
130
  {
131
  add_action("admin_init", "plugin_install_script_for_gallery_bank");
132
  }
 
 
 
 
 
133
 
134
  add_action("admin_bar_menu", "add_gallery_bank_icon", 100);
135
  add_action("plugins_loaded", "gallery_bank_plugin_load_text_domain");
4
  Plugin URI: http://tech-banker.com
5
  Description: Gallery Bank is an easy to use Responsive WordPress Gallery Plugin for photos, videos, galleries and albums.
6
  Author: Tech Banker
7
+ Version: 3.0.29
8
  Author URI: http://tech-banker.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
59
  function plugin_uninstall_script_for_gallery_bank()
60
  {
61
  delete_option("gallery-bank-info-popup");
62
+ delete_option("gallery-bank-banner");
63
  }
64
  /*************************************************************************************/
65
  function gallery_bank_plugin_load_text_domain()
126
  );
127
  }
128
 
129
+ function gallery_bank_banner()
130
+ {
131
+ echo'<div id="ux_buy_pro" class="updated">
132
+ <div class="gb_buy_pro">
133
+ <div class="gb_text_control">
134
+ It\'s time to upgrade your <strong>Gallery Bank Standard Edition</strong> to <strong>Premium</strong> Edition!<br />
135
+ <span>Extend standard plugin functionality with 200+ awesome features! <br/>Go for Premium Version Now! Starting at <strong>11£/- only</strong></span>
136
+ </div>
137
+ <a class="button gb_message_buttons" href="admin.php?page=gallery_bank_purchase&msg=no">CLOSE</a>
138
+ <a class="button gb_message_buttons" target="_blank" href="http://wordpress.org/support/view/plugin-reviews/gallery-bank?filter=5">RATE US 5 ★</a>
139
+ <a class="button gb_message_buttons" target="_blank" href="http://tech-banker.com/gallery-bank/demo/">LIVE DEMO</a>
140
+ <a class="button gb_message_buttons" target="_blank" href="http://tech-banker.com/gallery-bank/">UPGRADE NOW</a>
141
+ </div>
142
+ </div>';
143
+ }
144
+
145
  $version = get_option("gallery-bank-pro-edition");
146
  if($version == "" || $version == "3.0")
147
  {
148
  add_action("admin_init", "plugin_install_script_for_gallery_bank");
149
  }
150
+ $show_banner = get_option("gallery-bank-banner");
151
+ if($show_banner == "")
152
+ {
153
+ add_action("admin_notices", "gallery_bank_banner",1);
154
+ }
155
 
156
  add_action("admin_bar_menu", "add_gallery_bank_icon", 100);
157
  add_action("plugins_loaded", "gallery_bank_plugin_load_text_domain");
lib/add-new-album-class.php CHANGED
@@ -36,64 +36,31 @@ else
36
  $img_name = esc_attr($_REQUEST["img_name"]);
37
  $img_width = intval($_REQUEST["image_width"]);
38
  $img_height = intval($_REQUEST["image_height"]);
 
39
 
40
 
41
  process_image_upload($img_path, $img_width, $img_height);
42
 
43
- $column1 = "<input type=\"checkbox\" id=\"ux_grp_select_items_" . $dynamicId . "\" name=\"ux_grp_select_items_" . $dynamicId . "\" value=\"" . $dynamicId . "\" />";
44
  array_push($dynamicArray, $column1);
45
 
46
  $column2 = "<a href=\"javascript:void(0);\" title=\"" . $img_name . "\" >
47
- <img type=\"image\" imgPath=\"" . $img_path . "\" src=\"" . GALLERY_BK_THUMB_SMALL_URL . $img_path . "\" id=\"ux_gb_img\" name=\"ux_gb_img\" class=\"img dynamic_css\" imageid=\"" . $dynamicId . "\" width=\"" . $img_width . "\"/></a><br/>
48
  <label><strong>" . $img_name . "</strong></label><br/><label>" . date("F j, Y") . "</label><br/>
49
  <input type=\"radio\" style=\"cursor: pointer;\" id=\"ux_rdl_cover\" name=\"ux_album_cover\" /><label>" . __(" Set as Album Cover", gallery_bank) . "</label>";
50
  array_push($dynamicArray, $column2);
51
 
52
- $column3 = "<input placeholder=\"" . __("Enter your Title", gallery_bank) . "\" class=\"layout-span12\" type=\"text\" name=\"ux_img_title_" . $dynamicId . "\" id=\"ux_img_title_" . $dynamicId . "\" />
53
- <textarea placeholder=\"" . __("Enter your Description ", gallery_bank) . "\" style=\"margin-top:20px\" rows=\"5\" class=\"layout-span12\" name=\"ux_txt_desc_" . $dynamicId . "\" id=\"ux_txt_desc_" . $dynamicId . "\"></textarea>";
54
  array_push($dynamicArray, $column3);
55
- $column4 = "<input placeholder=\"" . __("Enter your Tags", gallery_bank) . "\" class=\"layout-span12\" readonly=\"readonly\" type=\"text\" onkeypress=\"return preventDot(event);\" name=\"ux_txt_tags_" . $dynamicId . "\" id=\"ux_txt_tags_" . $dynamicId . "\" />";
56
  array_push($dynamicArray, $column4);
57
- $column5 = "<input value=\"http://\" type=\"text\" id=\"ux_txt_url_" . $dynamicId . "\" name=\"ux_txt_url_" . $dynamicId . "\" class=\"layout-span12\" />";
58
  array_push($dynamicArray, $column5);
59
  $column6 = "<a class=\"btn hovertip\" id=\"ux_btn_delete\" style=\"cursor: pointer;\" data-original-title=\"" . __("Delete Image", gallery_bank) . "\" onclick=\"deleteImage(this);\"><i class=\"icon-trash\"></i></a>";
60
  array_push($dynamicArray, $column6);
61
  echo json_encode($dynamicArray);
62
  die();
63
- }
64
- else if ($_REQUEST["param"] == "add_new_album") {
65
- $ux_album_name1 = htmlspecialchars(esc_attr($_REQUEST["album_name"]));
66
- $ux_album_name = ($ux_album_name1 == "") ? "Untitled Album" : $ux_album_name1;
67
- $ux_description = html_entity_decode(esc_attr($_REQUEST["uxDescription"]));
68
- $album_count = $wpdb->get_var
69
- (
70
- "SELECT count(album_id) FROM ".gallery_bank_albums()
71
- );
72
- if($album_count < 3)
73
- {
74
- $wpdb->query
75
- (
76
- $wpdb->prepare
77
- (
78
- "INSERT INTO " . gallery_bank_albums() . "(album_name, description, album_date, author)
79
- VALUES(%s, %s, CURDATE(), %s)",
80
- $ux_album_name,
81
- $ux_description,
82
- $current_user->display_name
83
- )
84
- );
85
- echo $EventLastId = $wpdb->insert_id;
86
- $wpdb->query
87
- (
88
- $wpdb->prepare
89
- (
90
- "UPDATE " . gallery_bank_albums() . " SET album_order = %d WHERE album_id = %d",
91
- $EventLastId,
92
- $EventLastId
93
- )
94
- );
95
- }
96
- die();
97
  }
98
  else if ($_REQUEST["param"] == "add_pic") {
99
  $ux_albumid = intval($_REQUEST["album_id"]);
@@ -150,7 +117,7 @@ else
150
  )
151
  );
152
  }
153
- $pic_id = $wpdb->insert_id;
154
  $wpdb->query
155
  (
156
  $wpdb->prepare
@@ -179,7 +146,7 @@ else
179
  $ux_img_name
180
  )
181
  );
182
- $pic_id = $wpdb->insert_id;
183
  $wpdb->query
184
  (
185
  $wpdb->prepare
@@ -217,7 +184,7 @@ else
217
  $ux_albumCover = $_REQUEST["isAlbumCoverSet"];
218
  $ux_title = html_entity_decode(esc_attr($_REQUEST["title"]));
219
  $ux_description = html_entity_decode(esc_attr($_REQUEST["description"]));
220
- $ux_tags = html_entity_decode(esc_attr($_REQUEST["tags"]));
221
  $ux_urlRedirect = esc_attr($_REQUEST["urlRedirect"]);
222
  $img_gb_path = esc_attr($_REQUEST["img_gb_path"]);
223
  $cover_width = intval($_REQUEST["cover_width"]);
36
  $img_name = esc_attr($_REQUEST["img_name"]);
37
  $img_width = intval($_REQUEST["image_width"]);
38
  $img_height = intval($_REQUEST["image_height"]);
39
+ $picid = intval($_REQUEST["picid"]);
40
 
41
 
42
  process_image_upload($img_path, $img_width, $img_height);
43
 
44
+ $column1 = "<input type=\"checkbox\" id=\"ux_grp_select_items_" . $picid . "\" name=\"ux_grp_select_items_" . $picid . "\" value=\"" . $picid . "\" />";
45
  array_push($dynamicArray, $column1);
46
 
47
  $column2 = "<a href=\"javascript:void(0);\" title=\"" . $img_name . "\" >
48
+ <img type=\"image\" imgPath=\"" . $img_path . "\" src=\"" . GALLERY_BK_THUMB_SMALL_URL . $img_path . "\" id=\"ux_gb_img\" name=\"ux_gb_img\" class=\"img dynamic_css\" imageid=\"" . $picid . "\" width=\"" . $img_width . "\"/></a><br/>
49
  <label><strong>" . $img_name . "</strong></label><br/><label>" . date("F j, Y") . "</label><br/>
50
  <input type=\"radio\" style=\"cursor: pointer;\" id=\"ux_rdl_cover\" name=\"ux_album_cover\" /><label>" . __(" Set as Album Cover", gallery_bank) . "</label>";
51
  array_push($dynamicArray, $column2);
52
 
53
+ $column3 = "<input placeholder=\"" . __("Enter your Title", gallery_bank) . "\" class=\"layout-span12\" type=\"text\" name=\"ux_img_title_" . $picid . "\" id=\"ux_img_title_" . $picid . "\" />
54
+ <textarea placeholder=\"" . __("Enter your Description ", gallery_bank) . "\" style=\"margin-top:20px\" rows=\"5\" class=\"layout-span12\" name=\"ux_txt_desc_" . $picid . "\" id=\"ux_txt_desc_" . $picid . "\"></textarea>";
55
  array_push($dynamicArray, $column3);
56
+ $column4 = "<input placeholder=\"" . __("Enter your Tags", gallery_bank) . "\" class=\"layout-span12\" readonly=\"readonly\" type=\"text\" onkeypress=\"return preventDot(event);\" name=\"ux_txt_tags_" . $picid . "\" id=\"ux_txt_tags_" . $picid . "\" />";
57
  array_push($dynamicArray, $column4);
58
+ $column5 = "<input value=\"http://\" type=\"text\" id=\"ux_txt_url_" . $picid . "\" name=\"ux_txt_url_" . $picid . "\" class=\"layout-span12\" />";
59
  array_push($dynamicArray, $column5);
60
  $column6 = "<a class=\"btn hovertip\" id=\"ux_btn_delete\" style=\"cursor: pointer;\" data-original-title=\"" . __("Delete Image", gallery_bank) . "\" onclick=\"deleteImage(this);\"><i class=\"icon-trash\"></i></a>";
61
  array_push($dynamicArray, $column6);
62
  echo json_encode($dynamicArray);
63
  die();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
  else if ($_REQUEST["param"] == "add_pic") {
66
  $ux_albumid = intval($_REQUEST["album_id"]);
117
  )
118
  );
119
  }
120
+ echo $pic_id = $wpdb->insert_id;
121
  $wpdb->query
122
  (
123
  $wpdb->prepare
146
  $ux_img_name
147
  )
148
  );
149
+ echo $pic_id = $wpdb->insert_id;
150
  $wpdb->query
151
  (
152
  $wpdb->prepare
184
  $ux_albumCover = $_REQUEST["isAlbumCoverSet"];
185
  $ux_title = html_entity_decode(esc_attr($_REQUEST["title"]));
186
  $ux_description = html_entity_decode(esc_attr($_REQUEST["description"]));
187
+ $ux_tags = html_entity_decode(esc_attr($_REQUEST["tags"]));
188
  $ux_urlRedirect = esc_attr($_REQUEST["urlRedirect"]);
189
  $img_gb_path = esc_attr($_REQUEST["img_gb_path"]);
190
  $cover_width = intval($_REQUEST["cover_width"]);
lib/gallery-bank-class.php CHANGED
@@ -8,14 +8,6 @@ function create_global_menus_for_gallery_bank()
8
  global $wpdb;
9
  add_menu_page("Gallery Bank", __("Gallery Bank", gallery_bank), "read", "gallery_bank", "", GALLERY_BK_PLUGIN_URL . "/assets/images/icon.png");
10
  add_submenu_page("gallery_bank", "Dashboard", __("Dashboard", gallery_bank), "read", "gallery_bank", "gallery_bank");
11
- $album_count = $wpdb->get_var
12
- (
13
- "SELECT count(album_id) FROM ".gallery_bank_albums()
14
- );
15
- if($album_count < 3)
16
- {
17
- add_submenu_page("gallery_bank", "Add New Album", __("Add New Album", gallery_bank), "read", "add_album", "add_album");
18
- }
19
  add_submenu_page("gallery_bank", "Short-Codes", __("Short-Codes", gallery_bank), "read", "gallery_bank_shortcode", "gallery_bank_shortcode");
20
  add_submenu_page("gallery_bank", "Album Sorting", __("Album Sorting", gallery_bank), "read", "gallery_album_sorting", "gallery_album_sorting");
21
  add_submenu_page("gallery_bank", "Gallery Bank", __("Global Settings", gallery_bank), "read", "global_settings", "global_settings");
@@ -23,7 +15,7 @@ function create_global_menus_for_gallery_bank()
23
  add_submenu_page("gallery_bank", "Purchase Pro Version", __("Purchase Pro Version", gallery_bank), "read", "gallery_bank_purchase", "gallery_bank_purchase");
24
  add_submenu_page("", "", "", "read", "view_album", "view_album");
25
  add_submenu_page("", "", "", "read", "album_preview", "album_preview");
26
- add_submenu_page("", "", "", "read", "edit_album", "edit_album");
27
  add_submenu_page("", "", "", "read", "images_sorting", "images_sorting");
28
  }
29
  //--------------------------------------------------------------------------------------------------------------//
@@ -57,7 +49,13 @@ function gallery_bank()
57
  include_once GALLERY_BK_PLUGIN_DIR . "/views/dashboard.php";
58
  }
59
 
60
- function add_album()
 
 
 
 
 
 
61
  {
62
  global $wpdb;
63
  $album_count = $wpdb->get_var
@@ -68,7 +66,7 @@ function add_album()
68
  {
69
  global $wpdb;
70
  include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
71
- include_once GALLERY_BK_PLUGIN_DIR . "/views/add-new-album.php";
72
  }
73
  else
74
  {
@@ -79,16 +77,6 @@ function add_album()
79
  <?php
80
  }
81
  }
82
- function gallery_bank_shortcode()
83
- {
84
- include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
85
- include_once GALLERY_BK_PLUGIN_DIR . "/views/shortcode.php";
86
- }
87
- function edit_album()
88
- {
89
- include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
90
- include_once GALLERY_BK_PLUGIN_DIR . "/views/edit-album.php";
91
- }
92
 
93
  function global_settings()
94
  {
8
  global $wpdb;
9
  add_menu_page("Gallery Bank", __("Gallery Bank", gallery_bank), "read", "gallery_bank", "", GALLERY_BK_PLUGIN_URL . "/assets/images/icon.png");
10
  add_submenu_page("gallery_bank", "Dashboard", __("Dashboard", gallery_bank), "read", "gallery_bank", "gallery_bank");
 
 
 
 
 
 
 
 
11
  add_submenu_page("gallery_bank", "Short-Codes", __("Short-Codes", gallery_bank), "read", "gallery_bank_shortcode", "gallery_bank_shortcode");
12
  add_submenu_page("gallery_bank", "Album Sorting", __("Album Sorting", gallery_bank), "read", "gallery_album_sorting", "gallery_album_sorting");
13
  add_submenu_page("gallery_bank", "Gallery Bank", __("Global Settings", gallery_bank), "read", "global_settings", "global_settings");
15
  add_submenu_page("gallery_bank", "Purchase Pro Version", __("Purchase Pro Version", gallery_bank), "read", "gallery_bank_purchase", "gallery_bank_purchase");
16
  add_submenu_page("", "", "", "read", "view_album", "view_album");
17
  add_submenu_page("", "", "", "read", "album_preview", "album_preview");
18
+ add_submenu_page("", "", "", "read", "save_album", "save_album");
19
  add_submenu_page("", "", "", "read", "images_sorting", "images_sorting");
20
  }
21
  //--------------------------------------------------------------------------------------------------------------//
49
  include_once GALLERY_BK_PLUGIN_DIR . "/views/dashboard.php";
50
  }
51
 
52
+
53
+ function gallery_bank_shortcode()
54
+ {
55
+ include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
56
+ include_once GALLERY_BK_PLUGIN_DIR . "/views/shortcode.php";
57
+ }
58
+ function save_album()
59
  {
60
  global $wpdb;
61
  $album_count = $wpdb->get_var
66
  {
67
  global $wpdb;
68
  include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
69
+ include_once GALLERY_BK_PLUGIN_DIR . "/views/edit-album.php";
70
  }
71
  else
72
  {
77
  <?php
78
  }
79
  }
 
 
 
 
 
 
 
 
 
 
80
 
81
  function global_settings()
82
  {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Gallery-Bank,contact-banker
3
  Tags: admin, AJAX, album, albums, best gallery plugin, best portfolio plugin, comments, easy media gallery, filterable gallery, filterable portfolio, flash, foto, fotoalbum, gallery, gallery album, gallery bank, gallery image, gallery wordpress plugin, grid gallery, image, image album, image slider, images, lightbox, links, media, modal, multiple pictures, nextgen, page, pagination gallery, pagination portfolio, photo, photo album, photo albums, photo gallery, Photo Slider, photoalbum, photogallery, photos, picture, pictures, plugin, portfolio, portfolio gallery, portfolio wordpress plugin, Post, posts, responsive gallery, seo image, sidebar, slideshow, thumbnails, videos, website gallery, widget, wordpress gallery plugin, wordpress portfolio plugin, wp gallery, wp gallery plugin
4
  Requires at least: 3.3
5
  Tested up to: 3.9.1
6
- Stable tag: 3.0.28
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -48,7 +48,7 @@ It provides a powerful engine for uploading and managing galleries of images & v
48
 
49
  Gallery Bank is designed to adapt each portfolio to any situation and can be easily used on mobiles as it is a Responsive Plugin.
50
 
51
- ***May 19, 2014: We're happy to announce that Gallery Bank reached 125,450+ plugin downloads in only 11 months. We frequently receive positive feedback from people using our Gallery Bank Plugin for WordPress. Thanks so much for your support!***
52
 
53
  <a href="http://tech-banker.com/forum/gallery-bank-support/" target="_blank">Support Desk - feel free to ask your Queries</a>
54
 
@@ -483,6 +483,11 @@ is False in shortcode.
483
 
484
  == Changelog ==
485
 
 
 
 
 
 
486
  = 3.0.28 =
487
 
488
  * Few Bugs Fixed
3
  Tags: admin, AJAX, album, albums, best gallery plugin, best portfolio plugin, comments, easy media gallery, filterable gallery, filterable portfolio, flash, foto, fotoalbum, gallery, gallery album, gallery bank, gallery image, gallery wordpress plugin, grid gallery, image, image album, image slider, images, lightbox, links, media, modal, multiple pictures, nextgen, page, pagination gallery, pagination portfolio, photo, photo album, photo albums, photo gallery, Photo Slider, photoalbum, photogallery, photos, picture, pictures, plugin, portfolio, portfolio gallery, portfolio wordpress plugin, Post, posts, responsive gallery, seo image, sidebar, slideshow, thumbnails, videos, website gallery, widget, wordpress gallery plugin, wordpress portfolio plugin, wp gallery, wp gallery plugin
4
  Requires at least: 3.3
5
  Tested up to: 3.9.1
6
+ Stable tag: 3.0.29
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
48
 
49
  Gallery Bank is designed to adapt each portfolio to any situation and can be easily used on mobiles as it is a Responsive Plugin.
50
 
51
+ ***May 22, 2014: We're happy to announce that Gallery Bank reached 127,150+ plugin downloads in only 11 months. We frequently receive positive feedback from people using our Gallery Bank Plugin for WordPress. Thanks so much for your support!***
52
 
53
  <a href="http://tech-banker.com/forum/gallery-bank-support/" target="_blank">Support Desk - feel free to ask your Queries</a>
54
 
483
 
484
  == Changelog ==
485
 
486
+ = 3.0.29 =
487
+
488
+ * Few Bugs Fixed
489
+ * Added Functionality to support Bulk Images Upload
490
+
491
  = 3.0.28 =
492
 
493
  * Few Bugs Fixed
views/add-new-album.php DELETED
@@ -1,449 +0,0 @@
1
- <?php
2
- global $wpdb;
3
- $album_css = $wpdb->get_results
4
- (
5
- "SELECT * FROM " . gallery_bank_settings()
6
- );
7
- if (count($album_css) != 0) {
8
- $setting_keys = array();
9
-
10
- for ($flag = 0; $flag < count($album_css); $flag++) {
11
- array_push($setting_keys, $album_css[$flag]->setting_key);
12
- }
13
-
14
- $index = array_search("thumbnails_width", $setting_keys);
15
- $thumbnails_width = $album_css[$index]->setting_value;
16
-
17
- $index = array_search("thumbnails_height", $setting_keys);
18
- $thumbnails_height = $album_css[$index]->setting_value;
19
-
20
- $index = array_search("thumbnails_opacity", $setting_keys);
21
- $thumbnails_opacity = $album_css[$index]->setting_value;
22
-
23
- $index = array_search("thumbnails_border_size", $setting_keys);
24
- $thumbnails_border_size = $album_css[$index]->setting_value;
25
-
26
- $index = array_search("thumbnails_border_radius", $setting_keys);
27
- $thumbnails_border_radius = $album_css[$index]->setting_value;
28
-
29
- $index = array_search("thumbnails_border_color", $setting_keys);
30
- $thumbnails_border_color = $album_css[$index]->setting_value;
31
-
32
- $index = array_search("cover_thumbnail_width", $setting_keys);
33
- $cover_thumbnail_width = $album_css[$index]->setting_value;
34
-
35
- $index = array_search("cover_thumbnail_height", $setting_keys);
36
- $cover_thumbnail_height = $album_css[$index]->setting_value;
37
-
38
- ?>
39
- <!--suppress ALL -->
40
- <style type="text/css">
41
-
42
- .dynamic_css {
43
- border: <?php echo $thumbnails_border_size;?>px solid <?php echo $thumbnails_border_color;?>;
44
- border-radius: <?php echo $thumbnails_border_radius;?>px;
45
- -moz-border-radius: <?php echo $thumbnails_border_radius; ?>px;
46
- -webkit-border-radius: <?php echo $thumbnails_border_radius;?>px;
47
- -khtml-border-radius: <?php echo $thumbnails_border_radius;?>px;
48
- -o-border-radius: <?php echo $thumbnails_border_radius;?>px;
49
- opacity: <?php echo $thumbnails_opacity;?>;
50
- -moz-opacity: <?php echo $thumbnails_opacity; ?>;
51
- -khtml-opacity: <?php echo $thumbnails_opacity; ?>;
52
- }
53
- div.pp_default .pp_top .pp_middle {
54
- background-color: #ffffff;
55
- }
56
- .pp_pic_holder.pp_default {
57
- background-color: #ffffff;
58
- }
59
- div.pp_default .pp_content_container .pp_left {
60
- background-color: #ffffff;
61
- padding-left: 16px;
62
- }
63
-
64
- div.pp_default .pp_content_container .pp_right {
65
- background-color: #ffffff;
66
- padding-right: 13px;
67
- }
68
-
69
- div.pp_default .pp_bottom .pp_middle {
70
- background-color: #ffffff;
71
- }
72
-
73
- div.pp_default .pp_content, div.light_rounded .pp_content {
74
- background-color: #ffffff;
75
- }
76
-
77
- .pp_details {
78
- background-color: #ffffff;
79
- }
80
-
81
- .ppt {
82
- display: none !important;
83
- }
84
- </style>
85
- <?php
86
- }
87
- ?>
88
- <div class="message red" style="display: block;margin-top:30px">
89
- <span>
90
- <strong>You will be only allowed to add 3 galleries. Kindly purchase Premium Version for full access.</strong>
91
- </span>
92
- </div>
93
- <form id="add_new_album" class="layout-form">
94
- <div id="poststuff" style="width: 99% !important;">
95
- <div id="post-body" class="metabox-holder">
96
- <div id="postbox-container-2" class="postbox-container">
97
- <div id="advanced" class="meta-box-sortables">
98
- <div id="gallery_bank_get_started" class="postbox" >
99
- <div class="handlediv" data-target="#ux_add_new_album" title="Click to toggle" data-toggle="collapse"><br></div>
100
- <h3 class="hndle"><span><?php _e("Add New Album", gallery_bank); ?></span></h3>
101
- <div class="inside">
102
- <div id="ux_add_new_album" class="gallery_bank_layout">
103
- <a class="btn btn-inverse" href="admin.php?page=gallery_bank">
104
- <?php _e("Back to Albums", gallery_bank); ?>
105
- </a>
106
- <button type="submit" id="ux_save_album" class="btn btn-info" style="float:right">
107
- <?php _e("Save and Submit Changes", gallery_bank); ?>
108
- </button>
109
- <div class="separator-doubled"></div>
110
- <div id="album_success_message" class="message green" style="display: none;">
111
- <span>
112
- <strong>
113
- <?php _e("Album Published. Kindly wait for the redirect to happen.", gallery_bank); ?>
114
- </strong>
115
- </span>
116
- </div>
117
- <a rel="prettyPhoto[gallery]" href="<?php echo GALLERY_BK_PLUGIN_URL . "/assets/images/how-to-setup-short-code.png";?>">How to setup Short-Codes for Gallery Bank into your WordPress Page/Post?</a>
118
- <div class="fluid-layout">
119
- <div class="layout-span6">
120
- <div class="widget-layout">
121
- <div class="widget-layout-title">
122
- <h4><?php _e("Album Details", gallery_bank); ?></h4>
123
- </div>
124
- <div class="widget-layout-body">
125
- <div class="layout-control-group">
126
- <label class="layout-control-label">
127
- <?php _e("Album Title", gallery_bank); ?> :
128
- </label>
129
-
130
- <div class="layout-controls">
131
- <input type="text" name="ux_title" class="layout-span12" value=""
132
- id="ux_title"
133
- placeholder="<?php _e("Enter your Album Title", gallery_bank); ?>"/>
134
- </div>
135
- </div>
136
- </div>
137
- <div class="widget-layout-body">
138
- <div class="layout-control-group">
139
- <label class="layout-control-label"><?php _e("Description", gallery_bank); ?>
140
- :</label>
141
- </div>
142
- <div class="layout-control-group">
143
- <?php
144
- wp_editor("", $id = "ux_description", $media_buttons = true, $tab_index = 1);
145
- ?>
146
- </div>
147
- </div>
148
- </div>
149
- </div>
150
- <div class="layout-span6">
151
- <div class="widget-layout">
152
- <div class="widget-layout-title">
153
- <h4><?php _e("Upload Images", gallery_bank); ?></h4>
154
- </div>
155
- <div class="widget-layout-body" id="image_uploader">
156
- <p><?php _e("Your browser doesn\"t have Flash, Silverlight or HTML5 support.", gallery_bank) ?></p>
157
- </div>
158
- </div>
159
- </div>
160
- <div class="layout-span6">
161
- <div class="widget-layout">
162
- <div class="widget-layout-title">
163
- <h4><?php _e("Upload Videos", gallery_bank); ?>
164
- <i class="widget_premium_feature"><?php _e(" (Available in Premium Versions)", gallery_bank); ?></i>
165
- </h4>
166
-
167
- </div>
168
- <div class="widget-layout-body" id="video_uploader">
169
- <div class="layout-control-group">
170
- <label class="layout-control-label"><?php _e("Video Url", gallery_bank); ?>
171
- :</label>
172
-
173
- <div class="layout-controls">
174
- <input type="text" name="ux_txt_video_url" class="layout-span12" value=""
175
- id="ux_txt_video_url"
176
- placeholder="<?php _e("Enter your Video Url", gallery_bank); ?>"/>
177
- </div>
178
- </div>
179
- <div class="layout-control-group">
180
- <div class="layout-controls">
181
- <button type="button" onclick="insertVideoToDataTable();"
182
- style="float:right"
183
- class="btn btn-info"><?php _e("Upload Video", gallery_bank); ?></button>
184
- </div>
185
- </div>
186
- </div>
187
- </div>
188
- </div>
189
- </div>
190
- <div class="fluid-layout">
191
- <div class="layout-span12">
192
- <div class="widget-layout">
193
- <div class="widget-layout-title">
194
- <h4><?php _e("Your Gallery Bank Album", gallery_bank); ?></h4>
195
- </div>
196
- <div class="widget-layout-body">
197
- <table class="table table-striped " id="data-table-album">
198
- <thead>
199
- <tr>
200
- <th style="width:10%">
201
- <input type="checkbox" id="grp_select_items" name="grp_select_items"
202
- style="vertical-align:middle;"/>
203
- <button type="button" onclick="deleteSelectedImages();"
204
- style="vertical-align:middle;"
205
- class="btn btn-inverse"><?php _e("Delete", gallery_bank); ?></button>
206
- </th>
207
- <th style="width:15%">
208
- <?php _e("Thumbnail", gallery_bank); ?>
209
- </th>
210
- <th style="width:25%">
211
- <?php _e("Title & Description", gallery_bank); ?>
212
- </th>
213
- <th style="width:20%">
214
- <?php _e("Tags (comma separated list)", gallery_bank); ?>
215
- <i class="widget_premium_feature"><?php _e(" (Available in Premium Versions)", gallery_bank); ?></i>
216
- </th>
217
- <th style="width:25%">
218
- <?php _e("Url to Redirect on click of an Image", gallery_bank); ?>
219
- </th>
220
- <th style="width:5%"></th>
221
- </tr>
222
- </thead>
223
- <tbody>
224
- </tbody>
225
- </table>
226
- </div>
227
- </div>
228
- </div>
229
- </div>
230
- <div class="separator-doubled"></div>
231
- <button type="submit" id="ux_save_album" class="btn btn-info"
232
- style="float:right; margin-top: 20px;"><?php _e("Save and Submit Changes", gallery_bank); ?></button>
233
- <a class="btn btn-inverse" href="admin.php?page=gallery_bank"
234
- style="margin-top: 20px;"><?php _e("Back to Albums", gallery_bank); ?></a>
235
- </div>
236
- </div>
237
- </div>
238
- </div>
239
- </div>
240
- </div>
241
- </div>
242
- </form>
243
- <script type="text/javascript">
244
- //Global Declaration
245
- var url = "<?php echo GALLERY_BK_PLUGIN_URL ?>";
246
- var image_width = <?php echo $thumbnails_width; ?>;
247
- var image_height = <?php echo $thumbnails_height; ?>;
248
- var cover_width = <?php echo $cover_thumbnail_width; ?>;
249
- var cover_height = <?php echo $cover_thumbnail_height; ?>;
250
- jQuery("a[rel^=\"prettyPhoto\"]").prettyPhoto
251
- ({
252
- animation_speed: 1000,
253
- slideshow: 4000,
254
- autoplay_slideshow: false,
255
- opacity: 0.80,
256
- show_title: false,
257
- allow_resize: true
258
- });
259
- oTable = jQuery("#data-table-album").dataTable
260
- ({
261
- "bJQueryUI": false,
262
- "bAutoWidth": true,
263
- "sPaginationType": "full_numbers",
264
- "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
265
- "oLanguage": {
266
- "sLengthMenu": "<span>Show entries:</span> _MENU_"
267
- }
268
- });
269
-
270
- jQuery("#add_new_album").validate
271
- ({
272
- submitHandler: function () {
273
- <?php
274
- if(class_exists("ckeditor_wordpress"))
275
- {
276
- ?>
277
- var uxDescription = encodeURIComponent(CKEDITOR.instances.ux_description.getData());
278
- <?php
279
- }
280
- else
281
- {
282
- ?>
283
- var uxDescription = jQuery("#wp-ux_description-wrap").hasClass("tmce-active") ?
284
- encodeURIComponent(tinyMCE.get("ux_description").getContent())
285
- : encodeURIComponent(jQuery("#ux_description").val());
286
- <?php
287
- }
288
- ?>
289
- var album_name = encodeURIComponent(jQuery("#ux_title").val());
290
- jQuery.post(ajaxurl, "album_name=" + album_name + "&uxDescription=" + uxDescription +
291
- "&param=add_new_album&action=add_new_album_library", function (data)
292
- {
293
- if(data == "")
294
- {
295
- alert("<?php _e( "You will be only allowed to add 3 galleries. Kindly purchase Premium Version for full access!", gallery_bank ); ?>");
296
- }
297
- else
298
- {
299
-
300
- jQuery("#album_success_message").css("display", "block");
301
- jQuery("body,html").animate({
302
- scrollTop: jQuery("body,html").position().top}, "slow");
303
- var album_id = jQuery.trim(data);
304
- var count = 0;
305
- if (oTable.fnGetNodes().length > 0) {
306
- jQuery.each(oTable.fnGetNodes(), function (index, value) {
307
- var controlType = jQuery(value.cells[1]).find("img").attr("type");
308
- var image_name = encodeURIComponent(jQuery(value.cells[1]).find("a").attr("title"));
309
- var img_gb_path = jQuery(value.cells[1]).find("img").attr("imgpath");
310
- var isAlbumCoverSet = jQuery(value.cells[1]).find("input:radio").attr("checked");
311
- var title = jQuery(value.cells[2]).find("input:text").eq(0).val();
312
- var description = jQuery(value.cells[2]).find("textarea").eq(0).val();
313
- var tags = jQuery(value.cells[3]).find("input:text").eq(0).val();
314
- var urlRedirect = "";
315
- if (controlType == "image") {
316
- urlRedirect = jQuery(value.cells[4]).find("input:text").eq(0).val();
317
- }
318
- else {
319
- urlRedirect = "http://";
320
- }
321
- jQuery.post(ajaxurl, "album_id=" + album_id + "&controlType=" + controlType + "&imagename=" + image_name +
322
- "&img_gb_path=" + img_gb_path + "&isAlbumCoverSet=" + isAlbumCoverSet + "&title=" + encodeURIComponent(title) +
323
- "&description=" + encodeURIComponent(description) + "&tags=" + encodeURIComponent(tags) + "&urlRedirect=" + urlRedirect +
324
- "&cover_height=" + cover_height + "&cover_width=" + cover_width +
325
- "&param=add_pic&action=add_new_album_library", function () {
326
- count++;
327
- if (count == parseInt(oTable.fnGetNodes().length)) {
328
- setTimeout(function () {
329
- jQuery("#album_success_message").css("display", "none");
330
- window.location.href = "admin.php?page=gallery_bank";
331
- }, 2000);
332
- }
333
- });
334
- });
335
- }
336
- else {
337
- setTimeout(function () {
338
- jQuery("#album_success_message").css("display", "none");
339
- window.location.href = "admin.php?page=gallery_bank";
340
- }, 2000);
341
- }
342
- }
343
- });
344
- }
345
- });
346
- jQuery("#image_uploader").pluploadQueue
347
- ({
348
- runtimes: "html5,flash,silverlight,html4",
349
- url: url + "/upload.php",
350
- chunk_size: '1mb',
351
- filters: {
352
- max_file_size: "100mb",
353
- mime_types: [
354
- {title: "Image files", extensions: "jpg,jpeg,gif,png"}
355
- ]
356
- },
357
- rename: true,
358
- sortable: true,
359
- dragdrop: true,
360
- unique_names: true,
361
- max_file_count: 20,
362
- views: {
363
- list: true,
364
- thumbs: true, // Show thumbs
365
- active: "thumbs"
366
- },
367
-
368
- flash_swf_url: url + "/assets/Moxie.swf",
369
- silverlight_xap_url: url + "/assets/Moxie.xap",
370
- init: {
371
- FileUploaded: function (up, file,info) {
372
-
373
- var oTable = jQuery("#data-table-album").dataTable();
374
- jQuery.post(ajaxurl, "img_path=" + file.target_name + "&img_name=" + file.name + "&image_width=" + image_width + "&image_height=" + image_height + "&param=add_new_dynamic_row_for_image&action=add_new_album_library", function (data) {
375
- var col1 = jQuery("<td></td>");
376
- col1.append(jQuery.parseJSON(data)[0]);
377
- var col2 = jQuery("<td></td>");
378
- col2.append(jQuery.parseJSON(data)[1]);
379
- var col3 = jQuery("<td></td>");
380
- col3.append(jQuery.parseJSON(data)[2]);
381
- var col4 = jQuery("<td></td>");
382
- col4.append(jQuery.parseJSON(data)[3]);
383
- var col5 = jQuery("<td></td>");
384
- col5.append(jQuery.parseJSON(data)[4]);
385
- var col6 = jQuery("<td></td>");
386
- col6.append(jQuery.parseJSON(data)[5]);
387
- oTable.fnAddData([col1.html(), col2.html(), col3.html(), col4.html(), col5.html(), col6.html()]);
388
- select_radio();
389
- jQuery(".hovertip").tooltip();
390
- });
391
- },
392
- UploadComplete: function () {
393
- jQuery(".plupload_buttons").css("display", "block");
394
- jQuery(".plupload_upload_status").css("display", "none");
395
- }
396
- }
397
- });
398
- function deleteImage(control) {
399
- var r = confirm("<?php _e("Are you sure you want to delete this Image?", gallery_bank );?>");
400
- if (r == true) {
401
- var row = jQuery(control).closest("tr");
402
- var oTable = jQuery("#data-table-album").dataTable();
403
- oTable.fnDeleteRow(row[0]);
404
- select_radio();
405
- }
406
- }
407
- function insertVideoToDataTable()
408
- {
409
- alert("<?php _e( "This feature is only available in Paid Premium Version!", gallery_bank ); ?>");
410
- }
411
- jQuery("#grp_select_items").click(function () {
412
- var oTable = jQuery("#data-table-album").dataTable();
413
- var checkProp = jQuery("#grp_select_items").prop("checked");
414
- jQuery("input:checkbox", oTable.fnGetNodes()).each(function () {
415
- if (!checkProp) {
416
- jQuery(this).removeAttr("checked");
417
- } else {
418
- jQuery(this).attr("checked", "checked");
419
- }
420
- });
421
- });
422
- function deleteSelectedImages() {
423
- alert("<?php _e( "This feature is only available in Paid Premium Version!", gallery_bank ); ?>");
424
- }
425
- //This function is to select radio button of first image
426
- function select_radio() {
427
- if (!(jQuery("input[type=radio][name=ux_album_cover]:checked").size() > 0)) {
428
-
429
- jQuery(jQuery.unique(
430
- jQuery("INPUT:radio")
431
- .map(function (i, e) {
432
- return jQuery(e).attr("name")
433
- }
434
- ).get()
435
- )).each(function (i, e) {
436
- jQuery("INPUT:radio[name=\"" + e + "\"]:visible:first")
437
- .attr("checked", "checked");
438
- });
439
- }
440
- }
441
- function preventDot(e)
442
- {
443
- var key = e.charCode ? e.charCode : e.keyCode;
444
- if (key == 46)
445
- {
446
- return false;
447
- }
448
- }
449
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/dashboard.php CHANGED
@@ -1,5 +1,10 @@
1
  <?php
2
  global $wpdb;
 
 
 
 
 
3
  $popup = get_option("gallery-bank-info-popup");
4
  if($popup == "")
5
  {
@@ -172,7 +177,7 @@
172
  if($album_count < 3)
173
  {
174
  ?>
175
- <a class="btn btn-info" href="admin.php?page=add_album"><?php _e("Add New Album", gallery_bank);?></a>
176
  <?php
177
  }
178
  ?>
@@ -222,7 +227,7 @@
222
  ?>
223
  <tr>
224
  <td>
225
- <a href="admin.php?page=edit_album&album_id=<?php echo $album[$flag]->album_id;?>" title="<?php echo stripcslashes(htmlspecialchars_decode($album[$flag] -> album_name));?>" >
226
  <div class="imgLiquidFill dynamic_cover_css">
227
  <?php
228
  if(count($albumCover) != 0)
@@ -259,7 +264,7 @@
259
  <td>
260
  <ul class="layout-table-controls">
261
  <li>
262
- <a href="admin.php?page=edit_album&album_id=<?php echo $album[$flag]->album_id;?>" class="btn hovertip" data-original-title="<?php _e( "Edit Album", gallery_bank ); ?>">
263
  <i class="icon-pencil" ></i>
264
  </a>
265
  </li>
@@ -416,6 +421,7 @@ function close_popup()
416
  });
417
 
418
  }
 
419
  function delete_album(album_id)
420
  {
421
  var r = confirm("<?php _e( "Are you sure you want to delete this Album?", gallery_bank ); ?>");
1
  <?php
2
  global $wpdb;
3
+ $last_album_id = $wpdb->get_var
4
+ (
5
+ "SELECT album_id FROM " .gallery_bank_albums(). " order by album_id desc limit 1"
6
+ );
7
+
8
  $popup = get_option("gallery-bank-info-popup");
9
  if($popup == "")
10
  {
177
  if($album_count < 3)
178
  {
179
  ?>
180
+ <a class="btn btn-info" href="admin.php?page=save_album&album_id=<?php echo count($last_album_id) == 0 ? 1 : $last_album_id + 1; ?>"><?php _e("Add New Album", gallery_bank);?></a>
181
  <?php
182
  }
183
  ?>
227
  ?>
228
  <tr>
229
  <td>
230
+ <a href="admin.php?page=save_album&album_id=<?php echo $album[$flag]->album_id;?>" title="<?php echo stripcslashes(htmlspecialchars_decode($album[$flag] -> album_name));?>" >
231
  <div class="imgLiquidFill dynamic_cover_css">
232
  <?php
233
  if(count($albumCover) != 0)
264
  <td>
265
  <ul class="layout-table-controls">
266
  <li>
267
+ <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 ); ?>">
268
  <i class="icon-pencil" ></i>
269
  </a>
270
  </li>
421
  });
422
 
423
  }
424
+
425
  function delete_album(album_id)
426
  {
427
  var r = confirm("<?php _e( "Are you sure you want to delete this Album?", gallery_bank ); ?>");
views/edit-album.php CHANGED
@@ -1,15 +1,57 @@
1
  <?php
2
- global $wpdb;
3
 
4
  $album_id = intval($_REQUEST["album_id"]);
5
- $album = $wpdb->get_row
6
  (
7
- $wpdb->prepare
8
- (
9
- "SELECT * FROM " . gallery_bank_albums() . " where album_id = %d",
10
- $album_id
11
- )
12
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  $pics = $wpdb->get_results
14
  (
15
  $wpdb->prepare
@@ -72,6 +114,11 @@ if (count($album_css) != 0)
72
  -khtml-opacity: <?php echo $thumbnails_opacity; ?>;
73
  }
74
  </style>
 
 
 
 
 
75
  <form id="edit_album" class="layout-form">
76
  <div id="poststuff" style="width: 99% !important;">
77
  <div id="post-body" class="metabox-holder">
@@ -79,15 +126,15 @@ if (count($album_css) != 0)
79
  <div id="advanced" class="meta-box-sortables">
80
  <div id="gallery_bank_get_started" class="postbox" >
81
  <div class="handlediv" data-target="#ux_edit_album" title="Click to toggle" data-toggle="collapse"><br></div>
82
- <h3 class="hndle"><span><?php _e("Edit Album", gallery_bank); ?></span></h3>
83
  <div class="inside">
84
  <div id="ux_edit_album" class="gallery_bank_layout">
85
  <a class="btn btn-inverse" href="admin.php?page=gallery_bank"><?php _e("Back to Albums", gallery_bank); ?></a>
86
- <button type="submit" class="btn btn-info" style="float:right"><?php _e("Update Album", gallery_bank); ?></button>
87
  <div class="separator-doubled"></div>
88
  <div id="update_album_success_message" class="message green" style="display: none;">
89
  <span>
90
- <strong><?php _e("Album Updated. Kindly wait for the redirect to happen.", gallery_bank); ?></strong>
91
  </span>
92
  </div>
93
  <div class="fluid-layout">
@@ -167,6 +214,7 @@ if (count($album_css) != 0)
167
  <table class="table table-striped " id="data-table-edit-album">
168
  <thead>
169
  <tr>
 
170
  <th style="width:11%">
171
  <input type="checkbox" id="grp_select_items" name="grp_select_items" style="vertical-align:middle;"/>
172
  <button type="button" onclick="deleteSelectedImages();" style="vertical-align:middle;"
@@ -186,6 +234,7 @@ if (count($album_css) != 0)
186
  <?php _e("Url to Redirect on click of an Image", gallery_bank); ?>
187
  </th>
188
  <th style="width:5%"></th>
 
189
  </tr>
190
  </thead>
191
  <tbody>
@@ -196,9 +245,10 @@ if (count($album_css) != 0)
196
  <?php
197
  if ($pics[$flag]->video == 1) {
198
  ?>
 
199
  <td>
200
  <input type="checkbox" id="ux_grp_select_items" name="ux_grp_select_items"
201
- value="<?php echo $pics[$flag]->pic_id; ?>" control="edit"/>
202
  </td>
203
  <td>
204
  <a href="javascript:void(0);" title="<?php echo $pics[$flag]->pic_name; ?>">
@@ -206,7 +256,7 @@ if (count($album_css) != 0)
206
  imgpath="<?php echo $pics[$flag]->pic_name; ?>"
207
  src="<?php echo stripcslashes($video_url); ?>" id="ux_gb_img"
208
  name="ux_gb_img" width="<?php echo $thumbnails_width; ?>px;"
209
- class="edit dynamic_css" picId="<?php echo $pics[$flag]->pic_id; ?>"/>
210
  </a><br/>
211
  <?php $dateFormat = date("F j, Y", strtotime($pics[$flag]->date)); ?>
212
  <label><strong>Video</strong></label><br/><label><?php echo $dateFormat; ?></label>
@@ -234,24 +284,25 @@ if (count($album_css) != 0)
234
  <td>
235
  <a class="btn hovertip " id="ux_btn_delete" style="cursor: pointer;"
236
  data-original-title="<?php _e("Delete Video", gallery_bank) ?>"
237
- onclick="deleteImage(this);" type="edit"
238
  controlId="<?php echo $pics[$flag]->pic_id; ?>">
239
  <i class="icon-trash"></i>
240
  </a>
241
  </td>
 
242
  <?php
243
  } else {
244
  ?>
245
  <td>
246
  <input type="checkbox" id="ux_grp_select_items" name="ux_grp_select_items"
247
- value="<?php echo $pics[$flag]->pic_id; ?>" control="edit"/>
248
  </td>
249
  <td>
250
  <a href="javascript:void(0);" title="<?php echo $pics[$flag]->pic_name; ?>">
251
  <img type="image" imgpath="<?php echo $pics[$flag]->thumbnail_url; ?>"
252
  src="<?php echo stripcslashes(GALLERY_BK_THUMB_SMALL_URL . $pics[$flag]->thumbnail_url); ?>"
253
  id="ux_gb_img" imageid="<?php echo $pics[$flag]->pic_id; ?>"
254
- name="ux_gb_img" class="edit dynamic_css"
255
  width="<?php echo $thumbnails_width ?>"/>
256
  </a>
257
  <br/>
@@ -277,18 +328,18 @@ if (count($album_css) != 0)
277
  </td>
278
  <td>
279
  <input placeholder="<?php _e("Enter your Title", gallery_bank) ?>"
280
- class="layout-span12 edit" type="text"
281
  name="ux_edit_img_title_<?php echo $pics[$flag]->pic_id; ?>"
282
  id="ux_edit_img_title_<?php echo $pics[$flag]->pic_id; ?>"
283
  value="<?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->title))); ?>"/>
284
  <textarea placeholder="<?php _e("Enter your Description ", gallery_bank) ?>"
285
- style="margin-top:20px" rows="5" class="layout-span12 edit"
286
  name="ux_edit_txt_desc_<?php echo $pics[$flag]->pic_id; ?>"
287
  id="ux_edit_txt_desc_<?php echo $pics[$flag]->pic_id; ?>"><?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->description))); ?></textarea>
288
  </td>
289
  <td>
290
  <input placeholder="<?php _e("Enter your Tags", gallery_bank) ?>"
291
- class="layout-span12 edit" type="text" onkeypress="return preventDot(event);"
292
  name="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>"
293
  id="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>" readonly="readonly"
294
  value=""/>
@@ -304,16 +355,19 @@ if (count($album_css) != 0)
304
  <input value="<?php echo $domain; ?>" type="text"
305
  id="ux_edit_txt_url_<?php echo $pics[$flag]->pic_id; ?>"
306
  name="ux_edit_txt_url_<?php echo $pics[$flag]->pic_id; ?>"
307
- class="layout-span12 edit"/>
308
  </td>
309
  <td>
310
  <a class="btn hovertip" id="ux_btn_delete" style="cursor: pointer;"
311
  data-original-title="<?php _e("Delete Image", gallery_bank) ?>"
312
- onclick="deleteImage(this);" type="edit"
313
  controlId="<?php echo $pics[$flag]->pic_id; ?>">
314
  <i class="icon-trash"></i>
315
  </a>
316
  </td>
 
 
 
317
  <?php
318
  }
319
  ?>
@@ -328,7 +382,7 @@ if (count($album_css) != 0)
328
  </div>
329
  </div>
330
  <div class="separator-doubled"></div>
331
- <button type="submit" class="btn btn-info" style="float:right; margin-top: 20px;"><?php _e("Update Album", gallery_bank); ?></button>
332
  <a class="btn btn-inverse" href="admin.php?page=gallery_bank" style="margin-top: 20px;"><?php _e("Back to Albums", gallery_bank); ?></a>
333
  </div>
334
  </div>
@@ -356,7 +410,10 @@ if (count($album_css) != 0)
356
  "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
357
  "oLanguage": {
358
  "sLengthMenu": "<span>Show entries:</span> _MENU_"
359
- }
 
 
 
360
  });
361
  jQuery("#edit_album").validate
362
  ({
@@ -405,7 +462,6 @@ if (count($album_css) != 0)
405
  var urlRedirect = "";
406
  var picId = "";
407
 
408
- if (controlClass == "edit dynamic_css") {
409
  controlType = jQuery(value.cells[1]).find("img").attr("type");
410
  picId = jQuery(value.cells[1]).find("img").attr("imageId");
411
  img_gb_path = jQuery(value.cells[1]).find("img").attr("imgpath");
@@ -425,29 +481,6 @@ if (count($album_css) != 0)
425
  window.location.href = "admin.php?page=gallery_bank";
426
  }, 3000);
427
  });
428
- }
429
- else {
430
- controlType = jQuery(value.cells[1]).find("img").attr("type");
431
- var image_name = encodeURIComponent(jQuery(value.cells[1]).find("a").attr("title"));
432
- img_gb_path = jQuery(value.cells[1]).find("img").attr("imgpath");
433
- isAlbumCoverSet = jQuery(value.cells[1]).find("input:radio").attr("checked");
434
- title = jQuery(value.cells[2]).find("input:text").eq(0).val();
435
- description = jQuery(value.cells[2]).find("textarea").eq(0).val();
436
- tags = jQuery(value.cells[3]).find("input:text").eq(0).val();
437
- urlRedirect = jQuery(value.cells[4]).find("input:text").eq(0).val();
438
- jQuery.post(ajaxurl, "album_id=" + albumid + "&controlType=" + controlType + "&imagename=" + image_name +
439
- "&img_gb_path=" + img_gb_path + "&isAlbumCoverSet=" + isAlbumCoverSet + "&title=" + encodeURIComponent(title) +
440
- "&description=" + encodeURIComponent(description) + "&tags=" + encodeURIComponent(tags) + "&urlRedirect=" + urlRedirect +
441
- "&cover_height=" + cover_height + "&cover_width=" + cover_width +
442
- "&param=add_pic&action=add_new_album_library", function () {
443
- count++;
444
- if (count == parseInt(oTable.fnGetNodes().length))
445
- setTimeout(function () {
446
- jQuery("#update_album_success_message").css("display", "none");
447
- window.location.href = "admin.php?page=gallery_bank";
448
- }, 3000);
449
- });
450
- }
451
  });
452
  if (count == parseInt(oTable.fnGetNodes().length)) {
453
  setTimeout(function () {
@@ -483,27 +516,46 @@ if (count($album_css) != 0)
483
  silverlight_xap_url: url + "/assets/Moxie.xap",
484
  init: {
485
  FileUploaded: function (up, file) {
 
486
  var oTable = jQuery("#data-table-edit-album").dataTable();
487
-
488
- jQuery.post(ajaxurl, "img_path=" + file.target_name + "&img_name=" + file.name + "&image_width=" + image_width +
489
- "&image_height=" + image_height +
490
- "&param=add_new_dynamic_row_for_image&action=add_new_album_library", function (data) {
491
- var col1 = jQuery("<td></td>");
492
- col1.append(jQuery.parseJSON(data)[0]);
493
- var col2 = jQuery("<td></td>");
494
- col2.append(jQuery.parseJSON(data)[1]);
495
- var col3 = jQuery("<td></td>");
496
- col3.append(jQuery.parseJSON(data)[2]);
497
- var col4 = jQuery("<td></td>");
498
- col4.append(jQuery.parseJSON(data)[3]);
499
- var col5 = jQuery("<td></td>");
500
- col5.append(jQuery.parseJSON(data)[4]);
501
- var col6 = jQuery("<td></td>");
502
- col6.append(jQuery.parseJSON(data)[5]);
503
- oTable.fnAddData([col1.html(), col2.html(), col3.html(), col4.html(), col5.html(), col6.html()]);
504
- select_radio();
505
- jQuery(".hovertip").tooltip();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
506
  });
 
507
  },
508
  UploadComplete: function () {
509
  jQuery(".plupload_buttons").css("display", "block");
@@ -515,13 +567,10 @@ if (count($album_css) != 0)
515
  var r = confirm("<?php _e("Are you sure you want to delete this Image?", gallery_bank)?>");
516
  if (r == true) {
517
  var row = jQuery(control).closest("tr");
518
- var type = jQuery(control).attr("type");
519
  var oTable = jQuery("#data-table-edit-album").dataTable();
520
- if (type == "edit")
521
- {
522
  var controlId = jQuery(control).attr("controlid");
523
  delete_array.push(controlId);
524
- }
525
  oTable.fnDeleteRow(row[0]);
526
  select_radio();
527
  }
1
  <?php
2
+ global $wpdb,$current_user;
3
 
4
  $album_id = intval($_REQUEST["album_id"]);
5
+ $last_albums_id = $wpdb->get_var
6
  (
7
+ $wpdb->prepare
8
+ (
9
+ "SELECT album_id FROM " .gallery_bank_albums(). " where album_id= %d",
10
+ $album_id
11
+ )
12
  );
13
+ $album_count = $wpdb->get_var
14
+ (
15
+ "SELECT count(album_id) FROM ".gallery_bank_albums()
16
+ );
17
+ if($album_count < 3)
18
+ {
19
+ if($last_albums_id == 0)
20
+ {
21
+ $wpdb->query
22
+ (
23
+ $wpdb->prepare
24
+ (
25
+ "INSERT INTO " . gallery_bank_albums() . "(album_id,album_name, description, album_date, author, album_order)
26
+ VALUES(%d, %s, %s, CURDATE(), %s, %d)",
27
+ $album_id,
28
+ "Untitled Album",
29
+ "",
30
+ $current_user->display_name,
31
+ $album_id
32
+ )
33
+ );
34
+ $album = $wpdb->get_row
35
+ (
36
+ $wpdb->prepare
37
+ (
38
+ "SELECT * FROM " . gallery_bank_albums() . " where album_id = %d",
39
+ $album_id
40
+ )
41
+ );
42
+ }
43
+ else
44
+ {
45
+ $album = $wpdb->get_row
46
+ (
47
+ $wpdb->prepare
48
+ (
49
+ "SELECT * FROM " . gallery_bank_albums() . " where album_id = %d",
50
+ $album_id
51
+ )
52
+ );
53
+ }
54
+ }
55
  $pics = $wpdb->get_results
56
  (
57
  $wpdb->prepare
114
  -khtml-opacity: <?php echo $thumbnails_opacity; ?>;
115
  }
116
  </style>
117
+ <div class="message red" style="display: block;margin-top:30px">
118
+ <span>
119
+ <strong>You will be only allowed to add 3 galleries. Kindly purchase Premium Version for full access.</strong>
120
+ </span>
121
+ </div>
122
  <form id="edit_album" class="layout-form">
123
  <div id="poststuff" style="width: 99% !important;">
124
  <div id="post-body" class="metabox-holder">
126
  <div id="advanced" class="meta-box-sortables">
127
  <div id="gallery_bank_get_started" class="postbox" >
128
  <div class="handlediv" data-target="#ux_edit_album" title="Click to toggle" data-toggle="collapse"><br></div>
129
+ <h3 class="hndle"><span><?php _e("Album", gallery_bank); ?></span></h3>
130
  <div class="inside">
131
  <div id="ux_edit_album" class="gallery_bank_layout">
132
  <a class="btn btn-inverse" href="admin.php?page=gallery_bank"><?php _e("Back to Albums", gallery_bank); ?></a>
133
+ <button type="submit" class="btn btn-info" style="float:right"><?php _e("Save Album", gallery_bank); ?></button>
134
  <div class="separator-doubled"></div>
135
  <div id="update_album_success_message" class="message green" style="display: none;">
136
  <span>
137
+ <strong><?php _e("Album Saved. Kindly wait for the redirect to happen.", gallery_bank); ?></strong>
138
  </span>
139
  </div>
140
  <div class="fluid-layout">
214
  <table class="table table-striped " id="data-table-edit-album">
215
  <thead>
216
  <tr>
217
+
218
  <th style="width:11%">
219
  <input type="checkbox" id="grp_select_items" name="grp_select_items" style="vertical-align:middle;"/>
220
  <button type="button" onclick="deleteSelectedImages();" style="vertical-align:middle;"
234
  <?php _e("Url to Redirect on click of an Image", gallery_bank); ?>
235
  </th>
236
  <th style="width:5%"></th>
237
+ <th style="visibility: hidden"></th>
238
  </tr>
239
  </thead>
240
  <tbody>
245
  <?php
246
  if ($pics[$flag]->video == 1) {
247
  ?>
248
+
249
  <td>
250
  <input type="checkbox" id="ux_grp_select_items" name="ux_grp_select_items"
251
+ value="<?php echo $pics[$flag]->pic_id; ?>" />
252
  </td>
253
  <td>
254
  <a href="javascript:void(0);" title="<?php echo $pics[$flag]->pic_name; ?>">
256
  imgpath="<?php echo $pics[$flag]->pic_name; ?>"
257
  src="<?php echo stripcslashes($video_url); ?>" id="ux_gb_img"
258
  name="ux_gb_img" width="<?php echo $thumbnails_width; ?>px;"
259
+ class="dynamic_css" picId="<?php echo $pics[$flag]->pic_id; ?>"/>
260
  </a><br/>
261
  <?php $dateFormat = date("F j, Y", strtotime($pics[$flag]->date)); ?>
262
  <label><strong>Video</strong></label><br/><label><?php echo $dateFormat; ?></label>
284
  <td>
285
  <a class="btn hovertip " id="ux_btn_delete" style="cursor: pointer;"
286
  data-original-title="<?php _e("Delete Video", gallery_bank) ?>"
287
+ onclick="deleteImage(this);"
288
  controlId="<?php echo $pics[$flag]->pic_id; ?>">
289
  <i class="icon-trash"></i>
290
  </a>
291
  </td>
292
+
293
  <?php
294
  } else {
295
  ?>
296
  <td>
297
  <input type="checkbox" id="ux_grp_select_items" name="ux_grp_select_items"
298
+ value="<?php echo $pics[$flag]->pic_id; ?>" />
299
  </td>
300
  <td>
301
  <a href="javascript:void(0);" title="<?php echo $pics[$flag]->pic_name; ?>">
302
  <img type="image" imgpath="<?php echo $pics[$flag]->thumbnail_url; ?>"
303
  src="<?php echo stripcslashes(GALLERY_BK_THUMB_SMALL_URL . $pics[$flag]->thumbnail_url); ?>"
304
  id="ux_gb_img" imageid="<?php echo $pics[$flag]->pic_id; ?>"
305
+ name="ux_gb_img" class=" dynamic_css"
306
  width="<?php echo $thumbnails_width ?>"/>
307
  </a>
308
  <br/>
328
  </td>
329
  <td>
330
  <input placeholder="<?php _e("Enter your Title", gallery_bank) ?>"
331
+ class="layout-span12 " type="text"
332
  name="ux_edit_img_title_<?php echo $pics[$flag]->pic_id; ?>"
333
  id="ux_edit_img_title_<?php echo $pics[$flag]->pic_id; ?>"
334
  value="<?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->title))); ?>"/>
335
  <textarea placeholder="<?php _e("Enter your Description ", gallery_bank) ?>"
336
+ style="margin-top:20px" rows="5" class="layout-span12 "
337
  name="ux_edit_txt_desc_<?php echo $pics[$flag]->pic_id; ?>"
338
  id="ux_edit_txt_desc_<?php echo $pics[$flag]->pic_id; ?>"><?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->description))); ?></textarea>
339
  </td>
340
  <td>
341
  <input placeholder="<?php _e("Enter your Tags", gallery_bank) ?>"
342
+ class="layout-span12 " type="text" onkeypress="return preventDot(event);"
343
  name="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>"
344
  id="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>" readonly="readonly"
345
  value=""/>
355
  <input value="<?php echo $domain; ?>" type="text"
356
  id="ux_edit_txt_url_<?php echo $pics[$flag]->pic_id; ?>"
357
  name="ux_edit_txt_url_<?php echo $pics[$flag]->pic_id; ?>"
358
+ class="layout-span12 "/>
359
  </td>
360
  <td>
361
  <a class="btn hovertip" id="ux_btn_delete" style="cursor: pointer;"
362
  data-original-title="<?php _e("Delete Image", gallery_bank) ?>"
363
+ onclick="deleteImage(this);"
364
  controlId="<?php echo $pics[$flag]->pic_id; ?>">
365
  <i class="icon-trash"></i>
366
  </a>
367
  </td>
368
+ <td style="visibility: hidden">
369
+ <?php echo $pics[$flag]->pic_id; ?>
370
+ </td>
371
  <?php
372
  }
373
  ?>
382
  </div>
383
  </div>
384
  <div class="separator-doubled"></div>
385
+ <button type="submit" class="btn btn-info" style="float:right; margin-top: 20px;"><?php _e("Save Album", gallery_bank); ?></button>
386
  <a class="btn btn-inverse" href="admin.php?page=gallery_bank" style="margin-top: 20px;"><?php _e("Back to Albums", gallery_bank); ?></a>
387
  </div>
388
  </div>
410
  "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
411
  "oLanguage": {
412
  "sLengthMenu": "<span>Show entries:</span> _MENU_"
413
+ },
414
+ "aaSorting": [[ 6, "asc" ]],
415
+ "aoColumnDefs": [{ "bSortable": false, "aTargets": [0] },{ "bSortable": false, "aTargets": [0] }]
416
+
417
  });
418
  jQuery("#edit_album").validate
419
  ({
462
  var urlRedirect = "";
463
  var picId = "";
464
 
 
465
  controlType = jQuery(value.cells[1]).find("img").attr("type");
466
  picId = jQuery(value.cells[1]).find("img").attr("imageId");
467
  img_gb_path = jQuery(value.cells[1]).find("img").attr("imgpath");
481
  window.location.href = "admin.php?page=gallery_bank";
482
  }, 3000);
483
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
484
  });
485
  if (count == parseInt(oTable.fnGetNodes().length)) {
486
  setTimeout(function () {
516
  silverlight_xap_url: url + "/assets/Moxie.xap",
517
  init: {
518
  FileUploaded: function (up, file) {
519
+
520
  var oTable = jQuery("#data-table-edit-album").dataTable();
521
+ var albumid = jQuery("#ux_hidden_album_id").val();
522
+ var controlType = "image";
523
+ var image_name = file.name;
524
+ var img_gb_path = file.target_name;
525
+ var isAlbumCoverSet = "";
526
+ var title = "";
527
+ var description = "";
528
+ var tags = "";
529
+ var urlRedirect = "http://";
530
+ jQuery.post(ajaxurl, "album_id=" + albumid + "&controlType=" + controlType + "&imagename=" + image_name +
531
+ "&img_gb_path=" + img_gb_path + "&isAlbumCoverSet=" + isAlbumCoverSet + "&title=" + encodeURIComponent(title) +
532
+ "&description=" + encodeURIComponent(description) + "&tags=" + encodeURIComponent(tags) + "&urlRedirect=" + urlRedirect +
533
+ "&cover_height=" + cover_height + "&cover_width=" + cover_width +
534
+ "&param=add_pic&action=add_new_album_library", function (data) {
535
+
536
+ jQuery.post(ajaxurl, "img_path=" + file.target_name + "&img_name=" + file.name + "&image_width=" + image_width +
537
+ "&image_height=" + image_height + "&picid=" + data +
538
+ "&param=add_new_dynamic_row_for_image&action=add_new_album_library", function (data) {
539
+ var col1 = jQuery("<td></td>");
540
+ col1.append(jQuery.parseJSON(data)[0]);
541
+ var col2 = jQuery("<td></td>");
542
+ col2.append(jQuery.parseJSON(data)[1]);
543
+ var col3 = jQuery("<td></td>");
544
+ col3.append(jQuery.parseJSON(data)[2]);
545
+ var col4 = jQuery("<td></td>");
546
+ col4.append(jQuery.parseJSON(data)[3]);
547
+ var col5 = jQuery("<td></td>");
548
+ col5.append(jQuery.parseJSON(data)[4]);
549
+ var col6 = jQuery("<td></td>");
550
+ col6.append(jQuery.parseJSON(data)[5]);
551
+ var col7 = jQuery("<td style=\"visibility:hidden;\"></td>");
552
+ oTable.fnAddData([col1.html(), col2.html(), col3.html(), col4.html(), col5.html(), col6.html(), col7.html()]);
553
+
554
+ select_radio();
555
+ jQuery(".hovertip").tooltip();
556
+ });
557
  });
558
+
559
  },
560
  UploadComplete: function () {
561
  jQuery(".plupload_buttons").css("display", "block");
567
  var r = confirm("<?php _e("Are you sure you want to delete this Image?", gallery_bank)?>");
568
  if (r == true) {
569
  var row = jQuery(control).closest("tr");
 
570
  var oTable = jQuery("#data-table-edit-album").dataTable();
 
 
571
  var controlId = jQuery(control).attr("controlid");
572
  delete_array.push(controlId);
573
+
574
  oTable.fnDeleteRow(row[0]);
575
  select_radio();
576
  }
views/header.php CHANGED
@@ -22,9 +22,6 @@ switch($_REQUEST["page"])
22
  case "gallery_bank":
23
  $page = "Dashboard";
24
  break;
25
- case "add_album":
26
- $page = "Add New Album";
27
- break;
28
  case "gallery_bank_shortcode":
29
  $page = "Short-Codes";
30
  break;
@@ -40,8 +37,8 @@ switch($_REQUEST["page"])
40
  case "gallery_bank_purchase":
41
  $page = "Purchase Pro Version";
42
  break;
43
- case "edit_album":
44
- $page = "Edit Album";
45
  break;
46
  case "images_sorting":
47
  $page = "Re-order Images";
@@ -61,23 +58,11 @@ switch($_REQUEST["page"])
61
  </ul>
62
  <h2 class="nav-tab-wrapper">
63
  <a class="nav-tab " id="gallery_bank" href="admin.php?page=gallery_bank">Dashboard</a>
64
- <?php
65
- $album_count = $wpdb->get_var
66
- (
67
- "SELECT count(album_id) FROM ".gallery_bank_albums()
68
- );
69
- if($album_count < 3)
70
- {
71
- ?>
72
- <a class="nav-tab " id="add_album" href="admin.php?page=add_album">Add New Album</a>
73
- <?php
74
- }
75
- ?>
76
- <a class="nav-tab " id="gallery_bank_shortcode" href="admin.php?page=gallery_bank_shortcode">Short-Codes</a>
77
- <a class="nav-tab " id="gallery_album_sorting" href="admin.php?page=gallery_album_sorting">Album Sorting</a>
78
- <a class="nav-tab " id="global_settings" href="admin.php?page=global_settings">Global Settings</a>
79
- <a class="nav-tab " id="gallery_bank_system_status" href="admin.php?page=gallery_bank_system_status">System Status</a>
80
- <a class="nav-tab " id="gallery_bank_purchase" href="admin.php?page=gallery_bank_purchase">Purchase Pro Version</a>
81
  </h2>
82
  <?php
83
  if(in_array($language, $gb_lang))
22
  case "gallery_bank":
23
  $page = "Dashboard";
24
  break;
 
 
 
25
  case "gallery_bank_shortcode":
26
  $page = "Short-Codes";
27
  break;
37
  case "gallery_bank_purchase":
38
  $page = "Purchase Pro Version";
39
  break;
40
+ case "save_album":
41
+ $page = "Album";
42
  break;
43
  case "images_sorting":
44
  $page = "Re-order Images";
58
  </ul>
59
  <h2 class="nav-tab-wrapper">
60
  <a class="nav-tab " id="gallery_bank" href="admin.php?page=gallery_bank">Dashboard</a>
61
+ <a class="nav-tab " id="gallery_bank_shortcode" href="admin.php?page=gallery_bank_shortcode"><?php _e("Short-Codes", gallery_bank);?></a>
62
+ <a class="nav-tab " id="gallery_album_sorting" href="admin.php?page=gallery_album_sorting"><?php _e("Album Sorting", gallery_bank);?></a>
63
+ <a class="nav-tab " id="global_settings" href="admin.php?page=global_settings"><?php _e("Global Settings", gallery_bank);?></a>
64
+ <a class="nav-tab " id="gallery_bank_system_status" href="admin.php?page=gallery_bank_system_status"><?php _e("System Status", gallery_bank);?></a>
65
+ <a class="nav-tab " id="gallery_bank_purchase" href="admin.php?page=gallery_bank_purchase"><?php _e("Purchase Pro Version", gallery_bank);?></a>
 
 
 
 
 
 
 
 
 
 
 
 
66
  </h2>
67
  <?php
68
  if(in_array($language, $gb_lang))
views/purchase_pro_version.php CHANGED
@@ -1,3 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <form id="gallery_bank_pricing" class="layout-form">
2
  <div id="poststuff" style="width: 99% !important;">
3
  <div id="post-body" class="metabox-holder columns-2">
1
+ <?php
2
+ if (isset($_REQUEST["msg"]))
3
+ {
4
+ if(esc_attr($_REQUEST["msg"]) == "no")
5
+ {
6
+ update_option("gallery-bank-banner", "no");
7
+ ?>
8
+ <style type="text/css" >
9
+ #ux_buy_pro
10
+ {
11
+ display:none;
12
+ }
13
+ </style>
14
+ <?php
15
+ }
16
+ }
17
+ ?>
18
  <form id="gallery_bank_pricing" class="layout-form">
19
  <div id="poststuff" style="width: 99% !important;">
20
  <div id="post-body" class="metabox-holder columns-2">