Gallery – Flagallery Photo Portfolio - Version 4.23

Version Description

Download this release

Release Info

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

Code changes from version 4.15 to 4.23

admin/addgallery.php CHANGED
@@ -129,8 +129,8 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
129
  if ( !flagAdmin::can_manage_this_gallery($gallery->author) )
130
  continue;
131
  $name = ( empty($gallery->title) ) ? $gallery->name : esc_html(stripslashes($gallery->title));
132
- if($flag->options['albSort'] == 'gid'){ $name = $gallery->gid.' - '.$name; }
133
- if($flag->options['albSort'] == 'title'){ $name = $name.' ('.$gallery->gid.')'; }
134
  $sel = ($ingallery == $gallery->gid) ? 'selected="selected" ' : '';
135
  echo '<option ' . $sel . 'value="' . $gallery->gid . '" >' . $name . '</option>' . "\n";
136
  } ?>
129
  if ( !flagAdmin::can_manage_this_gallery($gallery->author) )
130
  continue;
131
  $name = ( empty($gallery->title) ) ? $gallery->name : esc_html(stripslashes($gallery->title));
132
+ if($flag->options['albSort'] == 'gid'){ $name = '#'.$gallery->gid.' - '.$name; }
133
+ if($flag->options['albSort'] == 'title'){ $name = $name.' (#'.$gallery->gid.')'; }
134
  $sel = ($ingallery == $gallery->gid) ? 'selected="selected" ' : '';
135
  echo '<option ' . $sel . 'value="' . $gallery->gid . '" >' . $name . '</option>' . "\n";
136
  } ?>
