Easy FancyBox - Version 1.3.4.8

Version Description

PDF bugfix. Improved auto-enable and auto-gallery settings and a Spotlight effect!

=

Download this release

Release Info

Developer RavanH
Plugin Icon 128x128 Easy FancyBox
Version 1.3.4.8
Comparing to
See all releases

Code changes from version 1.3.4.6 to 1.3.4.8

easy-fancybox-settings.php CHANGED
@@ -60,6 +60,13 @@ function easy_fancybox_settings(){
60
  'default' => '1',
61
  'description' => __('Show the overlay around content opened in FancyBox.','easy-fancybox')
62
  ),
 
 
 
 
 
 
 
63
  'overlayOpacity' => array (
64
  'id' => 'fancybox_overlayOpacity',
65
  'title' => __('Overlay opacity','easy-fancybox'),
@@ -168,16 +175,24 @@ function easy_fancybox_settings(){
168
  ),*/
169
  'onComplete' => array (
170
  'id' => 'fancybox_onComplete',
171
- 'title' => __('Extra\'s','easy-fancybox'),
172
  'label_for' => 'fancybox_onComplete',
173
  'input' => 'select',
174
  'options' => array(
175
- '' => __('No extra\'s','easy-fancybox'), // no extra's
176
- 'function() { $(\'#fancybox-title\').hide(); $(\'#fancybox-wrap\').hover(function() { $(\'#fancybox-title\').show(); }, function() { $(\'#fancybox-title\').hide(); }); }' => __('Hide/show title on mouse hover action','easy-fancybox')
177
- ),
 
 
 
 
178
  'noquotes' => true,
179
  'default' => '',
180
- 'description' => '<br />' . __('Hide/show title on mouse hover action works best with Overlay title position','easy-fancybox') . '<br />'
 
 
 
 
181
  ),
182
 
183
  'p3' => array (
@@ -294,7 +309,20 @@ function easy_fancybox_settings(){
294
  'hide' => true,
295
  'default' => 'jpg gif png',
296
  'selector' => 'href$=',
297
- 'description' => ' <em>' . __('Default:','easy-fancybox') . ' jpg gif png</em><br /><br />'
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  ),
299
  'autoGallery' => array (
300
  'id' => 'fancybox_autoGallery',
@@ -303,14 +331,27 @@ function easy_fancybox_settings(){
303
  'hide' => true,
304
  'input' => 'select',
305
  'options' => array(
306
- '' => __('None'),
307
- '1' => __('Post/page images only, separate galleries per post','easy-fancybox'),
308
- '2' => __('Post/page images only, one gallery for all','easy-fancybox'),
309
- '3' => __('All images, one gallery for all','easy-fancybox')
310
  ),
311
- 'default' => '3',
312
- 'description' => ' <em>' . __('Default:','easy-fancybox') . ' ' . 'Post/page images only, separate galleries per post' . '</em><br />' . __('Determine which images to automaticaly link together into a FancyBox gallery.','easy-fancybox')
 
 
 
 
 
 
 
 
 
 
313
  ),
 
 
 
 
314
  'class' => array (
315
  'hide' => true,
316
  'default' => 'fancybox'
@@ -432,7 +473,7 @@ function easy_fancybox_settings(){
432
  'onStart' => array (
433
  'noquotes' => true,
434
  // 'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.content = \'<embed src="\' + selectedArray[selectedIndex].href + \'#nameddest=self&page=1&view=FitH,0&zoom=80,0,0" type="application/pdf" height="100%" width="100%" />\' }'
435
- 'default' => 'function(selectedArray, selectedIndex, selectedOpts) { if ( selectedArray[selectedIndex].title == "" ) { selectedArray[selectedIndex].title = $(selectedArray[selectedIndex]).html() }; selectedOpts.content = \'<object data="\' + selectedArray[selectedIndex].href + \'#toolbar=0&amp;navpanes=0&amp;nameddest=self&amp;page=1&amp;view=FitH,0&amp;zoom=80,0,0" type="application/pdf" height="100%" width="100%"><param name="src" value="\' + selectedArray[selectedIndex].href + \'#toolbar=0&amp;navpanes=0&amp;nameddest=self&amp;page=1&amp;view=FitH,0&amp;zoom=80,0,0" /><a href="\' + selectedArray[selectedIndex].href + \'">\' + selectedArray[selectedIndex].title + \'</a></object>\' }'
436
  )
437
  )
438
  ),
60
  'default' => '1',
61
  'description' => __('Show the overlay around content opened in FancyBox.','easy-fancybox')
62
  ),
63
+ 'overlaySpotlight' => array (
64
+ 'id' => 'fancybox_overlaySpotlight',
65
+ 'input' => 'checkbox',
66
+ 'hide' => true,
67
+ 'default' => '',
68
+ 'description' => __('Spotlight effect.','easy-fancybox')
69
+ ),
70
  'overlayOpacity' => array (
71
  'id' => 'fancybox_overlayOpacity',
72
  'title' => __('Overlay opacity','easy-fancybox'),
175
  ),*/
176
  'onComplete' => array (
177
  'id' => 'fancybox_onComplete',
178
+ 'title' => __('Advanced','easy-fancybox'),
179
  'label_for' => 'fancybox_onComplete',
180
  'input' => 'select',
181
  'options' => array(
182
+ '' => __('None','easy-fancybox'), // no extra's
183
+ 'function() { $(\'#fancybox-title\').hide(); $(\'#fancybox-wrap\').hover(function() { $(\'#fancybox-title\').show(); }, function() { $(\'#fancybox-title\').hide(); }); }' => __('Hide/show title on mouse hover action','easy-fancybox'),
184
+ 'function() { fb_timeout = setTimeout(function(){jQuery.fancybox.next();}, 5000); $(\'#fancybox-wrap\').hover(function() { if(fb_timeout) clearTimeout(fb_timeout); }, function() { if(!fb_timeout) var fb_timeout = setTimeout(function(){jQuery.fancybox.next();}, 5000); }); }' => __('Gallery Auto-rotation','easy-fancybox')
185
+ ), // \'jQuery("#fancybox-right").trigger("click")\'
186
+ // \'jQuery.event.trigger("fancybox-next")\'
187
+ // \'jQuery.fancybox.next()\'
188
+ // function(){jQuery.fancybox.next();}
189
  'noquotes' => true,
190
  'default' => '',
191
+ 'description' => '<br />' . __('Note: Hide/show title on mouse hover action works best with Overlay title position. Auto-rotation uses a fixed 5 second pause per image.','easy-fancybox') . '<br />'
192
+ ),
193
+ 'onCleanup' => array (
194
+ 'noquotes' => true,
195
+ 'default' => 'function() { if(fb_timeout) { window.clearTimeout(fb_timeout); fb_timeout = null; } }'
196
  ),
197
 
198
  'p3' => array (
309
  'hide' => true,
310
  'default' => 'jpg gif png',
311
  'selector' => 'href$=',
312
+ 'description' => ' <em>' . __('Default:','easy-fancybox') . ' jpg gif png</em><br />' . __('Change option "Advanced" below to further tweak auto-detection and gallery behaviour.','easy-fancybox') . '<br />'
313
+ ),
314
+ 'autoAttributeLimit' => array (
315
+ 'id' => 'fancybox_autoAttributeLimit',
316
+ 'title' => __('Apply to','easy-fancybox'),
317
+ 'label_for' => 'fancybox_autoAttributeLimit',
318
+ 'hide' => true,
319
+ 'input' => 'select',
320
+ 'options' => array(
321
+ '' => __('All image links', 'easy-fancybox'),
322
+ '1' => __('Grouped images only','easy-fancybox')
323
+ ),
324
+ 'default' => '',
325
+ 'description' => '<em>' . __('Default:','easy-fancybox') . ' ' . 'All image links' . '</em><br />' . __('Note: The options "Grouped images only" might need adjusting the setting "Group selector(s)" below to make it compatible with your theme.','easy-fancybox') . '<br />'
326
  ),
327
  'autoGallery' => array (
328
  'id' => 'fancybox_autoGallery',
331
  'hide' => true,
332
  'input' => 'select',
333
  'options' => array(
334
+ '' => __('Disabled'),
335
+ '1' => __('One gallery per group','easy-fancybox'),
336
+ '2' => __('One gallery for all','easy-fancybox')
 
337
  ),
338
+ 'default' => '1',
339
+ 'description' => '<em>' . __('Default:','easy-fancybox') . ' ' . 'One gallery per group' . '</em><br />' . __('When disabled, you can use the rel attribute to manually group images together. Example: < a href="..." rel="gallery">...< /a>','easy-fancybox') . '<br />' . __('Note: You might need to adjust the setting "Group selector(s)" below to make grouping compatible with your theme.','easy-fancybox') . '<br />'
340
+ ),
341
+ 'autoSelector' => array (
342
+ 'id' => 'fancybox_autoGallerySelector',
343
+ 'title' => __('Group selector(s)','easy-fancybox'),
344
+ 'label_for' => 'fancybox_autoGallerySelector',
345
+ 'hide' => true,
346
+ 'input' => 'text',
347
+ 'class' => 'regular-text',
348
+ 'default' => 'article, div.hentry',
349
+ 'description' => __('Seperate with a comma.', 'easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' ' . 'article, div.hentry' . '</em><br />' . __('Examples: If your theme wraps post content in a div with class post, change this value to "div.post". If you want to include images in a sidebar with ID primary, add ", div#primary" or "aside#primary" for html5 themes.','easy-fancybox')
350
  ),
351
+ /* 'onStart' => array (
352
+ 'noquotes' => true,
353
+ 'default' => 'function() { window.clearTimeout(fb_timeout); }'
354
+ ),*/
355
  'class' => array (
356
  'hide' => true,
357
  'default' => 'fancybox'
473
  'onStart' => array (
474
  'noquotes' => true,
475
  // 'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.content = \'<embed src="\' + selectedArray[selectedIndex].href + \'#nameddest=self&page=1&view=FitH,0&zoom=80,0,0" type="application/pdf" height="100%" width="100%" />\' }'
476
+ 'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.content = \'<object data="\' + selectedArray[selectedIndex].href + \'#toolbar=1&amp;navpanes=0&amp;nameddest=self&amp;page=1&amp;view=FitH,0&amp;zoom=80,0,0" type="application/pdf" height="100%" width="100%"><param name="src" value="\' + selectedArray[selectedIndex].href + \'#toolbar=1&amp;navpanes=0&amp;nameddest=self&amp;page=1&amp;view=FitH,0&amp;zoom=80,0,0" /><a href="\' + selectedArray[selectedIndex].href + \'" style="display:block;font-size:18px;height:20px;position:absolute;top:50%;margin:-10px auto 0 auto">\' + $(selectedArray[selectedIndex]).html() + \'</a></object>\' }'
477
  )
478
  )
479
  ),
easy-fancybox.css.php CHANGED
@@ -5,20 +5,23 @@
5
 
6
  header('Content-type: text/css; charset=utf-8', true);
7
  ob_start("iepathfix_compress");
 
8
  function iepathfix_compress($buffer) {
9
- $prefix = ( isset($_SERVER['HTTPS']) ) ? "https://" : "http://";
10
  /* Relative path fix : add 'fancybox/'
11
  * IE6 path fix : replace relative with full path */
12
- $buffer = str_replace(array("url('", "AlphaImageLoader(src='fancybox/"), array("url('fancybox/", "AlphaImageLoader(src='" . ( ( isset($_SERVER['HTTPS']) ) ? "https://" : "http://" ) . htmlspecialchars( $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']), ENT_QUOTES) . "/fancybox/"), $buffer);
13
  /* remove comments */
14
  $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
15
- /* remove tabs, spaces, newlines, etc. */
16
- $buffer = str_replace(array("\r", "\n", "\t", ' ', ' ', ' '), '', $buffer);
17
  /* and squeeze some more */
18
- $buffer = str_replace(array(", ", ": ", " {", "{ ", " }", "} ", ";}", "; ", " 0;"), array(",", ":", "{", "{", "}", "}", "}", ";", ";"), $buffer);
19
  return $buffer;
20
  }
21
 
 
 
22
  /* the css file */
23
  $version = preg_match( '`^\d{1,2}\.\d{1,2}(\.\d{1,2})?$`' , $_GET['ver'] ) ? $_GET['ver'] : '';
24
  include( './fancybox/jquery.fancybox-' . htmlspecialchars( $version , ENT_QUOTES) . '.css' );
5
 
6
  header('Content-type: text/css; charset=utf-8', true);
7
  ob_start("iepathfix_compress");
8
+
9
  function iepathfix_compress($buffer) {
10
+ global $url;
11
  /* Relative path fix : add 'fancybox/'
12
  * IE6 path fix : replace relative with full path */
13
+ $buffer = str_replace(array("url('", "AlphaImageLoader(src='fancybox/"), array("url('fancybox/", "AlphaImageLoader(src='" . $url . "/fancybox/" ), $buffer);
14
  /* remove comments */
15
  $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
16
+ /* remove tabs and newlines */
17
+ $buffer = str_replace(array("\r", "\n", "\t"), '', $buffer);
18
  /* and squeeze some more */
19
+ $buffer = str_replace(array(", ", ": ", " {", "{ ", " }", "} ", "; ", " 0;"), array(",", ":", "{", "{", "}", "}", ";", ";"), $buffer);
20
  return $buffer;
21
  }
22
 
23
+ $url = ( ( isset($_SERVER['HTTPS']) ) ? "https://" : "http://" ) . htmlspecialchars( $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']), ENT_QUOTES);
24
+
25
  /* the css file */
26
  $version = preg_match( '`^\d{1,2}\.\d{1,2}(\.\d{1,2})?$`' , $_GET['ver'] ) ? $_GET['ver'] : '';
27
  include( './fancybox/jquery.fancybox-' . htmlspecialchars( $version , ENT_QUOTES) . '.css' );
easy-fancybox.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Easy FancyBox
4
  Plugin URI: http://4visions.nl/en/wordpress-plugins/easy-fancybox/
5
  Description: Easily enable the <a href="http://fancybox.net/">FancyBox jQuery extension</a> on all image, SWF, PDF, YouTube, Dailymotion and Vimeo links. Also supports iFrame and inline content. Happy with it? Please leave me a small <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&amp;item_number=1%2e3%2e4&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us">TIP</a></strong> for development and support on this plugin and please consider a <strong><a href="http://fancybox.net/">DONATION to the FancyBox project</a></strong>.
6
- Version: 1.3.4.6
7
  Author: RavanH
8
  Author URI: http://4visions.nl/
9
  */
@@ -59,7 +59,8 @@ function easy_fancybox() {
59
  echo '
60
  <script type="text/javascript">
61
  /* <![CDATA[ */
62
- jQuery(document).ready(function($){';
 
63
 
64
  /*
65
  * Global settings routine
@@ -111,10 +112,11 @@ $(\'a['.$value['options']['autoAttribute']['selector'].']:not(.nofancybox)'.$att
111
  echo '.attr(\'href\', function(index, attr){'.$value['options']['autoAttribute']['href-replace'].'})';
112
  echo '.addClass(\''.$value['options']['class']['default'].'\');';
113
  } else {
 
114
  $file_types = array_filter( explode( ' ', str_replace( ',', ' ', $autoAttribute ) ) );
115
  $more=0;
116
  echo '
117
- var fb_'.$key.'_selector = \'';
118
  foreach ($file_types as $type) {
119
  if ($more>0)
120
  echo ',';
@@ -123,27 +125,44 @@ var fb_'.$key.'_selector = \'';
123
  }
124
  echo '\';';
125
 
126
- switch( get_option($value['options']['autoGallery']['id'],$value['options']['autoGallery']['default']) ) {
127
- case '':
128
- default :
129
- echo '
130
- $(fb_'.$key.'_selector).addClass(\''.$value['options']['class']['default'].'\');';
131
- break;
132
- case '1':
133
- echo '
134
- var fb_'.$key.'_posts = jQuery(\'div.post, article\');
135
- fb_'.$key.'_posts.each(function() { jQuery(this).find(fb_'.$key.'_selector).addClass(\''.$value['options']['class']['default'].'\').attr(\'rel\', \'gallery-\' + fb_'.$key.'_posts.index(this)); });';
136
- break;
137
- case '2':
138
- echo '
139
- var fb_'.$key.'_posts = jQuery(\'div.post, article\');
140
- fb_'.$key.'_posts.each(function() { jQuery(this).find(fb_'.$key.'_selector).addClass(\''.$value['options']['class']['default'].'\').attr(\'rel\', \'gallery\'); });';
141
- break;
142
- case '3':
143
- echo '
144
- $(fb_'.$key.'_selector).addClass(\''.$value['options']['class']['default'].'\').attr(\'rel\', \'gallery\');';
145
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  }
 
147
  }
148
  }
149
 
@@ -206,6 +225,10 @@ $(\'a[class*="fancybox"]\').filter(\':first\').trigger(\'click\');';
206
  </script>
207
  ';
208
 
 
 
 
 
209
  }
210
 
211
  // FancyBox Media Settings Section on Settings > Media admin page
3
  Plugin Name: Easy FancyBox
4
  Plugin URI: http://4visions.nl/en/wordpress-plugins/easy-fancybox/
5
  Description: Easily enable the <a href="http://fancybox.net/">FancyBox jQuery extension</a> on all image, SWF, PDF, YouTube, Dailymotion and Vimeo links. Also supports iFrame and inline content. Happy with it? Please leave me a small <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&amp;item_number=1%2e3%2e4&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us">TIP</a></strong> for development and support on this plugin and please consider a <strong><a href="http://fancybox.net/">DONATION to the FancyBox project</a></strong>.
6
+ Version: 1.3.4.8
7
  Author: RavanH
8
  Author URI: http://4visions.nl/
9
  */
59
  echo '
60
  <script type="text/javascript">
61
  /* <![CDATA[ */
62
+ jQuery(document).ready(function($){
63
+ var fb_timeout = null;';
64
 
65
  /*
66
  * Global settings routine
112
  echo '.attr(\'href\', function(index, attr){'.$value['options']['autoAttribute']['href-replace'].'})';
113
  echo '.addClass(\''.$value['options']['class']['default'].'\');';
114
  } else {
115
+ // set selectors
116
  $file_types = array_filter( explode( ' ', str_replace( ',', ' ', $autoAttribute ) ) );
117
  $more=0;
118
  echo '
119
+ var fb_'.$key.'_select = \'';
120
  foreach ($file_types as $type) {
121
  if ($more>0)
122
  echo ',';
125
  }
126
  echo '\';';
127
 
128
+ // class and rel depending on settings
129
+ if( '1' == get_option($value['options']['autoAttributeLimit']['id'],$value['options']['autoAttributeLimit']['default']) ) {
130
+ // add class
131
+ echo '
132
+ var fb_'.$key.'_sections = jQuery(\''.get_option($value['options']['autoSelector']['id'],$value['options']['autoSelector']['default']).'\');
133
+ fb_'.$key.'_sections.each(function() { jQuery(this).find(fb_'.$key.'_select).addClass(\''.$value['options']['class']['default'].'\')';
134
+ // and set rel
135
+ switch( get_option($value['options']['autoGallery']['id'],$value['options']['autoGallery']['default']) ) {
136
+ case '':
137
+ default :
138
+ echo '; });';
139
+ break;
140
+ case '1':
141
+ echo '.attr(\'rel\', \'gallery-\' + fb_'.$key.'_sections.index(this)); });';
142
+ break;
143
+ case '2':
144
+ echo '.attr(\'rel\', \'gallery\'); });';
145
+ }
146
+ } else {
147
+ // add class
148
+ echo '
149
+ $(fb_'.$key.'_select).addClass(\''.$value['options']['class']['default'].'\')';
150
+ // set rel
151
+ switch( get_option($value['options']['autoGallery']['id'],$value['options']['autoGallery']['default']) ) {
152
+ case '':
153
+ default :
154
+ echo ';';
155
+ break;
156
+ case '1':
157
+ echo ';
158
+ var fb_'.$key.'_sections = jQuery(\''.get_option($value['options']['autoSelector']['id'],$value['options']['autoSelector']['default']).'\');
159
+ fb_'.$key.'_sections.each(function() { jQuery(this).find(fb_'.$key.'_select).attr(\'rel\', \'gallery-\' + fb_'.$key.'_sections.index(this)); });';
160
+ break;
161
+ case '2':
162
+ echo '.attr(\'rel\', \'gallery\');';
163
+ }
164
  }
165
+
166
  }
167
  }
168
 
225
  </script>
226
  ';
227
 
228
+ if ('1' == $overlaySpotlight)
229
+ echo '<style type="text/css">#fancybox-overlay{background-image:url("'. plugins_url(FANCYBOX_SUBDIR.'/light-mask.png', __FILE__) . '");background-position:50% -3%;background-repeat:no-repeat;-o-background-size:100%;-webkit-background-size:100%;-moz-background-size:100%;-khtml-background-size:100%;background-size:100%;position:fixed}</style>
230
+ ';
231
+
232
  }
233
 
234
  // FancyBox Media Settings Section on Settings > Media admin page
light-mask.png ADDED
Binary file
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravan
4
  Tags: fancybox, lightbox, gallery, image, photo, flash, nextgen, overlay, youtube, vimeo, dailymotion, pdf, iframe, swf, jquery
5
  Requires at least: 2.7
6
  Tested up to: 3.1
7
- Stable tag: 1.3.4.6
8
 
9
  Easily enable the FancyBox 1.3.4 jQuery extension on just about all media links. Multi-Site compatible. Supports iFrame and Flash movies.
10
 
@@ -13,6 +13,7 @@ Easily enable the FancyBox 1.3.4 jQuery extension on just about all media links.
13
  Easy FancyBox-in-a-Box for just about all media links gives you a flexible and aesthetic media lightbox solution for your website. Easy FancyBox uses the packed FancyBox jQuery extension and is WP 3.0 Multi-Site compatible. After activation you can find a new section **FancyBox** on your **Settings > Media** admin page where you can manage the plugins options.
14
 
15
  It supports:
 
16
  - images (.jpg/.gif/.png and others) _and_ WordPress Galleries
17
  - PDF and SWF (Flash) files
18
  - movie sites like **Youtube**, **Vimeo** _and_ **Dailmotion**
@@ -50,7 +51,7 @@ Follow these steps:
50
 
51
  3. Activate the plugin on the Plug-ins page.
52
 
53
- Done! Check your sparkling new FancyBoxed images :)
54
 
55
  Not happy with the default settings? Check out the new options under **Settings > Media**.
56
 
@@ -64,15 +65,12 @@ The plugin works best from the **/mu-plugins/** folder where it runs quietly in
64
 
65
  == Frequently Asked Questions ==
66
 
67
- = What's FancyBox? =
68
-
69
- Basically, it is a fancy way of presenting images, movies, portable documents and inline content on your website. For example, if you have scaled-down images in your posts which are linked to the original large version, instead of opening them on a blanc page, FancyBox opens those in a smooth overlay. Visit [FancyBox](http://fancybox.net/) for more information and examples.
70
 
71
- = Why EASY FancyBox? =
72
 
73
- Instead of bothering you with the HUGE amount of configuration options that FancyBox can handle, this plugin requires almost NO configuration. Easy, isn't it? ;)
74
 
75
- If you *do* want configuration options to tweak and fiddle for days, check out some of the other FancyBox plugins available.
76
 
77
  = Which version of FancyBox does this plugin use? =
78
 
@@ -82,15 +80,37 @@ The same version as this plugin has. I aim to keep close pace to FancyBox upgrad
82
 
83
  There is no new settings page but there are a few options you can change. You will find a new **FancyBox** section on **Settings > Media**. To see the default, check out the example under [Screenshots](http://wordpress.org/extend/plugins/easy-fancybox/) ...
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  = Will a WordPress generated gallery be displayed in a FancyBox overlay? =
86
 
87
  Yes, but _only_ if you used the option **Link thumbnails to: Image File** when inserting the gallery! The gallery quicktag/shortcode should look something like `[gallery link="file"]`.
88
 
 
 
 
 
89
  = Can I exclude images or other links from auto-attribution? =
90
 
91
  Yes. All links with class **nofancybox** that would normally get auto-enabled, will be excluded from opening in a FancyBox overlay.
92
 
93
  `<a href="url/to/fullimg.jpg" class="nofancybox"><img src="url/to/thumbnail.jpg" /></a>`
 
94
 
95
  = Will a NextGen gallery be displayed in a FancyBox overlay ? =
96
 
@@ -98,11 +118,50 @@ It *can* be. Switch off any gallery overlay scripts in NextGen and either use th
98
  `
99
  class="fancybox" rel="%GALLERY_NAME%"
100
  `
 
101
 
102
  = Can I use ONE thumbnail to open a complete gallery ? =
103
 
104
- It can be done in combination with NextGen Gallery. Create a gallery, use the tag `[nggtags gallery=YourGalleryName]` in your page content and configure NextGen to include hidden gallery images.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  = Can I display web pages or HTML files in a FancyBox overlay? =
107
 
108
  Yes. Place a link with either `class="fancybox-iframe"` or `class="fancybox iframe"` (notice the space instead of the hyphen) to any web page or .htm(l) file in your content.
@@ -123,9 +182,7 @@ If you do'nt have *Auto-detect* checked under **SWF** on Settings > Media admin
123
 
124
  = Can I play YouTube, Dailymotion and Vimeo movies in a FancyBox overlay? =
125
 
126
- Yes.
127
-
128
- These are actually a special case of SWF files. The URL for these movies do not end in .swf so the FancyBox script will not be able to auto-detect the Flash content. This can be forced with `class="fancybox-youtube"`, `class="fancybox-swf"` or alternatively `class="fancybox-iframe"`. The difference between the three is mainly in size of the overlay window. Just choose the one that works best for you or... Just let the plugin auto-detect and auto-enable it for you! :)
129
 
130
  For **YouTube**, place the Share URL (the plain Page URL, the Short URL or even with the HD option) to the YouTube page in your content. Add `&fs=1` to the URL so show the 'Full screen' button. If you have disabled Auto-detection, use it with `class="fancybox-youtube"` to manually enable FancyBox for it. (Note: For shortened YouTube URLs, the class does not work. Auto auto-detection needs to be enabled seperately.)
131
 
@@ -135,10 +192,11 @@ Both YouTube and Vimeo movies can be made to auto-start when they are opened by
135
  `
136
  <a href="http://youtu.be/N_tONWXYviM?hd=1&fs=1&autoplay=1">text/thumbnail</a>
137
  `
 
138
 
139
  = I want that 'Show in full-screen' button on my YouTube movies =
140
 
141
- Append `&fs=1` to your YouTube share URL. If you use the Short URL without the `?hd=1` switch, append `?fs=1` to it.
142
 
143
  = The flash movie in the overlay shows BELOW some other flash content that is on the same page! =
144
 
@@ -161,29 +219,26 @@ just add `<param name="wmode" value="opaque" />` among the other parameters. Or
161
  `
162
  just change that `wmode="window"` to `wmode="opaque"` or add the tag if it is missing.
163
 
164
- = Can I display INLINE content in a FancyBox overlay ? =
165
 
166
- Yes.
167
 
168
- Wrap the inline content in
169
  `
170
  <div style="display:none" class="fancybox-hidden"><div id="fancyboxID-1">
171
  ...inline content here...
172
  </div></div>
173
  `
174
-
175
  Then place a FancyBox link anywhere else in the post/page content to the inline content. Something like
176
  `
177
  <a href="#fancyboxID-1" class="fancybox">Read my inline content</a>
178
  `
179
-
180
  NOTE: The wrapping divs ID *must* be unique and it must correspond with the links HREF with a # in front of it. When using the above example for more FancyBox inline content (hidden div + opening link) combinations on one page, give the second one the ID fancyboxID-2 and so on...
181
 
182
  = Can I make an image or hidden content to pop up in FancyBox on page load? =
183
 
184
- Yes.
185
-
186
- A link that has the ID **fancybox-auto** (Note: there can be only ONE link like that on a page!) will be triggered automatically on page load.
187
 
188
  Use the instructions above but this time give the link also `id="fancybox-auto"` and remove the anchor text to hide it. Now the hidden div content will pop up automatically when a visitor opens the page.
189
 
@@ -204,15 +259,19 @@ If you are on an older version of WordPress or if you cannot use WP's Menus, you
204
 
205
  Yes. Designed to work with **Network Activate** and does not require manual activation on each site in your network. You can even install it in mu-plugins: upload the complete /easy-fancybox/ directory to /wp-content/mu-plugins/ and move the file easy-fancybox.php one dir up.
206
 
207
- == Other Notes ==
208
 
209
- = Known Issues =
210
 
211
  - There is a conflict between the WP Slimstat plugin and the Easy FancyBox script for YouTube url conversion. When clicking a Youtube link, the movie opens in an overlay as it is supposed to but immediately after that, the complete page gets redirected to the original YouTube page. Adding a `class="noslimstat"` to the link is reported to work around the issue.
212
  - In FancyBox 1.3.3 there is a problem with image stretching in the Google Chrome browser. This is worked around in Easy FancyBox 1.3.3.4.2 by disabling the autoDimensions feature. Since version 1.3.4, this has been resolved.
213
  - Embedded flash content that has no wmode or wmode 'window', is displayed above the overlay and other javascript rendered content like dropdown menus. WordPress does NOT check for missing wmode in oEmbed generated Auto-embeds. Since version 1.3.4.5, the missing wmode is added by this plugin for WP (auto-)embeds but not for other user-embedded content. Please make sure you set the wmode parameter to 'opaque' (best) or 'transparent' (only when you need transparency) for your embedded content.
214
  - When using WP-Minify, the javascript files like `fancybox/jquery.fancybox-X.X.X.pack.js` and others need to be excluded from minification.
215
 
 
 
 
 
 
216
  == Screenshots ==
217
 
218
  1. Example image with **Overlay** caption. This is the default way Easy FancyBox displays images. Other options are **Inside** and the old **Outside**.
@@ -221,48 +280,56 @@ Yes. Designed to work with **Network Activate** and does not require manual acti
221
 
222
  == Upgrade Notice ==
223
 
224
- = 1.3.4.6 =
225
- PDF compatibility improvement, Dailymotion support and many new options and classes.
226
 
227
  == Changelog ==
228
 
 
 
 
 
 
 
 
229
  = 1.3.4.6 =
230
  * PDF embed compatibility improvement
231
- * new option: Show/hide title on mouse hover action
232
- * new option: Auto-gallery modes (Disabled, page/post images only, all)
233
- * Dailymotion support
234
  * Links with id **fancybox-auto** will be triggered on page load
235
  * Anything with class **fancybox-hidden"** will be hidden
236
  * Support for menu items in iframe
237
  * Added class **nofancybox** for exclusion when auto-enabling
238
 
239
  = 1.3.4.5 =
240
- * Added Support for PDF
241
- * Added Easing options
 
242
  * YouTube, Vimeo and iFrame options adjustable
243
  * lots and lots of more options!
244
  * BIGFIX: work-around for missing wmode in WordPress (auto-)embedded movies (credits: Crantea Mihaita)
245
 
246
  = 1.3.3.4.2 =
247
- * Fix: iframe width
248
- * Fix: image overlay size in Google Chrome browser issue (FancyBox 1.3.3)
249
- * Fix: fancybox-swf
250
 
251
  = 1.3.3.4 =
252
- * upgraded FancyBox script to version 1.3.3 (2010/11/4 - http://fancybox.net/changelog/)
253
  * Vimeo support
254
  * YouTube Short URL support (disabled by default)
255
  * Auto-recognition and seperate class `fancybox-youtube` for YouTube
256
  * Auto-recognition and seperate class `fancybox-vimeo` for Vimeo
257
 
258
  = 1.3.2 =
259
- * upgraded FancyBox script to version 1.3.2 (2010/10/10 - http://fancybox.net/changelog/)
260
 
261
  = 1.3.1.3 =
262
  * translation .pot file available
263
  * Dutch translation
264
- * YouTube and Flash movie support
265
- * Iframe support
266
  * added option Auto-enable for...
267
 
268
  = 1.3.1.2 =
4
  Tags: fancybox, lightbox, gallery, image, photo, flash, nextgen, overlay, youtube, vimeo, dailymotion, pdf, iframe, swf, jquery
5
  Requires at least: 2.7
6
  Tested up to: 3.1
7
+ Stable tag: 1.3.4.8
8
 
9
  Easily enable the FancyBox 1.3.4 jQuery extension on just about all media links. Multi-Site compatible. Supports iFrame and Flash movies.
10
 
13
  Easy FancyBox-in-a-Box for just about all media links gives you a flexible and aesthetic media lightbox solution for your website. Easy FancyBox uses the packed FancyBox jQuery extension and is WP 3.0 Multi-Site compatible. After activation you can find a new section **FancyBox** on your **Settings > Media** admin page where you can manage the plugins options.
14
 
15
  It supports:
16
+
17
  - images (.jpg/.gif/.png and others) _and_ WordPress Galleries
18
  - PDF and SWF (Flash) files
19
  - movie sites like **Youtube**, **Vimeo** _and_ **Dailmotion**
51
 
52
  3. Activate the plugin on the Plug-ins page.
53
 
54
+ By default, any images that are linked to directly (not to a WordPress page) from within your posts and pages, should now be opening in a FancyBox overlay :)
55
 
56
  Not happy with the default settings? Check out the new options under **Settings > Media**.
57
 
65
 
66
  == Frequently Asked Questions ==
67
 
 
 
 
68
 
69
+ = BASIC =
70
 
71
+ = What's FancyBox? =
72
 
73
+ Basically, it is a fancy way of presenting images, movies, portable documents and inline content on your website. For example, if you have scaled-down images in your posts which are linked to the original large version, instead of opening them on a blanc page, FancyBox opens those in a smooth overlay. Visit [FancyBox](http://fancybox.net/) for more information and examples.
74
 
75
  = Which version of FancyBox does this plugin use? =
76
 
80
 
81
  There is no new settings page but there are a few options you can change. You will find a new **FancyBox** section on **Settings > Media**. To see the default, check out the example under [Screenshots](http://wordpress.org/extend/plugins/easy-fancybox/) ...
82
 
83
+
84
+ = TROUBLE SHOOTING =
85
+
86
+ = Help! It does not work... =
87
+
88
+ If, after activation, your images do not open in a FancyBox overlay, there are several possible reasons. Some are easily solved, others are more difficult. Follow these basic checks to make sure everything is in place:
89
+
90
+ 1. Make sure that thumbnail images are linked *directly* to their larger counterpart, not to a dynamic WordPress page that includes the larger image. This means when you insert an image in your posts or pages, you need to select `File URL` at the **Link** option instead of `Page URL`. You'll have to manually edit your old posts if you have always inserted images with `Page URL` before, FancyBox cannot do this for you.
91
+ 1. Make sure you have all the needed media and their *Auto-detect* options activated on your **Settings > Media** admin page. If you are using images in other formats that JPG, GIF or PNG, you need to add the extensions to the Auto-detect field for Images. Please note: The image file names must actaully *end* with that extension! This means that if you have an image file that (for example) has *no* extension (does not end with .jpg or any other) even if is in JPEG compressed format, the FancyBox will not be able to detect is as an image. You will need to manually give those links the class `fancybox` to trigger FancyBox.
92
+ 1. Make sure your theme is capable of placing the needed javascript and css in the page header. Open any page on your site and view the source code by right-clicking on an empty section and selecting 'View source...' (or similar) to see the page source. There you will need to check of there are any references to javascript files like `jquery.fancybox-x.x.x.pack.js?ver=x.x.x` in the `<head>` section. There should also be a `easy-fancybox.css.php?ver=x.x.x` and some javascript that starts with `<!-- Easy FancyBox 1.3.4.9 using FancyBox 1.3.4 - RavanH (http://4visions.nl/en/wordpress-plugins/easy-fancybox/) -->`... If it's not there, your theme is really out of date. Consider switching to a new theme fast!
93
+ 1. Check if your theme wraps post/page content in a div with class `hentry`. If it doesn't, you might need to edit the option `Section(s)` on **Settings > Media** to reflect the class (or ID) name of the div that holds post/page content.
94
+
95
+ If you still do not get to see your images in FancyBox, ask on the [Easy FancyBox WordPress forum](http://wordpress.org/tags/easy-fancybox) or go to the [development site](http://4visions.nl/en/wordpress-plugins/easy-fancybox/)
96
+
97
+
98
+ = ADVANCED =
99
+
100
  = Will a WordPress generated gallery be displayed in a FancyBox overlay? =
101
 
102
  Yes, but _only_ if you used the option **Link thumbnails to: Image File** when inserting the gallery! The gallery quicktag/shortcode should look something like `[gallery link="file"]`.
103
 
104
+ = Can I make gallery images automatically rotate? =
105
+
106
+ Yes. There is an Advanced option called "Gallery Auto-rotation" for that.
107
+
108
  = Can I exclude images or other links from auto-attribution? =
109
 
110
  Yes. All links with class **nofancybox** that would normally get auto-enabled, will be excluded from opening in a FancyBox overlay.
111
 
112
  `<a href="url/to/fullimg.jpg" class="nofancybox"><img src="url/to/thumbnail.jpg" /></a>`
113
+
114
 
115
  = Will a NextGen gallery be displayed in a FancyBox overlay ? =
116
 
118
  `
119
  class="fancybox" rel="%GALLERY_NAME%"
120
  `
121
+
122
 
123
  = Can I use ONE thumbnail to open a complete gallery ? =
124
 
125
+ It can be done manually (using the internal WordPress gallery feature, or not) _or_ in combination with NextGen Gallery.
126
+
127
+ **Manual**
128
+
129
+ **A.** Open your post for editing in HTML mode and insert the first image thumbnail in your post content (linking to the images file, not page) to serve as the gallery thumbnail.
130
+
131
+ **B.** Place the following code to start a hidden div containing all the other images that should only be visible in FancyBox:
132
+ `
133
+ <div class="fancybox-hidden">
134
+ `
135
+
136
+ **C.** Right after that starting on a new line, insert all other images you want to show in your gallery. You can even use the WordPress internal gallery feature with the shortcode `[gallery link="file"]`. NOTE: if the gallery thumbnail is attached to the post, it will be show a second time when flipping through the gallery in FancyBox. If you do not want that, use an image that is not attached to the post as gallery thumbail.
137
+
138
+ **D.** Close the hidden div with the following code on a new line:
139
+ `
140
+ </div>
141
+ `
142
+
143
+ **With NextGEN Gallery**
144
+
145
+ You can choose between two shortcodes to show a gallery that (1) limits images per gallery using the shortcode `[nggallery id=x]` or (2) per tag name (accross galleries; you need to set tag name manually => more work but more control) using the shortcode `[nggtags gallery=YourTagName,AnotherTagName]`.
146
+
147
+ General steps:
148
+
149
+ **A.** Place the shortcode of your choice in your page/post content.
150
 
151
+ **B.** Configure NextGen on **Gallery > Options > Gallery settings** to at least have the following options set like this:
152
+
153
+ 1. Number of images per page: 1
154
+ 1. Integrate slideshow: unchecked (optional but advised: use auto-rotation in the FancyBox settings instead)
155
+ 1. Show first: Thumbnails
156
+ 1. Show ImageBrowser: unchecked
157
+ 1. Add hidden images: checked
158
+
159
+ **C.** Optional: add a new CSS rule to your theme stylesheet to hide the page browsing links below the gallery thumbnail:
160
+ `
161
+ .ngg-navigation{display:none}
162
+ `
163
+
164
+
165
  = Can I display web pages or HTML files in a FancyBox overlay? =
166
 
167
  Yes. Place a link with either `class="fancybox-iframe"` or `class="fancybox iframe"` (notice the space instead of the hyphen) to any web page or .htm(l) file in your content.
182
 
183
  = Can I play YouTube, Dailymotion and Vimeo movies in a FancyBox overlay? =
184
 
185
+ Yes. These are actually a special case of SWF files. The URL for these movies do not end in .swf so the FancyBox script will not be able to auto-detect the Flash content. This can be forced with `class="fancybox-youtube"`, `class="fancybox-swf"` or alternatively `class="fancybox-iframe"`. The difference between the three is mainly in size of the overlay window. Just choose the one that works best for you or... Just let the plugin auto-detect and auto-enable it for you! :)
 
 
186
 
187
  For **YouTube**, place the Share URL (the plain Page URL, the Short URL or even with the HD option) to the YouTube page in your content. Add `&fs=1` to the URL so show the 'Full screen' button. If you have disabled Auto-detection, use it with `class="fancybox-youtube"` to manually enable FancyBox for it. (Note: For shortened YouTube URLs, the class does not work. Auto auto-detection needs to be enabled seperately.)
188
 
192
  `
193
  <a href="http://youtu.be/N_tONWXYviM?hd=1&fs=1&autoplay=1">text/thumbnail</a>
194
  `
195
+
196
 
197
  = I want that 'Show in full-screen' button on my YouTube movies =
198
 
199
+ Append `&fs=1` to your YouTube share URL.
200
 
201
  = The flash movie in the overlay shows BELOW some other flash content that is on the same page! =
202
 
219
  `
220
  just change that `wmode="window"` to `wmode="opaque"` or add the tag if it is missing.
221
 
 
222
 
223
+ = Can I display INLINE content in a FancyBox overlay ? =
224
 
225
+ Yes. Wrap the inline content in
226
  `
227
  <div style="display:none" class="fancybox-hidden"><div id="fancyboxID-1">
228
  ...inline content here...
229
  </div></div>
230
  `
231
+
232
  Then place a FancyBox link anywhere else in the post/page content to the inline content. Something like
233
  `
234
  <a href="#fancyboxID-1" class="fancybox">Read my inline content</a>
235
  `
236
+
237
  NOTE: The wrapping divs ID *must* be unique and it must correspond with the links HREF with a # in front of it. When using the above example for more FancyBox inline content (hidden div + opening link) combinations on one page, give the second one the ID fancyboxID-2 and so on...
238
 
239
  = Can I make an image or hidden content to pop up in FancyBox on page load? =
240
 
241
+ Yes. A link that has the ID **fancybox-auto** (Note: there can be only ONE link like that on a page!) will be triggered automatically on page load.
 
 
242
 
243
  Use the instructions above but this time give the link also `id="fancybox-auto"` and remove the anchor text to hide it. Now the hidden div content will pop up automatically when a visitor opens the page.
244
 
259
 
260
  Yes. Designed to work with **Network Activate** and does not require manual activation on each site in your network. You can even install it in mu-plugins: upload the complete /easy-fancybox/ directory to /wp-content/mu-plugins/ and move the file easy-fancybox.php one dir up.
261
 
 
262
 
263
+ == Known Issues ==
264
 
265
  - There is a conflict between the WP Slimstat plugin and the Easy FancyBox script for YouTube url conversion. When clicking a Youtube link, the movie opens in an overlay as it is supposed to but immediately after that, the complete page gets redirected to the original YouTube page. Adding a `class="noslimstat"` to the link is reported to work around the issue.
266
  - In FancyBox 1.3.3 there is a problem with image stretching in the Google Chrome browser. This is worked around in Easy FancyBox 1.3.3.4.2 by disabling the autoDimensions feature. Since version 1.3.4, this has been resolved.
267
  - Embedded flash content that has no wmode or wmode 'window', is displayed above the overlay and other javascript rendered content like dropdown menus. WordPress does NOT check for missing wmode in oEmbed generated Auto-embeds. Since version 1.3.4.5, the missing wmode is added by this plugin for WP (auto-)embeds but not for other user-embedded content. Please make sure you set the wmode parameter to 'opaque' (best) or 'transparent' (only when you need transparency) for your embedded content.
268
  - When using WP-Minify, the javascript files like `fancybox/jquery.fancybox-X.X.X.pack.js` and others need to be excluded from minification.
269
 
270
+ == Trouble Shooting ==
271
+
272
+ See the FAQ section on trouble shooting.
273
+
274
+
275
  == Screenshots ==
276
 
277
  1. Example image with **Overlay** caption. This is the default way Easy FancyBox displays images. Other options are **Inside** and the old **Outside**.
280
 
281
  == Upgrade Notice ==
282
 
283
+ = 1.3.4.8 =
284
+ PDF bugfix. Improved auto-enable and auto-gallery settings and a Spotlight effect!
285
 
286
  == Changelog ==
287
 
288
+ = 1.3.4.8 =
289
+ * Advanced option: Gallery auto-rotation
290
+ * Spotlight effect
291
+ * Improved auto-enable and auto-gallery settings
292
+ * BIGFIX: CSS IE6 hack
293
+ * BIGFIX: PDF object in IE
294
+
295
  = 1.3.4.6 =
296
  * PDF embed compatibility improvement
297
+ * NEW: Show/hide title on mouse hover action
298
+ * NEW: Auto-gallery modes (Disabled, page/post images only, all)
299
+ * NEW: Dailymotion support
300
  * Links with id **fancybox-auto** will be triggered on page load
301
  * Anything with class **fancybox-hidden"** will be hidden
302
  * Support for menu items in iframe
303
  * Added class **nofancybox** for exclusion when auto-enabling
304
 
305
  = 1.3.4.5 =
306
+ * FancyBox script version 1.3.4 (2010/11/11 - http://fancybox.net/changelog/)
307
+ * NEW: Support for PDF
308
+ * NEW: Easing options
309
  * YouTube, Vimeo and iFrame options adjustable
310
  * lots and lots of more options!
311
  * BIGFIX: work-around for missing wmode in WordPress (auto-)embedded movies (credits: Crantea Mihaita)
312
 
313
  = 1.3.3.4.2 =
314
+ * BIGFIX: iframe width
315
+ * BIGFIX: image overlay size in Google Chrome browser issue (FancyBox 1.3.3)
316
+ * BIGFIX: fancybox-swf
317
 
318
  = 1.3.3.4 =
319
+ * FancyBox script version 1.3.3 (2010/11/4 - http://fancybox.net/changelog/)
320
  * Vimeo support
321
  * YouTube Short URL support (disabled by default)
322
  * Auto-recognition and seperate class `fancybox-youtube` for YouTube
323
  * Auto-recognition and seperate class `fancybox-vimeo` for Vimeo
324
 
325
  = 1.3.2 =
326
+ * FancyBox script version 1.3.2 (2010/10/10 - http://fancybox.net/changelog/)
327
 
328
  = 1.3.1.3 =
329
  * translation .pot file available
330
  * Dutch translation
331
+ * NEW: YouTube and Flash movie support
332
+ * NEW: Iframe support
333
  * added option Auto-enable for...
334
 
335
  = 1.3.1.2 =