Gallery Bank: WordPress Photo Gallery Plugin - Version 1.8.4

Version Description

  • Introduced Sorting of Images in an Album
  • Album Formatting conflict resolved
Download this release

Release Info

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

Code changes from version 1.8.3 to 1.8.4

.project ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>gallerybank1.8.3</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>com.aptana.ide.core.unifiedBuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ </buildSpec>
14
+ <natures>
15
+ <nature>com.aptana.projects.webnature</nature>
16
+ </natures>
17
+ </projectDescription>
gallery-bank.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://gallery-bank.com
5
  Description: Gallery Bank is an interactive WordPress photo gallery plugin, best fit for creative and corporate portfolio websites.
6
  Author: Gallery-Bank
7
- Version: 1.8.3
8
  Author URI: http://gallery-bank.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4
  Plugin URI: http://gallery-bank.com
5
  Description: Gallery Bank is an interactive WordPress photo gallery plugin, best fit for creative and corporate portfolio websites.
6
  Author: Gallery-Bank
7
+ Version: 1.8.4
8
  Author URI: http://gallery-bank.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
install-script.php CHANGED
@@ -33,6 +33,7 @@ if (count($wpdb->get_var('SHOW TABLES LIKE "' . gallery_bank_pics() . '"')) == 0
33
  description TEXT NOT NULL,
34
  thumbnail_url TEXT NOT NULL,
35
  date DATE,
 
36
  PRIMARY KEY (pic_id)
37
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci';
38
  dbDelta($sql);
@@ -179,6 +180,40 @@ if (count($wpdb->get_var('SHOW TABLES LIKE "' . gallery_bank_albums() . '"')) !=
179
  "ALTER TABLE " . gallery_bank_albums() . " ADD images_in_row INTEGER(5) NOT NULL",""
180
  )
181
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  }
183
  }
184
  ?>
33
  description TEXT NOT NULL,
34
  thumbnail_url TEXT NOT NULL,
35
  date DATE,
36
+ sorting_order INTEGER(20),
37
  PRIMARY KEY (pic_id)
38
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci';
39
  dbDelta($sql);
180
  "ALTER TABLE " . gallery_bank_albums() . " ADD images_in_row INTEGER(5) NOT NULL",""
181
  )
182
  );
183
+ $wpdb->query
184
+ (
185
+ $wpdb->prepare
186
+ (
187
+ "update " . gallery_bank_albums() . " set images_in_row =%d","3"
188
+ )
189
+ );
190
+ }
191
+ }
192
+ if (count($wpdb->get_var('SHOW TABLES LIKE "' . gallery_bank_pics() . '"')) != 0)
193
+ {
194
+ $check = $wpdb->get_var
195
+ (
196
+ $wpdb->prepare
197
+ (
198
+ "SHOW COLUMNS FROM " . gallery_bank_pics() . " LIKE 'sorting_order'",""
199
+ )
200
+ );
201
+ if($check != "sorting_order")
202
+ {
203
+ $wpdb->query
204
+ (
205
+ $wpdb->prepare
206
+ (
207
+ "ALTER TABLE " . gallery_bank_pics() . " ADD sorting_order INTEGER(20)",""
208
+ )
209
+ );
210
+ $wpdb->query
211
+ (
212
+ $wpdb->prepare
213
+ (
214
+ "update " . gallery_bank_pics() . " set ". gallery_bank_pics() .".sorting_order = " . gallery_bank_pics() . ".pic_id",""
215
+ )
216
+ );
217
  }
218
  }
219
  ?>
js/jquery.datatables.js CHANGED
@@ -23,10 +23,10 @@ sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:
23
  sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollWrapper:"dataTables_scroll",