admin/admin.php CHANGED
@@ -62,7 +62,7 @@ class flagAdminPanel{
62
  add_submenu_page( 'flag-overview' , __('FlAG Banner Box', 'flag'), __('Banner Box', 'flag'), 'FlAG Manage banners', 'flag-banner-box', array (&$this, 'show_menu'));
63
  add_submenu_page( 'flag-overview' , __('FlAG Manage skins', 'flag'), __('Skins', 'flag'), 'FlAG Change skin', 'flag-skins', array (&$this, 'show_menu'));
64
  add_submenu_page( 'flag-overview' , __('FlAG Change options', 'flag'), __('Options', 'flag'), 'FlAG Change options', 'flag-options', array (&$this, 'show_menu'));
65
- add_submenu_page( 'flag-overview' , __('FlAG Facebook Integration', 'flag'), __('Facebook', 'flag'), 'FlAG Facebook page', 'flag-facebook', array (&$this, 'show_menu'));
66
  if ( flag_wpmu_site_admin() )
67
  add_submenu_page( 'wpmu-admin.php' , __('GRAND Flash Album Gallery', 'flag'), __('Grand Flagallery', 'flag'), 'activate_plugins', 'flag-wpmu', array (&$this, 'show_menu'));
68
 
@@ -87,7 +87,7 @@ class flagAdminPanel{
87
  include_once ( dirname (__FILE__) . '/functions.php' ); // admin functions
88
  include_once ( dirname (__FILE__) . '/manage.php' ); // flag_admin_manage_gallery
89
  // Initate the Manage Gallery page
90
- $flag->manage_page = new flagManageGallery ();
91
  // Render the output now, because you cannot access a object during the constructor is not finished
92
  $flag->manage_page->controller();
93
 
@@ -111,8 +111,8 @@ class flagAdminPanel{
111
  case "flag-skins" :
112
  include_once ( dirname (__FILE__) . '/skins.php' ); // flag_manage_skins
113
  break;
114
- case "flag-facebook" :
115
- include_once ( dirname(__FILE__) . '/facebook-tool.php' ); // flag_facebook
116
  break;
117
  case "flag-wpmu" :
118
  include_once ( dirname (__FILE__) . '/wpmu.php' ); // flag_wpmu_admin
62
  add_submenu_page( 'flag-overview' , __('FlAG Banner Box', 'flag'), __('Banner Box', 'flag'), 'FlAG Manage banners', 'flag-banner-box', array (&$this, 'show_menu'));
63
  add_submenu_page( 'flag-overview' , __('FlAG Manage skins', 'flag'), __('Skins', 'flag'), 'FlAG Change skin', 'flag-skins', array (&$this, 'show_menu'));
64
  add_submenu_page( 'flag-overview' , __('FlAG Change options', 'flag'), __('Options', 'flag'), 'FlAG Change options', 'flag-options', array (&$this, 'show_menu'));
65
+ add_submenu_page( 'flag-overview' , __('Flagallery in iframe', 'flag'), __('Iframe', 'flag'), 'FlAG iFrame page', 'flag-iframe', array (&$this, 'show_menu'));
66
  if ( flag_wpmu_site_admin() )
67
  add_submenu_page( 'wpmu-admin.php' , __('GRAND Flash Album Gallery', 'flag'), __('Grand Flagallery', 'flag'), 'activate_plugins', 'flag-wpmu', array (&$this, 'show_menu'));
68
 
87
  include_once ( dirname (__FILE__) . '/functions.php' ); // admin functions
88
  include_once ( dirname (__FILE__) . '/manage.php' ); // flag_admin_manage_gallery
89
  // Initate the Manage Gallery page
90
+ $flag->manage_page = new flagManageGallery();
91
  // Render the output now, because you cannot access a object during the constructor is not finished
92
  $flag->manage_page->controller();
93
 
111
  case "flag-skins" :
112
  include_once ( dirname (__FILE__) . '/skins.php' ); // flag_manage_skins
113
  break;
114
+ case "flag-iframe" :
115
+ include_once ( dirname(__FILE__) . '/flagframe-tool.php' ); // flagframe-tool
116
  break;
117
  case "flag-wpmu" :
118
  include_once ( dirname (__FILE__) . '/wpmu.php' ); // flag_wpmu_admin
admin/banner.functions.php CHANGED
@@ -159,6 +159,7 @@ function flagSave_bPlaylist($title,$descr,$data,$file='',$skinaction='') {
159
  </items>
160
  </category>
161
  </gallery>';
 
162
  // Save options
163
  $flag_options = get_option('flag_options');
164
  if(wp_mkdir_p(ABSPATH.$flag_options['galleryPath'].'playlists/banner/')) {
159
  </items>
160
  </category>
161
  </gallery>';
162
+ //$content = str_replace(array('\\\'','\"'), array('\'','"'), $content);
163
  // Save options
164
  $flag_options = get_option('flag_options');
165
  if(wp_mkdir_p(ABSPATH.$flag_options['galleryPath'].'playlists/banner/')) {
admin/flag_install.php CHANGED
@@ -25,7 +25,7 @@ function flag_install () {
25
  // add charset & collate like wp core
26
  $charset_collate = '';
27
 
28
- if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {
29
  if ( ! empty($wpdb->charset) )
30
  $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
31
  if ( ! empty($wpdb->collate) )
@@ -163,7 +163,7 @@ function flag_capabilities() {
163
  $role->add_cap('FlAG Manage music');
164
  $role->add_cap('FlAG Manage video');
165
  $role->add_cap('FlAG Manage banners');
166
- $role->add_cap('FlAG Facebook page');
167
 
168
  }
169
 
@@ -204,6 +204,8 @@ function flag_list_options() {
204
  $flag_options['license_key'] = '';
205
  $flag_options['useMediaRSS'] = false; // activate the global Media RSS file
206
 
 
 
207
  // Sort Settings
208
  $flag_options['albSort'] = 'title'; // Galleries Sort order
209
  $flag_options['albSortDir'] = 'ASC'; // Galleries Sort dir
@@ -335,5 +337,5 @@ function flag_uninstall() {
335
  flag_remove_capability("FlAG Manage music");
336
  flag_remove_capability("FlAG Manage video");
337
  flag_remove_capability("FlAG Manage banners");
338
- flag_remove_capability("FlAG Facebook page");
339
  }
25
  // add charset & collate like wp core
26
  $charset_collate = '';
27
 
28
+ if ( $wpdb->has_cap('collation') ) {
29
  if ( ! empty($wpdb->charset) )
30
  $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
31
  if ( ! empty($wpdb->collate) )
163
  $role->add_cap('FlAG Manage music');
164
  $role->add_cap('FlAG Manage video');
165
  $role->add_cap('FlAG Manage banners');
166
+ $role->add_cap('FlAG iFrame page');
167
 
168
  }
169
 
204
  $flag_options['license_key'] = '';
205
  $flag_options['useMediaRSS'] = false; // activate the global Media RSS file
206
 
207
+ $flag_options['gp_jscode'] = ''; // GRAND Pages: google analytics code
208
+
209
  // Sort Settings
210
  $flag_options['albSort'] = 'title'; // Galleries Sort order
211
  $flag_options['albSortDir'] = 'ASC'; // Galleries Sort dir
337
  flag_remove_capability("FlAG Manage music");
338
  flag_remove_capability("FlAG Manage video");
339
  flag_remove_capability("FlAG Manage banners");
340
+ flag_remove_capability("FlAG iFrame page");
341
  }
admin/{facebook-tool.php → flagframe-tool.php} RENAMED
@@ -5,11 +5,11 @@ if ( !is_user_logged_in() )
5
  die('-1');
6
 
7
  // check for correct FlAG capability
8
- if ( !current_user_can('FlAG Facebook page') )
9
  die('-1');
10
 
11
  if(isset($_POST['copy_file'])) {
12
- if(copy(FLAG_ABSPATH.'facebook.php',ABSPATH.'facebook.php')) {
13
  flagGallery::show_message(__('Success','flag'));
14
  } else {
15
  flagGallery::show_error(__('Failure','flag'));
@@ -24,9 +24,9 @@ $i_skins = get_skins();
24
  $all_m_playlists = get_playlists();
25
  $all_v_playlists = get_v_playlists();
26
  $all_b_playlists = get_b_playlists();
27
- $fb_url = FLAG_URLPATH.'facebook.php';
28
- if(file_exists(ABSPATH.'facebook.php')) {
29
- $fb_url = home_url().'/facebook.php';
30
  }
31
  ?>
32
  <script type="text/javascript">/*<![CDATA[*/
@@ -141,21 +141,13 @@ function fb_url(galleries,skin,h,l) {
141
  }
142
  /*]]>*/</script>
143
  <div class="wrap">
144
- <h2><?php _e('Facebook Integration', 'flag'); ?></h2>
145
- <p>1. Log in to your <a target="_blank" href="http://www.facebook.com">Facebook</a> account.</p>
146
- <p>2. Search for the <a href="http://apps.facebook.com/117531781690494/?ref=ts">Page Tabs: Static HTML + iFrame</a> tabs application and select it.</p>
147
- <p>3. Click on <strong>Add Static HTML to a page</strong> button and you'll be prompted for the page where you want the app to be added.</p>
148
- <p>4. Once added you'll see on the left side menu of your page a new tab with a star icon called Welcome. Click on it to edit it.</p>
149
- <p>5. Add the <strong>Facebook Page Url</strong> in the text field.</p>
150
- <p>6. Click <strong>preview</strong> to see how it looks or <strong>save changes</strong>. The product is now added to the Welcome tab of your page.</p>
151
- <p>7. <strong>Optional:</strong> To change the tab's name, called by default <strong>Welcome</strong>, edit your page, go to the <strong>Apps</strong> tab and click <strong>Edit Settings</strong> option next to the <strong>Page Tabs: Static HTML + iFrame</strong> application to enter the name you want.</p>
152
- <p>8. <strong>Optional:</strong> To make the tab your default landing tab (first thing your visitors see on your page) edit your page and go to the <strong>Manage Permissions</strong> tab and change the <strong>Default Landing Tab</strong>.</p>
153
  <br /><br />
154
- <form id="facebook_copy" name="facebook_copy" method="POST" class="alignright">
155
- <p>Optional: &nbsp; <input type="submit" name="copy_file" class="button-primary" value="<?php _e('Copy facebook.php file to root directory', 'flag'); ?>" /><br />
156
- (makes Facebook page url shorter)</p>
157
  </form>
158
- <form id="generator1"><fieldset style="clear:both; margin:0 0 20px 0; padding: 20px; border: 1px solid #888888;"><legend style="font-size: 18px; padding: 0 5px;"><?php _e("Photo Gallery Facebook Page Generator", 'flag'); ?></legend>
159
  <table border="0" cellpadding="4" cellspacing="0">
160
  <tr>
161
  <td nowrap="nowrap" valign="top"><div><?php _e("Select galleries", 'flag'); ?>:<span style="color:red;"> *</span><br /><small><?php _e("(album categories)", 'flag'); ?></small></div></td>
@@ -196,12 +188,12 @@ function fb_url(galleries,skin,h,l) {
196
  <td valign="top"><p><input id="postid" type="text" /></p></td>
197
  </tr>
198
  <tr>
199
- <td valign="top"><div style="padding-top:3px;"><strong><?php _e("Facebook Page Url", 'flag'); ?>: &nbsp; </strong></div></td>
200
  <td valign="top"><input id="fb1_url0" type="text" style="width: 780px; font-size: 10px;" value="<?php echo $fb_url.'?i=all'; ?>" /></td>
201
  </tr>
202
  </table>
203
  </fieldset></form>
204
- <form id="generator2"><fieldset style="padding: 20px; margin:0 0 20px 0; border: 1px solid #888888;"><legend style="font-size: 18px; padding: 0 5px;"><?php _e("mp3 Gallery Facebook Page Generator", 'flag'); ?></legend>
205
  <table border="0" cellpadding="4" cellspacing="0">
206
  <tr>
207
  <td nowrap="nowrap" valign="top"><p style="padding-top:3px;"><label><?php _e("Choose playlist", 'flag'); ?>:</label></p></td>
@@ -218,12 +210,12 @@ function fb_url(galleries,skin,h,l) {
218
  </select></p></td>
219
  </tr>
220
  <tr>
221
- <td valign="top"><div style="padding-top:3px;"><strong><?php _e("Facebook Page Url", 'flag'); ?>: &nbsp; </strong></div></td>
222
  <td valign="top"><input id="fb2_url0" type="text" style="width: 600px; font-size: 10px;" value="<?php echo $fb_url.'?m='; ?>" /></td>
223
  </tr>
224
  </table>
225
  </fieldset></form>
226
- <form id="generator3"><fieldset style="padding: 20px; margin:0 0 20px 0; border: 1px solid #888888;"><legend style="font-size: 18px; padding: 0 5px;"><?php _e("Video Blog Gallery Facebook Page Generator", 'flag'); ?></legend>
227
  <table border="0" cellpadding="4" cellspacing="0">
228
  <tr>
229
  <td nowrap="nowrap" valign="top"><p style="padding-top:3px;"><label><?php _e("Choose playlist", 'flag'); ?>:</label></p></td>
@@ -240,12 +232,12 @@ function fb_url(galleries,skin,h,l) {
240
  </select></p></td>
241
  </tr>
242
  <tr>
243
- <td valign="top"><div style="padding-top:3px;"><strong><?php _e("Facebook Page Url", 'flag'); ?>: &nbsp; </strong></div></td>
244
  <td valign="top"><input id="fb3_url0" type="text" style="width: 600px; font-size: 10px;" value="<?php echo $fb_url.'?v='; ?>" /></td>
245
  </tr>
246
  </table>
247
  </fieldset></form>
248
- <form id="generator4"><fieldset style="padding: 20px; margin:0 0 20px 0; border: 1px solid #888888;"><legend style="font-size: 18px; padding: 0 5px;"><?php _e("Banner Box Facebook Page Generator", 'flag'); ?></legend>
249
  <table border="0" cellpadding="4" cellspacing="0">
250
  <tr>
251
  <td nowrap="nowrap" valign="top"><p style="padding-top:3px;"><label><?php _e("Choose xml", 'flag'); ?>:</label></p></td>
@@ -262,7 +254,7 @@ function fb_url(galleries,skin,h,l) {
262
  </select></p></td>
263
  </tr>
264
  <tr>
265
- <td valign="top"><div style="padding-top:3px;"><strong><?php _e("Facebook Page Url", 'flag'); ?>: &nbsp; </strong></div></td>
266
  <td valign="top"><input id="fb4_url0" type="text" style="width: 600px; font-size: 10px;" value="<?php echo $fb_url.'?b='; ?>" /></td>
267
  </tr>
268
  </table>
5
  die('-1');
6
 
7
  // check for correct FlAG capability
8
+ if ( !current_user_can('FlAG iFrame page') )
9
  die('-1');
10
 
11
  if(isset($_POST['copy_file'])) {
12
+ if(copy(FLAG_ABSPATH.'flagframe.php',ABSPATH.'flagframe.php')) {
13
  flagGallery::show_message(__('Success','flag'));
14
  } else {
15
  flagGallery::show_error(__('Failure','flag'));
24
  $all_m_playlists = get_playlists();
25
  $all_v_playlists = get_v_playlists();
26
  $all_b_playlists = get_b_playlists();
27
+ $fb_url = FLAG_URLPATH.'flagframe.php';
28
+ if(file_exists(ABSPATH.'flagframe.php')) {
29
+ $fb_url = home_url().'/flagframe.php';
30
  }
31
  ?>
32
  <script type="text/javascript">/*<![CDATA[*/
141
  }
142
  /*]]>*/</script>
143
  <div class="wrap">
144
+ <h2><?php _e('Flagallery iFrame', 'flag'); ?></h2>
 
 
 
 
 
 
 
 
145
  <br /><br />
146
+ <form id="flagframe_copy" name="flagframe_copy" method="POST" class="alignright">
147
+ <p>Optional: &nbsp; <input type="submit" name="copy_file" class="button-primary" value="<?php _e('Copy flagframe.php file to root directory', 'flag'); ?>" /><br />
148
+ (makes iframe url shorter)</p>
149
  </form>
150
+ <form id="generator1"><fieldset style="clear:both; margin:0 0 20px 0; padding: 20px; border: 1px solid #888888;"><legend style="font-size: 18px; padding: 0 5px;"><?php _e("Photo Gallery iFrame Generator", 'flag'); ?></legend>
151
  <table border="0" cellpadding="4" cellspacing="0">
152
  <tr>
153
  <td nowrap="nowrap" valign="top"><div><?php _e("Select galleries", 'flag'); ?>:<span style="color:red;"> *</span><br /><small><?php _e("(album categories)", 'flag'); ?></small></div></td>
188
  <td valign="top"><p><input id="postid" type="text" /></p></td>
189
  </tr>
190
  <tr>
191
+ <td valign="top"><div style="padding-top:3px;"><strong><?php _e("iFrame Url", 'flag'); ?>: &nbsp; </strong></div></td>
192
  <td valign="top"><input id="fb1_url0" type="text" style="width: 780px; font-size: 10px;" value="<?php echo $fb_url.'?i=all'; ?>" /></td>
193
  </tr>
194
  </table>
195
  </fieldset></form>
196
+ <form id="generator2"><fieldset style="padding: 20px; margin:0 0 20px 0; border: 1px solid #888888;"><legend style="font-size: 18px; padding: 0 5px;"><?php _e("mp3 Gallery iFrame Generator", 'flag'); ?></legend>
197
  <table border="0" cellpadding="4" cellspacing="0">
198
  <tr>
199
  <td nowrap="nowrap" valign="top"><p style="padding-top:3px;"><label><?php _e("Choose playlist", 'flag'); ?>:</label></p></td>
210
  </select></p></td>
211
  </tr>
212
  <tr>
213
+ <td valign="top"><div style="padding-top:3px;"><strong><?php _e("iFrame Url", 'flag'); ?>: &nbsp; </strong></div></td>
214
  <td valign="top"><input id="fb2_url0" type="text" style="width: 600px; font-size: 10px;" value="<?php echo $fb_url.'?m='; ?>" /></td>
215
  </tr>
216
  </table>
217
  </fieldset></form>
218
+ <form id="generator3"><fieldset style="padding: 20px; margin:0 0 20px 0; border: 1px solid #888888;"><legend style="font-size: 18px; padding: 0 5px;"><?php _e("Video Blog Gallery iFrame Generator", 'flag'); ?></legend>
219
  <table border="0" cellpadding="4" cellspacing="0">
220
  <tr>
221
  <td nowrap="nowrap" valign="top"><p style="padding-top:3px;"><label><?php _e("Choose playlist", 'flag'); ?>:</label></p></td>
232
  </select></p></td>
233
  </tr>
234
  <tr>
235
+ <td valign="top"><div style="padding-top:3px;"><strong><?php _e("iFrame Url", 'flag'); ?>: &nbsp; </strong></div></td>
236
  <td valign="top"><input id="fb3_url0" type="text" style="width: 600px; font-size: 10px;" value="<?php echo $fb_url.'?v='; ?>" /></td>
237
  </tr>
238
  </table>
239
  </fieldset></form>
240
+ <form id="generator4"><fieldset style="padding: 20px; margin:0 0 20px 0; border: 1px solid #888888;"><legend style="font-size: 18px; padding: 0 5px;"><?php _e("Banner Box iFrame Generator", 'flag'); ?></legend>
241
  <table border="0" cellpadding="4" cellspacing="0">
242
  <tr>
243
  <td nowrap="nowrap" valign="top"><p style="padding-top:3px;"><label><?php _e("Choose xml", 'flag'); ?>:</label></p></td>
254
  </select></p></td>
255
  </tr>
256
  <tr>
257
+ <td valign="top"><div style="padding-top:3px;"><strong><?php _e("iFrame Url", 'flag'); ?>: &nbsp; </strong></div></td>
258
  <td valign="top"><input id="fb4_url0" type="text" style="width: 600px; font-size: 10px;" value="<?php echo $fb_url.'?b='; ?>" /></td>
259
  </tr>
260
  </table>
admin/jgallery.php CHANGED
@@ -37,8 +37,16 @@ if($altColors['FullWindow'] && !$isCrawler){
37
  $xml['alt'] .= '</style>';
38
  if(!$isCrawler){
39
  if(!intval($flag_options['jAlterGalScript'])) {
40
- wp_print_styles('fancybox');
41
- wp_print_scripts('fancybox');
 
 
 
 
 
 
 
 
42
  //$xml['alt'] .= '<style type="text/css" scoped="scoped">@import url("'.plugins_url('/flash-album-gallery/admin/js/jquery.fancybox-1.3.4.css').'");</style>';
43
  //$xml['alt'] .= "<script type='text/javascript' src='".plugins_url('/flash-album-gallery/admin/js/jquery.fancybox-1.3.4.pack.js')."'></script>";
44
  $xml['alt'] .= "<script type='text/javascript'>var ExtendVar='fancybox', hitajax = '".plugins_url('/lib/hitcounter.php', dirname(__FILE__))."';</script>";
37
  $xml['alt'] .= '</style>';
38
  if(!$isCrawler){
39
  if(!intval($flag_options['jAlterGalScript'])) {
40
+ if(wp_style_is('fancybox', 'registered')){
41
+ wp_print_styles('fancybox');
42
+ } else{
43
+ wp_print_styles('fancybox-1.3.4');
44
+ }
45
+ if(wp_script_is('fancybox', 'registered')){
46
+ wp_print_scripts('fancybox');
47
+ } else{
48
+ wp_print_scripts('fancybox-1.3.4');
49
+ }
50
  //$xml['alt'] .= '<style type="text/css" scoped="scoped">@import url("'.plugins_url('/flash-album-gallery/admin/js/jquery.fancybox-1.3.4.css').'");</style>';
51
  //$xml['alt'] .= "<script type='text/javascript' src='".plugins_url('/flash-album-gallery/admin/js/jquery.fancybox-1.3.4.pack.js')."'></script>";
52
  $xml['alt'] .= "<script type='text/javascript'>var ExtendVar='fancybox', hitajax = '".plugins_url('/lib/hitcounter.php', dirname(__FILE__))."';</script>";
admin/js/script.js CHANGED
@@ -42,12 +42,11 @@ function FlAGClass(ExtendVar, skin_id, pic_id, slideshow) {
42
  }
43
  });
44
  }
45
- jQuery('#fancybox-wrap').on('click', '.grand_controls span', function(){
46
  skin_function[skin_id+'_fb'](jQuery(this).attr('rel'));
47
  if(jQuery(this).hasClass('g_slideshow')){
48
  jQuery(this).toggleClass('play stop');
49
  }
50
- jQuery('#fancybox-wrap').off('click', '.grand_controls span');
51
  });
52
  } else {
53
  if((('undefined' == metaViewport) || !metaViewport) && ExtendVar == 'photoswipe'){
42
  }
43
  });
44
  }
45
+ jQuery('#fancybox-wrap').off('click', '.grand_controls span').on('click', '.grand_controls span', function(){
46
  skin_function[skin_id+'_fb'](jQuery(this).attr('rel'));
47
  if(jQuery(this).hasClass('g_slideshow')){
48
  jQuery(this).toggleClass('play stop');
49
  }
 
50
  });
51
  } else {
52
  if((('undefined' == metaViewport) || !metaViewport) && ExtendVar == 'photoswipe'){
admin/settings.php CHANGED
@@ -122,7 +122,7 @@ function flag_admin_options() {
122
  flag_set_capability($_POST['manage_music'],"FlAG Manage music");
123
  flag_set_capability($_POST['manage_video'],"FlAG Manage video");
124
  flag_set_capability($_POST['manage_banners'],"FlAG Manage banners");
125
- flag_set_capability($_POST['facebook_page'],"FlAG Facebook page");
126
 
127
  flagGallery::show_message(__('Updated capabilities',"flag"));
128
  }
@@ -137,6 +137,7 @@ function flag_admin_options() {
137
 
138
  <ul id="tabs" class="tabs">
139
  <li class="selected"><a href="#" rel="imageoptions"><?php _e('Gallery Options', 'flag'); ?></a></li>
 
140
  <?php if(current_user_can('administrator')){ ?>
141
  <li><a href="#" rel="rControl"><?php _e('License Key & Remote Control', 'flag'); ?></a></li>
142
  <?php } ?>
@@ -307,6 +308,18 @@ jQuery(document).ready(function() {
307
  </form>
308
  </div>
309
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  <?php if(current_user_can('administrator')){ ?>
311
  <div id="rControl" class="cptab">
312
  <form name="rControl" method="post" style="float: left;width: 50%;">
@@ -486,8 +499,8 @@ jQuery(document).ready(function() {
486
  <td><label for="change_options"><select style="width: 150px;" name="change_options" id="change_options"><?php wp_dropdown_roles( flag_get_role('FlAG Change options') ); ?></select></label></td>
487
  </tr>
488
  <tr valign="top">
489
- <th scope="row" style="white-space: nowrap"><?php _e('Facebook page', 'flag'); ?>:</th>
490
- <td><label for="facebook_page"><select style="width: 150px;" name="facebook_page" id="facebook_page"><?php wp_dropdown_roles( flag_get_role('FlAG Facebook page') ); ?></select></label></td>
491
  </tr>
492
  </table>
493
  <div class="submit"><input type="submit" class="button-primary" name= "update_cap" value="<?php _e('Update capabilities', 'flag'); ?>"/></div>
122
  flag_set_capability($_POST['manage_music'],"FlAG Manage music");
123
  flag_set_capability($_POST['manage_video'],"FlAG Manage video");
124
  flag_set_capability($_POST['manage_banners'],"FlAG Manage banners");
125
+ flag_set_capability($_POST['flagframe_page'],"FlAG iFrame page");
126
 
127
  flagGallery::show_message(__('Updated capabilities',"flag"));
128
  }
137
 
138
  <ul id="tabs" class="tabs">
139
  <li class="selected"><a href="#" rel="imageoptions"><?php _e('Gallery Options', 'flag'); ?></a></li>
140
+ <li><a href="#" rel="grandpages"><?php _e('GRAND Pages', 'flag'); ?></a></li>
141
  <?php if(current_user_can('administrator')){ ?>
142
  <li><a href="#" rel="rControl"><?php _e('License Key & Remote Control', 'flag'); ?></a></li>
143
  <?php } ?>
308
  </form>
309
  </div>
310
 
311
+ <div id="grandpages" class="cptab">
312
+ <form name="grandpages" method="post">
313
+ <?php wp_nonce_field('flag_settings'); ?>
314
+ <input type="hidden" name="page_options" value="gp_jscode" />
315
+ <h2><?php _e('GRAND Pages settings','flag'); ?></h2>
316
+ <h3><?php _e('Google Analytics Tracking Code','flag'); ?></h3>
317
+ <textarea name="gp_jscode" rows="5" cols="50"><?php if(isset($flag_options['gp_jscode'])){ echo stripslashes($flag_options['gp_jscode']); } ?></textarea>
318
+ <p><?php _e('Enter your Google analytics tracking Code here. It will automatically be added to GRAND Pages so google can track your visitors behavior.', 'flag'); ?></p>
319
+ <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes', 'flag'); ?>"/></div>
320
+ </form>
321
+ </div>
322
+
323
  <?php if(current_user_can('administrator')){ ?>
324
  <div id="rControl" class="cptab">
325
  <form name="rControl" method="post" style="float: left;width: 50%;">
499
  <td><label for="change_options"><select style="width: 150px;" name="change_options" id="change_options"><?php wp_dropdown_roles( flag_get_role('FlAG Change options') ); ?></select></label></td>
500
  </tr>
501
  <tr valign="top">
502
+ <th scope="row" style="white-space: nowrap"><?php _e('iFrame page', 'flag'); ?>:</th>
503
+ <td><label for="flagframe_page"><select style="width: 150px;" name="flagframe_page" id="flagframe_page"><?php wp_dropdown_roles( flag_get_role('FlAG iFrame page') ); ?></select></label></td>
504
  </tr>
505
  </table>
506
  <div class="submit"><input type="submit" class="button-primary" name= "update_cap" value="<?php _e('Update capabilities', 'flag'); ?>"/></div>
admin/skin_options.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- define( 'SHORTINIT', true );
3
  require_once( dirname(dirname(__FILE__)) . '/flag-config.php');
4
 
5
  if(!function_exists('sanitize_flagname')){
1
  <?php
2
+ define('WP_INSTALLING', true);
3
  require_once( dirname(dirname(__FILE__)) . '/flag-config.php');
4
 
5
  if(!function_exists('sanitize_flagname')){
admin/skins.php CHANGED
@@ -362,7 +362,7 @@ $total_all_skins = count($all_skins);
362
  $skins_xml = @simplexml_load_file($skins_remote_xml, 'SimpleXMLElement', LIBXML_NOCDATA);
363
  $all_skins_arr = $skins_by_type = array();
364
  $skins_xml_error = false;
365
- if(empty($skins_xml)){
366
  $ch = curl_init($skins_remote_xml);
367
  curl_setopt($ch, CURLOPT_HEADER, 0);
368
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
362
  $skins_xml = @simplexml_load_file($skins_remote_xml, 'SimpleXMLElement', LIBXML_NOCDATA);
363
  $all_skins_arr = $skins_by_type = array();
364
  $skins_xml_error = false;
365
+ if(empty($skins_xml) && function_exists('curl_init')){
366
  $ch = curl_init($skins_remote_xml);
367
  curl_setopt($ch, CURLOPT_HEADER, 0);
368
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
admin/upload.php CHANGED
@@ -3,12 +3,14 @@
3
  * Accepts file uploads from swfupload.
4
  *
5
  */
6
- define('WP_ADMIN', true);
 
7
  ini_set( 'display_errors', 0 );
8
  ini_set( 'error_reporting', 0 );
9
 
10
  // look up for the path
11
  require_once( dirname( dirname(__FILE__) ) . '/flag-config.php');
 
12
 
13
  // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
14
  if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
3
  * Accepts file uploads from swfupload.
4
  *
5
  */
6
+ //define('WP_ADMIN', true);
7
+ define('WP_INSTALLING', true);
8
  ini_set( 'display_errors', 0 );
9
  ini_set( 'error_reporting', 0 );
10
 
11
  // look up for the path
12
  require_once( dirname( dirname(__FILE__) ) . '/flag-config.php');
13
+ require_once( dirname( dirname(__FILE__) ) . '/flag.php');
14
 
15
  // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
16
  if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
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: 4.15
7
  Author: Rattus
8
  Author URI: http://codeasily.com/
9
 
@@ -23,7 +23,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
23
  if (!class_exists('flagLoad')) {
24
  class flagLoad {
25
 
26
- var $version = '4.15';
27
  var $dbversion = '2.75';
28
  var $minium_WP = '3.0';
29
  var $minium_WPMU = '3.0';
@@ -247,8 +247,8 @@ class flagLoad {
247
  }
248
 
249
  function register_scripts_frontend() {
250
- wp_register_style('fancybox', plugins_url('/flash-album-gallery/admin/js/jquery.fancybox-1.3.4.css') );
251
- wp_register_script('fancybox', plugins_url('/flash-album-gallery/admin/js/jquery.fancybox-1.3.4.pack.js'), array('jquery'), '1.3.4', true );
252
 
253
  wp_register_style('photoswipe', plugins_url('/flash-album-gallery/admin/js/photoswipe/photoswipe.css') );
254
  wp_register_script('klass.photoswipe', plugins_url('/flash-album-gallery/admin/js/photoswipe/klass.min.js'), array('jquery'), '1.0', true );
@@ -262,7 +262,7 @@ class flagLoad {
262
  wp_register_script('flagscroll', plugins_url('/flash-album-gallery/admin/js/flagscroll.js'), array('jquery'), '1.0', true );
263
  wp_register_script('swfmousewheel', plugins_url('/flash-album-gallery/admin/js/swfmousewheel.js'), false, '2.0', true );
264
 
265
- wp_register_script('flagscript', plugins_url('/flash-album-gallery/admin/js/script.js'), array('jquery'), '2.0', true );
266
  wp_register_style('flagallery', plugins_url('/flash-album-gallery/admin/css/flagallery.css') );
267
 
268
  }
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: 4.23
7
  Author: Rattus
8
  Author URI: http://codeasily.com/
9
 
23
  if (!class_exists('flagLoad')) {
24
  class flagLoad {
25
 
26
+ var $version = '4.23';
27
  var $dbversion = '2.75';
28
  var $minium_WP = '3.0';
29
  var $minium_WPMU = '3.0';
247
  }
248
 
249
  function register_scripts_frontend() {
250
+ wp_register_style('fancybox-1.3.4', plugins_url('/flash-album-gallery/admin/js/jquery.fancybox-1.3.4.css') );
251
+ wp_register_script('fancybox-1.3.4', plugins_url('/flash-album-gallery/admin/js/jquery.fancybox-1.3.4.pack.js'), array('jquery'), '1.3.4', true );
252
 
253
  wp_register_style('photoswipe', plugins_url('/flash-album-gallery/admin/js/photoswipe/photoswipe.css') );
254
  wp_register_script('klass.photoswipe', plugins_url('/flash-album-gallery/admin/js/photoswipe/klass.min.js'), array('jquery'), '1.0', true );
262
  wp_register_script('flagscroll', plugins_url('/flash-album-gallery/admin/js/flagscroll.js'), array('jquery'), '1.0', true );
263
  wp_register_script('swfmousewheel', plugins_url('/flash-album-gallery/admin/js/swfmousewheel.js'), false, '2.0', true );
264
 
265
+ wp_register_script('flagscript', plugins_url('/flash-album-gallery/admin/js/script.js'), array('jquery','swfobject'), '2.0', true );
266
  wp_register_style('flagallery', plugins_url('/flash-album-gallery/admin/css/flagallery.css') );
267
 
268
  }
facebook.php → flagframe.php RENAMED
File without changes
full_window_template.php CHANGED
@@ -33,6 +33,10 @@ if ( post_password_required( $post ) ) {
33
  <?php
34
  do_action('flag_footer_scripts');
35
  wp_print_scripts(array('flagscroll', 'flagscript'));
 
 
 
36
  ?>
 
37
  </body>
38
  </html>
33
  <?php
34
  do_action('flag_footer_scripts');
35
  wp_print_scripts(array('flagscroll', 'flagscript'));
36
+
37
+ $flag_options = get_option('flag_options');
38
+ if(isset($flag_options['gp_jscode'])){ echo stripslashes($flag_options['gp_jscode']); }
39
  ?>
40
+
41
  </body>
42
  </html>
lang/flag-hu_HU.po CHANGED
@@ -182,12 +182,12 @@ msgid "Options"
182
  msgstr "Beállítások"
183
 
184
  #: admin/admin.php:61
185
- msgid "FlAG Facebook Integration"
186
- msgstr "FlAG Facebook Integráció"
187
 
188
  #: admin/admin.php:61
189
- msgid "Facebook"
190
- msgstr "Facebook"
191
 
192
  #: admin/admin.php:63
193
  msgid "GRAND Flash Album Gallery"
@@ -245,7 +245,7 @@ msgstr "Nyelvi csomag beszerzése"
245
  msgid "Skins for Grand Flagallery"
246
  msgstr "Felületek a Grand Flagallery-hez"
247
 
248
- #: admin/ajax.php:139 admin/ajax.php:165 admin/facebook-tool.php:13
249
  msgid "Success"
250
  msgstr "Sikerült"
251
 
@@ -462,7 +462,7 @@ msgstr "Nincs kép a WordPress Média Tárban"
462
  msgid "Playlist Title"
463
  msgstr "Lejátszási lista címe"
464
 
465
- #: admin/banner-box.php:509 admin/facebook-tool.php:180 admin/meta_box.php:126
466
  #: admin/music-box.php:488 admin/tinymce/window.php:118
467
  #: admin/video-box.php:412
468
  msgid "Choose skin"
@@ -599,97 +599,97 @@ msgstr "Elem Leírása"
599
  msgid "Save Changes"
600
  msgstr "Változások mentése"
601
 
602
- #: admin/facebook-tool.php:15
603
  msgid "Failure"
604
  msgstr "Hiba"
605
 
606
- #: admin/facebook-tool.php:144
607
- msgid "Facebook Integration"
608
- msgstr "Facebook integráció"
609
 
610
- #: admin/facebook-tool.php:155
611
- msgid "Copy facebook.php file to root directory"
612
- msgstr "facebook.php fájl másolása a gyökér könyvtárba"
613
 
614
- #: admin/facebook-tool.php:158
615
- msgid "Photo Gallery Facebook Page Generator"
616
- msgstr "Facebook Képgaléria Készítő"
617
 
618
- #: admin/facebook-tool.php:161 admin/meta_box.php:107
619
  #: admin/tinymce/window.php:76
620
  msgid "Select galleries"
621
  msgstr "Galéria választása"
622
 
623
- #: admin/facebook-tool.php:161 admin/meta_box.php:107
624
  #: admin/tinymce/window.php:76
625
  msgid "(album categories)"
626
  msgstr "(album kategóriák)"
627
 
628
- #: admin/facebook-tool.php:163 admin/meta_box.php:109
629
  #: admin/tinymce/window.php:78
630
  msgid "all galleries"
631
  msgstr "minden galéria"
632
 
633
- #: admin/facebook-tool.php:176 admin/meta_box.php:122
634
  msgid "Galleries order"
635
  msgstr "Galériák rendezése"
636
 
637
- #: admin/facebook-tool.php:182 admin/meta_box.php:128
638
  msgid "skin active by default"
639
  msgstr "felület használata alapértelmezettként"
640
 
641
- #: admin/facebook-tool.php:191 admin/tinymce/window.php:129
642
  msgid "Skin size"
643
  msgstr "Felület mérete"
644
 
645
- #: admin/facebook-tool.php:191 admin/tinymce/window.php:129
646
  msgid "blank for default"
647
  msgstr "hagyd üresen az alapértelmezetthez"
648
 
649
- #: admin/facebook-tool.php:192 admin/tinymce/window.php:130
650
  msgid "width"
651
  msgstr "szélesség"
652
 
653
- #: admin/facebook-tool.php:192 admin/tinymce/window.php:130
654
  msgid "height"
655
  msgstr "magasság"
656
 
657
- #: admin/facebook-tool.php:195
658
  msgid "Post ID"
659
  msgstr "Bejegyzés ID"
660
 
661
- #: admin/facebook-tool.php:195
662
  msgid "optional"
663
  msgstr "választható"
664
 
665
- #: admin/facebook-tool.php:199 admin/facebook-tool.php:221
666
- #: admin/facebook-tool.php:243 admin/facebook-tool.php:265
667
- msgid "Facebook Page Url"
668
- msgstr "Facebook Page Url"
669
 
670
- #: admin/facebook-tool.php:204
671
- msgid "mp3 Gallery Facebook Page Generator"
672
- msgstr "mp3 Galéria Facebook Oldal Készítő"
673
 
674
- #: admin/facebook-tool.php:207 admin/facebook-tool.php:209
675
- #: admin/facebook-tool.php:229 admin/facebook-tool.php:231
676
  #: widgets/widgets.php:499
677
  msgid "Choose playlist"
678
  msgstr "Lejátszási lista választása"
679
 
680
- #: admin/facebook-tool.php:226
681
- msgid "Video Blog Gallery Facebook Page Generator"
682
- msgstr "Videó Blog Galéria Facebook oldal Készítő"
683
 
684
- #: admin/facebook-tool.php:248
685
- msgid "Banner Box Facebook Page Generator"
686
- msgstr "Banner Doboz Facebook Oldal Készítő"
687
 
688
- #: admin/facebook-tool.php:251
689
  msgid "Choose xml"
690
  msgstr "xml választása"
691
 
692
- #: admin/facebook-tool.php:253
693
  msgid "Choose XML"
694
  msgstr "xml választása"
695
 
@@ -2123,8 +2123,8 @@ msgid "Change options"
2123
  msgstr "Beállítások változtatása"
2124
 
2125
  #: admin/settings.php:465
2126
- msgid "Facebook page"
2127
- msgstr "Facebook oldal"
2128
 
2129
  #: admin/settings.php:469
2130
  msgid "Update capabilities"
@@ -2566,7 +2566,7 @@ msgstr ""
2566
  "Engedélyezi a felhasználónak a szabályok megváltoztatását más blog "
2567
  "szerzőknél."
2568
 
2569
- #: facebook.php:68 facebook.php:80 facebook.php:98
2570
  msgid "Can't find playlist"
2571
  msgstr "Nem találok lejátszási listát"
2572
 
182
  msgstr "Beállítások"
183
 
184
  #: admin/admin.php:61
185
+ msgid "FlAG iFrame Integration"
186
+ msgstr "FlAG iFrame Integráció"
187
 
188
  #: admin/admin.php:61
189
+ msgid "iFrame"
190
+ msgstr "iFrame"
191
 
192
  #: admin/admin.php:63
193
  msgid "GRAND Flash Album Gallery"
245
  msgid "Skins for Grand Flagallery"
246
  msgstr "Felületek a Grand Flagallery-hez"
247
 
248
+ #: admin/ajax.php:139 admin/ajax.php:165 admin/flagframe-tool.php:13
249
  msgid "Success"
250
  msgstr "Sikerült"
251
 
462
  msgid "Playlist Title"
463
  msgstr "Lejátszási lista címe"
464
 
465
+ #: admin/banner-box.php:509 admin/flagframe-tool.php:180 admin/meta_box.php:126
466
  #: admin/music-box.php:488 admin/tinymce/window.php:118
467
  #: admin/video-box.php:412
468
  msgid "Choose skin"
599
  msgid "Save Changes"
600
  msgstr "Változások mentése"
601
 
602
+ #: admin/flagframe-tool.php:15
603
  msgid "Failure"
604
  msgstr "Hiba"
605
 
606
+ #: admin/flagframe-tool.php:144
607
+ msgid "iFrame Integration"
608
+ msgstr "iFrame integráció"
609
 
610
+ #: admin/flagframe-tool.php:155
611
+ msgid "Copy flagframe.php file to root directory"
612
+ msgstr "flagframe.php fájl másolása a gyökér könyvtárba"
613
 
614
+ #: admin/flagframe-tool.php:158
615
+ msgid "Photo Gallery iFrame Page Generator"
616
+ msgstr "iFrame Képgaléria Készítő"
617
 
618
+ #: admin/flagframe-tool.php:161 admin/meta_box.php:107
619
  #: admin/tinymce/window.php:76
620
  msgid "Select galleries"
621
  msgstr "Galéria választása"
622
 
623
+ #: admin/flagframe-tool.php:161 admin/meta_box.php:107
624
  #: admin/tinymce/window.php:76
625
  msgid "(album categories)"
626
  msgstr "(album kategóriák)"
627
 
628
+ #: admin/flagframe-tool.php:163 admin/meta_box.php:109
629
  #: admin/tinymce/window.php:78
630
  msgid "all galleries"
631
  msgstr "minden galéria"
632
 
633
+ #: admin/flagframe-tool.php:176 admin/meta_box.php:122
634
  msgid "Galleries order"
635
  msgstr "Galériák rendezése"
636
 
637
+ #: admin/flagframe-tool.php:182 admin/meta_box.php:128
638
  msgid "skin active by default"
639
  msgstr "felület használata alapértelmezettként"
640
 
641
+ #: admin/flagframe-tool.php:191 admin/tinymce/window.php:129
642
  msgid "Skin size"
643
  msgstr "Felület mérete"
644
 
645
+ #: admin/flagframe-tool.php:191 admin/tinymce/window.php:129
646
  msgid "blank for default"
647
  msgstr "hagyd üresen az alapértelmezetthez"
648
 
649
+ #: admin/flagframe-tool.php:192 admin/tinymce/window.php:130
650
  msgid "width"
651
  msgstr "szélesség"
652
 
653
+ #: admin/flagframe-tool.php:192 admin/tinymce/window.php:130
654
  msgid "height"
655
  msgstr "magasság"
656
 
657
+ #: admin/flagframe-tool.php:195
658
  msgid "Post ID"
659
  msgstr "Bejegyzés ID"
660
 
661
+ #: admin/flagframe-tool.php:195
662
  msgid "optional"
663
  msgstr "választható"
664
 
665
+ #: admin/flagframe-tool.php:199 admin/flagframe-tool.php:221
666
+ #: admin/flagframe-tool.php:243 admin/flagframe-tool.php:265
667
+ msgid "iFrame Page Url"
668
+ msgstr "iFrame Page Url"
669
 
670
+ #: admin/flagframe-tool.php:204
671
+ msgid "mp3 Gallery iFrame Page Generator"
672
+ msgstr "mp3 Galéria iFrame Oldal Készítő"
673
 
674
+ #: admin/flagframe-tool.php:207 admin/flagframe-tool.php:209
675
+ #: admin/flagframe-tool.php:229 admin/flagframe-tool.php:231
676
  #: widgets/widgets.php:499
677
  msgid "Choose playlist"
678
  msgstr "Lejátszási lista választása"
679
 
680
+ #: admin/flagframe-tool.php:226
681
+ msgid "Video Blog Gallery iFrame Page Generator"
682
+ msgstr "Videó Blog Galéria iFrame oldal Készítő"
683
 
684
+ #: admin/flagframe-tool.php:248
685
+ msgid "Banner Box iFrame Page Generator"
686
+ msgstr "Banner Doboz iFrame Oldal Készítő"
687
 
688
+ #: admin/flagframe-tool.php:251
689
  msgid "Choose xml"
690
  msgstr "xml választása"
691
 
692
+ #: admin/flagframe-tool.php:253
693
  msgid "Choose XML"
694
  msgstr "xml választása"
695
 
2123
  msgstr "Beállítások változtatása"
2124
 
2125
  #: admin/settings.php:465
2126
+ msgid "iFrame page"
2127
+ msgstr "iFrame oldal"
2128
 
2129
  #: admin/settings.php:469
2130
  msgid "Update capabilities"
2566
  "Engedélyezi a felhasználónak a szabályok megváltoztatását más blog "
2567
  "szerzőknél."
2568
 
2569
+ #: flagframe.php:68 flagframe.php:80 flagframe.php:98
2570
  msgid "Can't find playlist"
2571
  msgstr "Nem találok lejátszási listát"
2572
 
lang/flag-sl_SI.po CHANGED
@@ -187,12 +187,12 @@ msgid "Options"
187
  msgstr "Nastavitve"
188
 
189
  #: admin/admin.php:61
190
- msgid "FlAG Facebook Integration"
191
- msgstr "FlAG Facebook integracija"
192
 
193
  #: admin/admin.php:61
194
- msgid "Facebook"
195
- msgstr "Facebook"
196
 
197
  #: admin/admin.php:63
198
  msgid "GRAND Flash Album Gallery"
@@ -252,7 +252,7 @@ msgstr "Pridobite vaš jezikovni paket"
252
  msgid "Skins for Grand Flagallery"
253
  msgstr "Preobleke za GRAND FlAGalerijo"
254
 
255
- #: admin/ajax.php:139 admin/ajax.php:165 admin/facebook-tool.php:13
256
  msgid "Success"
257
  msgstr "Uspeh"
258
 
@@ -468,7 +468,7 @@ msgstr "Ni slik v Wordpress medijski knjižnici"
468
  msgid "Playlist Title"
469
  msgstr "Naslov seznama predvajanja"
470
 
471
- #: admin/banner-box.php:509 admin/facebook-tool.php:180 admin/meta_box.php:126
472
  #: admin/music-box.php:488 admin/tinymce/window.php:118
473
  #: admin/video-box.php:412
474
  msgid "Choose skin"
@@ -605,97 +605,97 @@ msgstr "Opis elementa"
605
  msgid "Save Changes"
606
  msgstr "Shrani spremembe"
607
 
608
- #: admin/facebook-tool.php:15
609
  msgid "Failure"
610
  msgstr "Neuspelo"
611
 
612
- #: admin/facebook-tool.php:144
613
- msgid "Facebook Integration"
614
- msgstr "Facebook integracija"
615
 
616
- #: admin/facebook-tool.php:155
617
- msgid "Copy facebook.php file to root directory"
618
- msgstr "Kopiraj facebook.php v root direktorij"
619
 
620
- #: admin/facebook-tool.php:158
621
- msgid "Photo Gallery Facebook Page Generator"
622
- msgstr "Foto galerija Facebook generator strani"
623
 
624
- #: admin/facebook-tool.php:161 admin/meta_box.php:107
625
  #: admin/tinymce/window.php:76
626
  msgid "Select galleries"
627
  msgstr "Izberi galerije"
628
 
629
- #: admin/facebook-tool.php:161 admin/meta_box.php:107
630
  #: admin/tinymce/window.php:76
631
  msgid "(album categories)"
632
  msgstr "(kategorije albuma)"
633
 
634
- #: admin/facebook-tool.php:163 admin/meta_box.php:109
635
  #: admin/tinymce/window.php:78
636
  msgid "all galleries"
637
  msgstr "vse galerije"
638
 
639
- #: admin/facebook-tool.php:176 admin/meta_box.php:122
640
  msgid "Galleries order"
641
  msgstr "Vrstni red galerij"
642
 
643
- #: admin/facebook-tool.php:182 admin/meta_box.php:128
644
  msgid "skin active by default"
645
  msgstr "Privzeto aktivirana preobleka"
646
 
647
- #: admin/facebook-tool.php:191 admin/tinymce/window.php:129
648
  msgid "Skin size"
649
  msgstr "Velikost preobleke"
650
 
651
- #: admin/facebook-tool.php:191 admin/tinymce/window.php:129
652
  msgid "blank for default"
653
  msgstr "prazno za privzeto"
654
 
655
- #: admin/facebook-tool.php:192 admin/tinymce/window.php:130
656
  msgid "width"
657
  msgstr "širina"
658
 
659
- #: admin/facebook-tool.php:192 admin/tinymce/window.php:130
660
  msgid "height"
661
  msgstr "višina"
662
 
663
- #: admin/facebook-tool.php:195
664
  msgid "Post ID"
665
  msgstr "Post ID"
666
 
667
- #: admin/facebook-tool.php:195
668
  msgid "optional"
669
  msgstr "neobvezno"
670
 
671
- #: admin/facebook-tool.php:199 admin/facebook-tool.php:221
672
- #: admin/facebook-tool.php:243 admin/facebook-tool.php:265
673
- msgid "Facebook Page Url"
674
- msgstr "Facebook Url strani"
675
 
676
- #: admin/facebook-tool.php:204
677
- msgid "mp3 Gallery Facebook Page Generator"
678
- msgstr "MP3 galerija Facebook generator strani"
679
 
680
- #: admin/facebook-tool.php:207 admin/facebook-tool.php:209
681
- #: admin/facebook-tool.php:229 admin/facebook-tool.php:231
682
  #: widgets/widgets.php:499
683
  msgid "Choose playlist"
684
  msgstr "Izberi seznam predvajanja"
685
 
686
- #: admin/facebook-tool.php:226
687
- msgid "Video Blog Gallery Facebook Page Generator"
688
- msgstr "Video blog galerija Facebook generator strani"
689
 
690
- #: admin/facebook-tool.php:248
691
- msgid "Banner Box Facebook Page Generator"
692
- msgstr "Skrinja oglasne pasice Facebook generator strani"
693
 
694
- #: admin/facebook-tool.php:251
695
  msgid "Choose xml"
696
  msgstr "Izberi xml"
697
 
698
- #: admin/facebook-tool.php:253
699
  msgid "Choose XML"
700
  msgstr "Izberi XML"
701
 
@@ -2123,8 +2123,8 @@ msgid "Change options"
2123
  msgstr "Spremeni možnosti"
2124
 
2125
  #: admin/settings.php:465
2126
- msgid "Facebook page"
2127
- msgstr "Facebook stran"
2128
 
2129
  #: admin/settings.php:469
2130
  msgid "Update capabilities"
@@ -2564,7 +2564,7 @@ msgstr "Omogočite vloge/zmožnosti"
2564
  msgid "Allow users to change the roles for other blog authors."
2565
  msgstr "Omogočite uporabnikom spreminjati vloge za druge blog avtorje."
2566
 
2567
- #: facebook.php:68 facebook.php:80 facebook.php:98
2568
  msgid "Can't find playlist"
2569
  msgstr "Ne najdem seznama predvajanja"
2570
 
187
  msgstr "Nastavitve"
188
 
189
  #: admin/admin.php:61
190
+ msgid "FlAG iFrame Integration"
191
+ msgstr "FlAG iFrame integracija"
192
 
193
  #: admin/admin.php:61
194
+ msgid "iFrame"
195
+ msgstr "iFrame"
196
 
197
  #: admin/admin.php:63
198
  msgid "GRAND Flash Album Gallery"
252
  msgid "Skins for Grand Flagallery"
253
  msgstr "Preobleke za GRAND FlAGalerijo"
254
 
255
+ #: admin/ajax.php:139 admin/ajax.php:165 admin/flagframe-tool.php:13
256
  msgid "Success"
257
  msgstr "Uspeh"
258
 
468
  msgid "Playlist Title"
469
  msgstr "Naslov seznama predvajanja"
470
 
471
+ #: admin/banner-box.php:509 admin/flagframe-tool.php:180 admin/meta_box.php:126
472
  #: admin/music-box.php:488 admin/tinymce/window.php:118
473
  #: admin/video-box.php:412
474
  msgid "Choose skin"
605
  msgid "Save Changes"
606
  msgstr "Shrani spremembe"
607
 
608
+ #: admin/flagframe-tool.php:15
609
  msgid "Failure"
610
  msgstr "Neuspelo"
611
 
612
+ #: admin/flagframe-tool.php:144
613
+ msgid "iFrame Integration"
614
+ msgstr "iFrame integracija"
615
 
616
+ #: admin/flagframe-tool.php:155
617
+ msgid "Copy flagframe.php file to root directory"
618
+ msgstr "Kopiraj flagframe.php v root direktorij"
619
 
620
+ #: admin/flagframe-tool.php:158
621
+ msgid "Photo Gallery iFrame Page Generator"
622
+ msgstr "Foto galerija iFrame generator strani"
623
 
624
+ #: admin/flagframe-tool.php:161 admin/meta_box.php:107
625
  #: admin/tinymce/window.php:76
626
  msgid "Select galleries"
627
  msgstr "Izberi galerije"
628
 
629
+ #: admin/flagframe-tool.php:161 admin/meta_box.php:107
630
  #: admin/tinymce/window.php:76
631
  msgid "(album categories)"
632
  msgstr "(kategorije albuma)"
633
 
634
+ #: admin/flagframe-tool.php:163 admin/meta_box.php:109
635
  #: admin/tinymce/window.php:78
636
  msgid "all galleries"
637
  msgstr "vse galerije"
638
 
639
+ #: admin/flagframe-tool.php:176 admin/meta_box.php:122
640
  msgid "Galleries order"
641
  msgstr "Vrstni red galerij"
642
 
643
+ #: admin/flagframe-tool.php:182 admin/meta_box.php:128
644
  msgid "skin active by default"
645
  msgstr "Privzeto aktivirana preobleka"
646
 
647
+ #: admin/flagframe-tool.php:191 admin/tinymce/window.php:129
648
  msgid "Skin size"
649
  msgstr "Velikost preobleke"
650
 
651
+ #: admin/flagframe-tool.php:191 admin/tinymce/window.php:129
652
  msgid "blank for default"
653
  msgstr "prazno za privzeto"
654
 
655
+ #: admin/flagframe-tool.php:192 admin/tinymce/window.php:130
656
  msgid "width"
657
  msgstr "širina"
658
 
659
+ #: admin/flagframe-tool.php:192 admin/tinymce/window.php:130
660
  msgid "height"
661
  msgstr "višina"
662
 
663
+ #: admin/flagframe-tool.php:195
664
  msgid "Post ID"
665
  msgstr "Post ID"
666
 
667
+ #: admin/flagframe-tool.php:195
668
  msgid "optional"
669
  msgstr "neobvezno"
670
 
671
+ #: admin/flagframe-tool.php:199 admin/flagframe-tool.php:221
672
+ #: admin/flagframe-tool.php:243 admin/flagframe-tool.php:265
673
+ msgid "iFrame Page Url"
674
+ msgstr "iFrame Url strani"
675
 
676
+ #: admin/flagframe-tool.php:204
677
+ msgid "mp3 Gallery iFrame Page Generator"
678
+ msgstr "MP3 galerija iFrame generator strani"
679
 
680
+ #: admin/flagframe-tool.php:207 admin/flagframe-tool.php:209
681
+ #: admin/flagframe-tool.php:229 admin/flagframe-tool.php:231
682
  #: widgets/widgets.php:499
683
  msgid "Choose playlist"
684
  msgstr "Izberi seznam predvajanja"
685
 
686
+ #: admin/flagframe-tool.php:226
687
+ msgid "Video Blog Gallery iFrame Page Generator"
688
+ msgstr "Video blog galerija iFrame generator strani"
689
 
690
+ #: admin/flagframe-tool.php:248
691
+ msgid "Banner Box iFrame Page Generator"
692
+ msgstr "Skrinja oglasne pasice iFrame generator strani"
693
 
694
+ #: admin/flagframe-tool.php:251
695
  msgid "Choose xml"
696
  msgstr "Izberi xml"
697
 
698
+ #: admin/flagframe-tool.php:253
699
  msgid "Choose XML"
700
  msgstr "Izberi XML"
701
 
2123
  msgstr "Spremeni možnosti"
2124
 
2125
  #: admin/settings.php:465
2126
+ msgid "iFrame page"
2127
+ msgstr "iFrame stran"
2128
 
2129
  #: admin/settings.php:469
2130
  msgid "Update capabilities"
2564
  msgid "Allow users to change the roles for other blog authors."
2565
  msgstr "Omogočite uporabnikom spreminjati vloge za druge blog avtorje."
2566
 
2567
+ #: flagframe.php:68 flagframe.php:80 flagframe.php:98
2568
  msgid "Can't find playlist"
2569
  msgstr "Ne najdem seznama predvajanja"
2570
 
lang/flag.pot CHANGED
@@ -175,11 +175,11 @@ msgid "Options"
175
  msgstr ""
176
 
177
  #: admin/admin.php:61
178
- msgid "FlAG Facebook Integration"
179
  msgstr ""
180
 
181
  #: admin/admin.php:61
182
- msgid "Facebook"
183
  msgstr ""
184
 
185
  #: admin/admin.php:63
@@ -238,7 +238,7 @@ msgstr ""
238
  msgid "Skins for Grand Flagallery"
239
  msgstr ""
240
 
241
- #: admin/ajax.php:139 admin/ajax.php:165 admin/facebook-tool.php:13
242
  msgid "Success"
243
  msgstr ""
244
 
@@ -454,7 +454,7 @@ msgstr ""
454
  msgid "Playlist Title"
455
  msgstr ""
456
 
457
- #: admin/banner-box.php:509 admin/facebook-tool.php:180 admin/meta_box.php:126
458
  #: admin/music-box.php:488 admin/tinymce/window.php:118
459
  #: admin/video-box.php:412
460
  msgid "Choose skin"
@@ -591,97 +591,97 @@ msgstr ""
591
  msgid "Save Changes"
592
  msgstr ""
593
 
594
- #: admin/facebook-tool.php:15
595
  msgid "Failure"
596
  msgstr ""
597
 
598
- #: admin/facebook-tool.php:144
599
- msgid "Facebook Integration"
600
  msgstr ""
601
 
602
- #: admin/facebook-tool.php:155
603
- msgid "Copy facebook.php file to root directory"
604
  msgstr ""
605
 
606
- #: admin/facebook-tool.php:158
607
- msgid "Photo Gallery Facebook Page Generator"
608
  msgstr ""
609
 
610
- #: admin/facebook-tool.php:161 admin/meta_box.php:107
611
  #: admin/tinymce/window.php:76
612
  msgid "Select galleries"
613
  msgstr ""
614
 
615
- #: admin/facebook-tool.php:161 admin/meta_box.php:107
616
  #: admin/tinymce/window.php:76
617
  msgid "(album categories)"
618
  msgstr ""
619
 
620
- #: admin/facebook-tool.php:163 admin/meta_box.php:109
621
  #: admin/tinymce/window.php:78
622
  msgid "all galleries"
623
  msgstr ""
624
 
625
- #: admin/facebook-tool.php:176 admin/meta_box.php:122
626
  msgid "Galleries order"
627
  msgstr ""
628
 
629
- #: admin/facebook-tool.php:182 admin/meta_box.php:128
630
  msgid "skin active by default"
631
  msgstr ""
632
 
633
- #: admin/facebook-tool.php:191 admin/tinymce/window.php:129
634
  msgid "Skin size"
635
  msgstr ""
636
 
637
- #: admin/facebook-tool.php:191 admin/tinymce/window.php:129
638
  msgid "blank for default"
639
  msgstr ""
640
 
641
- #: admin/facebook-tool.php:192 admin/tinymce/window.php:130
642
  msgid "width"
643
  msgstr ""
644
 
645
- #: admin/facebook-tool.php:192 admin/tinymce/window.php:130
646
  msgid "height"
647
  msgstr ""
648
 
649
- #: admin/facebook-tool.php:195
650
  msgid "Post ID"
651
  msgstr ""
652
 
653
- #: admin/facebook-tool.php:195
654
  msgid "optional"
655
  msgstr ""
656
 
657
- #: admin/facebook-tool.php:199 admin/facebook-tool.php:221
658
- #: admin/facebook-tool.php:243 admin/facebook-tool.php:265
659
- msgid "Facebook Page Url"
660
  msgstr ""
661
 
662
- #: admin/facebook-tool.php:204
663
- msgid "mp3 Gallery Facebook Page Generator"
664
  msgstr ""
665
 
666
- #: admin/facebook-tool.php:207 admin/facebook-tool.php:209
667
- #: admin/facebook-tool.php:229 admin/facebook-tool.php:231
668
  #: widgets/widgets.php:499
669
  msgid "Choose playlist"
670
  msgstr ""
671
 
672
- #: admin/facebook-tool.php:226
673
- msgid "Video Blog Gallery Facebook Page Generator"
674
  msgstr ""
675
 
676
- #: admin/facebook-tool.php:248
677
- msgid "Banner Box Facebook Page Generator"
678
  msgstr ""
679
 
680
- #: admin/facebook-tool.php:251
681
  msgid "Choose xml"
682
  msgstr ""
683
 
684
- #: admin/facebook-tool.php:253
685
  msgid "Choose XML"
686
  msgstr ""
687
 
@@ -2060,7 +2060,7 @@ msgid "Change options"
2060
  msgstr ""
2061
 
2062
  #: admin/settings.php:465
2063
- msgid "Facebook page"
2064
  msgstr ""
2065
 
2066
  #: admin/settings.php:469
@@ -2496,7 +2496,7 @@ msgstr ""
2496
  msgid "Allow users to change the roles for other blog authors."
2497
  msgstr ""
2498
 
2499
- #: facebook.php:68 facebook.php:80 facebook.php:98
2500
  msgid "Can't find playlist"
2501
  msgstr ""
2502
 
175
  msgstr ""
176
 
177
  #: admin/admin.php:61
178
+ msgid "FlAG iFrame Integration"
179
  msgstr ""
180
 
181
  #: admin/admin.php:61
182
+ msgid "iFrame"
183
  msgstr ""
184
 
185
  #: admin/admin.php:63
238
  msgid "Skins for Grand Flagallery"
239
  msgstr ""
240
 
241
+ #: admin/ajax.php:139 admin/ajax.php:165 admin/flagframe-tool.php:13
242
  msgid "Success"
243
  msgstr ""
244
 
454
  msgid "Playlist Title"
455
  msgstr ""
456
 
457
+ #: admin/banner-box.php:509 admin/flagframe-tool.php:180 admin/meta_box.php:126
458
  #: admin/music-box.php:488 admin/tinymce/window.php:118
459
  #: admin/video-box.php:412
460
  msgid "Choose skin"
591
  msgid "Save Changes"
592
  msgstr ""
593
 
594
+ #: admin/flagframe-tool.php:15
595
  msgid "Failure"
596
  msgstr ""
597
 
598
+ #: admin/flagframe-tool.php:144
599
+ msgid "iFrame Integration"
600
  msgstr ""
601
 
602
+ #: admin/flagframe-tool.php:155
603
+ msgid "Copy flagframe.php file to root directory"
604
  msgstr ""
605
 
606
+ #: admin/flagframe-tool.php:158
607
+ msgid "Photo Gallery iFrame Page Generator"
608
  msgstr ""
609
 
610
+ #: admin/flagframe-tool.php:161 admin/meta_box.php:107
611
  #: admin/tinymce/window.php:76
612
  msgid "Select galleries"
613
  msgstr ""
614
 
615
+ #: admin/flagframe-tool.php:161 admin/meta_box.php:107
616
  #: admin/tinymce/window.php:76
617
  msgid "(album categories)"
618
  msgstr ""
619
 
620
+ #: admin/flagframe-tool.php:163 admin/meta_box.php:109
621
  #: admin/tinymce/window.php:78
622
  msgid "all galleries"
623
  msgstr ""
624
 
625
+ #: admin/flagframe-tool.php:176 admin/meta_box.php:122
626
  msgid "Galleries order"
627
  msgstr ""
628
 
629
+ #: admin/flagframe-tool.php:182 admin/meta_box.php:128
630
  msgid "skin active by default"
631
  msgstr ""
632
 
633
+ #: admin/flagframe-tool.php:191 admin/tinymce/window.php:129
634
  msgid "Skin size"
635
  msgstr ""
636
 
637
+ #: admin/flagframe-tool.php:191 admin/tinymce/window.php:129
638
  msgid "blank for default"
639
  msgstr ""
640
 
641
+ #: admin/flagframe-tool.php:192 admin/tinymce/window.php:130
642
  msgid "width"
643
  msgstr ""
644
 
645
+ #: admin/flagframe-tool.php:192 admin/tinymce/window.php:130
646
  msgid "height"
647
  msgstr ""
648
 
649
+ #: admin/flagframe-tool.php:195
650
  msgid "Post ID"
651
  msgstr ""
652
 
653
+ #: admin/flagframe-tool.php:195
654
  msgid "optional"
655
  msgstr ""
656
 
657
+ #: admin/flagframe-tool.php:199 admin/flagframe-tool.php:221
658
+ #: admin/flagframe-tool.php:243 admin/flagframe-tool.php:265
659
+ msgid "iFrame Page Url"
660
  msgstr ""
661
 
662
+ #: admin/flagframe-tool.php:204
663
+ msgid "mp3 Gallery iFrame Page Generator"
664
  msgstr ""
665
 
666
+ #: admin/flagframe-tool.php:207 admin/flagframe-tool.php:209
667
+ #: admin/flagframe-tool.php:229 admin/flagframe-tool.php:231
668
  #: widgets/widgets.php:499
669
  msgid "Choose playlist"
670
  msgstr ""
671
 
672
+ #: admin/flagframe-tool.php:226
673
+ msgid "Video Blog Gallery iFrame Page Generator"
674
  msgstr ""
675
 
676
+ #: admin/flagframe-tool.php:248
677
+ msgid "Banner Box iFrame Page Generator"
678
  msgstr ""
679
 
680
+ #: admin/flagframe-tool.php:251
681
  msgid "Choose xml"
682
  msgstr ""
683
 
684
+ #: admin/flagframe-tool.php:253
685
  msgid "Choose XML"
686
  msgstr ""
687
 
2060
  msgstr ""
2061
 
2062
  #: admin/settings.php:465
2063
+ msgid "iFrame page"
2064
  msgstr ""
2065
 
2066
  #: admin/settings.php:469
2496
  msgid "Allow users to change the roles for other blog authors."
2497
  msgstr ""
2498
 
2499
+ #: flagframe.php:68 flagframe.php:80 flagframe.php:98
2500
  msgid "Can't find playlist"
2501
  msgstr ""
2502
 
lib/app.php CHANGED
@@ -176,6 +176,9 @@ if(isset($_REQUEST['account'])){
176
  if ( empty($args['title']) ) {
177
  $args['title'] = str_replace(' ', '_', current_time('mysql'));
178
  }
 
 
 
179
  @ require_once (dirname(dirname(__FILE__)). '/admin/functions.php');
180
  $defaultpath = $flag_options['galleryPath'];
181
 
176
  if ( empty($args['title']) ) {
177
  $args['title'] = str_replace(' ', '_', current_time('mysql'));
178
  }
179
+ if ( !isset($args['description']) ) {
180
+ $args['description'] = '';
181
+ }
182
  @ require_once (dirname(dirname(__FILE__)). '/admin/functions.php');
183
  $defaultpath = $flag_options['galleryPath'];
184
 
lib/class.swfobject.php CHANGED
@@ -84,8 +84,11 @@ class flag_swfobject {
84
  $this->js .= "start : function() {";
85
  $this->js .= $this->embedSWF;
86
  $this->js .= "} };";
 
 
87
  $this->js .= $this->id . '.start();';
88
-
 
89
  return $this->js;
90
  }
91
 
84
  $this->js .= "start : function() {";
85
  $this->js .= $this->embedSWF;
86
  $this->js .= "} };";
87
+
88
+ $this->js .= 'jQuery(function(){';
89
  $this->js .= $this->id . '.start();';
90
+ $this->js .= "});";
91
+
92
  return $this->js;
93
  }
94
 
lib/constructor.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
- require_once( dirname(dirname(__FILE__)) . '/flag-config.php');
3
-
 
4
  if ( !is_user_logged_in() )
5
  die('-1');
6
 
@@ -24,14 +25,14 @@ if(isset($arr['properties_skin']) && !empty($arr['properties_skin'])) {
24
  }
25
  $fp = fopen($settingsXML, "w");
26
  if(!$fp)
27
- exit("0");//Failure
28
  $arr['properties_skin'] = str_replace( array( '=','?','"','$' ), '', $arr['properties_skin'] );
29
  $newProperties = preg_replace("|<properties>.*?</properties>|si", $arr['properties_skin'], $mainXML);
30
  if(fwrite($fp, $newProperties))
31
  echo "1";//Save
32
  else
33
- echo "0";
34
  fclose($fp);
35
  } else {
36
- echo '0';
37
  }
1
  <?php
2
+ define('WP_INSTALLING', true);
3
+ @require_once( dirname(dirname(__FILE__)) . '/flag-config.php');
4
+ include_once(dirname(dirname(__FILE__)) . '/flag.php');
5
  if ( !is_user_logged_in() )
6
  die('-1');
7
 
25
  }
26
  $fp = fopen($settingsXML, "w");
27
  if(!$fp)
28
+ exit("00");//Failure
29
  $arr['properties_skin'] = str_replace( array( '=','?','"','$' ), '', $arr['properties_skin'] );
30
  $newProperties = preg_replace("|<properties>.*?</properties>|si", $arr['properties_skin'], $mainXML);
31
  if(fwrite($fp, $newProperties))
32
  echo "1";//Save
33
  else
34
+ echo "000";
35
  fclose($fp);
36
  } else {
37
+ echo '0000';
38
  }
lib/flag-db.php CHANGED
@@ -32,14 +32,6 @@ class flagdb {
32
 
33
  var $paged;
34
 
35
- /**
36
- * PHP4 compatibility layer for calling the PHP5 constructor.
37
- *
38
- */
39
- function flagdb() {
40
- return $this->__construct();
41
- }
42
-
43
  /**
44
  * Init the Database Abstraction layer for FlAGallery
45
  *
32
 
33
  var $paged;
34
 
 
 
 
 
 
 
 
 
35
  /**
36
  * Init the Database Abstraction layer for FlAGallery
37
  *
lib/gd.thumbnail.inc.php CHANGED
@@ -149,7 +149,7 @@ class flag_Thumbnail {
149
  }
150
 
151
  // increase memory-limit if possible, GD needs this for large images
152
- // @ini_set('memory_limit', '128M');
153
 
154
  if($this->error == false) {
155
  // Check memory consumption if file exists
@@ -161,20 +161,20 @@ class flag_Thumbnail {
161
 
162
  switch($this->format) {
163
  case 'GIF':
164
- $this->oldImage = ImageCreateFromGif($this->fileName);
165
  break;
166
  case 'JPG':
167
- $this->oldImage = ImageCreateFromJpeg($this->fileName);
168
  break;
169
  case 'PNG':
170
- $this->oldImage = ImageCreateFromPng($this->fileName);
171
  break;
172
  }
173
  if (!$this->oldImage) {
174
  $this->errmsg = 'Create Image failed. Check memory limit';
175
  $this->error = true;
176
  } else {
177
- $size = GetImageSize($this->fileName);
178
  $this->currentDimensions = array('width'=>$size[0],'height'=>$size[1]);
179
  $this->newImage = $this->oldImage;
180
  }
@@ -247,9 +247,9 @@ class flag_Thumbnail {
247
  *
248
  */
249
  function destruct() {
250
- if(is_resource($this->newImage)) @ImageDestroy($this->newImage);
251
- if(is_resource($this->oldImage)) @ImageDestroy($this->oldImage);
252
- if(is_resource($this->workingImage)) @ImageDestroy($this->workingImage);
253
  }
254
 
255
  /**
@@ -360,7 +360,7 @@ class flag_Thumbnail {
360
  */
361
  function showErrorImage() {
362
  header('Content-type: image/png');
363
- $errImg = ImageCreate(220,25);
364
  $bgColor = imagecolorallocate($errImg,0,0,0);
365
  $fgColor1 = imagecolorallocate($errImg,255,255,255);
366
  $fgColor2 = imagecolorallocate($errImg,255,0,0);
@@ -381,11 +381,11 @@ class flag_Thumbnail {
381
  $this->newWidth = $Width;
382
  $this->newHeight = $Height;
383
 
384
- if(function_exists("ImageCreateTrueColor")) {
385
- $this->workingImage = ImageCreateTrueColor($this->newWidth,$this->newHeight);
386
  }
387
  else {
388
- $this->workingImage = ImageCreate($this->newWidth,$this->newHeight);
389
  }
390
 
391
  // ImageCopyResampled(
@@ -422,11 +422,11 @@ class flag_Thumbnail {
422
 
423
  $this->calcImageSize($this->currentDimensions['width'],$this->currentDimensions['height']);
424
 
425
- if(function_exists("ImageCreateTrueColor")) {
426
- $this->workingImage = ImageCreateTrueColor($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
427
  }
428
  else {
429
- $this->workingImage = ImageCreate($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
430
  }
431
 
432
  // ImageCopyResampled(
@@ -459,11 +459,11 @@ class flag_Thumbnail {
459
 
460
  $this->calcImageSizePercent($this->currentDimensions['width'],$this->currentDimensions['height']);
461
 
462
- if(function_exists("ImageCreateTrueColor")) {
463
- $this->workingImage = ImageCreateTrueColor($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
464
  }
465
  else {
466
- $this->workingImage = ImageCreate($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
467
  }
468
 
469
  $this->ImageCopyResampled(
@@ -497,11 +497,11 @@ class flag_Thumbnail {
497
  $cropX = intval(($this->currentDimensions['width'] - $cropSize) / 2);
498
  $cropY = intval(($this->currentDimensions['height'] - $cropSize) / 2);
499
 
500
- if(function_exists("ImageCreateTrueColor")) {
501
- $this->workingImage = ImageCreateTrueColor($cropSize,$cropSize);
502
  }
503
  else {
504
- $this->workingImage = ImageCreate($cropSize,$cropSize);
505
  }
506
 
507
  $this->imagecopyresampled(
@@ -541,11 +541,11 @@ class flag_Thumbnail {
541
  if($startX < 0) $startX = 0;
542
  if($startY < 0) $startY = 0;
543
 
544
- if(function_exists("ImageCreateTrueColor")) {
545
- $this->workingImage = ImageCreateTrueColor($width,$height);
546
  }
547
  else {
548
- $this->workingImage = ImageCreate($width,$height);
549
  }
550
 
551
  $this->imagecopyresampled(
@@ -574,35 +574,35 @@ class flag_Thumbnail {
574
  * @param string $name
575
  */
576
  function show($quality=100,$name = '') {
577
- switch($this->format) {
578
- case 'GIF':
579
- if($name != '') {
580
- @ImageGif($this->newImage,$name) or $this->error = true;
581
- }
582
- else {
583
- header('Content-type: image/gif');
584
- ImageGif($this->newImage);
585
- }
586
- break;
587
- case 'JPG':
588
- if($name != '') {
589
- @ImageJpeg($this->newImage,$name,$quality) or $this->error = true;
590
- }
591
- else {
592
- header('Content-type: image/jpeg');
593
- ImageJpeg($this->newImage,'',$quality);
594
- }
595
- break;
596
- case 'PNG':
597
- if($name != '') {
598
- @ImagePng($this->newImage,$name) or $this->error = true;
599
- }
600
- else {
601
- header('Content-type: image/png');
602
- ImagePng($this->newImage);
603
- }
604
- break;
605
- }
606
  }
607
 
608
  /**
@@ -642,12 +642,12 @@ class flag_Thumbnail {
642
  $newHeight = $height + $reflectionHeight;
643
  $reflectedPart = $height * ($percent / 100);
644
 
645
- $this->workingImage = ImageCreateTrueColor($width,$newHeight);
646
 
647
- ImageAlphaBlending($this->workingImage,true);
648
 
649
- $colorToPaint = ImageColorAllocateAlpha($this->workingImage,255,255,255,0);
650
- ImageFilledRectangle($this->workingImage,0,0,$width,$newHeight,$colorToPaint);
651
 
652
  imagecopyresampled(
653
  $this->workingImage,
149
  }
150
 
151
  // increase memory-limit if possible, GD needs this for large images
152
+ //@ini_set('memory_limit', '256M');
153
 
154
  if($this->error == false) {
155
  // Check memory consumption if file exists
161
 
162
  switch($this->format) {
163
  case 'GIF':
164
+ $this->oldImage = imagecreatefromgif($this->fileName);
165
  break;
166
  case 'JPG':
167
+ $this->oldImage = imagecreatefromjpeg($this->fileName);
168
  break;
169
  case 'PNG':
170
+ $this->oldImage = imagecreatefrompng($this->fileName);
171
  break;
172
  }
173
  if (!$this->oldImage) {
174
  $this->errmsg = 'Create Image failed. Check memory limit';
175
  $this->error = true;
176
  } else {
177
+ $size = getimagesize($this->fileName);
178
  $this->currentDimensions = array('width'=>$size[0],'height'=>$size[1]);
179
  $this->newImage = $this->oldImage;
180
  }
247
  *
248
  */
249
  function destruct() {
250
+ if(is_resource($this->newImage)) @imagedestroy($this->newImage);
251
+ if(is_resource($this->oldImage)) @imagedestroy($this->oldImage);
252
+ if(is_resource($this->workingImage)) @imagedestroy($this->workingImage);
253
  }
254
 
255
  /**
360
  */
361
  function showErrorImage() {
362
  header('Content-type: image/png');
363
+ $errImg = imagecreate(620,25);
364
  $bgColor = imagecolorallocate($errImg,0,0,0);
365
  $fgColor1 = imagecolorallocate($errImg,255,255,255);
366
  $fgColor2 = imagecolorallocate($errImg,255,0,0);
381
  $this->newWidth = $Width;
382
  $this->newHeight = $Height;
383
 
384
+ if(function_exists("imagecreatetruecolor")) {
385
+ $this->workingImage = imagecreatetruecolor($this->newWidth,$this->newHeight);
386
  }
387
  else {
388
+ $this->workingImage = imagecreate($this->newWidth,$this->newHeight);
389
  }
390
 
391
  // ImageCopyResampled(
422
 
423
  $this->calcImageSize($this->currentDimensions['width'],$this->currentDimensions['height']);
424
 
425
+ if(function_exists("imagecreatetruecolor")) {
426
+ $this->workingImage = imagecreatetruecolor($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
427
  }
428
  else {
429
+ $this->workingImage = imagecreate($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
430
  }
431
 
432
  // ImageCopyResampled(
459
 
460
  $this->calcImageSizePercent($this->currentDimensions['width'],$this->currentDimensions['height']);
461
 
462
+ if(function_exists("imagecreatetruecolor")) {
463
+ $this->workingImage = imagecreatetruecolor($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
464
  }
465
  else {
466
+ $this->workingImage = imagecreate($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
467
  }
468
 
469
  $this->ImageCopyResampled(
497
  $cropX = intval(($this->currentDimensions['width'] - $cropSize) / 2);
498
  $cropY = intval(($this->currentDimensions['height'] - $cropSize) / 2);
499
 
500
+ if(function_exists("imagecreatetruecolor")) {
501
+ $this->workingImage = imagecreatetruecolor($cropSize,$cropSize);
502
  }
503
  else {
504
+ $this->workingImage = imagecreate($cropSize,$cropSize);
505
  }
506
 
507
  $this->imagecopyresampled(
541
  if($startX < 0) $startX = 0;
542
  if($startY < 0) $startY = 0;
543
 
544
+ if(function_exists("imagecreatetruecolor")) {
545
+ $this->workingImage = imagecreatetruecolor($width,$height);
546
  }
547
  else {
548
+ $this->workingImage = imagecreate($width,$height);
549
  }
550
 
551
  $this->imagecopyresampled(
574
  * @param string $name
575
  */
576
  function show($quality=100,$name = '') {
577
+ switch($this->format) {
578
+ case 'GIF':
579
+ if($name != '') {
580
+ imagegif($this->newImage,$name) or $this->error = true;
581
+ }
582
+ else {
583
+ header('Content-type: image/gif');
584
+ imagegif($this->newImage);
585
+ }
586
+ break;
587
+ case 'JPG':
588
+ if($name != '') {
589
+ imagejpeg($this->newImage,$name,$quality) or $this->error = true;
590
+ }
591
+ else {
592
+ header('Content-type: image/jpeg');
593
+ imagejpeg($this->newImage, null, $quality);
594
+ }
595
+ break;
596
+ case 'PNG':
597
+ if($name != '') {
598
+ imagepng($this->newImage,$name) or $this->error = true;
599
+ }
600
+ else {
601
+ header('Content-type: image/png');
602
+ imagepng($this->newImage);
603
+ }
604
+ break;
605
+ }
606
  }
607
 
608
  /**
642
  $newHeight = $height + $reflectionHeight;
643
  $reflectedPart = $height * ($percent / 100);
644
 
645
+ $this->workingImage = imagecreatetruecolor($width,$newHeight);
646
 
647
+ imagealphablending($this->workingImage,true);
648
 
649
+ $colorToPaint = imagecolorallocatealpha($this->workingImage,255,255,255,0);
650
+ imagefilledrectangle($this->workingImage,0,0,$width,$newHeight,$colorToPaint);
651
 
652
  imagecopyresampled(
653
  $this->workingImage,
lib/shortcodes.php CHANGED
@@ -4,28 +4,31 @@
4
  * @Docs http://codex.wordpress.org/Shortcode_API
5
  */
6
 
7
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
 
 
8
 
9
  class FlAG_shortcodes {
10
  var $flag_shortcode;
11
  var $flag_add_script;
12
  var $flag_fancybox;
13
  var $flag_add_mousewheel;
 
14
  // register the new shortcodes
15
  function FlAG_shortcodes() {
16
-
17
  // do_shortcode on the_excerpt could causes several unwanted output. Uncomment it on your own risk
18
  // add_filter('the_excerpt', array(&$this, 'convert_shortcode'));
19
  // add_filter('the_excerpt', 'do_shortcode', 11);
20
 
21
- add_shortcode( 'flagallery', array(&$this, 'show_flashalbum' ) );
22
- add_shortcode( 'grandmp3', array(&$this, 'grandmp3' ) );
23
- add_shortcode( 'grandmusic', array(&$this, 'grandmusic' ) );
24
- add_shortcode( 'grandflv', array(&$this, 'grandflv' ) );
25
- add_shortcode( 'grandvideo', array(&$this, 'grandvideo' ) );
26
- add_shortcode( 'grandbanner', array(&$this, 'grandbanner' ) );
27
- add_shortcode( 'grandbannerwidget', array(&$this, 'grandbannerwidget' ) );
28
- add_action('wp_footer', array(&$this, 'add_script'));
29
  add_action( 'flag_footer_scripts', array( &$this, 'add_script' ) );
30
 
31
  }
@@ -33,101 +36,122 @@ class FlAG_shortcodes {
33
  function show_flashalbum( $atts ) {
34
  global $wpdb, $flagdb;
35
 
36
- extract(shortcode_atts(array(
37
- 'gid' => '',
38
- 'album' => '',
39
- 'name' => '',
40
- 'w' => '',
41
- 'h' => '',
42
- 'orderby' => '',
43
- 'order' => '',
44
- 'exclude' => '',
45
- 'skin' => '',
46
- 'playlist' => '',
47
- 'wmode' => '',
48
- 'fullwindow'=> false,
49
- 'align' => ''
50
- ), $atts ));
51
-
52
  $out = '';
53
  // make an array out of the ids
54
- $draft_clause = (get_option( 'flag_db_version' ) < 2.75) ? '' : 'AND status=0';
55
- if($album) {
56
- $gallerylist = $flagdb->get_album($album);
57
- $ids = explode( ',', $gallerylist );
58
- $galleryIDs = array();
59
- foreach ($ids as $id) {
60
- $galleryIDs[] = $wpdb->get_var($wpdb->prepare("SELECT gid FROM {$wpdb->flaggallery} WHERE gid = %d $draft_clause", $id));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  }
62
- $galleryIDs = array_filter($galleryIDs);
63
- if(empty($galleryIDs))
64
- return $out = sprintf(__('[Gallery %s not found]','flag'),$gallerylist);
65
-
66
- $gids = implode('_',$galleryIDs);
67
- $out = flagShowFlashAlbum($gids, $name, $w, $h, $skin, $playlist, $wmode, false, $fullwindow, $align);
68
-
69
- } elseif($gid == "all") {
70
- $flag_options = get_option('flag_options');
71
- if(empty($orderby)){ $orderby = $flag_options['albSort']; }
72
- if(empty($order)){ $order = $flag_options['albSortDir']; }
73
-
74
- if(!in_array($orderby, array('title','rand'))) $orderby='gid';
75
- if(!$order) $order='DESC';
76
- $gallerylist = $flagdb->find_all_galleries($orderby, $order);
77
- if(is_array($gallerylist)) {
78
- $excludelist = explode(',',$exclude);
79
- $gids = '';
80
- foreach($gallerylist as $gallery) {
81
- if (in_array($gallery->gid, $excludelist))
82
  continue;
83
- $gids.='_'.$gallery->gid;
 
84
  }
85
- $gids = ltrim($gids,'_');
86
- $out = flagShowFlashAlbum($gids, $name, $w, $h, $skin, $playlist, $wmode, false, $fullwindow, $align);
87
  } else {
88
- $out = __('[Galleries not found]','flag');
89
  }
90
  } else {
91
  $ids = explode( ',', $gid );
92
 
93
  $galleryIDs = array();
94
- foreach ($ids as $id) {
95
- $id = intval($id);
96
- $galleryIDs[] = $wpdb->get_var($wpdb->prepare("SELECT gid FROM {$wpdb->flaggallery} WHERE gid = %d $draft_clause", $id));
97
- }
98
- $galleryIDs = array_filter($galleryIDs);
99
- if(empty($galleryIDs)){
100
- $out = sprintf(__('[Galleries %s not found]','flag'),$gid);
 
101
  return $out;
102
  }
103
 
104
- $gids = implode('_',$galleryIDs);
105
- $out = flagShowFlashAlbum($gids, $name, $w, $h, $skin, $playlist, $wmode, false, $fullwindow, $align);
106
- }
107
-
108
- $flag_options = get_option('flag_options');
109
- if($skin == '') $skin = $flag_options['flashSkin'];
110
- $skinpath = trailingslashit( $flag_options['skinsDirABS'] ).$skin;
111
- if(!is_dir($skinpath)) {
112
- $skin = 'minima_jn';
113
- $skinpath = trailingslashit( $flag_options['skinsDirABS'] ).$skin;
114
- }
115
- $this->flag_shortcode = true;
 
 
116
  $this->flag_add_script = true;
117
- if(in_array($skin, array('slider_gallery', 'slider_gallery_demo', 'slider', 'slider_demo')) || !$flag_options['jAlterGalScript'] ){
 
 
 
 
 
 
118
  $this->flag_fancybox = true;
119
  } else {
120
  $this->flag_fancybox = false;
121
  }
122
  $swfmousewheel = false;
123
- if(file_exists($skinpath . "/settings/settings.xml")) {
124
- $data = file_get_contents($skinpath . "/settings/settings.xml");
125
- $swfmousewheel = flagGetBetween($data,'<swfmousewheel>','</swfmousewheel>');
 
 
 
126
  }
127
- if($swfmousewheel == 'true') $this->flag_add_mousewheel = true;
128
 
129
- if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
130
- do_action('flag_footer_scripts');
131
  }
132
 
133
  return $out;
@@ -135,148 +159,168 @@ class FlAG_shortcodes {
135
 
136
  function add_script() {
137
  if ( $this->flag_shortcode ) {
138
- wp_print_scripts('flagscroll');
139
  }
140
  if ( $this->flag_fancybox ) {
141
- wp_print_styles('fancybox');
142
- wp_print_scripts('fancybox');
 
 
 
 
 
 
 
 
143
  }
144
  if ( $this->flag_add_script ) {
145
- wp_print_scripts('flagscript');
146
- wp_print_styles('flagallery');
147
  }
148
  if ( $this->flag_add_mousewheel ) {
149
- wp_print_scripts('swfmousewheel');
150
  }
151
  }
152
 
153
  function grandmusic( $atts ) {
154
 
155
- extract(shortcode_atts(array(
156
- 'playlist' => '',
157
- 'w' => '',
158
- 'h' => '',
159
- 'skin' => '',
160
- 'is_widget' => 0
161
- ), $atts ));
162
- $out = sprintf(__('[Playlist %s not found]','flag'),$playlist);
163
- if($playlist) {
164
- $flag_options = get_option('flag_options');
165
- if(!file_exists(ABSPATH.$flag_options['galleryPath'].'playlists/'.$playlist.'.xml')) {
166
  return $out;
167
  }
168
- $this->flag_shortcode = true;
169
  $this->flag_add_mousewheel = true;
170
- $out = flagShowMPlayer($playlist, $w, $h, $wmode='', $skin, $is_widget);
171
  }
172
- return $out;
 
173
  }
174
 
175
  function grandmp3( $atts ) {
176
  global $wpdb;
177
- extract(shortcode_atts(array(
178
- 'id' => '',
179
- 'autoplay' => 'false'
180
- ), $atts ));
181
- $out = '';
182
- $flag_options = get_option('flag_options');
183
- if($id) {
184
- $url = wp_get_attachment_url($id);
185
- $url = str_replace(array('.mp3'), array(''), $url);
186
- if( ! flagGallery::getUserNow($_SERVER['HTTP_USER_AGENT']) ){
187
- $out = '<script type="text/javascript">swfobject.embedSWF("'.plugins_url('/lib/mini.swf', dirname(__FILE__)).'", "c-'.$id.'", "250", "20", "10.1.52", "expressInstall.swf", {path:"'.$url.'",bgcolor:"'.$flag_options["mpBG"].'",color1:"'.$flag_options["mpColor1"].'",color2:"'.$flag_options["mpColor2"].'",autoplay:"'.$autoplay.'"}, {wmode:"transparent"}, {id:"f-'.$id.'",name:"f-'.$id.'"});</script>';
188
  }
189
- $out .= '<div id="c-'.$id.'" class="grandmp3"><audio src="'.$url.'.mp3" controls preload="none" autobuffer="false"></audio></div>';
190
  }
191
- return $out;
 
192
  }
193
 
194
  function grandvideo( $atts ) {
195
 
196
- extract(shortcode_atts(array(
197
- 'playlist' => '',
198
- 'w' => '',
199
- 'h' => ''
200
- ), $atts ));
201
- $out = sprintf(__('[Playlist %s not found]','flag'),$playlist);
202
- if($playlist) {
203
- $flag_options = get_option('flag_options');
204
- if(!file_exists(ABSPATH.$flag_options['galleryPath'].'playlists/video/'.$playlist.'.xml')) {
205
  return $out;
206
  }
207
- $data = file_get_contents(ABSPATH.$flag_options['galleryPath'].'playlists/video/'.$playlist.'.xml');
208
  $swfmousewheel = false;
209
- $swfmousewheel = flagGetBetween($data,'<swfmousewheel>','</swfmousewheel>');
210
- if($swfmousewheel == 'true') $this->flag_add_mousewheel = true;
 
 
211
  $this->flag_shortcode = true;
212
- $out = flagShowVPlayer($playlist, $w, $h);
213
-
214
  }
215
- return $out;
 
216
  }
217
 
218
  function grandflv( $atts ) {
219
  global $wpdb;
220
- extract(shortcode_atts(array(
221
- 'id' => '',
222
- 'w' => '',
223
- 'h' => '',
224
- 'autoplay' => ''
225
- ), $atts ));
226
  $out = '';
227
- if($id) {
228
  $this->flag_shortcode = true;
229
- $out = flagShowVmPlayer($id, $w, $h, $autoplay);
230
  }
231
- return $out;
 
232
  }
233
-
234
  function grandbanner( $atts ) {
235
 
236
- extract(shortcode_atts(array(
237
- 'xml' => '',
238
- 'w' => '',
239
- 'h' => ''
240
- ), $atts ));
241
- $out = sprintf(__('[XML %s not found]','flag'),$xml);
242
- if($xml) {
243
- $flag_options = get_option('flag_options');
244
- if(!file_exists(ABSPATH.$flag_options['galleryPath'].'playlists/banner/'.$xml.'.xml')) {
245
  return $out;
246
  }
247
- $data = file_get_contents(ABSPATH.$flag_options['galleryPath'].'playlists/banner/'.$xml.'.xml');
248
  $swfmousewheel = false;
249
- $swfmousewheel = flagGetBetween($data,'<swfmousewheel>','</swfmousewheel>');
250
- if($swfmousewheel == 'true') $this->flag_add_mousewheel = true;
 
 
251
  $this->flag_shortcode = true;
252
- $out = flagShowBanner($xml, $w, $h);
253
  }
254
- return $out;
 
255
  }
256
 
257
  function grandbannerwidget( $atts ) {
258
 
259
- extract(shortcode_atts(array(
260
- 'xml' => '',
261
- 'w' => '',
262
- 'h' => '',
263
- 'skin' => ''
264
- ), $atts ));
265
- $out = sprintf(__('[XML %s not found]','flag'),$xml);
266
- if($xml && $skin) {
267
- $flag_options = get_option('flag_options');
268
- $skinpath = trailingslashit( $flag_options['skinsDirABS'] ).$skin;
269
- if(!file_exists($skinpath)) {
270
  return $out;
271
  }
272
- $data = @file_get_contents($skinpath);
273
  $swfmousewheel = false;
274
- $swfmousewheel = flagGetBetween($data,'<swfmousewheel>','</swfmousewheel>');
275
- if($swfmousewheel == 'true') $this->flag_add_mousewheel = true;
 
 
276
  $this->flag_shortcode = true;
277
- $out = flagShowWidgetBanner($xml, $w, $h, $skin);
278
  }
279
- return $out;
 
280
  }
281
 
282
  }
4
  * @Docs http://codex.wordpress.org/Shortcode_API
5
  */
6
 
7
+ if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
8
+ die( 'You are not allowed to call this page directly.' );
9
+ }
10
 
11
  class FlAG_shortcodes {
12
  var $flag_shortcode;
13
  var $flag_add_script;
14
  var $flag_fancybox;
15
  var $flag_add_mousewheel;
16
+
17
  // register the new shortcodes
18
  function FlAG_shortcodes() {
19
+
20
  // do_shortcode on the_excerpt could causes several unwanted output. Uncomment it on your own risk
21
  // add_filter('the_excerpt', array(&$this, 'convert_shortcode'));
22
  // add_filter('the_excerpt', 'do_shortcode', 11);
23
 
24
+ add_shortcode( 'flagallery', array( &$this, 'show_flashalbum' ) );
25
+ add_shortcode( 'grandmp3', array( &$this, 'grandmp3' ) );
26
+ add_shortcode( 'grandmusic', array( &$this, 'grandmusic' ) );
27
+ add_shortcode( 'grandflv', array( &$this, 'grandflv' ) );
28
+ add_shortcode( 'grandvideo', array( &$this, 'grandvideo' ) );
29
+ add_shortcode( 'grandbanner', array( &$this, 'grandbanner' ) );
30
+ add_shortcode( 'grandbannerwidget', array( &$this, 'grandbannerwidget' ) );
31
+ add_action( 'wp_footer', array( &$this, 'add_script' ) );
32
  add_action( 'flag_footer_scripts', array( &$this, 'add_script' ) );
33
 
34
  }
36
  function show_flashalbum( $atts ) {
37
  global $wpdb, $flagdb;
38
 
39
+ extract( shortcode_atts( array(
40
+ 'gid' => '',
41
+ 'album' => '',
42
+ 'name' => '',
43
+ 'w' => '',
44
+ 'h' => '',
45
+ 'orderby' => '',
46
+ 'order' => '',
47
+ 'exclude' => '',
48
+ 'skin' => '',
49
+ 'playlist' => '',
50
+ 'wmode' => '',
51
+ 'fullwindow' => false,
52
+ 'align' => ''
53
+ ), $atts ) );
54
+
55
  $out = '';
56
  // make an array out of the ids
57
+ $draft_clause = ( get_option( 'flag_db_version' ) < 2.75 ) ? '' : 'AND status=0';
58
+ if ( $album ) {
59
+ $gallerylist = $flagdb->get_album( $album );
60
+ $ids = explode( ',', $gallerylist );
61
+ $galleryIDs = array();
62
+ foreach ( $ids as $id ) {
63
+ $galleryIDs[] = $wpdb->get_var( $wpdb->prepare( "SELECT gid FROM {$wpdb->flaggallery} WHERE gid = %d $draft_clause", $id ) );
64
+ }
65
+ $galleryIDs = array_filter( $galleryIDs );
66
+ if ( empty( $galleryIDs ) ) {
67
+ return $out = sprintf( __( '[Gallery %s not found]', 'flag' ), $gallerylist );
68
+ }
69
+
70
+ $gids = implode( '_', $galleryIDs );
71
+ $out = flagShowFlashAlbum( $gids, $name, $w, $h, $skin, $playlist, $wmode, false, $fullwindow, $align );
72
+
73
+ } elseif ( $gid == "all" ) {
74
+ $flag_options = get_option( 'flag_options' );
75
+ if ( empty( $orderby ) ) {
76
+ $orderby = $flag_options['albSort'];
77
+ }
78
+ if ( empty( $order ) ) {
79
+ $order = $flag_options['albSortDir'];
80
+ }
81
+
82
+ if ( ! in_array( $orderby, array( 'title', 'rand' ) ) ) {
83
+ $orderby = 'gid';
84
+ }
85
+ if ( ! $order ) {
86
+ $order = 'DESC';
87
  }
88
+ $gallerylist = $flagdb->find_all_galleries( $orderby, $order );
89
+ if ( is_array( $gallerylist ) ) {
90
+ $excludelist = explode( ',', $exclude );
91
+ $gids = '';
92
+ foreach ( $gallerylist as $gallery ) {
93
+ if ( in_array( $gallery->gid, $excludelist ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  continue;
95
+ }
96
+ $gids .= '_' . $gallery->gid;
97
  }
98
+ $gids = ltrim( $gids, '_' );
99
+ $out = flagShowFlashAlbum( $gids, $name, $w, $h, $skin, $playlist, $wmode, false, $fullwindow, $align );
100
  } else {
101
+ $out = __( '[Galleries not found]', 'flag' );
102
  }
103
  } else {
104
  $ids = explode( ',', $gid );
105
 
106
  $galleryIDs = array();
107
+ foreach ( $ids as $id ) {
108
+ $id = intval( $id );
109
+ $galleryIDs[] = $wpdb->get_var( $wpdb->prepare( "SELECT gid FROM {$wpdb->flaggallery} WHERE gid = %d $draft_clause", $id ) );
110
+ }
111
+ $galleryIDs = array_filter( $galleryIDs );
112
+ if ( empty( $galleryIDs ) ) {
113
+ $out = sprintf( __( '[Galleries %s not found]', 'flag' ), $gid );
114
+
115
  return $out;
116
  }
117
 
118
+ $gids = implode( '_', $galleryIDs );
119
+ $out = flagShowFlashAlbum( $gids, $name, $w, $h, $skin, $playlist, $wmode, false, $fullwindow, $align );
120
+ }
121
+
122
+ $flag_options = get_option( 'flag_options' );
123
+ if ( $skin == '' ) {
124
+ $skin = $flag_options['flashSkin'];
125
+ }
126
+ $skinpath = trailingslashit( $flag_options['skinsDirABS'] ) . $skin;
127
+ if ( ! is_dir( $skinpath ) ) {
128
+ $skin = 'minima_jn';
129
+ $skinpath = trailingslashit( $flag_options['skinsDirABS'] ) . $skin;
130
+ }
131
+ $this->flag_shortcode = true;
132
  $this->flag_add_script = true;
133
+ if ( in_array( $skin, array(
134
+ 'slider_gallery',
135
+ 'slider_gallery_demo',
136
+ 'slider',
137
+ 'slider_demo'
138
+ ) ) || ! $flag_options['jAlterGalScript']
139
+ ) {
140
  $this->flag_fancybox = true;
141
  } else {
142
  $this->flag_fancybox = false;
143
  }
144
  $swfmousewheel = false;
145
+ if ( file_exists( $skinpath . "/settings/settings.xml" ) ) {
146
+ $data = file_get_contents( $skinpath . "/settings/settings.xml" );
147
+ $swfmousewheel = flagGetBetween( $data, '<swfmousewheel>', '</swfmousewheel>' );
148
+ }
149
+ if ( $swfmousewheel == 'true' ) {
150
+ $this->flag_add_mousewheel = true;
151
  }
 
152
 
153
+ if ( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && strtolower( $_SERVER['HTTP_X_REQUESTED_WITH'] ) == 'xmlhttprequest' ) {
154
+ do_action( 'flag_footer_scripts' );
155
  }
156
 
157
  return $out;
159
 
160
  function add_script() {
161
  if ( $this->flag_shortcode ) {
162
+ wp_print_scripts( 'flagscroll' );
163
  }
164
  if ( $this->flag_fancybox ) {
165
+ if ( wp_style_is( 'fancybox', 'registered' ) ) {
166
+ wp_print_styles( 'fancybox' );
167
+ } else {
168
+ wp_print_styles( 'fancybox-1.3.4' );
169
+ }
170
+ if ( wp_script_is( 'fancybox', 'registered' ) ) {
171
+ wp_print_scripts( 'fancybox' );
172
+ } else {
173
+ wp_print_scripts( 'fancybox-1.3.4' );
174
+ }
175
  }
176
  if ( $this->flag_add_script ) {
177
+ wp_print_scripts( 'flagscript' );
178
+ wp_print_styles( 'flagallery' );
179
  }
180
  if ( $this->flag_add_mousewheel ) {
181
+ wp_print_scripts( 'swfmousewheel' );
182
  }
183
  }
184
 
185
  function grandmusic( $atts ) {
186
 
187
+ extract( shortcode_atts( array(
188
+ 'playlist' => '',
189
+ 'w' => '',
190
+ 'h' => '',
191
+ 'skin' => '',
192
+ 'is_widget' => 0
193
+ ), $atts ) );
194
+ $out = sprintf( __( '[Playlist %s not found]', 'flag' ), $playlist );
195
+ if ( $playlist ) {
196
+ $flag_options = get_option( 'flag_options' );
197
+ if ( ! file_exists( ABSPATH . $flag_options['galleryPath'] . 'playlists/' . $playlist . '.xml' ) ) {
198
  return $out;
199
  }
200
+ $this->flag_shortcode = true;
201
  $this->flag_add_mousewheel = true;
202
+ $out = flagShowMPlayer( $playlist, $w, $h, $wmode = '', $skin, $is_widget );
203
  }
204
+
205
+ return $out;
206
  }
207
 
208
  function grandmp3( $atts ) {
209
  global $wpdb;
210
+ extract( shortcode_atts( array(
211
+ 'id' => '',
212
+ 'autoplay' => 'false'
213
+ ), $atts ) );
214
+ $out = '';
215
+ $flag_options = get_option( 'flag_options' );
216
+ if ( $id ) {
217
+ $url = wp_get_attachment_url( $id );
218
+ $url = str_replace( array( '.mp3' ), array( '' ), $url );
219
+ if ( ! flagGallery::getUserNow( $_SERVER['HTTP_USER_AGENT'] ) ) {
220
+ $out = '<script type="text/javascript">swfobject.embedSWF("' . plugins_url( '/lib/mini.swf', dirname( __FILE__ ) ) . '", "c-' . $id . '", "250", "20", "10.1.52", "expressInstall.swf", {path:"' . $url . '",bgcolor:"' . $flag_options["mpBG"] . '",color1:"' . $flag_options["mpColor1"] . '",color2:"' . $flag_options["mpColor2"] . '",autoplay:"' . $autoplay . '"}, {wmode:"transparent"}, {id:"f-' . $id . '",name:"f-' . $id . '"});</script>';
221
  }
222
+ $out .= '<div id="c-' . $id . '" class="grandmp3"><audio src="' . $url . '.mp3" controls preload="none" autobuffer="false"></audio></div>';
223
  }
224
+
225
+ return $out;
226
  }
227
 
228
  function grandvideo( $atts ) {
229
 
230
+ extract( shortcode_atts( array(
231
+ 'playlist' => '',
232
+ 'w' => '',
233
+ 'h' => ''
234
+ ), $atts ) );
235
+ $out = sprintf( __( '[Playlist %s not found]', 'flag' ), $playlist );
236
+ if ( $playlist ) {
237
+ $flag_options = get_option( 'flag_options' );
238
+ if ( ! file_exists( ABSPATH . $flag_options['galleryPath'] . 'playlists/video/' . $playlist . '.xml' ) ) {
239
  return $out;
240
  }
241
+ $data = file_get_contents( ABSPATH . $flag_options['galleryPath'] . 'playlists/video/' . $playlist . '.xml' );
242
  $swfmousewheel = false;
243
+ $swfmousewheel = flagGetBetween( $data, '<swfmousewheel>', '</swfmousewheel>' );
244
+ if ( $swfmousewheel == 'true' ) {
245
+ $this->flag_add_mousewheel = true;
246
+ }
247
  $this->flag_shortcode = true;
248
+ $out = flagShowVPlayer( $playlist, $w, $h );
249
+
250
  }
251
+
252
+ return $out;
253
  }
254
 
255
  function grandflv( $atts ) {
256
  global $wpdb;
257
+ extract( shortcode_atts( array(
258
+ 'id' => '',
259
+ 'w' => '',
260
+ 'h' => '',
261
+ 'autoplay' => ''
262
+ ), $atts ) );
263
  $out = '';
264
+ if ( $id ) {
265
  $this->flag_shortcode = true;
266
+ $out = flagShowVmPlayer( $id, $w, $h, $autoplay );
267
  }
268
+
269
+ return $out;
270
  }
271
+
272
  function grandbanner( $atts ) {
273
 
274
+ extract( shortcode_atts( array(
275
+ 'xml' => '',
276
+ 'w' => '',
277
+ 'h' => ''
278
+ ), $atts ) );
279
+ $out = sprintf( __( '[XML %s not found]', 'flag' ), $xml );
280
+ if ( $xml ) {
281
+ $flag_options = get_option( 'flag_options' );
282
+ if ( ! file_exists( ABSPATH . $flag_options['galleryPath'] . 'playlists/banner/' . $xml . '.xml' ) ) {
283
  return $out;
284
  }
285
+ $data = file_get_contents( ABSPATH . $flag_options['galleryPath'] . 'playlists/banner/' . $xml . '.xml' );
286
  $swfmousewheel = false;
287
+ $swfmousewheel = flagGetBetween( $data, '<swfmousewheel>', '</swfmousewheel>' );
288
+ if ( $swfmousewheel == 'true' ) {
289
+ $this->flag_add_mousewheel = true;
290
+ }
291
  $this->flag_shortcode = true;
292
+ $out = flagShowBanner( $xml, $w, $h );
293
  }
294
+
295
+ return $out;
296
  }
297
 
298
  function grandbannerwidget( $atts ) {
299
 
300
+ extract( shortcode_atts( array(
301
+ 'xml' => '',
302
+ 'w' => '',
303
+ 'h' => '',
304
+ 'skin' => ''
305
+ ), $atts ) );
306
+ $out = sprintf( __( '[XML %s not found]', 'flag' ), $xml );
307
+ if ( $xml && $skin ) {
308
+ $flag_options = get_option( 'flag_options' );
309
+ $skinpath = trailingslashit( $flag_options['skinsDirABS'] ) . $skin;
310
+ if ( ! file_exists( $skinpath ) ) {
311
  return $out;
312
  }
313
+ $data = @file_get_contents( $skinpath );
314
  $swfmousewheel = false;
315
+ $swfmousewheel = flagGetBetween( $data, '<swfmousewheel>', '</swfmousewheel>' );
316
+ if ( $swfmousewheel == 'true' ) {
317
+ $this->flag_add_mousewheel = true;
318
+ }
319
  $this->flag_shortcode = true;
320
+ $out = flagShowWidgetBanner( $xml, $w, $h, $skin );
321
  }
322
+
323
+ return $out;
324
  }
325
 
326
  }
lib/swfobject.php CHANGED
@@ -161,7 +161,7 @@ function flagShowFlashAlbum($galleryID, $name='Gallery', $width='', $height='',
161
  $out .= $swfobject->javascript();
162
  }
163
  $out .= 'jQuery(function() { var fv = swfobject.getFlashPlayerVersion();';
164
- $out .= 'if(fv.major<10 || (navigator.userAgent.toLowerCase().indexOf("android") > -1)) { new FlAGClass(ExtendVar, "'.$skinID.'", false, false); }';
165
  $out .= '});';
166
  $out .= '/* ]]> */</script>';
167
 
161
  $out .= $swfobject->javascript();
162
  }
163
  $out .= 'jQuery(function() { var fv = swfobject.getFlashPlayerVersion();';
164
+ $out .= 'if(fv.major < 10 || (navigator.userAgent.toLowerCase().indexOf("android") > -1)) { new FlAGClass(ExtendVar, "'.$skinID.'", false, false); }';
165
  $out .= '});';
166
  $out .= '/* ]]> */</script>';
167
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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, photo gallery, slider, plugin, slideshow, video, widget, iphone gallery, best gallery, portfolio, banner rotator
5
  Requires at least: 3.0
6
- Tested up to: 3.9.1
7
  Stable tag: trunk
8
 
9
  Photo Gallery, Video Gallery, Music Album & Banner Rotator plugin with powerfull admin to manage your image galleries and media content
@@ -50,6 +50,33 @@ Now you can see "Views" of each photo in the gallery and visitors can "Like" ima
50
 
51
  == Changelog ==
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  = v4.15 - 13.05.2014 =
54
  * Added support for themes with Ajax page loading
55
 
3
  Donate link: http://photogallerycreator.com/grand-flagallery/
4
  Tags: admin, flash, fullscreen gallery, gallery, image, images, image gallery, mp3, music, page, photo, photo gallery, slider, plugin, slideshow, video, widget, iphone gallery, best gallery, portfolio, banner rotator
5
  Requires at least: 3.0
6
+ Tested up to: 4.0.0
7
  Stable tag: trunk
8
 
9
  Photo Gallery, Video Gallery, Music Album & Banner Rotator plugin with powerfull admin to manage your image galleries and media content
50
 
51
  == Changelog ==
52
 
53
+ = v4.23 - 9.09.2014 =
54
+ * Wordpress 4.0 compatibility
55
+
56
+ = v4.22 - 27.08.2014 =
57
+ * Now you can add Google Analytics Tracking Code for GRAND Pages in Flagallery Options
58
+
59
+ = v4.21 - 07.08.2014 =
60
+ * Fix for Widget
61
+
62
+ = v4.20 - 24.07.2014 =
63
+ * Added Flagallery Iframe page
64
+
65
+ = v4.19 - 24.07.2014 =
66
+ * Fixes and improvements
67
+
68
+ = v4.18 - 16.06.2014 =
69
+ * Replaced deprecated wordpress function
70
+ * Fix error on Skins page when no cURL installed on server
71
+
72
+ = v4.17 - 23.05.2014 =
73
+ * Fix conflict with Gmedia Gallery
74
+ * Fix js error 'swfobject undefined'
75
+
76
+ = v4.16 - 13.05.2014 =
77
+ * Slider skin small fix
78
+ * Remove Facebook page due to changed Facebook API
79
+
80
  = v4.15 - 13.05.2014 =
81
  * Added support for themes with Ajax page loading
82
 
widgets/widgets.php CHANGED
@@ -62,9 +62,8 @@ class flagSlideshowWidget extends WP_Widget {
62
  $alttext = $imageList[$key]['title'];
63
  $description = strip_tags( htmlspecialchars( stripslashes( flagGallery::i18n($image->description, 'pic_' . $image->pid . '_description') )) );
64
 
65
- //TODO:For mixed portrait/landscape it's better to use only the height setting, if widht is 0 or vice versa
66
- $out = '<a href="'.$imageList[$key]['link'].'" title="' . $image->title . '" ' . $thumbcode .'>';
67
- $out .= '<img src="'.$image->thumbURL.'" width="'.$instance['width'].'" height="'.$instance['height'].'" title="'.$alttext.'" alt="'.$description.'" />';
68
  echo $out . '</a>'."\n";
69
 
70
  }
@@ -428,9 +427,8 @@ class flagWidget extends WP_Widget {
428
  $alttext = strip_tags( htmlspecialchars( stripslashes( flagGallery::i18n($image->alttext, 'pic_' . $image->pid . '_alttext') )) );
429
  $description = strip_tags( htmlspecialchars( stripslashes( flagGallery::i18n($image->description, 'pic_' . $image->pid . '_description') )) );
430
 
431
- //TODO:For mixed portrait/landscape it's better to use only the height setting, if widht is 0 or vice versa
432
- $out = '<a href="'.plugins_url().'/flash-album-gallery/facebook.php?i='.$image->galleryid.'&amp;f='.$instance['skin'].'&amp;h='.$instance['fheight'].'" title="' . $image->title . '" ' . $thumbcode .'>';
433
- $out .= '<img src="'.$image->thumbURL.'" width="'.$instance['width'].'" height="'.$instance['height'].'" title="'.$alttext.'" alt="'.$description.'" />';
434
  echo $out . '</a>'."\n";
435
  }
436
  }
@@ -573,7 +571,7 @@ class flagVideoWidget extends WP_Widget {
573
  $description = strip_tags( htmlspecialchars( stripslashes( $flv->post_content )) );
574
 
575
  //TODO:For mixed portrait/landscape it's better to use only the height setting, if widht is 0 or vice versa
576
- $out = '<a href="'.plugins_url().'/flash-album-gallery/facebook.php?mv='.$flv->ID.'&amp;w=1&amp;h='.$instance['fheight'].'" title="' . $alttext . '" ' . $thumbcode .'>';
577
  $out .= '<img src="'.$thumb.'" width="'.$instance['width'].'" height="'.$instance['height'].'" title="'.$alttext.'" alt="'.$description.'" />';
578
  echo $out . '</a>'."\n";
579
  }
62
  $alttext = $imageList[$key]['title'];
63
  $description = strip_tags( htmlspecialchars( stripslashes( flagGallery::i18n($image->description, 'pic_' . $image->pid . '_description') )) );
64
 
65
+ $out = '<a href="'.$imageList[$key]['link'].'" title="' . $image->title . '" ' . $thumbcode .' style="overflow:hidden;display:inline-block;text-align:center;width:'.$instance['width'].'px;height:'.$instance['height'].'px;background:url('.$image->imageURL.') 50% 50%;background-size:cover;">';
66
+ $out .= '<img src="'.$image->thumbURL.'" style="opacity:0" width="'.$instance['width'].'" height="'.$instance['height'].'" title="'.$alttext.'" alt="'.$description.'" />';
 
67
  echo $out . '</a>'."\n";
68
 
69
  }
427
  $alttext = strip_tags( htmlspecialchars( stripslashes( flagGallery::i18n($image->alttext, 'pic_' . $image->pid . '_alttext') )) );
428
  $description = strip_tags( htmlspecialchars( stripslashes( flagGallery::i18n($image->description, 'pic_' . $image->pid . '_description') )) );
429
 
430
+ $out = '<a href="'.plugins_url().'/flash-album-gallery/flagframe.php?i='.$image->galleryid.'&amp;f='.$instance['skin'].'&amp;h='.$instance['fheight'].'" title="' . $image->title . '" ' . $thumbcode .' style="overflow:hidden;display:inline-block;text-align:center;width:'.$instance['width'].'px;height:'.$instance['height'].'px;background:url('.$image->imageURL.') 50% 50%;background-size:cover;">';
431
+ $out .= '<img src="'.$image->thumbURL.'" style="opacity:0" width="'.$instance['width'].'" height="'.$instance['height'].'" title="'.$alttext.'" alt="'.$description.'" />';
 
432
  echo $out . '</a>'."\n";
433
  }
434
  }
571
  $description = strip_tags( htmlspecialchars( stripslashes( $flv->post_content )) );
572
 
573
  //TODO:For mixed portrait/landscape it's better to use only the height setting, if widht is 0 or vice versa
574
+ $out = '<a href="'.plugins_url().'/flash-album-gallery/flagframe.php?mv='.$flv->ID.'&amp;w=1&amp;h='.$instance['fheight'].'" title="' . $alttext . '" ' . $thumbcode .'>';
575
  $out .= '<img src="'.$thumb.'" width="'.$instance['width'].'" height="'.$instance['height'].'" title="'.$alttext.'" alt="'.$description.'" />';
576
  echo $out . '</a>'."\n";
577
  }