Version Description
- translation .pot file available
- Dutch translation
- Youtube and Flash movie support
- Iframe support
- added option Auto-enable for...
Download this release
Release Info
Developer | RavanH |
Plugin | Easy FancyBox |
Version | 1.3.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.3.1.2 to 1.3.1.3
- easy-fancybox-nl.mo +0 -0
- easy-fancybox-nl_NL.mo +0 -0
- easy-fancybox.php +220 -0
- easy-fancybox.pot +79 -0
- fancybox.php +0 -140
- readme.txt +46 -18
easy-fancybox-nl.mo
ADDED
Binary file
|
easy-fancybox-nl_NL.mo
ADDED
Binary file
|
easy-fancybox.php
ADDED
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Easy FancyBox
|
4 |
+
Plugin URI: http://4visions.nl/en/wordpress-plugins/easy-fancybox/
|
5 |
+
Description: Hassle-free, no-settings, auto-enable <a href="http://fancybox.net/">FancyBox 1.3.1</a> on all image links including BMP, GIF, JPG, JPEG, and PNG. Uses packed Javascript. Happy with it? Please leave me a small <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&item_number=1%2e3%2e1&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us">TIP</a> for development and support on this plugin and please consider a DONATION to the <a href="http://fancybox.net/">FancyBox project</a>.
|
6 |
+
Version: 1.3.1.3
|
7 |
+
Author: RavanH
|
8 |
+
Author URI: http://4visions.nl/
|
9 |
+
*/
|
10 |
+
|
11 |
+
// FUNCTIONS //
|
12 |
+
|
13 |
+
function easy_fancybox_settings(){
|
14 |
+
return array(
|
15 |
+
'autoAttribute' => array (
|
16 |
+
'id' => 'fancybox_autoAttribute',
|
17 |
+
'title' => __('Auto-enable','easy-fancybox'),
|
18 |
+
'label_for' => 'fancybox_autoAttribute',
|
19 |
+
'input' => 'text',
|
20 |
+
'options' => array(),
|
21 |
+
'hide' => 'true',
|
22 |
+
'default' => 'jpg bmp gif jpeg png swf',
|
23 |
+
'description' => __('File types FancyBox should be automatically enabled for. Clear to switch off auto-enabling. Use the tags class="fancybox", class="fancybox-iframe" or class="fancybox-swf" on any link to manually enable FancyBox for it.','easy-fancybox').' '.__('Default:','easy-fancybox')
|
24 |
+
),
|
25 |
+
'titlePosition' => array (
|
26 |
+
'id' => 'fancybox_titlePosition',
|
27 |
+
'title' => __('Title Position','easy-fancybox'),
|
28 |
+
'label_for' => 'fancybox_titlePosition',
|
29 |
+
'input' => 'select',
|
30 |
+
'options' => array(
|
31 |
+
'over' => __('Overlay','easy-fancybox'),
|
32 |
+
'inside' => __('Inside','easy-fancybox'),
|
33 |
+
'outside' => __('Outside','easy-fancybox')
|
34 |
+
),
|
35 |
+
'default' => 'over',
|
36 |
+
'description' => __('Position of the overlay content title.','easy-fancybox').' '.__('Default:','easy-fancybox')
|
37 |
+
),
|
38 |
+
'transitionIn' => array (
|
39 |
+
'id' => 'fancybox_transitionIn',
|
40 |
+
'title' => __('Transition In','easy-fancybox'),
|
41 |
+
'label_for' => 'fancybox_transitionIn',
|
42 |
+
'input' => 'select',
|
43 |
+
'options' => array(
|
44 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
45 |
+
'fade' => __('Fade in','easy-fancybox'),
|
46 |
+
'none' => __('None','easy-fancybox')
|
47 |
+
),
|
48 |
+
'default' => 'elastic',
|
49 |
+
'description' => __('Transition effect when opening the overlay.','easy-fancybox').' '.__('Default:','easy-fancybox')
|
50 |
+
),
|
51 |
+
'transitionOut' => array (
|
52 |
+
'id' => 'fancybox_transitionOut',
|
53 |
+
'title' => __('Transition Out','easy-fancybox'),
|
54 |
+
'label_for' => 'fancybox_transitionOut',
|
55 |
+
'input' => 'select',
|
56 |
+
'options' => array(
|
57 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
58 |
+
'fade' => __('Fade out','easy-fancybox'),
|
59 |
+
'none' => __('None','easy-fancybox')
|
60 |
+
),
|
61 |
+
'default' => 'elastic',
|
62 |
+
'description' => __('Transition effect when closing the overlay.','easy-fancybox').' '.__('Default:','easy-fancybox')
|
63 |
+
),
|
64 |
+
);
|
65 |
+
}
|
66 |
+
|
67 |
+
// What about other things than link with img, like: div[rel$="fancybox"] ?
|
68 |
+
function easy_fancybox() {
|
69 |
+
$easy_fancybox_array = easy_fancybox_settings();
|
70 |
+
echo "
|
71 |
+
<!-- Easy FancyBox plugin for WordPress - RavanH (http://4visions.nl/en/wordpress-plugins/easy-fancybox/) -->
|
72 |
+
<script type=\"text/javascript\">
|
73 |
+
jQuery(document).ready(function($){";
|
74 |
+
|
75 |
+
$file_types = array_filter( explode( ' ', get_option( 'fancybox_autoAttribute', $easy_fancybox_array['autoAttribute']['default']) ) );
|
76 |
+
if(!empty($file_types)) {
|
77 |
+
echo "
|
78 |
+
$('";
|
79 |
+
foreach ($file_types as $type)
|
80 |
+
echo 'a[href$=".'.$type.'"],a[href$=".'.strtoupper($type).'"],';
|
81 |
+
echo "')
|
82 |
+
.attr('rel', 'gallery')
|
83 |
+
.addClass('fancybox');";
|
84 |
+
}
|
85 |
+
echo "
|
86 |
+
$('a.fancybox').fancybox({";
|
87 |
+
foreach ($easy_fancybox_array as $key => $values)
|
88 |
+
if('true'!=$values['hide'])
|
89 |
+
echo "
|
90 |
+
'".$key."' : '".get_option($values['id'], $values['default'])."',";
|
91 |
+
|
92 |
+
if( "over" == get_option("fancybox_titlePosition", $easy_fancybox_array['titlePosition']['default']) )
|
93 |
+
echo"
|
94 |
+
'onComplete' : function() {
|
95 |
+
$('#fancybox-wrap').hover(function() {
|
96 |
+
$('#fancybox-title').show();
|
97 |
+
}, function() {
|
98 |
+
$('#fancybox-title').hide();
|
99 |
+
});
|
100 |
+
},";
|
101 |
+
echo"
|
102 |
+
});
|
103 |
+
$('a.fancybox-iframe').fancybox({
|
104 |
+
'type' : 'iframe',
|
105 |
+
'padding' : 0,
|
106 |
+
'autoScale' : false,
|
107 |
+
'transitionIn' : 'none',
|
108 |
+
'transitionOut' : 'none',
|
109 |
+
'width' : '80%',
|
110 |
+
'height' : '90%',
|
111 |
+
});
|
112 |
+
$('a.fancybox-swf').click(function(){
|
113 |
+
$.fancybox({
|
114 |
+
'type' : 'swf',
|
115 |
+
'padding' : 0,
|
116 |
+
'autoScale' : false,
|
117 |
+
'transitionIn' : 'none',
|
118 |
+
'transitionOut' : 'none',
|
119 |
+
'title' : this.title,
|
120 |
+
'width' : 680,
|
121 |
+
'height' : 495,
|
122 |
+
'href' : this.href.replace(new RegExp('watch\\\?v=', 'i'), 'v/'),
|
123 |
+
'swf' : {
|
124 |
+
'wmode' : 'transparent',
|
125 |
+
'allowfullscreen' : 'true'
|
126 |
+
}
|
127 |
+
});
|
128 |
+
return false;
|
129 |
+
});
|
130 |
+
});
|
131 |
+
</script>
|
132 |
+
";
|
133 |
+
}
|
134 |
+
|
135 |
+
// FancyBox Media Settings Section on Settings > Media admin page
|
136 |
+
function easy_fancybox_settings_section() {
|
137 |
+
echo '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&item_number=&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us" title="'.__('Donate to Easy FancyBox plugin development with PayPal - it\'s fast, free and secure!','easy-fancybox').'"><img src="https://www.paypal.com/en_US/i/btn/x-click-but7.gif" style="border:none; vertical-align:text-bottom;float:right" alt="'.__('Donate to Easy FancyBox plugin development with PayPal - it\'s fast, free and secure!','easy-fancybox').'" /></a><p>'.__('The settings listed below determine the image overlay behaviour controlled by FancyBox.','easy-fancybox').'</p>';
|
138 |
+
}
|
139 |
+
// FancyBox Media Settings Fields
|
140 |
+
function easy_fancybox_settings_fields($args){
|
141 |
+
switch($args['input']) {
|
142 |
+
case 'select':
|
143 |
+
echo '
|
144 |
+
<select name="'.$args['id'].'" id="'.$args['id'].'">';
|
145 |
+
foreach ($args['options'] as $optionkey => $optionvalue) {
|
146 |
+
$selected = (get_option($args['id'], $args['default']) == $optionkey) ? ' selected="selected"' : '';
|
147 |
+
echo '
|
148 |
+
<option value="'.esc_attr($optionkey).'"'.$selected.'>'.$optionvalue.'</option>';
|
149 |
+
}
|
150 |
+
echo '
|
151 |
+
</select> ';
|
152 |
+
if( empty($args['label_for']) )
|
153 |
+
echo '<label for="'.$args['id'].'">'.$args['description'].' <em>'.$args['options'][$args['default']].'</em></label>';
|
154 |
+
else
|
155 |
+
echo $args['description'].' <em>'.$args['options'][$args['default']].'</em>';
|
156 |
+
break;
|
157 |
+
case 'text':
|
158 |
+
default:
|
159 |
+
echo '
|
160 |
+
<input type="text" name="'.$args['id'].'" id="'.$args['id'].'" value="'.esc_attr( get_option($args['id'], $args['default']) ).'" class="large-text"><br />';
|
161 |
+
if( empty($args['label_for']) )
|
162 |
+
echo '<label for="'.$args['id'].'">'.$args['description'].' <em>'.$args['default'].'</em></label>';
|
163 |
+
else
|
164 |
+
echo $args['description'].' <em>'.$args['default'].'</em>';
|
165 |
+
break;
|
166 |
+
echo $args['description'];
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
|
171 |
+
function easy_fancybox_admin_init(){
|
172 |
+
load_plugin_textdomain('easy-fancybox', false, dirname(plugin_basename( __FILE__ )));
|
173 |
+
|
174 |
+
add_settings_section('fancybox_section', __('FancyBox','easy-fancybox'), 'easy_fancybox_settings_section', 'media');
|
175 |
+
|
176 |
+
$easy_fancybox_array = easy_fancybox_settings();
|
177 |
+
foreach ($easy_fancybox_array as $key => $value) {
|
178 |
+
add_settings_field( 'fancybox_'.$key, $value['title'], 'easy_fancybox_settings_fields', 'media', 'fancybox_section', $value);
|
179 |
+
register_setting( 'media', 'fancybox_'.$key );
|
180 |
+
}
|
181 |
+
}
|
182 |
+
|
183 |
+
function easy_fancybox_enqueue() {
|
184 |
+
// check if fancy.php is moved one dir up like in WPMU's /mu-plugins/
|
185 |
+
// NOTE: don't use WP_PLUGIN_URL to avoid problems when installed in /mu-plugins/
|
186 |
+
$efb_subdir = (file_exists(dirname(__FILE__).'/easy-fancybox')) ? 'easy-fancybox' : '';
|
187 |
+
|
188 |
+
// ENQUEUE
|
189 |
+
// register main fancybox script
|
190 |
+
wp_enqueue_script('jquery.fancybox', plugins_url($efb_subdir, __FILE__).'/jquery.fancybox.pack.js', array('jquery'), '1.3.1');
|
191 |
+
|
192 |
+
if( "none" != get_option("fancybox_transitionIn") || "none" != get_option("fancybox_transitionOut") ) {
|
193 |
+
// first get rid of previously registered variants of jquery.easing (by other plugins)
|
194 |
+
wp_deregister_script('jquery.easing');
|
195 |
+
wp_deregister_script('jqueryeasing');
|
196 |
+
wp_deregister_script('jquery-easing');
|
197 |
+
wp_deregister_script('easing');
|
198 |
+
// then register our version
|
199 |
+
wp_enqueue_script('jquery.easing', plugins_url($efb_subdir, __FILE__).'/jquery.easing.pack.js', array('jquery'), '1.3');
|
200 |
+
}
|
201 |
+
|
202 |
+
// first get rid of previously registered variants of jquery.mousewheel (by other plugins)
|
203 |
+
wp_deregister_script('jquery.mousewheel');
|
204 |
+
wp_deregister_script('jquerymousewheel');
|
205 |
+
wp_deregister_script('jquery-mousewheel');
|
206 |
+
wp_deregister_script('mousewheel');
|
207 |
+
// then register our version
|
208 |
+
wp_enqueue_script('jquery.mousewheel', plugins_url($efb_subdir, __FILE__).'/jquery.mousewheel.pack.js', array('jquery'), '3.0.2');
|
209 |
+
|
210 |
+
// register style
|
211 |
+
wp_enqueue_style('jquery.fancybox', plugins_url($efb_subdir, __FILE__).'/jquery.fancybox.css.php', false, '1.3.1');
|
212 |
+
}
|
213 |
+
|
214 |
+
// HOOKS //
|
215 |
+
|
216 |
+
add_action('wp_enqueue_scripts', 'easy_fancybox_enqueue', 999);
|
217 |
+
add_action('wp_head', 'easy_fancybox');
|
218 |
+
|
219 |
+
add_action('admin_init','easy_fancybox_admin_init');
|
220 |
+
|
easy-fancybox.pot
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of the WordPress plugin by .
|
2 |
+
# Copyright (C) 2010
|
3 |
+
# This file is distributed under the same license as the package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
+
#
|
6 |
+
#, fuzzy
|
7 |
+
msgid ""
|
8 |
+
msgstr ""
|
9 |
+
"Project-Id-Version: \n"
|
10 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/easy-fancybox\n"
|
11 |
+
"POT-Creation-Date: 2010-09-08 21:30+0000\n"
|
12 |
+
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
|
13 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
+
"MIME-Version: 1.0\n"
|
16 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
17 |
+
"Content-Transfer-Encoding: 8bit\n"
|
18 |
+
|
19 |
+
#: fancybox.php:13
|
20 |
+
msgid "Title Position"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: fancybox.php:15
|
24 |
+
msgid "Overlay"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: fancybox.php:16
|
28 |
+
msgid "Inside"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: fancybox.php:17
|
32 |
+
msgid "Outside"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: fancybox.php:20
|
36 |
+
msgid "Position of the overlay content title."
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: fancybox.php:23
|
40 |
+
msgid "Transition In"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: fancybox.php:25 fancybox.php:35
|
44 |
+
msgid "Elastic"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: fancybox.php:26
|
48 |
+
msgid "Fade in"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: fancybox.php:27 fancybox.php:37
|
52 |
+
msgid "None"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: fancybox.php:30
|
56 |
+
msgid "Transition effect when opening the overlay."
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: fancybox.php:33
|
60 |
+
msgid "Transition Out"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: fancybox.php:36
|
64 |
+
msgid "Fade out"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: fancybox.php:40
|
68 |
+
msgid "Transition effect when closing the overlay."
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: fancybox.php:68
|
72 |
+
msgid ""
|
73 |
+
"The settings listed below determine the image overlay behaviour controlled "
|
74 |
+
"by FancyBox."
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: fancybox.php:114
|
78 |
+
msgid "FancyBox"
|
79 |
+
msgstr ""
|
fancybox.php
DELETED
@@ -1,140 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Easy FancyBox
|
4 |
-
Plugin URI: http://4visions.nl/en/wordpress-plugins/easy-fancybox/
|
5 |
-
Description: Hassle-free, no-settings, auto-enable <a href="http://fancybox.net/">FancyBox 1.3.1</a> on all image links including BMP, GIF, JPG, JPEG, and PNG. Uses packed Javascript. Happy with it? Please leave me a small <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&item_number=1%2e3%2e1&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us">TIP</a> for development and support on this plugin and please consider a DONATION to the <a href="http://fancybox.net/">FancyBox project</a>.
|
6 |
-
Version: 1.3.1.2
|
7 |
-
Author: RavanH
|
8 |
-
Author URI: http://4visions.nl/
|
9 |
-
*/
|
10 |
-
|
11 |
-
$easy_fancybox_array = array(
|
12 |
-
'titlePosition' => array (
|
13 |
-
'title' => __('Title Position','easy-fancybox'),
|
14 |
-
'options' => array(
|
15 |
-
'over' => __('Overlay','easy-fancybox'),
|
16 |
-
'inside' => __('Inside','easy-fancybox'),
|
17 |
-
'outside' => __('Outside','easy-fancybox')
|
18 |
-
),
|
19 |
-
'default' => 'over',
|
20 |
-
'description' => __('Position of the overlay content title.','easy-fancybox')
|
21 |
-
),
|
22 |
-
'transitionIn' => array (
|
23 |
-
'title' => __('Transition In','easy-fancybox'),
|
24 |
-
'options' => array(
|
25 |
-
'elastic' => __('Elastic','easy-fancybox'),
|
26 |
-
'fade' => __('Fade in','easy-fancybox'),
|
27 |
-
'none' => __('None','easy-fancybox')
|
28 |
-
),
|
29 |
-
'default' => 'elastic',
|
30 |
-
'description' => __('Transition effect when opening the overlay.','easy-fancybox')
|
31 |
-
),
|
32 |
-
'transitionOut' => array (
|
33 |
-
'title' => __('Transition Out','easy-fancybox'),
|
34 |
-
'options' => array(
|
35 |
-
'elastic' => __('Elastic','easy-fancybox'),
|
36 |
-
'fade' => __('Fade out','easy-fancybox'),
|
37 |
-
'none' => __('None','easy-fancybox')
|
38 |
-
),
|
39 |
-
'default' => 'elastic',
|
40 |
-
'description' => __('Transition effect when closing the overlay.','easy-fancybox')
|
41 |
-
),
|
42 |
-
);
|
43 |
-
// FUNCTIONS //
|
44 |
-
|
45 |
-
// What about other things than link with img, like: div[class$="fancybox"] ?
|
46 |
-
function easy_fancybox() {
|
47 |
-
global $easy_fancybox_array;
|
48 |
-
?>
|
49 |
-
<script type="text/javascript">
|
50 |
-
jQuery(document).ready(function($){
|
51 |
-
var select = $('a[href$=".bmp"],a[href$=".gif"],a[href$=".jpg"],a[href$=".jpeg"],a[href$=".png"],a[href$=".BMP"],a[href$=".GIF"],a[href$=".JPG"],a[href$=".JPEG"],a[href$=".PNG"]');
|
52 |
-
select.attr('rel', 'fancybox').fancybox({
|
53 |
-
<?php
|
54 |
-
foreach ($easy_fancybox_array as $key => $values) {
|
55 |
-
$value = (get_option("fancybox_".$key)) ? get_option("fancybox_".$key) : $values['default'];
|
56 |
-
echo "
|
57 |
-
'".$key."' : '".$value."',";
|
58 |
-
}
|
59 |
-
?>
|
60 |
-
});
|
61 |
-
});
|
62 |
-
</script>
|
63 |
-
<?php
|
64 |
-
}
|
65 |
-
|
66 |
-
// FancyBox Media Settings
|
67 |
-
function easy_fancybox_options_section() {
|
68 |
-
echo '<p>'.__('The settings listed below determine the image overlay behaviour controlled by FancyBox.','easy-fancybox').'</p>';
|
69 |
-
}
|
70 |
-
|
71 |
-
function easy_fancybox_option_titlePosition(){
|
72 |
-
global $easy_fancybox_array;
|
73 |
-
echo '
|
74 |
-
<label><select name="fancybox_titlePosition" id="fancybox_titlePosition">';
|
75 |
-
foreach ($easy_fancybox_array['titlePosition']['options'] as $optionkey => $optionvalue) {
|
76 |
-
$selected = (get_option('fancybox_titlePosition') == $optionkey) ? ' selected="selected"' : '';
|
77 |
-
echo '
|
78 |
-
<option value="'.esc_attr($optionkey).'"'.$selected.'>'.$optionvalue.'</option>';
|
79 |
-
}
|
80 |
-
echo '
|
81 |
-
</select> '.$easy_fancybox_array['titlePosition']['description'].'</label>';
|
82 |
-
}
|
83 |
-
|
84 |
-
function easy_fancybox_option_transitionIn(){
|
85 |
-
global $easy_fancybox_array;
|
86 |
-
echo '
|
87 |
-
<label><select name="fancybox_transitionIn" id="fancybox_transitionIn">';
|
88 |
-
foreach ($easy_fancybox_array['transitionIn']['options'] as $optionkey => $optionvalue) {
|
89 |
-
$selected = (get_option('fancybox_transitionIn') == $optionkey) ? ' selected="selected"' : '';
|
90 |
-
echo '
|
91 |
-
<option value="'.esc_attr($optionkey).'"'.$selected.'>'.$optionvalue.'</option>';
|
92 |
-
}
|
93 |
-
echo '
|
94 |
-
</select> '.$easy_fancybox_array['transitionIn']['description'].'</label>';
|
95 |
-
}
|
96 |
-
|
97 |
-
function easy_fancybox_option_transitionOut(){
|
98 |
-
global $easy_fancybox_array;
|
99 |
-
echo '
|
100 |
-
<label><select name="fancybox_transitionOut" id="fancybox_transitionOut">';
|
101 |
-
foreach ($easy_fancybox_array['transitionOut']['options'] as $optionkey => $optionvalue) {
|
102 |
-
$selected = (get_option('fancybox_transitionOut') == $optionkey) ? ' selected="selected"' : '';
|
103 |
-
echo '
|
104 |
-
<option value="'.esc_attr($optionkey).'"'.$selected.'>'.$optionvalue.'</option>';
|
105 |
-
}
|
106 |
-
echo '
|
107 |
-
</select> '.$easy_fancybox_array['transitionOut']['description'].'</label>';
|
108 |
-
}
|
109 |
-
|
110 |
-
function easy_fancybox_admin_init(){
|
111 |
-
global $easy_fancybox_array;
|
112 |
-
load_plugin_textdomain('easy-fancybox');
|
113 |
-
|
114 |
-
add_settings_section('fancybox_section', __('FancyBox','easy-fancybox'), 'easy_fancybox_options_section', 'media');
|
115 |
-
|
116 |
-
foreach ($easy_fancybox_array as $key => $value) {
|
117 |
-
add_settings_field( 'fancybox_'.$key, $value['title'], 'easy_fancybox_option_'.$key, 'media', 'fancybox_section');
|
118 |
-
register_setting( 'media', 'fancybox_'.$key );
|
119 |
-
}
|
120 |
-
}
|
121 |
-
|
122 |
-
|
123 |
-
// HOOKS //
|
124 |
-
|
125 |
-
if (!is_admin()) {
|
126 |
-
// check if fancy.php is moved one dir up like in WPMU's /mu-plugins/
|
127 |
-
// NOTE: don't use WP_PLUGIN_URL to avoid problems when installed in /mu-plugins/
|
128 |
-
if (file_exists(dirname(__FILE__).'/easy-fancybox'))
|
129 |
-
$efb = "easy-fancybox";
|
130 |
-
|
131 |
-
// ENQUEUE
|
132 |
-
wp_enqueue_script('jquery.fancybox', plugins_url($efb, __FILE__).'/jquery.fancybox.pack.js', array('jquery'), '1.3.1');
|
133 |
-
wp_enqueue_script('jquery.easing', plugins_url($efb, __FILE__).'/jquery.easing.pack.js', array('jquery'), '1.3');
|
134 |
-
wp_enqueue_script('jquery.mousewheel', plugins_url($efb, __FILE__).'/jquery.mousewheel.pack.js', array('jquery'), '3.0.2');
|
135 |
-
wp_enqueue_style('jquery.fancybox', plugins_url($efb, __FILE__).'/jquery.fancybox.css.php', false, '1.3.1');
|
136 |
-
add_action('wp_head', 'easy_fancybox');
|
137 |
-
}
|
138 |
-
|
139 |
-
add_action('admin_init','easy_fancybox_admin_init');
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -4,23 +4,30 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravan
|
|
4 |
Tags: fancybox, jquery, images, lightbox, gallery, image overlay
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 3.0.1
|
7 |
-
Stable tag: 1.3.1.
|
8 |
|
9 |
-
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
No options to be set. No configuration pages. It just gives you FancyBox-in-a-Box
|
14 |
|
15 |
-
|
16 |
-
* titlePosition ( over / inside / outside ) controls the position of the image title. Includes the new "Overlay" position.
|
17 |
-
* transitionIn and transitionOut ( elastic / fade / none ) control the transition effects during open and close.
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
-
Visit [FancyBox](http://fancybox.net/) for more information, examples and the Support Forum. Please consider a DONATION too!
|
24 |
|
25 |
== Installation ==
|
26 |
|
@@ -72,19 +79,33 @@ The same version as this plugin has. I aim to keep close pace to FancyBox upgrad
|
|
72 |
|
73 |
= Where is the settings page? =
|
74 |
|
75 |
-
There is no settings page but there are a few options you can change. See the new **FancyBox** section on **Settings > Media**. To see the default, check out the example under Screenshots
|
76 |
|
77 |
-
=
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
-
|
80 |
|
81 |
-
= Can I
|
82 |
|
83 |
-
Yes.
|
84 |
|
85 |
-
|
86 |
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
== Screenshots ==
|
90 |
|
@@ -92,6 +113,13 @@ Yes. Upload the complete /easy-fancybox/ directory to /wp-content/mu-plugins/ an
|
|
92 |
|
93 |
== Changelog ==
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
= 1.3.1.2 =
|
96 |
* added option titlePosition : over / inside / outside
|
97 |
* added option transitionIn : elastic / fade / none
|
@@ -105,5 +133,5 @@ Yes. Upload the complete /easy-fancybox/ directory to /wp-content/mu-plugins/ an
|
|
105 |
|
106 |
== Upgrade Notice ==
|
107 |
|
108 |
-
= 1.3.1.
|
109 |
-
|
4 |
Tags: fancybox, jquery, images, lightbox, gallery, image overlay
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 3.0.1
|
7 |
+
Stable tag: 1.3.1.3
|
8 |
|
9 |
+
Easily enable the FancyBox 1.3.1 jQuery extension on all JPG, BMP, GIF, PNG and SWF links. Multi-Site compatible and supports iFrame and Flash movies, including YouTube and others.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
No options to be set. No configuration pages. It just gives you FancyBox-in-a-Box for all links to image (.jpg/.bmp/.gif/.png) _and_ Flash movie (.swf) files. Easy FancyBox uses the packed FancyBox 1.3.1 jQuery extension, is WP 3.0 Multi-Site compatible and supports iFrame and Flash movies -including YouTube and others- in an overlay.
|
14 |
|
15 |
+
See the [Screenshot](http://wordpress.org/extend/plugins/easy-fancybox/screenshots/) and you know how images will be presented on your site as soon as you have installed and (network) activated this simple plugin.
|
|
|
|
|
16 |
|
17 |
+
See [FAQ's](http://wordpress.org/extend/plugins/easy-fancybox/faq/) for instructions to get Youtube movies (and similar services) and HTML content display in a FancyBox overlay.
|
18 |
|
19 |
+
Looking for some basic control? You can find a new section **FancyBox** on your **Settings > Media** admin page:
|
20 |
+
|
21 |
+
- *Auto-enable*: file types FancyBox should be automatically enabled for.
|
22 |
+
- *Title Position*: Overlay / Inside / Outside to control the position of the image title. Includes the new "Overlay" position.
|
23 |
+
- *Transition In / Out*: Elastic / Fade / None to control the transition effects during opening and closing of the overlay.
|
24 |
+
|
25 |
+
Visit [FancyBox](http://fancybox.net/) for more information, examples and the Support Forum. Please consider a DONATION to the FancyBox project.
|
26 |
+
|
27 |
+
= Translations =
|
28 |
+
|
29 |
+
- **Dutch** * Author: [R.A. van Hagen](http://4visions.nl)
|
30 |
|
|
|
31 |
|
32 |
== Installation ==
|
33 |
|
79 |
|
80 |
= Where is the settings page? =
|
81 |
|
82 |
+
There is no settings page but there are a few options you can change. See the new **FancyBox** section on **Settings > Media**. To see the default, check out the example under [Screenshots](http://wordpress.org/extend/plugins/easy-fancybox/) ...
|
83 |
|
84 |
+
= Will a WordPress generated gallery be displayed in a FancyBox overlay? =
|
85 |
+
|
86 |
+
Yes, but _only_ if you used the option **Link thumbnails to: Image File** when inserting the gallery!
|
87 |
+
|
88 |
+
= Can I display web pages or HTML files in a FancyBox overlay? =
|
89 |
+
|
90 |
+
Yes. Place a link with either `class="fancybox-iframe"` or `class="fancybox iframe"` to any web page or .htm(l) file in your content.
|
91 |
|
92 |
+
NOTE: The difference between these two (- or space) is in size of the overlay viewport. Try it out and use the one you like best :)
|
93 |
|
94 |
+
= Can I play SWF files in a FancyBox overlay? =
|
95 |
|
96 |
+
Yes. Just place a link _with the URL ending in .swf_ to your Flash file in the page content.
|
97 |
|
98 |
+
If you do not have **swf** included in the *Auto-enable* option on Settings > Media admin page,you will need to add either `class="fancybox"` or `class="fancybox-swf"` to the link to enable FancyBox for it.
|
99 |
|
100 |
+
= Can I play Youtube movies in a FancyBox overlay? =
|
101 |
+
|
102 |
+
Yes. Just place a link with `class="fancybox-swf"` to either the Youtube page or directly to the movie inside your page content.
|
103 |
+
|
104 |
+
This is actually a special case of SWF file. The URL for Youtube movies does 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-swf"` or alternatively `class="fancybox-iframe"`. The difference between the two is in size of the overlay viewport.
|
105 |
+
|
106 |
+
= Is Easy FancyBox multi-site compatible? =
|
107 |
+
|
108 |
+
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.
|
109 |
|
110 |
== Screenshots ==
|
111 |
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
+
= 1.3.1.3 =
|
117 |
+
* translation .pot file available
|
118 |
+
* Dutch translation
|
119 |
+
* Youtube and Flash movie support
|
120 |
+
* Iframe support
|
121 |
+
* added option Auto-enable for...
|
122 |
+
|
123 |
= 1.3.1.2 =
|
124 |
* added option titlePosition : over / inside / outside
|
125 |
* added option transitionIn : elastic / fade / none
|
133 |
|
134 |
== Upgrade Notice ==
|
135 |
|
136 |
+
= 1.3.1.3 =
|
137 |
+
Now supports Flash and Youtube movies. Dutch translation, added POT file for translations.
|