24
  sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};n.oPagination={two_button:{fnInit:function(g,l,s){var t,w,y;if(g.bJUI){t=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev;
25
  t.appendChild(y)}else{t=p.createElement("div");w=p.createElement("div")}t.className=g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;t.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;l.appendChild(t);l.appendChild(w);i(t).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&s(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&s(g)});i(t).bind("selectstart.DT",function(){return false});i(w).bind("selectstart.DT",function(){return false});
26
- if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");t.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l=g.aanFeatures.p,s=0,t=l.length;s<t;s++)if(l[s].childNodes.length!==0){l[s].childNodes[0].className=g._iDisplayStart===0?g.oClasses.sPagePrevDisabled:g.oClasses.sPagePrevEnabled;l[s].childNodes[1].className=g.fnDisplayEnd()==g.fnRecordsDisplay()?g.oClasses.sPageNextDisabled:
27
  g.oClasses.sPageNextEnabled}}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(g,l,s){var t=p.createElement("span"),w=p.createElement("span"),y=p.createElement("span"),F=p.createElement("span"),x=p.createElement("span");t.innerHTML=g.oLanguage.oPaginate.sFirst;w.innerHTML=g.oLanguage.oPaginate.sPrevious;F.innerHTML=g.oLanguage.oPaginate.sNext;x.innerHTML=g.oLanguage.oPaginate.sLast;var v=g.oClasses;t.className=v.sPageButton+" "+v.sPageFirst;w.className=v.sPageButton+" "+v.sPagePrevious;F.className=
28
  v.sPageButton+" "+v.sPageNext;x.className=v.sPageButton+" "+v.sPageLast;l.appendChild(t);l.appendChild(w);l.appendChild(y);l.appendChild(F);l.appendChild(x);i(t).bind("click.DT",function(){g.oApi._fnPageChange(g,"first")&&s(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&s(g)});i(F).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&s(g)});i(x).bind("click.DT",function(){g.oApi._fnPageChange(g,"last")&&s(g)});i("span",l).bind("mousedown.DT",function(){return false}).bind("selectstart.DT",
29
- function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");t.setAttribute("id",g.sTableId+"_first");w.setAttribute("id",g.sTableId+"_previous");F.setAttribute("id",g.sTableId+"_next");x.setAttribute("id",g.sTableId+"_last")}},fnUpdate:function(g,l){if(g.aanFeatures.p){var s=n.oPagination.iFullNumbersShowPages,t=Math.floor(s/2),w=Math.ceil(g.fnRecordsDisplay()/g._iDisplayLength),y=Math.ceil(g._iDisplayStart/g._iDisplayLength)+1,F=
30
  "",x,v=g.oClasses;if(w<s){t=1;x=w}else if(y<=t){t=1;x=s}else if(y>=w-t){t=w-s+1;x=w}else{t=y-Math.ceil(s/2)+1;x=t+s-1}for(s=t;s<=x;s++)F+=y!=s?'<span class="'+v.sPageButton+'">'+s+"</span>":'<span class="'+v.sPageButtonActive+'">'+s+"</span>";x=g.aanFeatures.p;var z,$=function(M){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;l(g);M.preventDefault()},X=function(){return false};s=0;for(t=x.length;s<t;s++)if(x[s].childNodes.length!==0){z=i("span:eq(2)",x[s]);z.html(F);i("span",z).bind("click.DT",
31
  $).bind("mousedown.DT",X).bind("selectstart.DT",X);z=x[s].getElementsByTagName("span");z=[z[0],z[1],z[z.length-2],z[z.length-1]];i(z).removeClass(v.sPageButton+" "+v.sPageButtonActive+" "+v.sPageButtonStaticDisabled);if(y==1){z[0].className+=" "+v.sPageButtonStaticDisabled;z[1].className+=" "+v.sPageButtonStaticDisabled}else{z[0].className+=" "+v.sPageButton;z[1].className+=" "+v.sPageButton}if(w===0||y==w||g._iDisplayLength==-1){z[2].className+=" "+v.sPageButtonStaticDisabled;z[3].className+=" "+
32
  v.sPageButtonStaticDisabled}else{z[2].className+=" "+v.sPageButton;z[3].className+=" "+v.sPageButton}}}}}};n.oSort={"string-asc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?-1:g>l?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?1:g>l?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g<
23
  sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollWrapper:"dataTables_scroll",
24
  sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};n.oPagination={two_button:{fnInit:function(g,l,s){var t,w,y;if(g.bJUI){t=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev;
25
  t.appendChild(y)}else{t=p.createElement("div");w=p.createElement("div")}t.className=g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;t.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;l.appendChild(t);l.appendChild(w);i(t).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&s(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&s(g)});i(t).bind("selectstart.DT",function(){return false});i(w).bind("selectstart.DT",function(){return false});
26
+ if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");t.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){jQuery('.hovertip').tooltip();if(g.aanFeatures.p)for(var l=g.aanFeatures.p,s=0,t=l.length;s<t;s++)if(l[s].childNodes.length!==0){l[s].childNodes[0].className=g._iDisplayStart===0?g.oClasses.sPagePrevDisabled:g.oClasses.sPagePrevEnabled;l[s].childNodes[1].className=g.fnDisplayEnd()==g.fnRecordsDisplay()?g.oClasses.sPageNextDisabled:
27
  g.oClasses.sPageNextEnabled}}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(g,l,s){var t=p.createElement("span"),w=p.createElement("span"),y=p.createElement("span"),F=p.createElement("span"),x=p.createElement("span");t.innerHTML=g.oLanguage.oPaginate.sFirst;w.innerHTML=g.oLanguage.oPaginate.sPrevious;F.innerHTML=g.oLanguage.oPaginate.sNext;x.innerHTML=g.oLanguage.oPaginate.sLast;var v=g.oClasses;t.className=v.sPageButton+" "+v.sPageFirst;w.className=v.sPageButton+" "+v.sPagePrevious;F.className=
28
  v.sPageButton+" "+v.sPageNext;x.className=v.sPageButton+" "+v.sPageLast;l.appendChild(t);l.appendChild(w);l.appendChild(y);l.appendChild(F);l.appendChild(x);i(t).bind("click.DT",function(){g.oApi._fnPageChange(g,"first")&&s(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&s(g)});i(F).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&s(g)});i(x).bind("click.DT",function(){g.oApi._fnPageChange(g,"last")&&s(g)});i("span",l).bind("mousedown.DT",function(){return false}).bind("selectstart.DT",
29
+ function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");t.setAttribute("id",g.sTableId+"_first");w.setAttribute("id",g.sTableId+"_previous");F.setAttribute("id",g.sTableId+"_next");x.setAttribute("id",g.sTableId+"_last")}},fnUpdate:function(g,l){jQuery('.hovertip').tooltip();if(g.aanFeatures.p){var s=n.oPagination.iFullNumbersShowPages,t=Math.floor(s/2),w=Math.ceil(g.fnRecordsDisplay()/g._iDisplayLength),y=Math.ceil(g._iDisplayStart/g._iDisplayLength)+1,F=
30
  "",x,v=g.oClasses;if(w<s){t=1;x=w}else if(y<=t){t=1;x=s}else if(y>=w-t){t=w-s+1;x=w}else{t=y-Math.ceil(s/2)+1;x=t+s-1}for(s=t;s<=x;s++)F+=y!=s?'<span class="'+v.sPageButton+'">'+s+"</span>":'<span class="'+v.sPageButtonActive+'">'+s+"</span>";x=g.aanFeatures.p;var z,$=function(M){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;l(g);M.preventDefault()},X=function(){return false};s=0;for(t=x.length;s<t;s++)if(x[s].childNodes.length!==0){z=i("span:eq(2)",x[s]);z.html(F);i("span",z).bind("click.DT",
31
  $).bind("mousedown.DT",X).bind("selectstart.DT",X);z=x[s].getElementsByTagName("span");z=[z[0],z[1],z[z.length-2],z[z.length-1]];i(z).removeClass(v.sPageButton+" "+v.sPageButtonActive+" "+v.sPageButtonStaticDisabled);if(y==1){z[0].className+=" "+v.sPageButtonStaticDisabled;z[1].className+=" "+v.sPageButtonStaticDisabled}else{z[0].className+=" "+v.sPageButton;z[1].className+=" "+v.sPageButton}if(w===0||y==w||g._iDisplayLength==-1){z[2].className+=" "+v.sPageButtonStaticDisabled;z[3].className+=" "+
32
  v.sPageButtonStaticDisabled}else{z[2].className+=" "+v.sPageButton;z[3].className+=" "+v.sPageButton}}}}}};n.oSort={"string-asc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?-1:g>l?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?1:g>l?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g<
lib/album-gallery-bank-class.php CHANGED
@@ -173,6 +173,26 @@ else
173
  }
