Gallery – Flagallery Photo Portfolio - Version 2.72

Version Description

Download this release

Release Info

Developer pasyuk
Plugin Icon 128x128 Gallery – Flagallery Photo Portfolio
Version 2.72
Comparing to
See all releases

Code changes from version 2.56 to 2.72

admin/admin.php CHANGED
@@ -72,14 +72,6 @@ class flagAdminPanel{
72
 
73
  global $flag;
74
 
75
- // check for upgrade
76
- /*if( get_option( 'flag_db_version' ) != FLAG_DBVERSION ) {
77
- include_once ( dirname (__FILE__) . '/functions.php' );
78
- include_once ( dirname (__FILE__) . '/upgrade.php' );
79
- flag_upgrade_page();
80
- return;
81
- }*/
82
-
83
  // Set installation date
84
  if( empty($flag->options['installDate']) ) {
85
  $flag->options['installDate'] = time();
72
 
73
  global $flag;
74
 
 
 
 
 
 
 
 
 
75
  // Set installation date
76
  if( empty($flag->options['installDate']) ) {
77
  $flag->options['installDate'] = time();
admin/banner-box.php CHANGED
@@ -69,8 +69,14 @@ function flag_banner_controler() {
69
  flag_banner_wp_media_lib();
70
  }
71
  break;
72
- case 'add':
73
- $added = $_POST['items'];
 
 
 
 
 
 
74
  flag_banner_wp_media_lib($added);
75
  break;
76
  case 'delete':
@@ -204,26 +210,64 @@ function flag_banner_wp_media_lib($added=false) {
204
  $playlistPath = $flag_options['galleryPath'].'playlists/banner/'.$_GET['playlist'].'.xml';
205
  $playlist = get_b_playlist_data(ABSPATH.$playlistPath);
206
  $exclude = explode(',', $added);
 
 
 
 
 
 
 
 
207
  }
208
  ?>
209
  <script type="text/javascript">
210
  <!--
211
  jQuery(document).ready(function(){
212
- jQuery('.cb :checkbox').click(function() {
 
 
 
 
 
213
  var cur, arr, del;
214
  if(jQuery(this).is(':checked')){
215
  cur = jQuery(this).val();
216
  arr = jQuery('#items_array').val();
217
  if(arr) { del = ','; } else { del = ''; }
218
  jQuery('#items_array').val(arr+del+cur);
 
219
  } else {
220
  cur = jQuery(this).val();
221
  arr = jQuery('#items_array').val().split(',');
222
  arr = jQuery.grep(arr, function(a){ return a != cur; }).join(',');
223
  jQuery('#items_array').val(arr);
 
224
  }
 
225
  });
 
 
 
 
 
 
 
226
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  function checkAll(form) {
228
  for (i = 0, n = form.elements.length; i < n; i++) {
229
  if(form.elements[i].type == "checkbox") {
@@ -240,9 +284,9 @@ function checkAll(form) {
240
  }
241
  // this function check for a the number of selected images, sumbmit false when no one selected
242
  function checkSelected() {
243
- if(!jQuery('.cb input:checked')) {
244
  alert('<?php echo esc_js(__("No items selected", "flag")); ?>');
245
- return false;
246
  }
247
  var actionId = jQuery('#bulkaction').val();
248
  switch (actionId) {
@@ -250,11 +294,7 @@ function checkSelected() {
250
  showDialog('new_playlist', 160);
251
  return false;
252
  break;
253
- case "add_to_playlist":
254
- return confirm('<?php echo sprintf(esc_js(__("You are about to add %s items to playlist \n \n 'Cancel' to stop, 'OK' to proceed.",'flag')), "' + numchecked + '") ; ?>');
255
- break;
256
  }
257
- return confirm('<?php echo sprintf(esc_js(__("You are about to start the bulk edit for %s items \n \n 'Cancel' to stop, 'OK' to proceed.",'flag')), "' + numchecked + '") ; ?>');
258
  }
259
 
260
  function showDialog( windowId, height ) {
@@ -265,7 +305,7 @@ function showDialog( windowId, height ) {
265
  //-->
266
  </script>
267
  <div class="wrap">
268
-
269
  <?php if( current_user_can('FlAG Import folder') ) {
270
  $defaultpath = 'wp-content/';
271
  ?>
@@ -297,7 +337,7 @@ function showDialog( windowId, height ) {
297
  <table class="form-table">
298
  <tr valign="top">
299
  <th scope="row"><?php _e('Import from Server path:', 'flag'); ?></th>
300
- <td><input type="text" size="35" id="bannerfolder" name="bannerfolder" value="<?php echo $defaultpath; ?>" /><span class="browsefiles button" style="display:none"><?php _e('Toggle DIR Browser',"flag"); ?></span>
301
  <div id="file_browser"></div><br />
302
  <p><label><input type="checkbox" name="delete_files" value="delete" /> &nbsp;
303
  <?php _e('delete files after import in WordPress Media Library','flag'); ?></label></p>
@@ -307,9 +347,49 @@ function showDialog( windowId, height ) {
307
  <div class="submit"><input class="button-primary" type="submit" name="importfolder" value="<?php _e('Import folder', 'flag'); ?>"/></div>
308
  </form>
309
  </div>
 
310
  <?php } ?>
311
 
312
  <h2><?php _e('WordPress Image Library', 'flag'); ?></h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  <form id="bannerlib" class="flagform" method="POST" action="<?php echo $filepath; ?>" accept-charset="utf-8">
314
  <?php wp_nonce_field('flag_bulkbanner'); ?>
315
  <input type="hidden" name="page" value="banner-box" />
@@ -330,12 +410,12 @@ function showDialog( windowId, height ) {
330
  <input type="hidden" id="items_array" name="items_array" value="" />
331
  <?php } else { ?>
332
  <input type="hidden" name="mode" value="save" />
333
- <input style="width: 80%;" type="text" id="items_array" name="items_array" value="<?php echo $added; ?>" />
334
  <input type="hidden" name="playlist_title" value="<?php echo $playlist['title']; ?>" />
335
  <input type="hidden" name="skinname" value="<?php echo $playlist['skin']; ?>" />
336
  <input type="hidden" name="skinaction" value="<?php echo $playlist['skin']; ?>" />
337
  <textarea style="display: none;" name="playlist_descr" cols="40" rows="1"><?php echo $playlist['description']; ?></textarea>
338
- <input name="addToPlaylist" class="button-secondary" type="submit" value="<?php _e('Update Playlist','flag'); ?>" onclick="if ( !checkSelected() ) return false;" />
339
  <?php } ?>
340
  </div>
341
 
@@ -360,13 +440,7 @@ function showDialog( windowId, height ) {
360
  </tr>
361
  </tfoot>
362
  <tbody>
363
- <?php $bannerlist = get_posts( $args = array(
364
- 'numberposts' => -1,
365
- 'orderby' => 'ID',
366
- 'order' => 'DESC',
367
- 'post_type' => 'attachment',
368
- 'post_mime_type' => array('image') )
369
- );
370
  $uploads = wp_upload_dir();
371
  $flag_options = get_option('flag_options');
372
  if($bannerlist) {
@@ -378,7 +452,7 @@ if($bannerlist) {
378
  $class = ( empty($class) ) ? ' class="alternate"' : '';
379
  $class2 = ( empty($class) ) ? '' : ' alternate';
380
  $ex = $checked = '';
381
- if($added!==false && in_array($ban->ID, $exclude) ) {
382
  $ex = ' style="background-color:#DDFFBB;" title="'.__("Already Added", "flag").'"';
383
  $checked = ' checked="checked"';
384
  }
69
  flag_banner_wp_media_lib();
70
  }
71
  break;
72
+ case 'add':
73
+ if(isset($_POST['items']) && isset($_GET['playlist'])){
74
+ $added = $_POST['items'];
75
+ } elseif(isset($_GET['playlist'])) {
76
+ $added = $_COOKIE['bannerboxplaylist_'.$_GET['playlist']];
77
+ } else {
78
+ $added = false;
79
+ }
80
  flag_banner_wp_media_lib($added);
81
  break;
82
  case 'delete':
210
  $playlistPath = $flag_options['galleryPath'].'playlists/banner/'.$_GET['playlist'].'.xml';
211
  $playlist = get_b_playlist_data(ABSPATH.$playlistPath);
212
  $exclude = explode(',', $added);
213
+ } else {
214
+ $items_array_default = isset($_COOKIE['bannerboxplaylist_default'])? $_COOKIE['bannerboxplaylist_default'] : '';
215
+ $exclude = explode(',', $items_array_default);
216
+ }
217
+ if(isset($_GET['playlist'])){
218
+ $playlist_cookie = $_GET['playlist'];
219
+ } else {
220
+ $playlist_cookie = 'default';
221
  }
222
  ?>
223
  <script type="text/javascript">
224
  <!--
225
  jQuery(document).ready(function(){
226
+ var storedData = getStorage('bannerboxplaylist_');
227
+ <?php if(isset($_POST['items'])){
228
+ ?>
229
+ storedData.set('<?php echo $playlist_cookie; ?>', '<?php echo $_POST['items']; ?>');
230
+ <?php } ?>
231
+ jQuery('.cb :checkbox').click(function() {
232
  var cur, arr, del;
233
  if(jQuery(this).is(':checked')){
234
  cur = jQuery(this).val();
235
  arr = jQuery('#items_array').val();
236
  if(arr) { del = ','; } else { del = ''; }
237
  jQuery('#items_array').val(arr+del+cur);
238
+ jQuery(this).closest('tr').css('background-color','#DDFFBB');
239
  } else {
240
  cur = jQuery(this).val();
241
  arr = jQuery('#items_array').val().split(',');
242
  arr = jQuery.grep(arr, function(a){ return a != cur; }).join(',');
243
  jQuery('#items_array').val(arr);
244
+ jQuery(this).closest('tr').removeAttr('style');
245
  }
246
+ storedData.set('<?php echo $playlist_cookie; ?>', jQuery('#items_array').val());
247
  });
248
+ jQuery('.clear_selected').click(function(){
249
+ jQuery('#items_array').val('');
250
+ jQuery('.cb :checkbox').each(function(){
251
+ jQuery(this).prop('checked', false).closest('tr').removeAttr('style');
252
+ });
253
+ storedData.set('<?php echo $playlist_cookie; ?>', jQuery('#items_array').val());
254
+ });
255
  });
256
+ function getStorage(key_prefix) {
257
+ return {
258
+ set: function (id, data) {
259
+ document.cookie = key_prefix + id + '=' + encodeURIComponent(data);
260
+ },
261
+ get: function (id, data) {
262
+ var cookies = document.cookie, parsed = {};
263
+ cookies.replace(/([^=]+)=([^;]*);?\s*/g, function (whole, key, value) {
264
+ parsed[key] = decodeURIComponent(value);
265
+ });
266
+ return parsed[key_prefix + id];
267
+ }
268
+ };
269
+ }
270
+
271
  function checkAll(form) {
272
  for (i = 0, n = form.elements.length; i < n; i++) {
273
  if(form.elements[i].type == "checkbox") {
284
  }
285
  // this function check for a the number of selected images, sumbmit false when no one selected
286
  function checkSelected() {
287
+ if(!jQuery('#items_array').val()) {
288
  alert('<?php echo esc_js(__("No items selected", "flag")); ?>');
289
+ return false;
290
  }
291
  var actionId = jQuery('#bulkaction').val();
292
  switch (actionId) {
294
  showDialog('new_playlist', 160);
295
  return false;
296
  break;
 
 
 
297
  }
 
298
  }
299
 
300
  function showDialog( windowId, height ) {
305
  //-->
306
  </script>
307
  <div class="wrap">
308
+ <?php if($added===false) { ?>
309
  <?php if( current_user_can('FlAG Import folder') ) {
310
  $defaultpath = 'wp-content/';
311
  ?>
337
  <table class="form-table">
338
  <tr valign="top">
339
  <th scope="row"><?php _e('Import from Server path:', 'flag'); ?></th>
340
+ <td><input type="text" size="35" id="bannerfolder" name="bannerfolder" value="<?php echo $defaultpath; ?>" /><span class="browsefiles button" style="display:none"><?php _e('Browse...',"flag"); ?></span>
341
  <div id="file_browser"></div><br />
342
  <p><label><input type="checkbox" name="delete_files" value="delete" /> &nbsp;
343
  <?php _e('delete files after import in WordPress Media Library','flag'); ?></label></p>
347
  <div class="submit"><input class="button-primary" type="submit" name="importfolder" value="<?php _e('Import folder', 'flag'); ?>"/></div>
348
  </form>
349
  </div>
350
+ <?php } ?>
351
  <?php } ?>
352
 
353
  <h2><?php _e('WordPress Image Library', 'flag'); ?></h2>
354
+
355
+ <?php
356
+ // look for pagination
357
+ if ( ! isset( $_GET['paged'] ) || $_GET['paged'] < 1 )
358
+ $_GET['paged'] = 1;
359
+
360
+ $objects_per_page = 25;
361
+ $start = ( $_GET['paged'] - 1 ) * $objects_per_page;
362
+ $img_total_count = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->posts WHERE `post_mime_type` LIKE 'image/%' AND `post_type` = 'attachment' AND `post_status` = 'inherit'");
363
+ $bannerlist = get_posts( $args = array(
364
+ 'numberposts' => $objects_per_page,
365
+ 'offset' => $start,
366
+ 'orderby' => 'ID',
367
+ 'order' => 'DESC',
368
+ 'post_type' => 'attachment',
369
+ 'post_mime_type' => array('image') )
370
+ );
371
+
372
+ // build pagination
373
+ $page_links = paginate_links( array(
374
+ 'base' => add_query_arg( 'paged', '%#%' ),
375
+ 'format' => '',
376
+ 'prev_text' => __('&laquo;'),
377
+ 'next_text' => __('&raquo;'),
378
+ 'total' => ceil( $img_total_count / $objects_per_page),
379
+ 'current' => $_GET['paged']
380
+ ));
381
+ ?>
382
+ <div class="tablenav" style="overflow: hidden; height: auto;">
383
+ <?php if($added===false) { ?>
384
+ <div class="alignleft"><b><?php _e('Selected Media','flag'); ?>: </b><input style="width:500px;" type="text" readonly="readonly" id="items_array" name="items_array" value="<?php echo $items_array_default; ?>" /> <span class="clear_selected button"><?php _e('Clear Selected','flag'); ?></span></div>
385
+ <?php } ?>
386
+ <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
387
+ number_format_i18n( ( $_GET['paged'] - 1 ) * $objects_per_page + 1 ),
388
+ number_format_i18n( min( $_GET['paged'] * $objects_per_page, $img_total_count ) ),
389
+ number_format_i18n( $img_total_count ),
390
+ $page_links
391
+ ); echo $page_links_text; ?></div>
392
+ </div>
393
  <form id="bannerlib" class="flagform" method="POST" action="<?php echo $filepath; ?>" accept-charset="utf-8">
394
  <?php wp_nonce_field('flag_bulkbanner'); ?>
395
  <input type="hidden" name="page" value="banner-box" />
410
  <input type="hidden" id="items_array" name="items_array" value="" />
411
  <?php } else { ?>
412
  <input type="hidden" name="mode" value="save" />
413
+ <input style="width: 80%;" type="text" id="items_array" name="items_array" readonly="readonly" value="<?php echo $added; ?>" />
414
  <input type="hidden" name="playlist_title" value="<?php echo $playlist['title']; ?>" />
415
  <input type="hidden" name="skinname" value="<?php echo $playlist['skin']; ?>" />
416
  <input type="hidden" name="skinaction" value="<?php echo $playlist['skin']; ?>" />
417
  <textarea style="display: none;" name="playlist_descr" cols="40" rows="1"><?php echo $playlist['description']; ?></textarea>
418
+ <input name="addToPlaylist" class="button-secondary" type="submit" value="<?php _e('Update Playlist','flag'); ?>" />
419
  <?php } ?>
420
  </div>
421
 
440
  </tr>
441
  </tfoot>
442
  <tbody>
443
+ <?php
 
 
 
 
 
 
444
  $uploads = wp_upload_dir();
445
  $flag_options = get_option('flag_options');
446
  if($bannerlist) {
452
  $class = ( empty($class) ) ? ' class="alternate"' : '';
453
  $class2 = ( empty($class) ) ? '' : ' alternate';
454
  $ex = $checked = '';
455
+ if( ($added!==false || !empty($items_array_default)) && in_array($ban->ID, $exclude) ) {
456
  $ex = ' style="background-color:#DDFFBB;" title="'.__("Already Added", "flag").'"';
457
  $checked = ' checked="checked"';
458
  }
admin/css/tabs.css CHANGED
@@ -3,7 +3,7 @@
3
  border-style:solid;
4
  border-width:1px;
5
  padding:2px;
6
- margin-top:45px;
7
 
8
  -moz-border-radius-topright: 6px;
9
  -khtml-border-top-right-radius: 6px;
@@ -18,7 +18,7 @@
18
  display: none;
19
  padding:0 15px;
20
  }
21
- .cptab h2 {margin-top:-85px; margin-bottom:45px;}
22
 
23
  #tabs{
24
  display: block;
3
  border-style:solid;
4
  border-width:1px;
5
  padding:2px;
6
+ margin-top:60px;
7
 
8
  -moz-border-radius-topright: 6px;
9
  -khtml-border-top-right-radius: 6px;
18
  display: none;
19
  padding:0 15px;
20
  }
21
+ .cptab h2 {margin-top:-85px; margin-bottom:65px;}
22
 
23
  #tabs{
24
  display: block;
admin/flag_install.php CHANGED
@@ -45,6 +45,7 @@ function flag_install () {
45
  filename VARCHAR(255) NOT NULL ,
46
  description MEDIUMTEXT NULL ,
47
  alttext MEDIUMTEXT NULL ,
 
48
  imagedate DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
49
  exclude TINYINT NULL DEFAULT '0',
50
  sortorder BIGINT(20) DEFAULT '0' NOT NULL ,
45
  filename VARCHAR(255) NOT NULL ,
46
  description MEDIUMTEXT NULL ,
47
  alttext MEDIUMTEXT NULL ,
48
+ link TEXT NULL ,
49
  imagedate DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
50
  exclude TINYINT NULL DEFAULT '0',
51
  sortorder BIGINT(20) DEFAULT '0' NOT NULL ,
admin/jgallery.php CHANGED
@@ -70,10 +70,10 @@ foreach ( $gID as $galID ) {
70
  $galID = (int) $galID;
71
  if ( $galID == 0) {
72
  $thegalleries = array();
73
- $thepictures = $wpdb->get_results("SELECT pid, galleryid, filename, description, alttext, imagedate, sortorder, hitcounter, total_value, total_votes FROM $wpdb->flagpictures WHERE 1=1 {$exclude_clause} ORDER BY {$flag_options['galSort']} {$flag_options['galSortDir']} ", ARRAY_A);
74
  } else {
75
  $thegalleries = $wpdb->get_row("SELECT gid, name, path, title, galdesc FROM $wpdb->flaggallery WHERE gid={$galID}", ARRAY_A);
76
- $thepictures = $wpdb->get_results("SELECT pid, filename, description, alttext, imagedate, hitcounter, total_value, total_votes FROM $wpdb->flagpictures WHERE galleryid = '{$galID}' {$exclude_clause} ORDER BY {$flag_options['galSort']} {$flag_options['galSortDir']} ", ARRAY_A);
77
  }
78
  $captions = '';
79
 
@@ -118,6 +118,6 @@ foreach ( $gID as $galID ) {
118
  }
119
  }
120
  $xml['alt'] .= '</div>'.PHP_EOL;
121
- $d = array('properties'=>$data) + $c;
122
  $xml['json'] = json_encode($d);
123
  ?>
70
  $galID = (int) $galID;
71
  if ( $galID == 0) {
72
  $thegalleries = array();
73
+ $thepictures = $wpdb->get_results("SELECT pid, galleryid, filename, description, alttext, link, imagedate, sortorder, hitcounter, total_value, total_votes FROM $wpdb->flagpictures WHERE 1=1 {$exclude_clause} ORDER BY {$flag_options['galSort']} {$flag_options['galSortDir']} ", ARRAY_A);
74
  } else {
75
  $thegalleries = $wpdb->get_row("SELECT gid, name, path, title, galdesc FROM $wpdb->flaggallery WHERE gid={$galID}", ARRAY_A);
76
+ $thepictures = $wpdb->get_results("SELECT pid, filename, description, alttext, link, imagedate, hitcounter, total_value, total_votes FROM $wpdb->flagpictures WHERE galleryid = '{$galID}' {$exclude_clause} ORDER BY {$flag_options['galSort']} {$flag_options['galSortDir']} ", ARRAY_A);
77
  }
78
  $captions = '';
79
 
118
  }
119
  }
120
  $xml['alt'] .= '</div>'.PHP_EOL;
121
+ $d = array('properties'=>$data) + $c + $musicData;
122
  $xml['json'] = json_encode($d);
123
  ?>
admin/js/script.js CHANGED
@@ -84,9 +84,9 @@ function alternate_flag_e(t, ExtendVar){
84
  jQuery('.flag_alternate').find(t).not('.loaded').each(function(){
85
  var d = jQuery(this).html();
86
  if(d) {
87
- d = d.replace(/\[/g, '<');
88
  d = d.replace(/src=/g, 'src="');
89
- d = d.replace(/\]/g, '" />');
90
  jQuery(this).addClass('loaded').html(d);
91
  }
92
  jQuery(this).show();
84
  jQuery('.flag_alternate').find(t).not('.loaded').each(function(){
85
  var d = jQuery(this).html();
86
  if(d) {
87
+ d = d.replace(/>\[/g, '><');
88
  d = d.replace(/src=/g, 'src="');
89
+ d = d.replace(/\]</g, '" /><');
90
  jQuery(this).addClass('loaded').html(d);
91
  }
92
  jQuery(this).show();
admin/manage-images.php CHANGED
@@ -39,7 +39,7 @@ function flag_picturelist() {
39
  }
40
 
41
  // look for pagination
42
- if ( ! isset( $_GET['paged'] ) || $_GET['paged'] < 1 )
43
  $_GET['paged'] = 1;
44
 
45
  $start = ( $_GET['paged'] - 1 ) * 50;
@@ -194,7 +194,7 @@ jQuery(document).ready( function() {
194
 
195
  <br style="clear: both;" />
196
 
197
- <form id="updategallery" class="flagform" method="POST" action="<?php echo $flag->manage_page->base_page . '&amp;mode=edit&amp;s=' . $_GET['s']; ?>" accept-charset="utf-8">
198
  <?php wp_nonce_field('flag_updategallery'); ?>
199
  <input type="hidden" name="page" value="manage-images" />
200
 
@@ -445,6 +445,7 @@ if($picturelist) {
445
  <td <?php echo $attributes; ?>>
446
  <input name="alttext[<?php echo $pid; ?>]" type="text" style="width:95%; margin-bottom: 2px;" value="<?php echo stripslashes($picture->alttext); ?>" /><br/>
447
  <textarea name="description[<?php echo $pid; ?>]" style="width:95%; margin-top: 2px;" rows="2" ><?php echo stripslashes($picture->description); ?></textarea>
 
448
  </td>
449
  <?php
450
  break;
@@ -601,9 +602,8 @@ function flag_manage_gallery_columns() {
601
  $gallery_columns['filename'] = __('Filename', 'flag');
602
  $gallery_columns['views_likes'] = __('Views / Likes', 'flag');
603
  $gallery_columns['rating'] = __('Rating', 'flag');
604
- $gallery_columns['alt_title_desc'] = __('Alt &amp; Title Text', 'flag') . ' / ' . __('Description', 'flag');
605
  $gallery_columns['exclude'] = '<img src="'.FLAG_URLPATH.'admin/images/lock.png" alt="member view" title="'.__('Only for logged in users', 'flag').'" />';
606
- //$gallery_columns['views'] = '<img src="'.FLAG_URLPATH.'admin/images/hits.png" alt="total views" title="'.__('Views', 'flag').'" />';
607
  $gallery_columns = apply_filters('flag_manage_images_columns', $gallery_columns);
608
 
609
  return $gallery_columns;
39
  }
40
 
41
  // look for pagination
42
+ if ( ! isset( $_GET['paged'] ) || intval($_GET['paged']) < 1 )
43
  $_GET['paged'] = 1;
44
 
45
  $start = ( $_GET['paged'] - 1 ) * 50;
194
 
195
  <br style="clear: both;" />
196
 
197
+ <form id="updategallery" class="flagform" method="POST" action="<?php echo $flag->manage_page->base_page . '&amp;mode=edit&amp;s=' . get_search_query(); ?>" accept-charset="utf-8">
198
  <?php wp_nonce_field('flag_updategallery'); ?>
199
  <input type="hidden" name="page" value="manage-images" />
200
 
445
  <td <?php echo $attributes; ?>>
446
  <input name="alttext[<?php echo $pid; ?>]" type="text" style="width:95%; margin-bottom: 2px;" value="<?php echo stripslashes($picture->alttext); ?>" /><br/>
447
  <textarea name="description[<?php echo $pid; ?>]" style="width:95%; margin-top: 2px;" rows="2" ><?php echo stripslashes($picture->description); ?></textarea>
448
+ <input name="link[<?php echo $pid; ?>]" type="hidden" style="width:95%; margin-bottom: 2px;" value="<?php echo stripslashes($picture->link); ?>" placeholder="(optional for skin) URL for linked button" /><br/>
449
  </td>
450
  <?php
451
  break;
602
  $gallery_columns['filename'] = __('Filename', 'flag');
603
  $gallery_columns['views_likes'] = __('Views / Likes', 'flag');
604
  $gallery_columns['rating'] = __('Rating', 'flag');
605
+ $gallery_columns['alt_title_desc'] = __('Alt &amp; Title Text', 'flag') . ' / ' . __('Description', 'flag');// . ' / ' . __('Link', 'flag');
606
  $gallery_columns['exclude'] = '<img src="'.FLAG_URLPATH.'admin/images/lock.png" alt="member view" title="'.__('Only for logged in users', 'flag').'" />';
 
607
  $gallery_columns = apply_filters('flag_manage_images_columns', $gallery_columns);
608
 
609
  return $gallery_columns;
admin/manage.php CHANGED
@@ -84,8 +84,8 @@ class flagManageGallery {
84
  }
85
  }
86
 
87
- $delete_pic = $wpdb->query("DELETE FROM $wpdb->flagpictures WHERE galleryid = $this->gid");
88
- $delete_galllery = $wpdb->query("DELETE FROM $wpdb->flaggallery WHERE gid = $this->gid");
89
 
90
  if($delete_galllery) {
91
 
@@ -130,7 +130,7 @@ class flagManageGallery {
130
  @unlink($image->imagePath);
131
  @unlink($image->thumbPath);
132
  //}
133
- $delete_pic = $wpdb->query("DELETE FROM $wpdb->flagpictures WHERE pid = $image->pid");
134
  }
135
  if($delete_pic)
136
  flagGallery::show_message( __('Picture','flag').' \''.$this->pid.'\' '.__('deleted successfully','flag') );
@@ -345,6 +345,7 @@ class flagManageGallery {
345
 
346
  $description = $_POST['description'];
347
  $alttext = $_POST['alttext'];
 
348
  $exclude = $_POST['exclude'];
349
  $pictures = $_POST['pid'];
350
  $hitcounter = $_POST['hitcounter'];
@@ -364,6 +365,13 @@ class flagManageGallery {
364
  $wpdb->query( "UPDATE $wpdb->flagpictures SET alttext = '$alttext' WHERE pid = $key");
365
  }
366
  }
 
 
 
 
 
 
 
367
  if ( is_array($hitcounter) ){
368
  foreach( $hitcounter as $key => $value ) {
369
  $hitcounter = abs( intval($value) );
84
  }
85
  }
86
 
87
+ $delete_pic = $wpdb->query("DELETE FROM $wpdb->flagpictures WHERE galleryid = '$this->gid'");
88
+ $delete_galllery = $wpdb->query("DELETE FROM $wpdb->flaggallery WHERE gid = '$this->gid'");
89
 
90
  if($delete_galllery) {
91
 
130
  @unlink($image->imagePath);
131
  @unlink($image->thumbPath);
132
  //}
133
+ $delete_pic = $wpdb->query("DELETE FROM $wpdb->flagpictures WHERE pid = '$image->pid'");
134
  }
135
  if($delete_pic)
136
  flagGallery::show_message( __('Picture','flag').' \''.$this->pid.'\' '.__('deleted successfully','flag') );
345
 
346
  $description = $_POST['description'];
347
  $alttext = $_POST['alttext'];
348
+ $link = $_POST['link'];
349
  $exclude = $_POST['exclude'];
350
  $pictures = $_POST['pid'];
351
  $hitcounter = $_POST['hitcounter'];
365
  $wpdb->query( "UPDATE $wpdb->flagpictures SET alttext = '$alttext' WHERE pid = $key");
366
  }
367
  }
368
+ if ( is_array($link) ){
369
+ foreach( $link as $key => $value ) {
370
+ $link = $wpdb->escape($value);
371
+ $key =intval($key);
372
+ $wpdb->query( "UPDATE $wpdb->flagpictures SET link = '$link' WHERE pid = $key");
373
+ }
374
+ }
375
  if ( is_array($hitcounter) ){
376
  foreach( $hitcounter as $key => $value ) {
377
  $hitcounter = abs( intval($value) );
admin/meta_box.php CHANGED
@@ -2,7 +2,9 @@
2
 
3
  global $flagdb, $post;
4
  require_once (dirname(__FILE__) . '/get_skin.php');
 
5
  $i_skins = get_skins();
 
6
  $flag_custom = get_post_custom($post->ID);
7
  $items_array = $flag_custom["mb_items_array"][0];
8
  $skinname = $flag_custom["mb_skinname"][0];
@@ -32,9 +34,11 @@ jQuery(document).ready(function() {
32
  var galleries = 'gid='+jQuery('#mb_items_array').val();
33
  var skin = jQuery('#mb_skinname option:selected').val();
34
  if(skin) skin = ' skin='+skin; else skin = '';
 
 
35
  var wmode = jQuery('#mb_bg_link').val();
36
  if(wmode) wmode = ' wmode=transparent'; else wmode = ' wmode=window';
37
- short_code(galleries,skin,wmode);
38
  jQuery('#galleries :checkbox').click(function(){
39
  var cur, arr, del;
40
  if(jQuery(this).is(':checked')){
@@ -60,32 +64,38 @@ jQuery(document).ready(function() {
60
  }
61
  }
62
  galleries = 'gid='+jQuery('#mb_items_array').val();
63
- skin = jQuery('#mb_skinname option:selected').val(); if(skin) skin = ' skin='+skin; else skin = '';
64
- short_code(galleries,skin,wmode);
65
  });
66
  jQuery('#mb_skinname').change(function(){
67
- var skin = jQuery(this).val();
68
  if(skin) {
69
  skin = ' skin='+skin;
70
  } else {
71
  skin = '';
72
  }
73
- galleries = 'gid='+jQuery('#mb_items_array').val();
74
- short_code(galleries,skin,wmode);
 
 
 
 
 
 
 
 
75
  });
76
  jQuery('#mb_bg_link').change(function(){
77
- var wmode = jQuery(this).val();
78
  if(wmode) {
79
  wmode = ' wmode=transparent';
80
  } else {
81
  wmode = ' wmode=window';
82
  }
83
- galleries = 'gid='+jQuery('#mb_items_array').val();
84
- short_code(galleries,skin,wmode);
85
  });
86
  });
87
- function short_code(galleries,skin,wmode) {
88
- jQuery('#mb_scode').val('[flagallery '+galleries+' name=Gallery w=100% h=100%'+skin+wmode+' fullwindow=true]');
89
  }
90
  /*]]>*/</script>
91
  <div class="wrap">
@@ -133,6 +143,21 @@ function short_code(galleries,skin,wmode) {
133
  <td valign="top"><input id="mb_button_link" name="mb_button_link" type="text" style="width: 49%;" placeholder="<?php echo home_url(); ?>" value="<?php echo $button_link; ?>" /><br />
134
  <small><?php _e("Leave empty to use referer link", 'flag'); ?></small></td>
135
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  <tr>
137
  <td nowrap="nowrap" valign="top"><div style="padding-top: 3px;"><?php _e("Background Image Link", 'flag'); ?>: &nbsp; </div></td>
138
  <td valign="top"><input id="mb_bg_link" name="mb_bg_link" type="text" style="width: 49%;" value="<?php echo $bg_link; ?>" /><br />
2
 
3
  global $flagdb, $post;
4
  require_once (dirname(__FILE__) . '/get_skin.php');
5
+ require_once (dirname(__FILE__) . '/playlist.functions.php');
6
  $i_skins = get_skins();
7
+ $all_playlists = get_playlists();
8
  $flag_custom = get_post_custom($post->ID);
9
  $items_array = $flag_custom["mb_items_array"][0];
10
  $skinname = $flag_custom["mb_skinname"][0];
34
  var galleries = 'gid='+jQuery('#mb_items_array').val();
35
  var skin = jQuery('#mb_skinname option:selected').val();
36
  if(skin) skin = ' skin='+skin; else skin = '';
37
+ var playlist = jQuery('#mb_playlist option:selected').val();
38
+ if(playlist) playlist = ' playlist='+playlist; else playlist = '';
39
  var wmode = jQuery('#mb_bg_link').val();
40
  if(wmode) wmode = ' wmode=transparent'; else wmode = ' wmode=window';
41
+ short_code(galleries,skin,wmode,playlist);
42
  jQuery('#galleries :checkbox').click(function(){
43
  var cur, arr, del;
44
  if(jQuery(this).is(':checked')){
64
  }
65
  }
66
  galleries = 'gid='+jQuery('#mb_items_array').val();
67
+ short_code(galleries,skin,wmode,playlist);
 
68
  });
69
  jQuery('#mb_skinname').change(function(){
70
+ skin = jQuery(this).val();
71
  if(skin) {
72
  skin = ' skin='+skin;
73
  } else {
74
  skin = '';
75
  }
76
+ short_code(galleries,skin,wmode,playlist);
77
+ });
78
+ jQuery('#mb_playlist').change(function(){
79
+ playlist = jQuery(this).val();
80
+ if(playlist) {
81
+ playlist = ' playlist='+playlist;
82
+ } else {
83
+ playlist = '';
84
+ }
85
+ short_code(galleries,skin,wmode,playlist);
86
  });
87
  jQuery('#mb_bg_link').change(function(){
88
+ wmode = jQuery(this).val();
89
  if(wmode) {
90
  wmode = ' wmode=transparent';
91
  } else {
92
  wmode = ' wmode=window';
93
  }
94
+ short_code(galleries,skin,wmode,playlist);
 
95
  });
96
  });
97
+ function short_code(galleries,skin,wmode,playlist) {
98
+ jQuery('#mb_scode').val('[flagallery '+galleries+' w=100% h=100%'+skin+wmode+playlist+' fullwindow=true name=Gallery]');
99
  }
100
  /*]]>*/</script>
101
  <div class="wrap">
143
  <td valign="top"><input id="mb_button_link" name="mb_button_link" type="text" style="width: 49%;" placeholder="<?php echo home_url(); ?>" value="<?php echo $button_link; ?>" /><br />
144
  <small><?php _e("Leave empty to use referer link", 'flag'); ?></small></td>
145
  </tr>
146
+ <tr>
147
+ <td nowrap="nowrap" valign="top"><div style="padding-top: 3px;"><?php _e("Music", 'flag'); ?>: &nbsp; </div></td>
148
+ <td valign="top"><select id="mb_playlist" name="mb_playlist">
149
+ <option value="" selected="selected"><?php _e("choose playlist", 'flag'); ?></option>
150
+ <?php
151
+ foreach((array)$all_playlists as $playlist_file => $playlist_data) {
152
+ $playlist_name = basename($playlist_file, '.xml');
153
+ ?>
154
+ <option value="<?php echo $playlist_name; ?>"><?php echo $playlist_data['title']; ?></option>
155
+ <?php
156
+ }
157
+ ?>
158
+ </select><br />
159
+ <small><?php _e("(optional) Read Skin specification for supporting this function.", 'flag'); ?></small></td>
160
+ </tr>
161
  <tr>
162
  <td nowrap="nowrap" valign="top"><div style="padding-top: 3px;"><?php _e("Background Image Link", 'flag'); ?>: &nbsp; </div></td>
163
  <td valign="top"><input id="mb_bg_link" name="mb_bg_link" type="text" style="width: 49%;" value="<?php echo $bg_link; ?>" /><br />
admin/music-box.php CHANGED
@@ -68,7 +68,13 @@ function flag_music_controler() {
68
  }
69
  break;
70
  case 'add':
71
- $added = $_POST['items'];
 
 
 
 
 
 
72
  flag_music_wp_media_lib($added);
73
  break;
74
  case 'delete':
@@ -156,32 +162,70 @@ function flag_music_wp_media_lib($added=false) {
156
  $playlistPath = $flag_options['galleryPath'].'playlists/'.$_GET['playlist'].'.xml';
157
  $playlist = get_playlist_data(ABSPATH.$playlistPath);
158
  $exclude = explode(',', $added);
 
 
 
 
 
 
 
 
159
  }
160
  ?>
161
  <script type="text/javascript">
162
  <!--
163
  jQuery(document).ready(function(){
164
- jQuery('.cb :checkbox').click(function() {
 
 
 
 
 
165
  var cur, arr, del;
166
  if(jQuery(this).is(':checked')){
167
  cur = jQuery(this).val();
168
  arr = jQuery('#items_array').val();
169
  if(arr) { del = ','; } else { del = ''; }
170
  jQuery('#items_array').val(arr+del+cur);
 
171
  } else {
172
  cur = jQuery(this).val();
173
  arr = jQuery('#items_array').val().split(',');
174
  arr = jQuery.grep(arr, function(a){ return a != cur; }).join(',');
175
  jQuery('#items_array').val(arr);
 
176
  }
 
177
  });
178
- jQuery('.del_thumb').click(function(){
179
- var id = jQuery(this).attr('data-id');
180
- jQuery('#mp3thumb-'+id).attr('value', '');
181
- jQuery('#thumb-'+id).attr('src', '<?php echo site_url()."/wp-includes/images/crystal/audio.png"; ?>');
182
- return false;
183
- })
 
 
 
 
 
 
 
184
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  function checkAll(form) {
186
  for (i = 0, n = form.elements.length; i < n; i++) {
187
  if(form.elements[i].type == "checkbox") {
@@ -198,21 +242,17 @@ function checkAll(form) {
198
  }
199
  // this function check for a the number of selected images, sumbmit false when no one selected
200
  function checkSelected() {
201
- if(!jQuery('.cb input:checked')) {
202
- alert('<?php echo esc_js(__('No items selected', 'flag')); ?>');
203
- return false;
204
- }
205
- actionId = jQuery('#bulkaction').val();
206
  switch (actionId) {
207
  case "new_playlist":
208
  showDialog('new_playlist', 160);
209
  return false;
210
  break;
211
- case "add_to_playlist":
212
- return confirm('<?php echo sprintf(esc_js(__("You are about to add %s items to playlist \n \n 'Cancel' to stop, 'OK' to proceed.",'flag')), "' + numchecked + '") ; ?>');
213
- break;
214
  }
215
- return confirm('<?php echo sprintf(esc_js(__("You are about to start the bulk edit for %s items \n \n 'Cancel' to stop, 'OK' to proceed.",'flag')), "' + numchecked + '") ; ?>');
216
  }
217
 
218
  function showDialog( windowId, height ) {
@@ -243,15 +283,17 @@ function send_to_editor(html) {
243
  <script type="text/javascript">
244
  /* <![CDATA[ */
245
  jQuery(function() {
246
- jQuery("#file_browser").fileTree({
247
- script: "admin-ajax.php?action=flag_file_browser&nonce=<?php echo wp_create_nonce( 'flag-ajax' ) ;?>",
248
- root: jQuery("#mp3folder").val()
249
- }, function(file) {
250
- //var path = file.replace("<?php echo WINABSPATH; ?>", "");
251
- jQuery("#mp3folder").val(file);
252
- });
 
253
 
254
- jQuery("#file_browser").show("slide");
 
255
  });
256
  /* ]]> */
257
  </script>
@@ -266,7 +308,7 @@ function send_to_editor(html) {
266
  <th scope="row"><?php _e('Import from Server path:', 'flag'); ?></th>
267
  <td><input type="text" size="35" id="mp3folder" name="mp3folder" value="<?php echo $defaultpath; ?>" /><span class="browsefiles button" style="display:none"><?php _e('Browse...',"flag"); ?></span>
268
  <div id="file_browser"></div><br />
269
- <p><label><input type="checkbox" name="delete_files" value="delete" checked="checked" /> &nbsp;
270
  <?php _e('delete files after import in WordPress Media Library','flag'); ?></label></p>
271
  </td>
272
  </tr>
@@ -278,7 +320,45 @@ function send_to_editor(html) {
278
  <?php } ?>
279
 
280
  <h2><?php _e('WordPress Music Library', 'flag'); ?></h2>
281
- <form id="musiclib" class="flagform" method="POST" action="<?php echo $filepath; ?>" accept-charset="utf-8">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  <?php wp_nonce_field('flag_bulkmusic'); ?>
283
  <input type="hidden" name="page" value="music-box" />
284
 
@@ -287,7 +367,6 @@ function send_to_editor(html) {
287
  <div class="actions">
288
  <?php if($added===false) { ?>
289
  <input name="updateMedia" class="button-primary" style="float: right;" type="submit" value="<?php _e('Update Media','flag'); ?>" />
290
-
291
  <?php if ( function_exists('json_encode') ) { ?>
292
  <select name="bulkaction" id="bulkaction">
293
  <option value="no_action" ><?php _e("No action",'flag'); ?></option>
@@ -299,12 +378,12 @@ function send_to_editor(html) {
299
  <input type="hidden" id="items_array" name="items_array" value="" />
300
  <?php } else { ?>
301
  <input type="hidden" name="mode" value="save" />
302
- <input style="width: 80%;" type="text" id="items_array" name="items_array" value="<?php echo $added; ?>" />
303
  <input type="hidden" name="playlist_title" value="<?php echo $playlist['title']; ?>" />
304
  <input type="hidden" name="skinname" value="<?php echo $playlist['skin']; ?>" />
305
  <input type="hidden" name="skinaction" value="<?php echo $playlist['skin']; ?>" />
306
  <textarea style="display: none;" name="playlist_descr" cols="40" rows="1"><?php echo $playlist['description']; ?></textarea>
307
- <input name="addToPlaylist" class="button-secondary" type="submit" value="<?php _e('Update Playlist','flag'); ?>" onclick="if ( !checkSelected() ) return false;" />
308
  <?php } ?>
309
  </div>
310
 
@@ -331,13 +410,7 @@ function send_to_editor(html) {
331
  </tr>
332
  </tfoot>
333
  <tbody>
334
- <?php $musiclist = get_posts( $args = array(
335
- 'numberposts' => -1,
336
- 'orderby' => 'ID',
337
- 'order' => 'DESC',
338
- 'post_type' => 'attachment',
339
- 'post_mime_type' => 'audio/mpeg' )
340
- );
341
  $uploads = wp_upload_dir();
342
  $flag_options = get_option('flag_options');
343
  if($musiclist) {
@@ -349,7 +422,7 @@ if($musiclist) {
349
  $class = ( empty($class) ) ? ' class="alternate"' : '';
350
  $class2 = ( empty($class) ) ? '' : ' alternate';
351
  $ex = $checked = '';
352
- if($added!==false && in_array($mp3->ID, $exclude) ) {
353
  $ex = ' style="background-color:#DDFFBB;" title="'.__("Already Added", "flag").'"';
354
  $checked = ' checked="checked"';
355
  }
68
  }
69
  break;
70
  case 'add':
71
+ if(isset($_POST['items']) && isset($_GET['playlist'])){
72
+ $added = $_POST['items'];
73
+ } elseif(isset($_GET['playlist'])) {
74
+ $added = $_COOKIE['musicboxplaylist_'.$_GET['playlist']];
75
+ } else {
76
+ $added = false;
77
+ }
78
  flag_music_wp_media_lib($added);
79
  break;
80
  case 'delete':
162
  $playlistPath = $flag_options['galleryPath'].'playlists/'.$_GET['playlist'].'.xml';
163
  $playlist = get_playlist_data(ABSPATH.$playlistPath);
164
  $exclude = explode(',', $added);
165
+ } else {
166
+ $items_array_default = isset($_COOKIE['musicboxplaylist_default'])? $_COOKIE['musicboxplaylist_default'] : '';
167
+ $exclude = explode(',', $items_array_default);
168
+ }
169
+ if(isset($_GET['playlist'])){
170
+ $playlist_cookie = $_GET['playlist'];
171
+ } else {
172
+ $playlist_cookie = 'default';
173
  }
174
  ?>
175
  <script type="text/javascript">
176
  <!--
177
  jQuery(document).ready(function(){
178
+ var storedData = getStorage('musicboxplaylist_');
179
+ <?php if(isset($_POST['items'])){
180
+ ?>
181
+ storedData.set('<?php echo $playlist_cookie; ?>', '<?php echo $_POST['items']; ?>');
182
+ <?php } ?>
183
+ jQuery('.cb :checkbox').click(function() {
184
  var cur, arr, del;
185
  if(jQuery(this).is(':checked')){
186
  cur = jQuery(this).val();
187
  arr = jQuery('#items_array').val();
188
  if(arr) { del = ','; } else { del = ''; }
189
  jQuery('#items_array').val(arr+del+cur);
190
+ jQuery(this).closest('tr').css('background-color','#DDFFBB').next().css('background-color','#DDFFBB');
191
  } else {
192
  cur = jQuery(this).val();
193
  arr = jQuery('#items_array').val().split(',');
194
  arr = jQuery.grep(arr, function(a){ return a != cur; }).join(',');
195
  jQuery('#items_array').val(arr);
196
+ jQuery(this).closest('tr').removeAttr('style').next().removeAttr('style');
197
  }
198
+ storedData.set('<?php echo $playlist_cookie; ?>', jQuery('#items_array').val());
199
  });
200
+ jQuery('.clear_selected').click(function(){
201
+ jQuery('#items_array').val('');
202
+ jQuery('.cb :checkbox').each(function(){
203
+ jQuery(this).prop('checked', false).closest('tr').removeAttr('style').next().removeAttr('style');
204
+ });
205
+ storedData.set('<?php echo $playlist_cookie; ?>', jQuery('#items_array').val());
206
+ });
207
+ jQuery('.del_thumb').click(function(){
208
+ var id = jQuery(this).attr('data-id');
209
+ jQuery('#mp3thumb-'+id).attr('value', '');
210
+ jQuery('#thumb-'+id).attr('src', '<?php echo site_url()."/wp-includes/images/crystal/audio.png"; ?>');
211
+ return false;
212
+ });
213
  });
214
+ function getStorage(key_prefix) {
215
+ return {
216
+ set: function (id, data) {
217
+ document.cookie = key_prefix + id + '=' + encodeURIComponent(data);
218
+ },
219
+ get: function (id, data) {
220
+ var cookies = document.cookie, parsed = {};
221
+ cookies.replace(/([^=]+)=([^;]*);?\s*/g, function (whole, key, value) {
222
+ parsed[key] = decodeURIComponent(value);
223
+ });
224
+ return parsed[key_prefix + id];
225
+ }
226
+ };
227
+ }
228
+
229
  function checkAll(form) {
230
  for (i = 0, n = form.elements.length; i < n; i++) {
231
  if(form.elements[i].type == "checkbox") {
242
  }
243
  // this function check for a the number of selected images, sumbmit false when no one selected
244
  function checkSelected() {
245
+ if(!jQuery('#items_array').val()) {
246
+ alert('<?php echo esc_js(__("No items selected", "flag")); ?>');
247
+ return false;
248
+ }
249
+ var actionId = jQuery('#bulkaction').val();
250
  switch (actionId) {
251
  case "new_playlist":
252
  showDialog('new_playlist', 160);
253
  return false;
254
  break;
 
 
 
255
  }
 
256
  }
257
 
258
  function showDialog( windowId, height ) {
283
  <script type="text/javascript">
284
  /* <![CDATA[ */
285
  jQuery(function() {
286
+ jQuery("span.browsefiles").show().click(function(){
287
+ jQuery("#file_browser").fileTree({
288
+ script: "admin-ajax.php?action=flag_file_browser&nonce=<?php echo wp_create_nonce( 'flag-ajax' ) ;?>",
289
+ root: jQuery("#mp3folder").val()
290
+ }, function(file) {
291
+ //var path = file.replace("<?php echo WINABSPATH; ?>", "");
292
+ jQuery("#mp3folder").val(file);
293
+ });
294
 
295
+ jQuery("#file_browser").show("slide");
296
+ });
297
  });
298
  /* ]]> */
299
  </script>
308
  <th scope="row"><?php _e('Import from Server path:', 'flag'); ?></th>
309
  <td><input type="text" size="35" id="mp3folder" name="mp3folder" value="<?php echo $defaultpath; ?>" /><span class="browsefiles button" style="display:none"><?php _e('Browse...',"flag"); ?></span>
310
  <div id="file_browser"></div><br />
311
+ <p><label><input type="checkbox" name="delete_files" value="delete" /> &nbsp;
312
  <?php _e('delete files after import in WordPress Media Library','flag'); ?></label></p>
313
  </td>
314
  </tr>
320
  <?php } ?>
321
 
322
  <h2><?php _e('WordPress Music Library', 'flag'); ?></h2>
323
+ <?php
324
+ // look for pagination
325
+ if ( ! isset( $_GET['paged'] ) || $_GET['paged'] < 1 )
326
+ $_GET['paged'] = 1;
327
+
328
+ $objects_per_page = 5;
329
+ $start = ( $_GET['paged'] - 1 ) * $objects_per_page;
330
+ $img_total_count = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->posts WHERE `post_mime_type` = 'audio/mpeg' AND `post_type` = 'attachment' AND `post_status` = 'inherit'");
331
+ $musiclist = get_posts( $args = array(
332
+ 'numberposts' => $objects_per_page,
333
+ 'offset' => $start,
334
+ 'orderby' => 'ID',
335
+ 'order' => 'DESC',
336
+ 'post_type' => 'attachment',
337
+ 'post_mime_type' => 'audio/mpeg' )
338
+ );
339
+
340
+ // build pagination
341
+ $page_links = paginate_links( array(
342
+ 'base' => add_query_arg( 'paged', '%#%' ),
343
+ 'format' => '',
344
+ 'prev_text' => __('&laquo;'),
345
+ 'next_text' => __('&raquo;'),
346
+ 'total' => ceil( $img_total_count / $objects_per_page),
347
+ 'current' => $_GET['paged']
348
+ ));
349
+ ?>
350
+ <div class="tablenav" style="overflow: hidden; height: auto;">
351
+ <?php if($added===false) { ?>
352
+ <div class="alignleft"><b><?php _e('Selected Media','flag'); ?>: </b><input style="width:500px;" type="text" readonly="readonly" id="items_array" name="items_array" value="<?php echo $items_array_default; ?>" /> <span class="clear_selected button"><?php _e('Clear Selected','flag'); ?></span></div>
353
+ <?php } ?>
354
+ <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
355
+ number_format_i18n( ( $_GET['paged'] - 1 ) * $objects_per_page + 1 ),
356
+ number_format_i18n( min( $_GET['paged'] * $objects_per_page, $img_total_count ) ),
357
+ number_format_i18n( $img_total_count ),
358
+ $page_links
359
+ ); echo $page_links_text; ?></div>
360
+ </div>
361
+ <form id="musiclib" class="flagform" method="POST" action="<?php echo $filepath; ?>" accept-charset="utf-8">
362
  <?php wp_nonce_field('flag_bulkmusic'); ?>
363
  <input type="hidden" name="page" value="music-box" />
364
 
367
  <div class="actions">
368
  <?php if($added===false) { ?>
369
  <input name="updateMedia" class="button-primary" style="float: right;" type="submit" value="<?php _e('Update Media','flag'); ?>" />
 
370
  <?php if ( function_exists('json_encode') ) { ?>
371
  <select name="bulkaction" id="bulkaction">
372
  <option value="no_action" ><?php _e("No action",'flag'); ?></option>
378
  <input type="hidden" id="items_array" name="items_array" value="" />
379
  <?php } else { ?>
380
  <input type="hidden" name="mode" value="save" />
381
+ <input style="width: 80%;" type="text" id="items_array" name="items_array" readonly="readonly" value="<?php echo $added; ?>" />
382
  <input type="hidden" name="playlist_title" value="<?php echo $playlist['title']; ?>" />
383
  <input type="hidden" name="skinname" value="<?php echo $playlist['skin']; ?>" />
384
  <input type="hidden" name="skinaction" value="<?php echo $playlist['skin']; ?>" />
385
  <textarea style="display: none;" name="playlist_descr" cols="40" rows="1"><?php echo $playlist['description']; ?></textarea>
386
+ <input name="addToPlaylist" class="button-secondary" type="submit" value="<?php _e('Update Playlist','flag'); ?>" />
387
  <?php } ?>
388
  </div>
389
 
410
  </tr>
411
  </tfoot>
412
  <tbody>
413
+ <?php
 
 
 
 
 
 
414
  $uploads = wp_upload_dir();
415
  $flag_options = get_option('flag_options');
416
  if($musiclist) {
422
  $class = ( empty($class) ) ? ' class="alternate"' : '';
423
  $class2 = ( empty($class) ) ? '' : ' alternate';
424
  $ex = $checked = '';
425
+ if( ($added!==false || !empty($items_array_default)) && in_array($mp3->ID, $exclude) ) {
426
  $ex = ' style="background-color:#DDFFBB;" title="'.__("Already Added", "flag").'"';
427
  $checked = ' checked="checked"';
428
  }
admin/settings.php CHANGED
@@ -30,22 +30,43 @@ function flag_admin_options() {
30
  // Save options
31
  update_option('flag_options', $flag->options);
32
 
33
- if(!isset($_POST['access_key']))
34
- flagGallery::show_message(__('Update Successfully','flag'));
35
  }
36
- if( isset($_POST['access_key']) ){
37
- if(function_exists('curl_init')){
38
- check_admin_referer('flag_settings');
39
- $ch = curl_init('http://mypgc.co/app/account_st.php');
40
- curl_setopt ($ch, CURLOPT_POST, 1);
41
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
42
- curl_setopt ($ch, CURLOPT_POSTFIELDS, array('access_key'=>$_POST['access_key'], 'access_url'=>$_POST['access_url']));
43
- $access_key_return = curl_exec ($ch);
44
- curl_close ($ch);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  } else {
46
- $access_key_return = '<div class="updated"><p>cURL library is not installed on your server.</p></div>';
 
47
  }
48
- echo $access_key_return;
49
  }
50
 
51
 
@@ -82,7 +103,9 @@ function flag_admin_options() {
82
 
83
  <ul id="tabs" class="tabs">
84
  <li class="selected"><a href="#" rel="imageoptions"><?php _e('Image Gallery Options', 'flag'); ?></a></li>
85
- <li><a href="#" rel="rControl"><?php _e('Remote Control', 'flag'); ?></a></li>
 
 
86
  <li><a href="#" rel="vPlayer"><?php _e('FLV Single Player Options', 'flag'); ?></a></li>
87
  <li><a href="#" rel="mPlayer"><?php _e('MP3 Single Player Options', 'flag'); ?></a></li>
88
  <?php if (flagGallery::flag_wpmu_enable_function('wpmuRoles')) : ?>
@@ -138,8 +161,45 @@ jQuery(document).ready(function() {
138
  <span class="setting-description"><?php _e('A RSS feed will be added to you blog header.','flag'); ?></span></td>
139
  </tr>
140
  </table>
141
-
142
- <h3><?php _e('Alternative Gallery Options','flag'); ?> <br><small style="color: red;"><?php _e('(Attention: this is not skin option, only for browsers without flash support)','flag'); ?></small></h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  <table class="flag_colors form-table flag-options">
144
  <tr>
145
  <th align="left"><?php _e('Show jQuery gallery for browsers without flashplayer','flag'); ?></th>
@@ -196,63 +256,36 @@ jQuery(document).ready(function() {
196
  <td><input class="colorPick" type="text" size="7" maxlength="6" id="DescrColor" name="DescrColor" value="<?php echo $flag_options['DescrColor']; ?>" /><div id="cp_DescrColor" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
197
  </tr>
198
  </table>
199
-
200
- <h3><?php _e('Image settings','flag'); ?></h3>
201
- <table class="form-table flag-options">
202
- <tr valign="top">
203
- <th scope="row" width="200"><label><?php _e('Resize Images','flag'); ?></label><br /><small>(Manage Gallery -> 'Resize Images' action)</small></th>
204
- <td><input type="hidden" name="imgResize" value="1" <?php checked('1', $flag_options['imgResize']); ?> />
205
- <input type="text" size="5" name="imgWidth" value="<?php echo $flag_options['imgWidth']; ?>" /> x <input type="text" size="5" name="imgHeight" value="<?php echo $flag_options['imgHeight']; ?>" />
206
- <span class="setting-description"><?php _e('Width x Height (in pixel). Flash Album Gallery will keep ratio size','flag'); ?></span></td>
207
- </tr>
208
- <tr valign="top">
209
- <th align="left"><?php _e('Image quality','flag'); ?></th>
210
- <td><input type="text" size="3" maxlength="3" name="imgQuality" value="<?php echo $flag_options['imgQuality']; ?>" /> %</td>
211
- </tr>
212
- </table>
213
-
214
- <h3><?php _e('Sort options','flag'); ?></h3>
215
- <table class="form-table flag-options">
216
- <tr>
217
- <th valign="top" width="200"><?php _e('Sort thumbnails','flag'); ?>:</th>
218
- <td>
219
- <label><input name="galSort" type="radio" value="sortorder" <?php checked('sortorder', $flag_options['galSort']); ?> /> <?php _e('Custom order', 'flag'); ?></label><br />
220
- <label><input name="galSort" type="radio" value="pid" <?php checked('pid', $flag_options['galSort']); ?> /> <?php _e('Image ID', 'flag'); ?></label><br />
221
- <label><input name="galSort" type="radio" value="filename" <?php checked('filename', $flag_options['galSort']); ?> /> <?php _e('File name', 'flag'); ?></label><br />
222
- <label><input name="galSort" type="radio" value="alttext" <?php checked('alttext', $flag_options['galSort']); ?> /> <?php _e('Alt / Title text', 'flag'); ?></label><br />
223
- <label><input name="galSort" type="radio" value="imagedate" <?php checked('imagedate', $flag_options['galSort']); ?> /> <?php _e('Date / Time', 'flag'); ?></label><br />
224
- <label><input name="galSort" type="radio" value="hitcounter" <?php checked('hitcounter', $flag_options['galSort']); ?> /> <?php _e('Image views', 'flag'); ?></label><br />
225
- <label><input name="galSort" type="radio" value="total_votes" <?php checked('total_votes', $flag_options['galSort']); ?> /> <?php _e('Image likes', 'flag'); ?></label><br />
226
- <label><input name="galSort" type="radio" value="rand()" <?php checked('rand()', $flag_options['galSort']); ?> /> <?php _e('Randomly', 'flag'); ?></label>
227
- </td>
228
- </tr>
229
- <tr>
230
- <th valign="top"><?php _e('Sort direction','flag'); ?>:</th>
231
- <td><label><input name="galSortDir" type="radio" value="ASC" <?php checked('ASC', $flag_options['galSortDir']); ?> /> <?php _e('Ascending', 'flag'); ?></label><br />
232
- <label><input name="galSortDir" type="radio" value="DESC" <?php checked('DESC', $flag_options['galSortDir']); ?> /> <?php _e('Descending', 'flag'); ?></label>
233
- </td>
234
- </tr>
235
- </table>
236
  <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes', 'flag'); ?>"/></div>
237
  </form>
238
  </div>
239
 
 
240
  <div id="rControl" class="cptab">
241
  <form name="rControl" method="post">
242
  <?php wp_nonce_field('flag_settings'); ?>
243
- <input type="hidden" name="page_options" value="access_key" />
 
244
  <input type="hidden" name="access_url" value="<?php echo plugins_url() . '/' . FLAGFOLDER . '/lib/app.php'; ?>" />
245
- <h2><?php _e('Remote Control App Settings','flag'); ?></h2>
246
  <table class="form-table flag-options">
247
  <tr>
248
- <th valign="top" width="200"><?php _e('App Access Key','flag'); ?>:</th>
249
- <td valign="top"><input type="text" size="54" id="access_key" name="access_key" value="<?php echo $flag_options['access_key']?>" /></td>
 
 
 
 
 
 
 
 
250
  </tr>
251
  </table>
252
- <h3>Coming soon...</h3>
253
- <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes', 'flag'); ?>"/></div>
254
  </form>
255
  </div>
 
256
 
257
  <div id="vPlayer" class="cptab">
258
  <form name="vPlayer" method="post">
30
  // Save options
31
  update_option('flag_options', $flag->options);
32
 
33
+ flagGallery::show_message(__('Update Successfully','flag'));
 
34
  }
35
+ if( isset($_POST['membership']) ){
36
+ if(!empty($_POST['license_key'])){
37
+ if(function_exists('curl_init')){
38
+ check_admin_referer('flag_settings');
39
+ $ch = curl_init('http://mypgc.co/app/account_st.php');
40
+ curl_setopt ($ch, CURLOPT_REFERER, home_url());
41
+ curl_setopt ($ch, CURLOPT_POST, 1);
42
+ curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
43
+ curl_setopt ($ch, CURLOPT_POSTFIELDS, array('access_key'=>$_POST['access_key'], 'access_url'=>$_POST['access_url'], 'license_key'=>$_POST['license_key']));
44
+ $access_key_return = curl_exec ($ch);
45
+ curl_close ($ch);
46
+ } else {
47
+ $access_key_return = __('cURL library is not installed on your server.','flag');
48
+ }
49
+ if(strpos($access_key_return, 'Error') !== FALSE){
50
+ $_POST['license_key'] = '';
51
+ }
52
+ $options = explode(',', stripslashes($_POST['page_options']));
53
+ foreach ($options as $option) {
54
+ $option = trim($option);
55
+ $value = trim($_POST[$option]);
56
+ $flag->options[$option] = $value;
57
+ }
58
+ // Save options
59
+ update_option('flag_options', $flag->options);
60
+
61
+ if(strpos($access_key_return, 'Error') === FALSE){
62
+ flagGallery::show_message($access_key_return);
63
+ } else {
64
+ flagGallery::show_error($access_key_return);
65
+ }
66
  } else {
67
+ $access_key_return = __('Enter License Key. License Key is required','flag');
68
+ flagGallery::show_error($access_key_return);
69
  }
 
70
  }
71
 
72
 
103
 
104
  <ul id="tabs" class="tabs">
105
  <li class="selected"><a href="#" rel="imageoptions"><?php _e('Image Gallery Options', 'flag'); ?></a></li>
106
+ <?php if(current_user_can('administrator')){ ?>
107
+ <li><a href="#" rel="rControl"><?php _e('License Key & Remote Control', 'flag'); ?></a></li>
108
+ <?php } ?>
109
  <li><a href="#" rel="vPlayer"><?php _e('FLV Single Player Options', 'flag'); ?></a></li>
110
  <li><a href="#" rel="mPlayer"><?php _e('MP3 Single Player Options', 'flag'); ?></a></li>
111
  <?php if (flagGallery::flag_wpmu_enable_function('wpmuRoles')) : ?>
161
  <span class="setting-description"><?php _e('A RSS feed will be added to you blog header.','flag'); ?></span></td>
162
  </tr>
163
  </table>
164
+
165
+ <h3><?php _e('Image settings','flag'); ?></h3>
166
+ <table class="form-table flag-options">
167
+ <tr valign="top">
168
+ <th scope="row" width="200"><label><?php _e('Resize Images','flag'); ?></label><br /><small>(Manage Gallery -> 'Resize Images' action)</small></th>
169
+ <td><input type="hidden" name="imgResize" value="1" <?php checked('1', $flag_options['imgResize']); ?> />
170
+ <input type="text" size="5" name="imgWidth" value="<?php echo $flag_options['imgWidth']; ?>" /> x <input type="text" size="5" name="imgHeight" value="<?php echo $flag_options['imgHeight']; ?>" />
171
+ <span class="setting-description"><?php _e('Width x Height (in pixel). Flash Album Gallery will keep ratio size','flag'); ?></span></td>
172
+ </tr>
173
+ <tr valign="top">
174
+ <th align="left"><?php _e('Image quality','flag'); ?></th>
175
+ <td><input type="text" size="3" maxlength="3" name="imgQuality" value="<?php echo $flag_options['imgQuality']; ?>" /> %</td>
176
+ </tr>
177
+ </table>
178
+
179
+ <h3><?php _e('Sort options','flag'); ?></h3>
180
+ <table class="form-table flag-options">
181
+ <tr>
182
+ <th valign="top" width="200"><?php _e('Sort thumbnails','flag'); ?>:</th>
183
+ <td>
184
+ <label><input name="galSort" type="radio" value="sortorder" <?php checked('sortorder', $flag_options['galSort']); ?> /> <?php _e('Custom order', 'flag'); ?></label><br />
185
+ <label><input name="galSort" type="radio" value="pid" <?php checked('pid', $flag_options['galSort']); ?> /> <?php _e('Image ID', 'flag'); ?></label><br />
186
+ <label><input name="galSort" type="radio" value="filename" <?php checked('filename', $flag_options['galSort']); ?> /> <?php _e('File name', 'flag'); ?></label><br />
187
+ <label><input name="galSort" type="radio" value="alttext" <?php checked('alttext', $flag_options['galSort']); ?> /> <?php _e('Alt / Title text', 'flag'); ?></label><br />
188
+ <label><input name="galSort" type="radio" value="imagedate" <?php checked('imagedate', $flag_options['galSort']); ?> /> <?php _e('Date / Time', 'flag'); ?></label><br />
189
+ <label><input name="galSort" type="radio" value="hitcounter" <?php checked('hitcounter', $flag_options['galSort']); ?> /> <?php _e('Image views', 'flag'); ?></label><br />
190
+ <label><input name="galSort" type="radio" value="total_votes" <?php checked('total_votes', $flag_options['galSort']); ?> /> <?php _e('Image likes', 'flag'); ?></label><br />
191
+ <label><input name="galSort" type="radio" value="rand()" <?php checked('rand()', $flag_options['galSort']); ?> /> <?php _e('Randomly', 'flag'); ?></label>
192
+ </td>
193
+ </tr>
194
+ <tr>
195
+ <th valign="top"><?php _e('Sort direction','flag'); ?>:</th>
196
+ <td><label><input name="galSortDir" type="radio" value="ASC" <?php checked('ASC', $flag_options['galSortDir']); ?> /> <?php _e('Ascending', 'flag'); ?></label><br />
197
+ <label><input name="galSortDir" type="radio" value="DESC" <?php checked('DESC', $flag_options['galSortDir']); ?> /> <?php _e('Descending', 'flag'); ?></label>
198
+ </td>
199
+ </tr>
200
+ </table>
201
+
202
+ <h3><?php _e('Alternative Gallery Options','flag'); ?> <br><small style="color: darkgreen;"><?php _e('(Note: this is not flash skin option. Options below only for alternative gallery in mobile browsers)','flag'); ?></small></h3>
203
  <table class="flag_colors form-table flag-options">
204
  <tr>
205
  <th align="left"><?php _e('Show jQuery gallery for browsers without flashplayer','flag'); ?></th>
256
  <td><input class="colorPick" type="text" size="7" maxlength="6" id="DescrColor" name="DescrColor" value="<?php echo $flag_options['DescrColor']; ?>" /><div id="cp_DescrColor" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
257
  </tr>
258
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes', 'flag'); ?>"/></div>
260
  </form>
261
  </div>
262
 
263
+ <?php if(current_user_can('administrator')){ ?>
264
  <div id="rControl" class="cptab">
265
  <form name="rControl" method="post">
266
  <?php wp_nonce_field('flag_settings'); ?>
267
+ <input type="hidden" name="page_options" value="access_key,license_key" />
268
+ <h2><?php _e('License Key & Remote Control','flag'); ?></h2>
269
  <input type="hidden" name="access_url" value="<?php echo plugins_url() . '/' . FLAGFOLDER . '/lib/app.php'; ?>" />
 
270
  <table class="form-table flag-options">
271
  <tr>
272
+ <th valign="top" width="200"><?php _e('License Key','flag'); ?>:</th>
273
+ <td valign="top"><input type="text" size="54" id="license_key" name="license_key" value="<?php echo $flag_options['license_key']?>" /></td>
274
+ </tr>
275
+ <tr>
276
+ <td colspan="2"><br><i><?php _e('If you want to upload photos to FlAGallery right from your iPhone download application (comming soon) and enter access key below. License Key is required.', 'flag'); ?></i></td>
277
+ </tr>
278
+ <tr>
279
+ <th valign="top" width="200"><?php _e('Remote App Access Key','flag'); ?>:</th>
280
+ <td valign="top"><input type="text" size="54" id="access_key" name="access_key" value="<?php echo $flag_options['access_key']?>" /><br>
281
+ <small><?php _e('Leave blank to disable access from application', 'flag'); ?></small></td>
282
  </tr>
283
  </table>
284
+ <h3>iOS application coming soon...</h3>
285
+ <div class="submit"><input class="button-primary" type="submit" name="membership" value="<?php _e('Update Settings for Remote Access', 'flag'); ?>"/></div>
286
  </form>
287
  </div>
288
+ <?php } ?>
289
 
290
  <div id="vPlayer" class="cptab">
291
  <form name="vPlayer" method="post">
admin/skins.php CHANGED
@@ -164,6 +164,7 @@ if ( isset($_POST['license_key']) ) {
164
  if(!empty($flag_options['license_key'])){
165
  if(function_exists('curl_init')){
166
  $ch = curl_init('http://mypgc.co/app/account_st.php');
 
167
  curl_setopt ($ch, CURLOPT_POST, 1);
168
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
169
  curl_setopt ($ch, CURLOPT_POSTFIELDS, array('check_status'=>$flag_options['license_key']));
164
  if(!empty($flag_options['license_key'])){
165
  if(function_exists('curl_init')){
166
  $ch = curl_init('http://mypgc.co/app/account_st.php');
167
+ curl_setopt ($ch, CURLOPT_REFERER, home_url());
168
  curl_setopt ($ch, CURLOPT_POST, 1);
169
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
170
  curl_setopt ($ch, CURLOPT_POSTFIELDS, array('check_status'=>$flag_options['license_key']));
admin/tinymce/window.php CHANGED
@@ -50,7 +50,7 @@ if($_REQUEST['riched'] == "false") {
50
  <li><a href="#" rel="album_panel"><span><?php _e( 'Albums', 'flag' ); ?></span></a></li>
51
  <li id="sort_tab"><a href="#" rel="sort_panel"><span><?php _e('Sort', 'flag'); ?></span></a></li>
52
  <li><a href="#" rel="custom_panel"><span><?php _e( 'Skin', 'flag' ); ?></span></a></li>
53
- <li style="display:none;"><a href="#" rel="music_panel"><span><?php _e( 'Music', 'flag' ); ?></span></a></li>
54
  </ul>
55
  <?php } else { ?>
56
  <div class="tabs" style="position:relative; overflow:hidden; margin-bottom:-1px;">
@@ -59,7 +59,7 @@ if($_REQUEST['riched'] == "false") {
59
  <li id="album_tab"><span><a href="javascript:mcTabs.displayTab('album_tab','album_panel');" onmousedown="return false;"><?php _e( 'Albums', 'flag' ); ?></a></span></li>
60
  <li id="sort_tab"><span><a href="javascript:mcTabs.displayTab('sort_tab','sort_panel');" onmousedown="return false;"><?php _e('Sort', 'flag'); ?></a></span></li>
61
  <li id="custom_tab"><span><a href="javascript:mcTabs.displayTab('custom_tab','custom_panel');" onmousedown="return false;"><?php _e( 'Skin', 'flag' ); ?></a></span></li>
62
- <li id="music_tab" style="display:none;"><span><a href="javascript:mcTabs.displayTab('music_tab','music_panel');" onmousedown="return false;"><?php _e( 'Music', 'flag' ); ?></a></span></li>
63
  </ul>
64
  </div>
65
  <div class="panel_wrapper" style="border:1px solid #919B9C; height:130px;">
@@ -265,7 +265,7 @@ if($_REQUEST['riched'] == "false") {
265
  skinalign = " align=" + skinalign;
266
  } else skinalign = '';
267
  if (playlist) {
268
- skinname = " play=" + playlist;
269
  } else playlist = '';
270
 
271
  if (galleryid || album ) {
50
  <li><a href="#" rel="album_panel"><span><?php _e( 'Albums', 'flag' ); ?></span></a></li>
51
  <li id="sort_tab"><a href="#" rel="sort_panel"><span><?php _e('Sort', 'flag'); ?></span></a></li>
52
  <li><a href="#" rel="custom_panel"><span><?php _e( 'Skin', 'flag' ); ?></span></a></li>
53
+ <li><a href="#" rel="music_panel"><span><?php _e( 'Music', 'flag' ); ?></span></a></li>
54
  </ul>
55
  <?php } else { ?>
56
  <div class="tabs" style="position:relative; overflow:hidden; margin-bottom:-1px;">
59
  <li id="album_tab"><span><a href="javascript:mcTabs.displayTab('album_tab','album_panel');" onmousedown="return false;"><?php _e( 'Albums', 'flag' ); ?></a></span></li>
60
  <li id="sort_tab"><span><a href="javascript:mcTabs.displayTab('sort_tab','sort_panel');" onmousedown="return false;"><?php _e('Sort', 'flag'); ?></a></span></li>
61
  <li id="custom_tab"><span><a href="javascript:mcTabs.displayTab('custom_tab','custom_panel');" onmousedown="return false;"><?php _e( 'Skin', 'flag' ); ?></a></span></li>
62
+ <li id="music_tab"><span><a href="javascript:mcTabs.displayTab('music_tab','music_panel');" onmousedown="return false;"><?php _e( 'Music', 'flag' ); ?></a></span></li>
63
  </ul>
64
  </div>
65
  <div class="panel_wrapper" style="border:1px solid #919B9C; height:130px;">
265
  skinalign = " align=" + skinalign;
266
  } else skinalign = '';
267
  if (playlist) {
268
+ playlist = " playlist=" + playlist;
269
  } else playlist = '';
270
 
271
  if (galleryid || album ) {
admin/upgrade.php CHANGED
@@ -17,7 +17,6 @@ function flag_upgrade() {
17
  // Be sure that the tables exist
18
  if($wpdb->get_var("show tables like '$wpdb->flagpictures'") == $wpdb->prefix . 'flag_pictures') {
19
 
20
- echo __('Upgrade database structure...', 'flag');
21
  $wpdb->show_errors();
22
 
23
  $installed_ver = get_option( "flag_db_version" );
@@ -48,14 +47,6 @@ function flag_upgrade() {
48
  flag_add_sql_column( $wpdb->flagpictures, 'meta_data', "LONGTEXT AFTER used_ips;");
49
  }
50
 
51
- // update now the database
52
- update_option( "flag_db_version", FLAG_DBVERSION );
53
- echo __('finished', 'flag') . "<br />\n";
54
- $wpdb->hide_errors();
55
-
56
- // *** From here we start file operation which could failed sometimes,
57
- // *** ensure that the DB changes are not performed two times...
58
-
59
  // On some reason the import / date sometimes failed, due to the memory limit
60
  if (version_compare($installed_ver, '0.32', '<')) {
61
  echo __('Import date and time information...', 'flag');
@@ -100,7 +91,17 @@ function flag_upgrade() {
100
  $flag_options['mpColor2'] = '3283A7';
101
  update_option('flag_options', $flag_options);
102
  echo __('finished', 'flag') . "<br />\n";
103
- }
 
 
 
 
 
 
 
 
 
 
104
  }
105
  return false;
106
  }
@@ -155,44 +156,5 @@ function flag_add_sql_column($table_name, $column_name, $create_ddl) {
155
  return false;
156
  }
157
 
158
- /**
159
- * flag_upgrade_page() - This page showsup , when the database version doesn't fir to the script FLAG_DBVERSION constant.
160
- *
161
- * @return string Upgrade Message
162
- */
163
- function flag_upgrade_page() {
164
- $filepath = admin_url() . 'admin.php?page=' . $_GET['page'];
165
-
166
- if ($_GET['upgrade'] == 'now') {
167
- flag_start_upgrade($filepath);
168
- return;
169
- }
170
- ?>
171
- <div class="wrap">
172
- <h2><?php _e('Upgrade GRAND FlAGallery', 'flag'); ?></h2>
173
- <p><?php _e('The script detect that you upgrade from a older version.', 'flag'); ?>
174
- <?php _e('Your database tables for GRAND FlAGallery is out-of-date, and must be upgraded before you can continue.', 'flag'); ?>
175
- <?php _e('If you would like to downgrade later, please make first a complete backup of your database and the images.', 'flag'); ?></p>
176
- <p><?php _e('The upgrade process may take a while, so please be patient.', 'flag'); ?></p>
177
- <h3><a href="<?php echo $filepath; ?>&amp;upgrade=now"><?php _e('Start upgrade now', 'flag'); ?>...</a></h3>
178
- </div>
179
- <?php
180
- }
181
 
182
- /**
183
- * flag_start_upgrade() - Proceed the upgrade routine
184
- *
185
- * @param mixed $filepath
186
- * @return void
187
- */
188
- function flag_start_upgrade($filepath) {
189
- ?>
190
- <div class="wrap">
191
- <h2><?php _e('Upgrade GRAND FlAGallery', 'flag'); ?></h2>
192
- <p><?php flag_upgrade(); ?></p>
193
- <p><?php _e('Upgrade sucessful', 'flag'); ?></p>
194
- <h3><a href="<?php echo $filepath; ?>"><?php _e('Continue', 'flag'); ?>...</a></h3>
195
- </div>
196
- <?php
197
- }
198
  ?>
17
  // Be sure that the tables exist
18
  if($wpdb->get_var("show tables like '$wpdb->flagpictures'") == $wpdb->prefix . 'flag_pictures') {
19
 
 
20
  $wpdb->show_errors();
21
 
22
  $installed_ver = get_option( "flag_db_version" );
47
  flag_add_sql_column( $wpdb->flagpictures, 'meta_data', "LONGTEXT AFTER used_ips;");
48
  }
49
 
 
 
 
 
 
 
 
 
50
  // On some reason the import / date sometimes failed, due to the memory limit
51
  if (version_compare($installed_ver, '0.32', '<')) {
52
  echo __('Import date and time information...', 'flag');
91
  $flag_options['mpColor2'] = '3283A7';
92
  update_option('flag_options', $flag_options);
93
  echo __('finished', 'flag') . "<br />\n";
94
+ }
95
+
96
+ // v2.56 -> v2.70
97
+ if (version_compare($installed_ver, '2.70', '<')) {
98
+ flag_add_sql_column( $wpdb->flagpictures, 'link', "TEXT NULL AFTER alttext;");
99
+ }
100
+
101
+ // update now the database
102
+ update_option( "flag_db_version", FLAG_DBVERSION );
103
+ $wpdb->hide_errors();
104
+
105
  }
106
  return false;
107
  }
156
  return false;
157
  }
158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  ?>
changelog.txt CHANGED
@@ -1,5 +1,20 @@
1
  GRAND FlAGallery
2
- by Rattus & CodEasily DEV Team
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  = v2.56 - 25.03.2013 =
5
  * Fixed: SQL injection vulnerability
1
  GRAND FlAGallery
2
+ by CodEasily.com
3
+
4
+ = v2.72 - 20.05.2013 =
5
+ * Added: pagination on Music Box page
6
+ * Fixed: small fixes for Banner Box page
7
+
8
+ = v2.71 - 07.05.2013 =
9
+ * Added: pagination on Banner Box page
10
+ * Fixed: reports sometimes a error "Fatal error: Only variables can be passed by reference"
11
+ * Fixed: compatibility with SEO plugin
12
+ * Changed: Options page
13
+ * Fixed: Vulnerability on Search images.
14
+
15
+ = v2.70 - 11.04.2013 =
16
+ * Fixed: Compatibility with some modern themes
17
+ * Added: Music for gallery skins
18
 
19
  = v2.56 - 25.03.2013 =
20
  * Fixed: SQL injection vulnerability
flag.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: GRAND Flash Album Gallery
4
  Plugin URI: http://codeasily.com/wordpress-plugins/flash-album-gallery/flag/
5
  Description: The GRAND FlAGallery plugin - provides a comprehensive interface for managing photos and images through a set of admin pages, and it displays photos in a way that makes your web site look very professional.
6
- Version: 2.56
7
  Author: Rattus
8
  Author URI: http://codeasily.com/
9
 
@@ -23,8 +23,8 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
23
  if (!class_exists('flagLoad')) {
24
  class flagLoad {
25
 
26
- var $version = '2.56';
27
- var $dbversion = '1.24';
28
  var $minium_WP = '3.0';
29
  var $minium_WPMU = '3.0';
30
  var $flagAdminPanel;
@@ -114,6 +114,13 @@ class flagLoad {
114
  // check for tables
115
  flag_capabilities();
116
  }
 
 
 
 
 
 
 
117
  }
118
 
119
  function required_version() {
@@ -405,6 +412,7 @@ class flagLoad {
405
  // OK, we're authenticated: we need to find and save the data
406
  $items_array = $_POST["mb_items_array"];
407
  $skinname = $_POST["mb_skinname"];
 
408
  $scode = $_POST["mb_scode"];
409
  $button_text = $_POST["mb_button"];
410
  $button_link = $_POST["mb_button_link"];
@@ -413,6 +421,7 @@ class flagLoad {
413
  $bg_repeat = $_POST["mb_bg_repeat"];
414
  update_post_meta($post_id, "mb_items_array", $_POST["mb_items_array"]);
415
  update_post_meta($post_id, "mb_skinname", $_POST["mb_skinname"]);
 
416
  update_post_meta($post_id, "mb_scode", $_POST["mb_scode"]);
417
  update_post_meta($post_id, "mb_button", $_POST["mb_button"]);
418
  update_post_meta($post_id, "mb_button_link", $_POST["mb_button_link"]);
3
  Plugin Name: GRAND Flash Album Gallery
4
  Plugin URI: http://codeasily.com/wordpress-plugins/flash-album-gallery/flag/
5
  Description: The GRAND FlAGallery plugin - provides a comprehensive interface for managing photos and images through a set of admin pages, and it displays photos in a way that makes your web site look very professional.
6
+ Version: 2.72
7
  Author: Rattus
8
  Author URI: http://codeasily.com/
9
 
23
  if (!class_exists('flagLoad')) {
24
  class flagLoad {
25
 
26
+ var $version = '2.72';
27
+ var $dbversion = '2.70';
28
  var $minium_WP = '3.0';
29
  var $minium_WPMU = '3.0';
30
  var $flagAdminPanel;
114
  // check for tables
115
  flag_capabilities();
116
  }
117
+ // check for upgrade
118
+ if( get_option( 'flag_db_version' ) < FLAG_DBVERSION ) {
119
+ include_once ( dirname (__FILE__) . '/admin/functions.php' );
120
+ include_once ( dirname (__FILE__) . '/admin/upgrade.php' );
121
+ flag_upgrade();
122
+ add_action( 'admin_notices', create_function('', 'echo \'<div id="message" class="updated"><p>\' . __(\'GRAND FlAGallery database upgraded\', "flag" ) . \'</p></div>\';') );
123
+ }
124
  }
125
 
126
  function required_version() {
412
  // OK, we're authenticated: we need to find and save the data
413
  $items_array = $_POST["mb_items_array"];
414
  $skinname = $_POST["mb_skinname"];
415
+ $playlist = $_POST["mb_playlist"];
416
  $scode = $_POST["mb_scode"];
417
  $button_text = $_POST["mb_button"];
418
  $button_link = $_POST["mb_button_link"];
421
  $bg_repeat = $_POST["mb_bg_repeat"];
422
  update_post_meta($post_id, "mb_items_array", $_POST["mb_items_array"]);
423
  update_post_meta($post_id, "mb_skinname", $_POST["mb_skinname"]);
424
+ update_post_meta($post_id, "mb_playlist", $_POST["mb_playlist"]);
425
  update_post_meta($post_id, "mb_scode", $_POST["mb_scode"]);
426
  update_post_meta($post_id, "mb_button", $_POST["mb_button"]);
427
  update_post_meta($post_id, "mb_button_link", $_POST["mb_button_link"]);
lib/app.php CHANGED
@@ -2,4 +2,4 @@
2
  // include the flag function
3
  @ require_once (dirname(dirname(__FILE__)). '/flag-config.php');
4
 
5
- ?>
2
  // include the flag function
3
  @ require_once (dirname(dirname(__FILE__)). '/flag-config.php');
4
 
5
+ ?>
lib/class.swfobject.php CHANGED
@@ -123,7 +123,7 @@ class flag_swfobject {
123
  foreach ($params as $key => $value) {
124
  if ( !empty($list) )
125
  $list .= ",";
126
- $list .= "\n\t\t" . $key . ' : ' . '"' . $value .'"';
127
  }
128
  }
129
  $js = "\t" . $name . ' : {' . $list . '}';
123
  foreach ($params as $key => $value) {
124
  if ( !empty($list) )
125
  $list .= ",";
126
+ $list .= "\n\t\t" . $key . " : " . "'" . $value ."'";
127
  }
128
  }
129
  $js = "\t" . $name . ' : {' . $list . '}';
lib/meta.php CHANGED
@@ -292,6 +292,8 @@ class flagMeta {
292
  if ($list_element == false)
293
  array_pop($stack);
294
  $list_element = true;
 
 
295
  // save it in our temp array
296
  $list_array[] = $val['value'];
297
  // in the case it's a list element we seralize it
@@ -300,7 +302,9 @@ class flagMeta {
300
  }
301
  else {
302
  array_push($stack, $val['tag']);
303
- $this->setArrayValue($xmlarray, $stack, $val['value']);
 
 
304
  array_pop($stack);
305
  }
306
  }
@@ -347,8 +351,7 @@ class flagMeta {
347
  function setArrayValue(& $array, $stack, $value) {
348
  if ($stack) {
349
  $key = array_shift($stack);
350
- //TODO:Review this, reports sometimes a error "Fatal error: Only variables can be passed by reference" (PHP 5.2.6)
351
- $this->setArrayValue($array [$key], $stack, $value);
352
  } else {
353
  $array = $value;
354
  }
292
  if ($list_element == false)
293
  array_pop($stack);
294
  $list_element = true;
295
+ // do not parse empty tags
296
+ if ( empty($val['value']) ) continue;
297
  // save it in our temp array
298
  $list_array[] = $val['value'];
299
  // in the case it's a list element we seralize it
302
  }
303
  else {
304
  array_push($stack, $val['tag']);
305
+ // do not parse empty tags
306
+ if ( !empty($val['value']) )
307
+ $this->setArrayValue($xmlarray, $stack, $val['value']);
308
  array_pop($stack);
309
  }
310
  }
351
  function setArrayValue(& $array, $stack, $value) {
352
  if ($stack) {
353
  $key = array_shift($stack);
354
+ $this->setArrayValue($array[$key], $stack, $value);
 
355
  } else {
356
  $array = $value;
357
  }
lib/swfobject.php CHANGED
@@ -54,6 +54,18 @@ function flagShowFlashAlbum($galleryID, $name='', $width='', $height='', $skin='
54
  } else if(file_exists($skinpath . "/settings.php")) {
55
  include( $skinpath . "/settings.php");
56
  }
 
 
 
 
 
 
 
 
 
 
 
 
57
  if(empty($wmode)) $wmode = $flashBacktransparent? 'transparent' : 'opaque';
58
  if(empty($flashBackcolor)) $flashBackcolor = $flag_options['flashBackcolor'];
59
  $isCrawler = flagGetUserNow($_SERVER['HTTP_USER_AGENT']);
54
  } else if(file_exists($skinpath . "/settings.php")) {
55
  include( $skinpath . "/settings.php");
56
  }
57
+ $musicData = array();
58
+ if(!empty($playlist) && false === strpos($playlist, '..')){
59
+ $galleryPath = trim($flag_options['galleryPath'],'/');
60
+ $playlistPath = $galleryPath.'/playlists/'.$playlist.'.xml';
61
+ if(file_exists(ABSPATH.$playlistPath)) {
62
+ if ($playlist_xml = @simplexml_load_file(ABSPATH.$playlistPath, 'SimpleXMLElement', LIBXML_NOCDATA)){
63
+ foreach($playlist_xml->category->items->item as $item){
64
+ $musicData['sound'][] = array('track' => (string) $item->track, 'title' => (string) $item->title);
65
+ }
66
+ }
67
+ }
68
+ }
69
  if(empty($wmode)) $wmode = $flashBacktransparent? 'transparent' : 'opaque';
70
  if(empty($flashBackcolor)) $flashBackcolor = $flag_options['flashBackcolor'];
71
  $isCrawler = flagGetUserNow($_SERVER['HTTP_USER_AGENT']);
readme.txt CHANGED
@@ -1,4 +1,4 @@
1
- === GRAND FlAGallery ===
2
  Contributors: Rattus
3
  Donate link: http://photogallerycreator.com/grand-flagallery/
4
  Tags: admin, flash, fullscreen gallery, gallery, image, images, image gallery, mp3, music, page, photo, slider, plugin, Post, posts, slideshow, video, widget, iOS gallery, iphone gallery, best gallery
@@ -9,26 +9,33 @@ Stable tag: trunk
9
  GRAND Flash Album Gallery is a Photo Gallery, Video Gallery, Music Album & Banner Rotator plugin with powerfull admin to manage your media content
10
 
11
  == Description ==
12
- Try GRAND Flash Album Gallery - powerfull flash & jQuery media content plugin. It provides a comprehensive interface for handling image galleries, audio and video.
 
13
 
14
  Edit your media content the way you want: upload images, import music and video, create photo gallery, music playlists, group pictures in slideshow and add descriptions for each image, mp3 or video - GRAND FlAGallery is the smart choice when showing the best of your product or describing in brief any event. GRAND FlAGallery can easily beautify your site with **image gallery, mp3 player, video player, banner rotator, nivo slider or nice widgets**. SEO optimized, compatibility with Google Reader, FeedBerner, etc.
15
 
 
 
 
 
 
 
 
 
16
  **[How to add gallery to your Wordpress site](http://mypgc.co/how-add-gallery-to-wordpress-website-or-blog)** - full HowTo guide.
17
 
18
  For more information read **[Review, Tutorials, FAQ](http://codeasily.com/wordpress-plugins/flag "GRAND FlAGallery Home Page")** and see demos created with "GRAND FlAGallery" WordPress Plugin.
19
 
20
- New version of Banner Rotator!!! Now it is responsive. Full support of iPhone/iPad. Ideal for mobile themes. [See demo](http://skins.mypgc.co) in the site's header.
21
 
22
  Music/Video Player: Each instance (player copy) can play different file. All instances are connected between, so as soon as one start playing the previous is stopped automatically. Playlists also available.
23
 
24
- * iPhone, iPad, Android, Blackberry and Desktop friendly photo gallery, SEO optimized.
25
- * Full-screen mobile friendly slideshow with touch controls (optional, if set PhotoSwipe library script for alternative gallery).
26
- * Widgets for Banner Rotator, Photo Gallery and Video Gallery.
27
-
28
- Added: GRAND Pages - Full Window Gallery Template. Now you can display your image gallery in full window separate page (gallery template). [View Demo 1](http://photogallerycreator.com/flagallery/grand-pages-full-window-gallery-template/), [View Demo 2](http://photogallerycreator.com/flagallery/3d-sphere-v2-0-full-window-mode/)
29
 
30
  You have the opportunity to create image gallery, as separate pages. It looks very cool when you open image gallery, and gallery images occupies the entire page... such a large and beautiful. Wow! And there is a button with which you can go back to the previous page. You can also specify the name of the button and link.
31
 
 
 
32
  Now you can see "Views" of each photo in the gallery and visitors can "Like" image and see image "Rating".
33
 
34
  * Demo [Photo Galleries](http://photogallerycreator.com/grand-flagallery/)
@@ -41,6 +48,21 @@ Now you can see "Views" of each photo in the gallery and visitors can "Like" ima
41
 
42
  == Changelog ==
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  = v2.56 - 25.03.2013 =
45
  * Fixed: SQL injection vulnerability
46
  * Fixed: Video Box admin shows parse error
@@ -515,14 +537,7 @@ Now you can see "Views" of each photo in the gallery and visitors can "Like" ima
515
  * Bugfix : Fix for Upload Images button on Overview page
516
  * Bugfix : Fixed conflict with NextGEN Gallery (creating thumbnails cause error)
517
 
518
- == Upgrade Notice ==
519
-
520
- * After plugin update go to Skins page and update skins with 'Update skins' button.
521
- * If you use Facebook template and copied it in the root directory, then after each plugin update click 'Copy facebook.php file to root directory'.
522
- * If GRAND FlAGallery displays an error message after upgrade, go to FlAGallery Overview page and press 'Reset settings'.
523
- * Have some troubles with plugin? Try first reseting settings, **deactivate and reactivate plugin.**
524
-
525
- == Credits ==
526
 
527
  Copyright 2009 by Sergey Pasyuk & CodEasily.com DevTeam
528
 
@@ -551,12 +566,6 @@ See more tags in the FAQ section
551
 
552
  That's it ... Have fun!
553
 
554
- = Upgrade Notice =
555
- * After plugin update go to Skins page and update skins with 'Update skins' button.
556
- * If you use Facebook template and copied it in the root directory, then after each plugin update click 'Copy facebook.php file to root directory'.
557
- * If GRAND FlAGallery displays an error message after upgrade, go to FlAGallery Overview page and press 'Reset settings'.
558
- * Have some troubles with plugin? Try first reseting settings, **deactivate and reactivate plugin.**
559
-
560
 
561
  == Screenshots ==
562
 
@@ -572,13 +581,7 @@ That's it ... Have fun!
572
 
573
  == Frequently Asked Questions ==
574
 
575
- = Upgrade Notice =
576
- * After plugin update go to Skins page and update skins with 'Update skins' button.
577
- * If you use Facebook template and copied it in the root directory, then after each plugin update click 'Copy facebook.php file to root directory'.
578
- * If GRAND FlAGallery displays an error message after upgrade, go to FlAGallery Overview page and press 'Reset settings'.
579
- * Have some troubles with plugin? Try first reseting settings, **deactivate and reactivate plugin.**
580
-
581
- = Read as startup : =
582
  http://codeasily.com/wordpress-plugins/flash-album-gallery/flag-review/
583
 
584
  = The flash didn't work. I only see the message "The Flash Player and a browser with Javascript needed..", but everything is installed and activated. =
1
+ === Grand Flagallery ===
2
  Contributors: Rattus
3
  Donate link: http://photogallerycreator.com/grand-flagallery/
4
  Tags: admin, flash, fullscreen gallery, gallery, image, images, image gallery, mp3, music, page, photo, slider, plugin, Post, posts, slideshow, video, widget, iOS gallery, iphone gallery, best gallery
9
  GRAND Flash Album Gallery is a Photo Gallery, Video Gallery, Music Album & Banner Rotator plugin with powerfull admin to manage your media content
10
 
11
  == Description ==
12
+
13
+ GRAND Flash Album Gallery - powerfull flash & jQuery media content plugin. It provides a comprehensive interface for handling image galleries, audio and video.
14
 
15
  Edit your media content the way you want: upload images, import music and video, create photo gallery, music playlists, group pictures in slideshow and add descriptions for each image, mp3 or video - GRAND FlAGallery is the smart choice when showing the best of your product or describing in brief any event. GRAND FlAGallery can easily beautify your site with **image gallery, mp3 player, video player, banner rotator, nivo slider or nice widgets**. SEO optimized, compatibility with Google Reader, FeedBerner, etc.
16
 
17
+ * iPhone, iPad, Android, Blackberry and Desktop friendly photo gallery, SEO optimized.
18
+ * Full-screen mobile friendly slideshow with touch controls (optional, if set PhotoSwipe library script for alternative gallery).
19
+ * Widgets for Banner Rotator, Photo Gallery and Video Gallery.
20
+ * Background music in gallery for desktop browsers.
21
+
22
+ New plugin:
23
+ > Try our **new plugin** called [Gmedia Gallery](http://wordpress.org/extend/plugins/grand-media/). Help me make it best gallery plugin: test it and write suggestions how I can improve it in feature versions.
24
+
25
  **[How to add gallery to your Wordpress site](http://mypgc.co/how-add-gallery-to-wordpress-website-or-blog)** - full HowTo guide.
26
 
27
  For more information read **[Review, Tutorials, FAQ](http://codeasily.com/wordpress-plugins/flag "GRAND FlAGallery Home Page")** and see demos created with "GRAND FlAGallery" WordPress Plugin.
28
 
29
+ Responsive Banner Rotator! Full support of iPhone/iPad. Ideal for mobile themes. [See demo](http://skins.mypgc.co) in the site's header.
30
 
31
  Music/Video Player: Each instance (player copy) can play different file. All instances are connected between, so as soon as one start playing the previous is stopped automatically. Playlists also available.
32
 
33
+ GRAND Pages - Full Window Gallery Template. You can display your image gallery in full window separate page (gallery template). [View Demo 1](http://photogallerycreator.com/flagallery/grand-pages-full-window-gallery-template/), [View Demo 2](http://photogallerycreator.com/flagallery/3d-sphere-v2-0-full-window-mode/)
 
 
 
 
34
 
35
  You have the opportunity to create image gallery, as separate pages. It looks very cool when you open image gallery, and gallery images occupies the entire page... such a large and beautiful. Wow! And there is a button with which you can go back to the previous page. You can also specify the name of the button and link.
36
 
37
+ Added music playlist support in gallery skins. Now your visitors can listen music while watching gallery. [View Demo](http://photogallerycreator.com/flagallery/optima-grandpage/)
38
+
39
  Now you can see "Views" of each photo in the gallery and visitors can "Like" image and see image "Rating".
40
 
41
  * Demo [Photo Galleries](http://photogallerycreator.com/grand-flagallery/)
48
 
49
  == Changelog ==
50
 
51
+ = v2.72 - 20.05.2013 =
52
+ * Added: pagination on Music Box page
53
+ * Fixed: small fixes for Banner Box page
54
+
55
+ = v2.71 - 07.05.2013 =
56
+ * Added: pagination on Banner Box page
57
+ * Fixed: reports sometimes a error "Fatal error: Only variables can be passed by reference"
58
+ * Fixed: compatibility with SEO plugin
59
+ * Changed: Options page
60
+ * Fixed: Vulnerability on Search images.
61
+
62
+ = v2.70 - 11.04.2013 =
63
+ * Fixed: Compatibility with some modern themes
64
+ * Added: Music for gallery skins
65
+
66
  = v2.56 - 25.03.2013 =
67
  * Fixed: SQL injection vulnerability
68
  * Fixed: Video Box admin shows parse error
537
  * Bugfix : Fix for Upload Images button on Overview page
538
  * Bugfix : Fixed conflict with NextGEN Gallery (creating thumbnails cause error)
539
 
540
+ == Credits ==
 
 
 
 
 
 
 
541
 
542
  Copyright 2009 by Sergey Pasyuk & CodEasily.com DevTeam
543
 
566
 
567
  That's it ... Have fun!
568
 
 
 
 
 
 
 
569
 
570
  == Screenshots ==
571
 
581
 
582
  == Frequently Asked Questions ==
583
 
584
+ = Read as startup : =
 
 
 
 
 
 
585
  http://codeasily.com/wordpress-plugins/flash-album-gallery/flag-review/
586
 
587
  = The flash didn't work. I only see the message "The Flash Player and a browser with Javascript needed..", but everything is installed and activated. =