174
  die();
175
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  }
177
  }
178
  ?>
173
  }
174
  die();
175
  }
176
+ else if($_REQUEST["param"] == "reorderControls")
177
+ {
178
+
179
+ $updateRecordsArray = $_POST['recordsArray'];
180
+ $listingCounter = 1;
181
+ foreach ($updateRecordsArray as $recordIDValue)
182
+ {
183
+ $wpdb->query
184
+ (
185
+ $wpdb->prepare
186
+ (
187
+ "UPDATE ".gallery_bank_pics()." SET sorting_order = %d WHERE pic_id = %d",
188
+ $listingCounter,
189
+ $recordIDValue
190
+ )
191
+ );
192
+ $listingCounter = $listingCounter + 1;
193
+ }
194
+ die();
195
+ }
196
  }
197
  }
198
  ?>
lib/front-view-album-class.php CHANGED
@@ -9,7 +9,7 @@
9
  (
10
  $wpdb->prepare
11
  (
12
- "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d",
13
  $album_id
14
  )
15
  );
9
  (
10
  $wpdb->prepare
11
  (
12
+ "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by sorting_order asc",
13
  $album_id
14
  )
15
  );
lib/gallery-bank-class.php CHANGED
@@ -10,6 +10,7 @@ function create_global_menus_for_gallery_bank()
10
  add_submenu_page('', 'Gallery Bank', __('Gallery Bank', gallery_bank), 'administrator', 'gallery_bank', 'gallery_bank');
11
  add_submenu_page('', '','' , 'administrator', 'add_album', 'add_album');
12
  add_submenu_page('', '','' , 'administrator', 'view_album', 'view_album');
 
13
  add_submenu_page('', '','' , 'administrator', 'edit_album', 'edit_album');
14
  add_submenu_page('', '','' , 'administrator', 'pro_version', 'pro_version');
15
 
@@ -81,13 +82,21 @@ function edit_album()
81
  include_once GALLERY_BK_PLUGIN_DIR .'/views/menus-gallery-bank.php';
82
  include_once GALLERY_BK_PLUGIN_DIR .'/views/edit-album.php';
83
  }
84
-
 
 
 
 
 
 
85
  //--------------------------------------------------------------------------------------------------------------//
86
  //CODE FOR CALLING JAVASCRIPT FUNCTIONS
87
  //--------------------------------------------------------------------------------------------------------------//
88
  function plugin_js_scripts_gallery_bank()
89
  {
90
  wp_enqueue_script('jquery');
 
 
91
  wp_enqueue_script('jquery.datatables.js', GALLERY_BK_PLUGIN_URL .'/js/jquery.datatables.js');
92
  wp_enqueue_script('jquery.validate.min.js', GALLERY_BK_PLUGIN_URL .'/js/jquery.validate.min.js');
93
  wp_enqueue_script('bootstrap-bootbox.min.js', GALLERY_BK_PLUGIN_URL .'/js/bootstrap-bootbox.min.js');
@@ -111,7 +120,7 @@ function plugin_css_scripts_gallery_bank()
111
  wp_enqueue_style('datatables.css', GALLERY_BK_PLUGIN_URL .'/css/datatables.css');
112
  wp_enqueue_style('system-message.css', GALLERY_BK_PLUGIN_URL .'/css/system-message.css');
113
  wp_enqueue_style('forms-btn.css', GALLERY_BK_PLUGIN_URL .'/css/forms-btn.css');
114
- wp_enqueue_style('visuallightbox.css', GALLERY_BK_PLUGIN_URL .'/css/visuallightbox.css');
115
  wp_enqueue_style('plugins.css', GALLERY_BK_PLUGIN_URL .'/css/plugins.css');
116
 
117
  }
@@ -200,4 +209,5 @@ add_action('init','frontend_plugin_css_scripts_gallery_bank');
200
  add_action('admin_menu','create_global_menus_for_gallery_bank');
201
  add_shortcode('gallery_bank', 'gallery_bank_short_code' );
202
  add_shortcode('gallery_bank_album_cover', 'gallery_bank_short_code_album');
 
203
  ?>
10
  add_submenu_page('', 'Gallery Bank', __('Gallery Bank', gallery_bank), 'administrator', 'gallery_bank', 'gallery_bank');
11
  add_submenu_page('', '','' , 'administrator', 'add_album', 'add_album');
12
  add_submenu_page('', '','' , 'administrator', 'view_album', 'view_album');
13
+ add_submenu_page('', '','' , 'administrator', 'images_sorting', 'images_sorting');
14
  add_submenu_page('', '','' , 'administrator', 'edit_album', 'edit_album');
15
  add_submenu_page('', '','' , 'administrator', 'pro_version', 'pro_version');
16
 
82
  include_once GALLERY_BK_PLUGIN_DIR .'/views/menus-gallery-bank.php';
83
  include_once GALLERY_BK_PLUGIN_DIR .'/views/edit-album.php';
84
  }
85
+ function images_sorting()
86
+ {
87
+ global $wpdb;
88
+ include_once GALLERY_BK_PLUGIN_DIR .'/views/header.php';
89
+ include_once GALLERY_BK_PLUGIN_DIR .'/views/menus-gallery-bank.php';
90
+ include_once GALLERY_BK_PLUGIN_DIR .'/views/images_sorting.php';
91
+ }
92
  //--------------------------------------------------------------------------------------------------------------//
93
  //CODE FOR CALLING JAVASCRIPT FUNCTIONS
94
  //--------------------------------------------------------------------------------------------------------------//
95
  function plugin_js_scripts_gallery_bank()
96
  {
97
  wp_enqueue_script('jquery');
98
+ wp_enqueue_script('jquery-ui-sortable');
99
+ wp_enqueue_script('jquery-ui-draggable');
100
  wp_enqueue_script('jquery.datatables.js', GALLERY_BK_PLUGIN_URL .'/js/jquery.datatables.js');
101
  wp_enqueue_script('jquery.validate.min.js', GALLERY_BK_PLUGIN_URL .'/js/jquery.validate.min.js');
102
  wp_enqueue_script('bootstrap-bootbox.min.js', GALLERY_BK_PLUGIN_URL .'/js/bootstrap-bootbox.min.js');
120
  wp_enqueue_style('datatables.css', GALLERY_BK_PLUGIN_URL .'/css/datatables.css');
121
  wp_enqueue_style('system-message.css', GALLERY_BK_PLUGIN_URL .'/css/system-message.css');
122
  wp_enqueue_style('forms-btn.css', GALLERY_BK_PLUGIN_URL .'/css/forms-btn.css');
123
+ wp_enqueue_style('visuallightbox.css', GALLERY_BK_PLUGIN_URL .'/css/visuallightbox.css');
124
  wp_enqueue_style('plugins.css', GALLERY_BK_PLUGIN_URL .'/css/plugins.css');
125
 
126
  }
209
  add_action('admin_menu','create_global_menus_for_gallery_bank');
210
  add_shortcode('gallery_bank', 'gallery_bank_short_code' );
211
  add_shortcode('gallery_bank_album_cover', 'gallery_bank_short_code_album');
212
+ remove_filter( 'the_content', 'wpautop' );
213
  ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Gallery-Bank
3
  Tags: gallery, image, gallery image, album, foto, fotoalbum, website gallery, multiple pictures, pictures, photo, photoalbum, photogallery, photo gallery, lightbox
4
  Requires at least: 3.0
5
  Tested up to: 3.6 Beta
6
- Stable tag: 1.8.3
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -104,6 +104,11 @@ Visit [here](http://gallery-bank.com) to upgrade to Pro Version now.
104
 
105
  == Changelog ==
106
 
 
 
 
 
 
107
  = 1.8.3 =
108
 
109
  * Introduced Timthumb for Thumbnails
3
  Tags: gallery, image, gallery image, album, foto, fotoalbum, website gallery, multiple pictures, pictures, photo, photoalbum, photogallery, photo gallery, lightbox
4
  Requires at least: 3.0
5
  Tested up to: 3.6 Beta
6
+ Stable tag: 1.8.4
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
104
 
105
  == Changelog ==
106
 
107
+ = 1.8.4 =
108
+
109
+ * Introduced Sorting of Images in an Album
110
+ * Album Formatting conflict resolved
111
+
112
  = 1.8.3 =
113
 
114
  * Introduced Timthumb for Thumbnails
views/album.php CHANGED
@@ -48,10 +48,10 @@ $url = plugins_url('', __FILE__);
48
  <th style="width:10%"><?php _e( "Album Name", gallery_bank ); ?></th>
49
  <th style="width:15%"><?php _e( "Shortcode - Only Pics", gallery_bank ); ?></th>
50
  <th style="width:25%"><?php _e( "Shortcode - Album Cover with Pics", gallery_bank ); ?></th>
51
- <th style="width:10%"><?php _e( "Total Pics", gallery_bank ); ?></th>
52
  <th style="width:7%"><?php _e( "Author", gallery_bank ); ?></th>
53
  <th style="width:8%"><?php _e( "Date", gallery_bank ); ?></th>
54
- <th style="width:4%"><?php _e( "Action", gallery_bank ); ?></th>
55
  </tr>
56
  </thead>
57
  <tbody>
@@ -82,8 +82,10 @@ $url = plugins_url('', __FILE__);
82
  <td><?php echo $album[$flag] -> author;?></td>
83
  <td><?php echo $album[$flag] -> album_date;?></td>
84
  <td>
85
- <a class="icon-edit" href="admin.php?page=edit_album&album_id=<?php echo $album[$flag]->album_id;?>"></a>
86
- <a class="icon-trash" style="cursor: pointer;" onclick="delete_album(<?php echo $album[$flag]->album_id;?>)"></a>
 
 
87
  </td>
88
  </tr>
89
  <?php
48
  <th style="width:10%"><?php _e( "Album Name", gallery_bank ); ?></th>
49
  <th style="width:15%"><?php _e( "Shortcode - Only Pics", gallery_bank ); ?></th>
50
  <th style="width:25%"><?php _e( "Shortcode - Album Cover with Pics", gallery_bank ); ?></th>
51
+ <th style="width:8%"><?php _e( "Total Pics", gallery_bank ); ?></th>
52
  <th style="width:7%"><?php _e( "Author", gallery_bank ); ?></th>
53
  <th style="width:8%"><?php _e( "Date", gallery_bank ); ?></th>
54
+ <th style="width:6%"><?php _e( "Action", gallery_bank ); ?></th>
55
  </tr>
56
  </thead>
57
  <tbody>
82
  <td><?php echo $album[$flag] -> author;?></td>
83
  <td><?php echo $album[$flag] -> album_date;?></td>
84
  <td>
85
+ <a data-original-title="<?php _e("Edit Album?", gallery_bank ); ?>" data-placement="top"class="icon-edit hovertip" href="admin.php?page=edit_album&album_id=<?php echo $album[$flag]->album_id;?>" ></a>
86
+ <a data-original-title="<?php _e("Sort Images?", gallery_bank ); ?>" data-placement="top" class="icon-move hovertip" style="cursor: pointer;"href="admin.php?page=images_sorting&album_id=<?php echo $album[$flag]->album_id;?>" ></a>
87
+ <a data-original-title="<?php _e("Delete Album?", gallery_bank ); ?>" data-placement="top" class="icon-trash hovertip" style="cursor: pointer;" onclick="delete_album(<?php echo $album[$flag]->album_id;?>)"></a>
88
+
89
  </td>
90
  </tr>
91
  <?php
views/edit-album.php CHANGED
@@ -94,7 +94,7 @@
94
  (
95
  $wpdb->prepare
96
  (
97
- "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by pic_id asc",
98
  $album_id
99
  )
100
  );
@@ -213,7 +213,9 @@ jQuery("#gallery_bank").addClass("current");
213
  },
214
  submitHandler: function(form)
215
  {
216
-
 
 
217
  var albumId = jQuery('#hidden_album_id').val();
218
  if (jQuery("#wp-ux_edit_description-wrap").hasClass("tmce-active"))
219
  {
@@ -225,7 +227,6 @@ jQuery("#gallery_bank").addClass("current");
225
  }
226
  var count_pic = arr.length;
227
  var edit_album_name = encodeURIComponent(jQuery('#ux_edit_album_name').val());
228
-
229
  jQuery.post(ajaxurl, "id="+arr+"&count_pic="+count_pic+"&param=delete_pic&action=album_gallery_library", function(data)
230
  {
231
  });
@@ -277,9 +278,6 @@ jQuery("#gallery_bank").addClass("current");
277
  {
278
  jQuery('#error_edit_border_album_message').css('display','none');
279
  jQuery('#error_update_album_message').css('display','none');
280
- jQuery('#success_update_album_message').css('display','block');
281
- jQuery('body,html').animate({
282
- scrollTop: jQuery('body,html').position().top}, 'slow');
283
  count++;
284
  if(count == array.length)
285
  {
94
  (
95
  $wpdb->prepare
96
  (
97
+ "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by sorting_order asc",
98
  $album_id
99
  )
100
  );
213
  },
214
  submitHandler: function(form)
215
  {
216
+ jQuery('#success_update_album_message').css('display','block');
217
+ jQuery('body,html').animate({
218
+ scrollTop: jQuery('body,html').position().top}, 'slow');
219
  var albumId = jQuery('#hidden_album_id').val();
220
  if (jQuery("#wp-ux_edit_description-wrap").hasClass("tmce-active"))
221
  {
227
  }
228
  var count_pic = arr.length;
229
  var edit_album_name = encodeURIComponent(jQuery('#ux_edit_album_name').val());
 
230
  jQuery.post(ajaxurl, "id="+arr+"&count_pic="+count_pic+"&param=delete_pic&action=album_gallery_library", function(data)
231
  {
232
  });
278
  {
279
  jQuery('#error_edit_border_album_message').css('display','none');
280
  jQuery('#error_update_album_message').css('display','none');
 
 
 
281
  count++;
282
  if(count == array.length)
283
  {
views/front-view-albums.php CHANGED
@@ -5,7 +5,7 @@
5
  (
6
  $wpdb->prepare
7
  (
8
- "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d",
9
  $album_id
10
  )
11
  );
5
  (
6
  $wpdb->prepare
7
  (
8
+ "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by sorting_order asc",
9
  $album_id
10
  )
11
  );
views/front_view.php CHANGED
@@ -5,7 +5,7 @@
5
  (
6
  $wpdb->prepare
7
  (
8
- "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d",
9
  $album_id
10
  )
11
  );
5
  (
6
  $wpdb->prepare
7
  (
8
+ "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by sorting_order asc",
9
  $album_id
10
  )
11
  );
views/images_sorting.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $wpdb;
3
+ $url = plugins_url('', __FILE__);
4
+ $album_id = $_REQUEST["album_id"];
5
+ $pic_detail = $wpdb->get_results
6
+ (
7
+ $wpdb->prepare
8
+ (
9
+ "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by sorting_order",
10
+ $album_id
11
+ )
12
+ );
13
+ $album = $wpdb->get_row
14
+ (
15
+ $wpdb->prepare
16
+ (
17
+ "SELECT * FROM ".gallery_bank_albums()." where album_id = %d",
18
+ $album_id
19
+ )
20
+ );
21
+
22
+ ?>
23
+ <div id="right">
24
+
25
+ <div id="breadcrumbs">
26
+ <ul>
27
+ <li class="first"></li>
28
+ <li>
29
+ <a href="admin.php?page=gallery_bank">
30
+ <?php _e( "Gallery Bank", gallery_bank ); ?>
31
+ </a>
32
+ </li>
33
+ <li>
34
+ <a href="admin.php?page=gallery_bank">
35
+ <?php _e( "Albums", gallery_bank ); ?>
36
+ </a>
37
+ </li>
38
+ <li class="last">
39
+ <a href="#">
40
+ <?php _e( "Sorting", gallery_bank ); ?>
41
+ </a>
42
+ </li>
43
+ </ul>
44
+ </div>
45
+ <a href="admin.php?page=gallery_bank"class="events-container-button blue" style="margin-top:10px;text-decoration: none;">
46
+ <span><?php _e('Back to Album', gallery_bank); ?></span>
47
+ </a>
48
+ <h3 style="font-size: 20px;margin: 10px;"><?php echo stripcslashes($album->album_name);?></h3>
49
+ <form id="sort_album" class="form-horizontal" method="post" action="">
50
+ <div id="view_bank_album">
51
+ <?php
52
+ $row = $album ->images_in_row;;
53
+ for ($flag = 0; $flag <count($pic_detail); $flag++)
54
+ {
55
+ if($pic_detail[$flag]->description == "")
56
+ {
57
+ if(($flag % $row ==0) && $flag != 0)
58
+ {
59
+ ?>
60
+ <br/>
61
+
62
+ <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" style="margin:5px;" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.stripcslashes($pic_detail[$flag]->pic_path).'&h=150&w=150&zc=1&q=100';?>"/>
63
+ <?php
64
+ }
65
+ else
66
+ {
67
+ ?>
68
+
69
+ <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" style="margin:5px;" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.stripcslashes($pic_detail[$flag]->pic_path).'&h=150&w=150&zc=1&q=100';?>"/>
70
+ <?php
71
+ }
72
+ }
73
+ else
74
+ {
75
+ if(($flag % $row ==0) && $flag != 0)
76
+ {
77
+ ?>
78
+ <br/>
79
+
80
+ <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" style="margin:5px;" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.stripcslashes($pic_detail[$flag]->pic_path).'&h=150&w=150&zc=1&q=100';?>"/>
81
+ <?php
82
+ }
83
+ else
84
+ {
85
+ ?>
86
+
87
+ <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" style="margin:5px;" src="<?php echo GALLERY_BK_PLUGIN_URL.'/lib/timthumb.php?src='.stripcslashes($pic_detail[$flag]->pic_path).'&h=150&w=150&zc=1&q=100';?>"/>
88
+ <?php
89
+ }
90
+ }
91
+ }
92
+ ?>
93
+ </div>
94
+ </form>
95
+ </div>
96
+ <div id="footer">
97
+ <div class="split">
98
+ <?php _e( "&copy; 2013 Gallery-Bank", gallery_bank ); ?>
99
+ </div>
100
+ <div class="split right">
101
+ <?php _e( "Powered by ", gallery_bank ); ?>
102
+ <a href="#" >
103
+ <?php _e( "Gallery Bank!", gallery_bank ); ?>
104
+ </a>
105
+ </div>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ <style>
110
+ img:hover
111
+ {
112
+ cursor:move;
113
+ }
114
+
115
+ </style>
116
+ <script type="text/javascript">
117
+
118
+ jQuery(document).ready(function()
119
+ {
120
+ jQuery("#view_bank_album").sortable
121
+ ({
122
+ opacity: 0.6,
123
+ cursor: 'move',
124
+ update: function()
125
+ {
126
+ jQuery.post(ajaxurl, jQuery(this).sortable("serialize")+"&param=reorderControls&action=album_gallery_library", function(data)
127
+ {
128
+
129
+
130
+ });
131
+ }
132
+ });
133
+ });
134
+
135
+ </script>
views/view-album.php CHANGED
@@ -116,7 +116,7 @@
116
  (
117
  $wpdb->prepare
118
  (
119
- "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d",
120
  $album_id
121
  )
122
  );
116
  (
117
  $wpdb->prepare
118
  (
119
+ "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by sorting_order asc",
120
  $album_id
121
  )
122
  );