Version Description
PDF compatibility improvement, Dailymotion support and many new options and classes.
=
Download this release
Release Info
Developer | RavanH |
Plugin | Easy FancyBox |
Version | 1.3.4.6 |
Comparing to | |
See all releases |
Code changes from version 1.3.4.5 to 1.3.4.6
- easy-fancybox-settings.php +1056 -0
- easy-fancybox.css.php +7 -3
- easy-fancybox.php +86 -904
- readme.txt +86 -18
easy-fancybox-settings.php
ADDED
@@ -0,0 +1,1056 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function easy_fancybox_settings(){
|
3 |
+
|
4 |
+
return array (
|
5 |
+
'Global' => array(
|
6 |
+
'title' => __('Global settings','easy-fancybox'),
|
7 |
+
'input' => 'multiple',
|
8 |
+
'hide' => true,
|
9 |
+
'options' => array(
|
10 |
+
'intro' => array (
|
11 |
+
'hide' => true,
|
12 |
+
'description' => __('These settings determine the global overlay appearance and behaviour controlled by FancyBox.','easy-fancybox') . '<br />'
|
13 |
+
),
|
14 |
+
'p0' => array (
|
15 |
+
'hide' => true,
|
16 |
+
'description' => '<br /><strong>' . __('Links') . '</strong><br />'
|
17 |
+
),
|
18 |
+
'attributeLimit' => array (
|
19 |
+
'id' => 'fancybox_attributeLimit',
|
20 |
+
'title' => __('Exclude','easy-fancybox'),
|
21 |
+
'label_for' => 'fancybox_attributeLimit',
|
22 |
+
'hide' => true,
|
23 |
+
'input' => 'select',
|
24 |
+
'options' => array(
|
25 |
+
'' => __('None'),
|
26 |
+
':not(:empty)' => __('Empty (hidden) links','easy-fancybox'),
|
27 |
+
':has(img)' => __('Without thumbnail image','easy-fancybox')
|
28 |
+
),
|
29 |
+
'default' => ':not(:empty)',
|
30 |
+
'description' => '<br />'
|
31 |
+
),
|
32 |
+
'autoClick' => array (
|
33 |
+
'id' => 'fancybox_autoClick',
|
34 |
+
'title' => __('Auto-trigger','easy-fancybox'),
|
35 |
+
'label_for' => 'fancybox_autoClick',
|
36 |
+
'hide' => true,
|
37 |
+
'input' => 'select',
|
38 |
+
'options' => array(
|
39 |
+
'' => __('None'),
|
40 |
+
'1' => __('Manual','easy-fancybox'),
|
41 |
+
'IMG' => __('First Image link','easy-fancybox'),
|
42 |
+
'PDF' => __('First PDF link','easy-fancybox'),
|
43 |
+
'SWF' => __('First SWF link','easy-fancybox'),
|
44 |
+
'YouTube' => __('First YouTube link ','easy-fancybox'),
|
45 |
+
'Vimeo' => __('First Vimeo link ','easy-fancybox'),
|
46 |
+
'Dailymotion' => __('First Dailymotion link ','easy-fancybox'),
|
47 |
+
'iFrame' => __('First iFrame link','easy-fancybox'),
|
48 |
+
'99' => __('First of any link','easy-fancybox'),
|
49 |
+
),
|
50 |
+
'default' => '1',
|
51 |
+
'description' => '<br />' . __('If you want an image, movie or even hidden content to pop up when a visitor opens the page, select one of these options. "Manual" means you have to create a link with class="fancybox" and id="fancybox-auto" in your content or a text widget.','easy-fancybox')
|
52 |
+
),
|
53 |
+
'p1' => array (
|
54 |
+
'hide' => true,
|
55 |
+
'description' => '<br /><br /><strong>' . __('Overlay','easy-fancybox') . '</strong><br />'
|
56 |
+
),
|
57 |
+
'overlayShow' => array (
|
58 |
+
'id' => 'fancybox_overlayShow',
|
59 |
+
'input' => 'checkbox',
|
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'),
|
66 |
+
'label_for' => 'fancybox_overlayOpacity',
|
67 |
+
'input' => 'text',
|
68 |
+
'class' => 'small-text',
|
69 |
+
'default' => '',
|
70 |
+
'description' => __('Value between 0 and 1. ','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 0.7</em><br />'
|
71 |
+
),
|
72 |
+
'overlayColor' => array (
|
73 |
+
'id' => 'fancybox_overlayColor',
|
74 |
+
'title' => __('Overlay color','easy-fancybox'),
|
75 |
+
'label_for' => 'fancybox_overlayColor',
|
76 |
+
'input' => 'text',
|
77 |
+
'class' => 'small-text',
|
78 |
+
'default' => '',
|
79 |
+
'description' => __('Enter a HTML color value.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' #777</em><br />'
|
80 |
+
),
|
81 |
+
'p2' => array (
|
82 |
+
'hide' => true,
|
83 |
+
'description' => '<br /><strong>' . __('Overlay window','easy-fancybox') . '</strong><br />'
|
84 |
+
),
|
85 |
+
'width' => array (
|
86 |
+
'id' => 'fancybox_width',
|
87 |
+
'title' => __('Width'),
|
88 |
+
'label_for' => 'fancybox_width',
|
89 |
+
'input' => 'text',
|
90 |
+
'class' => 'small-text',
|
91 |
+
'default' => '',
|
92 |
+
'description' => ' '
|
93 |
+
),
|
94 |
+
'height' => array (
|
95 |
+
'id' => 'fancybox_height',
|
96 |
+
'title' => __('Height'),
|
97 |
+
'label_for' => 'fancybox_height',
|
98 |
+
'input' => 'text',
|
99 |
+
'class' => 'small-text',
|
100 |
+
'default' => ''
|
101 |
+
),
|
102 |
+
'padding' => array (
|
103 |
+
'id' => 'fancybox_padding',
|
104 |
+
'title' => __('Border'),
|
105 |
+
'label_for' => 'fancybox_padding',
|
106 |
+
'input' => 'text',
|
107 |
+
'class' => 'small-text',
|
108 |
+
'default' => '',
|
109 |
+
'description' => '<br />' . __('Change default width, heigth and border of the overlay window.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 560 x 340 x 10</em><br />'
|
110 |
+
),
|
111 |
+
'centerOnScroll' => array (
|
112 |
+
'id' => 'fancybox_centerOnScroll',
|
113 |
+
'input' => 'checkbox',
|
114 |
+
'default' => '1',
|
115 |
+
'description' => __('Center while scrolling','easy-fancybox')
|
116 |
+
),
|
117 |
+
'showCloseButton' => array (
|
118 |
+
'id' => 'fancybox_showCloseButton',
|
119 |
+
'input' => 'checkbox',
|
120 |
+
'default' => '1',
|
121 |
+
'description' => __('Show the (X) close button','easy-fancybox')
|
122 |
+
),
|
123 |
+
'showNavArrows' => array (
|
124 |
+
'id' => 'fancybox_showNavArrows',
|
125 |
+
'input' => 'checkbox',
|
126 |
+
'default' => '1',
|
127 |
+
'description' => __('Show the gallery navigation arrows','easy-fancybox')
|
128 |
+
),
|
129 |
+
'titleShow' => array (
|
130 |
+
'id' => 'fancybox_titleShow',
|
131 |
+
'input' => 'checkbox',
|
132 |
+
'default' => '1',
|
133 |
+
'description' => __('Show title','easy-fancybox')
|
134 |
+
),
|
135 |
+
'titlePosition' => array (
|
136 |
+
'id' => 'fancybox_titlePosition',
|
137 |
+
'title' => __('Title Position','easy-fancybox'),
|
138 |
+
'label_for' => 'fancybox_titlePosition',
|
139 |
+
'input' => 'select',
|
140 |
+
'options' => array(
|
141 |
+
'' => __('Float','easy-fancybox'), // same as 'float'
|
142 |
+
'outside' => __('Outside','easy-fancybox'),
|
143 |
+
'inside' => __('Inside','easy-fancybox'),
|
144 |
+
'over' => __('Overlay','easy-fancybox')
|
145 |
+
),
|
146 |
+
'default' => 'over',
|
147 |
+
'description' => ' '
|
148 |
+
),
|
149 |
+
'titleFromAlt' => array (
|
150 |
+
'id' => 'fancybox_titleFromAlt',
|
151 |
+
'input' => 'checkbox',
|
152 |
+
'default' => '1',
|
153 |
+
'description' => __('Allow title from thumbnail alt tag','easy-fancybox')
|
154 |
+
),
|
155 |
+
/* 'titleFormat' => array (
|
156 |
+
'id' => 'fancybox_titleFormat',
|
157 |
+
'title' => __('Title format','easy-fancybox'),
|
158 |
+
'label_for' => 'fancybox_titleFormat',
|
159 |
+
'input' => 'select',
|
160 |
+
'options' => array(
|
161 |
+
'' => __('Default FancyBox style','easy-fancybox'),
|
162 |
+
'function(title, currentArray, currentIndex, currentOpts) { return \'<div style="font-face:Arial,sans-serif;text-align:left"><span style="float:right;font-size:large"><a href="javascript:;" onclick="$.fancybox.close();">' . __('Close','easy-fancybox') . ' <img src="' . plugins_url(FANCYBOX_SUBDIR, __FILE__) . '/fancybox/fancy_close.png" /></a></span>\' + (title && title.length ? \'<b style="display:block;margin-right:80px">\' + title + \'</b>\' : \'\' ) + \'' . __('Image','easy-fancybox') . '\' + (currentIndex + 1) + \' ' . __('of','easy-fancybox') . ' \' + currentArray.length + \'</div>\';
|
163 |
+
}' => __('Mimic Lightbox2 style','easy-fancybox'),
|
164 |
+
),
|
165 |
+
'noquotes' => true,
|
166 |
+
'default' => '',
|
167 |
+
'description' => '<br />' . __('To improve Lightbox2 style disable Show close button and set titleposition to Inside or Outside','easy-fancybox') . '<br />'
|
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 (
|
184 |
+
'hide' => true,
|
185 |
+
'description' => '<br /><strong>' . __('Transition','easy-fancybox') . '</strong><br />'
|
186 |
+
),
|
187 |
+
'transitionIn' => array (
|
188 |
+
'id' => 'fancybox_transitionIn',
|
189 |
+
'title' => __('Transition In','easy-fancybox'),
|
190 |
+
'label_for' => 'fancybox_transitionIn',
|
191 |
+
'input' => 'select',
|
192 |
+
'options' => array(
|
193 |
+
'' => __('Fade','easy-fancybox'),
|
194 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
195 |
+
'none' => __('None','easy-fancybox')
|
196 |
+
),
|
197 |
+
'default' => 'elastic',
|
198 |
+
'description' => ' '
|
199 |
+
),
|
200 |
+
'easingIn' => array (
|
201 |
+
'id' => 'fancybox_easingIn',
|
202 |
+
'title' => __('Easing In','easy-fancybox'),
|
203 |
+
'label_for' => 'fancybox_easingIn',
|
204 |
+
'input' => 'select',
|
205 |
+
'options' => array(
|
206 |
+
'' => __('Swing','easy-fancybox'),
|
207 |
+
'easeOutBack' => __('Back','easy-fancybox'),
|
208 |
+
'easeOutQuad' => __('Quad','easy-fancybox'),
|
209 |
+
'easeOutExpo' => __('Expo','easy-fancybox'),
|
210 |
+
),
|
211 |
+
'default' => 'easeOutBack',
|
212 |
+
'description' => '<br />'
|
213 |
+
),
|
214 |
+
'transitionOut' => array (
|
215 |
+
'id' => 'fancybox_transitionOut',
|
216 |
+
'title' => __('Transition Out','easy-fancybox'),
|
217 |
+
'label_for' => 'fancybox_transitionOut',
|
218 |
+
'input' => 'select',
|
219 |
+
'options' => array(
|
220 |
+
'' => __('Fade','easy-fancybox'),
|
221 |
+
'elastic' => __('Elastic','easy-fancybox'),
|
222 |
+
'none' => __('None','easy-fancybox')
|
223 |
+
),
|
224 |
+
'default' => 'elastic',
|
225 |
+
'description' => ' '
|
226 |
+
),
|
227 |
+
'easingOut' => array (
|
228 |
+
'id' => 'fancybox_easingOut',
|
229 |
+
'title' => __('Easing Out','easy-fancybox'),
|
230 |
+
'label_for' => 'fancybox_easingOut',
|
231 |
+
'input' => 'select',
|
232 |
+
'options' => array(
|
233 |
+
'' => __('Swing','easy-fancybox'),
|
234 |
+
'easeInBack' => __('Back','easy-fancybox'),
|
235 |
+
'easeInQuad' => __('Quad','easy-fancybox'),
|
236 |
+
'easeInExpo' => __('Expo','easy-fancybox'),
|
237 |
+
),
|
238 |
+
'default' => 'easeInBack',
|
239 |
+
'description' => '<br />' . __('Easing effects only apply when Transition is set to Elastic. ','easy-fancybox') . '<br /><br />'
|
240 |
+
),
|
241 |
+
'opacity' => array (
|
242 |
+
'id' => 'fancybox_opacity',
|
243 |
+
'input' => 'checkbox',
|
244 |
+
'default' => '',
|
245 |
+
'description' => __('Transparency fade during elastic transition.','easy-fancybox')
|
246 |
+
),
|
247 |
+
'speedIn' => array (
|
248 |
+
'id' => 'fancybox_speedIn',
|
249 |
+
'title' => __('Opening speed','easy-fancybox'),
|
250 |
+
'label_for' => 'fancybox_speedIn',
|
251 |
+
'input' => 'text',
|
252 |
+
'class' => 'small-text',
|
253 |
+
'default' => '',
|
254 |
+
),
|
255 |
+
'speedOut' => array (
|
256 |
+
'id' => 'fancybox_speedIn',
|
257 |
+
'title' => __('Closing speed','easy-fancybox'),
|
258 |
+
'label_for' => 'fancybox_speedOut',
|
259 |
+
'input' => 'text',
|
260 |
+
'class' => 'small-text',
|
261 |
+
'default' => '',
|
262 |
+
),
|
263 |
+
'changeFade' => array (
|
264 |
+
'id' => 'fancybox_changeFade',
|
265 |
+
'title' => __('Fade speed','easy-fancybox'),
|
266 |
+
'label_for' => 'fancybox_changeFade',
|
267 |
+
'input' => 'text',
|
268 |
+
'class' => 'small-text',
|
269 |
+
'default' => '',
|
270 |
+
'description' => '<br />' . __('Duration in milliseconds. Higher is slower.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 300</em><br />'
|
271 |
+
) )
|
272 |
+
),
|
273 |
+
'IMG' => array(
|
274 |
+
'title' => __('Images','easy-fancybox'),
|
275 |
+
'input' => 'multiple',
|
276 |
+
'options' => array(
|
277 |
+
'enable' => array (
|
278 |
+
'id' => 'fancybox_enableImg',
|
279 |
+
'input' => 'checkbox',
|
280 |
+
'hide' => true,
|
281 |
+
'default' => ( function_exists('is_plugin_active_for_network') && is_plugin_active_for_network(plugin_basename( __FILE__ )) ) ? '' : '1',
|
282 |
+
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('Images','easy-fancybox') . '</strong>'
|
283 |
+
),
|
284 |
+
'intro' => array (
|
285 |
+
'hide' => true,
|
286 |
+
'description' => __('To make any image file open in an overlay, add its extension to the auto-detect field or use the tag class="fancybox" for its link. Clear field to switch off auto-enabling.','easy-fancybox') . '<br />'
|
287 |
+
),
|
288 |
+
'autoAttribute' => array (
|
289 |
+
'id' => 'fancybox_autoAttribute',
|
290 |
+
'title' => __('Auto-detect','easy-fancybox'),
|
291 |
+
'label_for' => 'fancybox_autoAttribute',
|
292 |
+
'input' => 'text',
|
293 |
+
'class' => 'regular-text',
|
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',
|
301 |
+
'title' => __('Auto-gallery','easy-fancybox'),
|
302 |
+
'label_for' => 'fancybox_autoGallery',
|
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'
|
317 |
+
)
|
318 |
+
)
|
319 |
+
),
|
320 |
+
|
321 |
+
'PDF' => array(
|
322 |
+
'title' => __('PDF','easy-fancybox'),
|
323 |
+
'input' => 'multiple',
|
324 |
+
'options' => array(
|
325 |
+
'enable' => array (
|
326 |
+
'id' => 'fancybox_enablePDF',
|
327 |
+
'input' => 'checkbox',
|
328 |
+
'hide' => true,
|
329 |
+
'default' => '',
|
330 |
+
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('PDF','easy-fancybox') . '</strong>'
|
331 |
+
),
|
332 |
+
'autoAttribute' => array (
|
333 |
+
'id' => 'fancybox_autoAttributePDF',
|
334 |
+
'input' => 'checkbox',
|
335 |
+
'hide' => true,
|
336 |
+
'default' => '',
|
337 |
+
'selector' => 'href$=".pdf"',
|
338 |
+
'description' => __('Auto-detect','easy-fancybox')
|
339 |
+
),
|
340 |
+
'class' => array (
|
341 |
+
'hide' => true,
|
342 |
+
'default' => 'fancybox-pdf'
|
343 |
+
),
|
344 |
+
'intro' => array (
|
345 |
+
'hide' => true,
|
346 |
+
'description' => __('To make any PDF document file open in an overlay, switch on auto-detect or use the tag class="fancybox-pdf" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
347 |
+
),
|
348 |
+
'type' => array (
|
349 |
+
'default' => 'html'
|
350 |
+
),
|
351 |
+
'width' => array (
|
352 |
+
'id' => 'fancybox_PDFwidth',
|
353 |
+
'title' => __('Width'),
|
354 |
+
'label_for' => 'fancybox_PDFwidth',
|
355 |
+
'input' => 'text',
|
356 |
+
'class' => 'small-text',
|
357 |
+
'default' => '90%',
|
358 |
+
'description' => ' '
|
359 |
+
),
|
360 |
+
'height' => array (
|
361 |
+
'id' => 'fancybox_PDFheight',
|
362 |
+
'title' => __('Height'),
|
363 |
+
'label_for' => 'fancybox_PDFheight',
|
364 |
+
'input' => 'text',
|
365 |
+
'class' => 'small-text',
|
366 |
+
'default' => '90%'
|
367 |
+
),
|
368 |
+
'margin' => array (
|
369 |
+
'default' => '0'
|
370 |
+
),
|
371 |
+
'padding' => array (
|
372 |
+
'id' => 'fancybox_PDFpadding',
|
373 |
+
'title' => __('Border'),
|
374 |
+
'label_for' => 'fancybox_PDFpadding',
|
375 |
+
'input' => 'text',
|
376 |
+
'class' => 'small-text',
|
377 |
+
'default' => '0',
|
378 |
+
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
379 |
+
),
|
380 |
+
'autoScale' => array (
|
381 |
+
'noquotes' => true,
|
382 |
+
'default' => 'false'
|
383 |
+
),
|
384 |
+
'titleShow' => array (
|
385 |
+
'id' => 'fancybox_PDFtitleShow',
|
386 |
+
'input' => 'checkbox',
|
387 |
+
'default' => '',
|
388 |
+
'description' => __('Show title','easy-fancybox')
|
389 |
+
),
|
390 |
+
'titlePosition' => array (
|
391 |
+
'id' => 'fancybox_PDFtitlePosition',
|
392 |
+
'title' => __('Title Position','easy-fancybox'),
|
393 |
+
'label_for' => 'fancybox_PDFtitlePosition',
|
394 |
+
'input' => 'select',
|
395 |
+
'options' => array(
|
396 |
+
'float' => __('Float','easy-fancybox'), // same as 'float'
|
397 |
+
'outside' => __('Outside','easy-fancybox'),
|
398 |
+
'inside' => __('Inside','easy-fancybox')
|
399 |
+
//,'over' => __('Overlay','easy-fancybox')
|
400 |
+
),
|
401 |
+
'default' => 'float',
|
402 |
+
),
|
403 |
+
'titleFromAlt' => array (
|
404 |
+
'id' => 'fancybox_PDFtitleFromAlt',
|
405 |
+
'input' => 'checkbox',
|
406 |
+
'default' => '',
|
407 |
+
'description' => __('Allow title from thumbnail alt tag','easy-fancybox')
|
408 |
+
),
|
409 |
+
'transitionOut' => array (
|
410 |
+
'id' => 'fancybox_PDFtransitionOut',
|
411 |
+
'title' => __('Transition Out','easy-fancybox'),
|
412 |
+
'label_for' => 'fancybox_PDFtransitionOut',
|
413 |
+
'input' => 'select',
|
414 |
+
'class' => '',
|
415 |
+
'options' => array(
|
416 |
+
'fade' => __('Fade','easy-fancybox'),
|
417 |
+
//'elastic' => __('Elastic','easy-fancybox'),
|
418 |
+
'none' => __('None','easy-fancybox')
|
419 |
+
),
|
420 |
+
'default' => 'fade',
|
421 |
+
),
|
422 |
+
'easingIn' => array (
|
423 |
+
'default' => 'swing'
|
424 |
+
),
|
425 |
+
'autoDimensions' => array (
|
426 |
+
'noquotes' => true,
|
427 |
+
'default' => 'false'
|
428 |
+
),
|
429 |
+
'scrolling' => array (
|
430 |
+
'default' => 'no',
|
431 |
+
),
|
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&navpanes=0&nameddest=self&page=1&view=FitH,0&zoom=80,0,0" type="application/pdf" height="100%" width="100%"><param name="src" value="\' + selectedArray[selectedIndex].href + \'#toolbar=0&navpanes=0&nameddest=self&page=1&view=FitH,0&zoom=80,0,0" /><a href="\' + selectedArray[selectedIndex].href + \'">\' + selectedArray[selectedIndex].title + \'</a></object>\' }'
|
436 |
+
)
|
437 |
+
)
|
438 |
+
),
|
439 |
+
|
440 |
+
'SWF' => array(
|
441 |
+
'title' => __('SWF','easy-fancybox'),
|
442 |
+
'input' => 'multiple',
|
443 |
+
'options' => array(
|
444 |
+
'enable' => array (
|
445 |
+
'id' => 'fancybox_enableSWF',
|
446 |
+
'input' => 'checkbox',
|
447 |
+
'hide' => true,
|
448 |
+
'default' => '',
|
449 |
+
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('SWF','easy-fancybox') . '</strong>'
|
450 |
+
),
|
451 |
+
'autoAttribute' => array (
|
452 |
+
'id' => 'fancybox_autoAttributeSWF',
|
453 |
+
'input' => 'checkbox',
|
454 |
+
'hide' => true,
|
455 |
+
'default' => '',
|
456 |
+
'selector' => 'href$=".swf"',
|
457 |
+
'description' => __('Auto-detect','easy-fancybox')
|
458 |
+
),
|
459 |
+
'class' => array (
|
460 |
+
'hide' => true,
|
461 |
+
'default' => 'fancybox-swf'
|
462 |
+
),
|
463 |
+
'intro' => array (
|
464 |
+
'hide' => true,
|
465 |
+
'description' => __('To make any Flash (.swf) file open in an overlay, switch on auto-detect or use the tag class="fancybox-swf" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
466 |
+
),
|
467 |
+
'type' => array(
|
468 |
+
'default' => 'swf'
|
469 |
+
),
|
470 |
+
'width' => array (
|
471 |
+
'id' => 'fancybox_SWFWidth',
|
472 |
+
'title' => __('Width'),
|
473 |
+
'label_for' => 'fancybox_SWFWidth',
|
474 |
+
'input' => 'text',
|
475 |
+
'class' => 'small-text',
|
476 |
+
'options' => array(),
|
477 |
+
'default' => '680',
|
478 |
+
'description' => ' '
|
479 |
+
),
|
480 |
+
'height' => array (
|
481 |
+
'id' => 'fancybox_SWFHeight',
|
482 |
+
'title' => __('Height'),
|
483 |
+
'label_for' => 'fancybox_SWFHeight',
|
484 |
+
'input' => 'text',
|
485 |
+
'class' => 'small-text',
|
486 |
+
'options' => array(),
|
487 |
+
'default' => '495',
|
488 |
+
),
|
489 |
+
'padding' => array (
|
490 |
+
'id' => 'fancybox_SWFpadding',
|
491 |
+
'title' => __('Border'),
|
492 |
+
'label_for' => 'fancybox_SWFpadding',
|
493 |
+
'input' => 'text',
|
494 |
+
'class' => 'small-text',
|
495 |
+
'default' => '0',
|
496 |
+
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
497 |
+
),
|
498 |
+
'autoScale' => array (
|
499 |
+
'noquotes' => true,
|
500 |
+
'default' => 'false'
|
501 |
+
),
|
502 |
+
'titleShow' => array (
|
503 |
+
'id' => 'fancybox_SWFtitleShow',
|
504 |
+
'input' => 'checkbox',
|
505 |
+
'default' => '',
|
506 |
+
'description' => __('Show title','easy-fancybox')
|
507 |
+
),
|
508 |
+
'titlePosition' => array (
|
509 |
+
'id' => 'fancybox_SWFtitlePosition',
|
510 |
+
'title' => __('Title Position','easy-fancybox'),
|
511 |
+
'label_for' => 'fancybox_SWFtitlePosition',
|
512 |
+
'input' => 'select',
|
513 |
+
'options' => array(
|
514 |
+
'float' => __('Float','easy-fancybox'), // same as 'float'
|
515 |
+
'outside' => __('Outside','easy-fancybox'),
|
516 |
+
'inside' => __('Inside','easy-fancybox')
|
517 |
+
//,'over' => __('Overlay','easy-fancybox')
|
518 |
+
),
|
519 |
+
'default' => 'float',
|
520 |
+
),
|
521 |
+
'titleFromAlt' => array (
|
522 |
+
'id' => 'fancybox_SWFtitleFromAlt',
|
523 |
+
'input' => 'checkbox',
|
524 |
+
'default' => '',
|
525 |
+
'description' => __('Allow title from thumbnail alt tag','easy-fancybox')
|
526 |
+
),
|
527 |
+
'transitionOut' => array (
|
528 |
+
'id' => 'fancybox_SWFtransitionOut',
|
529 |
+
'title' => __('Transition Out','easy-fancybox'),
|
530 |
+
'label_for' => 'fancybox_SWFtransitionOut',
|
531 |
+
'input' => 'select',
|
532 |
+
'class' => '',
|
533 |
+
'options' => array(
|
534 |
+
'fade' => __('Fade','easy-fancybox'),
|
535 |
+
//'elastic' => __('Elastic','easy-fancybox'),
|
536 |
+
'none' => __('None','easy-fancybox')
|
537 |
+
),
|
538 |
+
'default' => 'fade',
|
539 |
+
),
|
540 |
+
'easingIn' => array (
|
541 |
+
'default' => 'swing'
|
542 |
+
),
|
543 |
+
'swf' => array (
|
544 |
+
'noquotes' => true,
|
545 |
+
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
546 |
+
)
|
547 |
+
)
|
548 |
+
),
|
549 |
+
|
550 |
+
'YouTube' => array(
|
551 |
+
'title' => __('YouTube','easy-fancybox'),
|
552 |
+
'input' => 'multiple',
|
553 |
+
'options' => array(
|
554 |
+
'enable' => array (
|
555 |
+
'id' => 'fancybox_enableYoutube',
|
556 |
+
'input' => 'checkbox',
|
557 |
+
'hide' => true,
|
558 |
+
'default' => '',
|
559 |
+
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('YouTube','easy-fancybox') . '</strong>'
|
560 |
+
),
|
561 |
+
'autoAttribute' => array (
|
562 |
+
'id' => 'fancybox_autoAttributeYoutube',
|
563 |
+
'input' => 'checkbox',
|
564 |
+
'hide' => true,
|
565 |
+
'default' => '',
|
566 |
+
'selector' => 'href*="youtube.com/"',
|
567 |
+
//'href-replace' => "return attr.replace(new RegExp('watch\\\?v=', 'i'), 'v/')",
|
568 |
+
'description' => __('Auto-detect','easy-fancybox')
|
569 |
+
),
|
570 |
+
'autoAttributeAlt' => array (
|
571 |
+
'id' => 'fancybox_autoAttributeYoutubeShortURL',
|
572 |
+
'input' => 'checkbox',
|
573 |
+
'hide' => true,
|
574 |
+
'default' => '',
|
575 |
+
'selector' => 'href*="youtu.be/"',
|
576 |
+
//'href-replace' => "return attr.replace(new RegExp('youtu.be', 'i'), 'www.youtube.com/v')",
|
577 |
+
'description' => __('Auto-detect Short links','easy-fancybox')
|
578 |
+
),
|
579 |
+
'class' => array (
|
580 |
+
'hide' => true,
|
581 |
+
'default' => 'fancybox-youtube'
|
582 |
+
),
|
583 |
+
'intro' => array (
|
584 |
+
'hide' => true,
|
585 |
+
'description' => __('To make any YouTube movie open in an overlay, switch on auto-detect or use the tag class="fancybox-youtube" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
586 |
+
),
|
587 |
+
'type' => array(
|
588 |
+
'default' => 'swf'
|
589 |
+
),
|
590 |
+
'width' => array (
|
591 |
+
'id' => 'fancybox_YoutubeWidth',
|
592 |
+
'title' => __('Width'),
|
593 |
+
'label_for' => 'fancybox_YoutubeWidth',
|
594 |
+
'input' => 'text',
|
595 |
+
'class' => 'small-text',
|
596 |
+
'default' => '640',
|
597 |
+
'description' => ' '
|
598 |
+
),
|
599 |
+
'height' => array (
|
600 |
+
'id' => 'fancybox_YoutubeHeight',
|
601 |
+
'title' => __('Height'),
|
602 |
+
'label_for' => 'fancybox_YoutubeHeight',
|
603 |
+
'input' => 'text',
|
604 |
+
'class' => 'small-text',
|
605 |
+
'default' => '385',
|
606 |
+
),
|
607 |
+
'padding' => array (
|
608 |
+
'id' => 'fancybox_Youtubepadding',
|
609 |
+
'title' => __('Border'),
|
610 |
+
'label_for' => 'fancybox_Youtubepadding',
|
611 |
+
'input' => 'text',
|
612 |
+
'class' => 'small-text',
|
613 |
+
'default' => '0',
|
614 |
+
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
615 |
+
),
|
616 |
+
'autoScale' => array (
|
617 |
+
'noquotes' => true,
|
618 |
+
'default' => 'false'
|
619 |
+
),
|
620 |
+
'titleShow' => array (
|
621 |
+
'id' => 'fancybox_YoutubetitleShow',
|
622 |
+
'input' => 'checkbox',
|
623 |
+
'default' => '',
|
624 |
+
'description' => __('Show title','easy-fancybox')
|
625 |
+
),
|
626 |
+
'titlePosition' => array (
|
627 |
+
'id' => 'fancybox_YoutubetitlePosition',
|
628 |
+
'title' => __('Title Position','easy-fancybox'),
|
629 |
+
'label_for' => 'fancybox_YoutubetitlePosition',
|
630 |
+
'input' => 'select',
|
631 |
+
'options' => array(
|
632 |
+
'float' => __('Float','easy-fancybox'), // same as 'float'
|
633 |
+
'outside' => __('Outside','easy-fancybox'),
|
634 |
+
'inside' => __('Inside','easy-fancybox')
|
635 |
+
//,'over' => __('Overlay','easy-fancybox')
|
636 |
+
),
|
637 |
+
'default' => 'float',
|
638 |
+
),
|
639 |
+
'titleFromAlt' => array (
|
640 |
+
'id' => 'fancybox_YoutubetitleFromAlt',
|
641 |
+
'input' => 'checkbox',
|
642 |
+
'default' => '',
|
643 |
+
'description' => __('Allow title from thumbnail alt tag','easy-fancybox')
|
644 |
+
),
|
645 |
+
'transitionOut' => array (
|
646 |
+
'id' => 'fancybox_YoutubetransitionOut',
|
647 |
+
'title' => __('Transition Out','easy-fancybox'),
|
648 |
+
'label_for' => 'fancybox_YoutubetransitionOut',
|
649 |
+
'input' => 'select',
|
650 |
+
'options' => array(
|
651 |
+
'fade' => __('Fade','easy-fancybox'),
|
652 |
+
//'elastic' => __('Elastic','easy-fancybox'),
|
653 |
+
'none' => __('None','easy-fancybox')
|
654 |
+
),
|
655 |
+
'default' => 'fade'
|
656 |
+
),
|
657 |
+
'easingIn' => array (
|
658 |
+
'default' => 'swing'
|
659 |
+
),
|
660 |
+
'swf' => array (
|
661 |
+
'noquotes' => true,
|
662 |
+
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
663 |
+
),
|
664 |
+
'onStart' => array (
|
665 |
+
'noquotes' => true,
|
666 |
+
'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.href = selectedArray[selectedIndex].href.replace(new RegExp(\'youtu.be\', \'i\'), \'www.youtube.com/v\').replace(new RegExp(\'watch\\\?v=\', \'i\'), \'v/\') }'
|
667 |
+
)
|
668 |
+
)
|
669 |
+
),
|
670 |
+
|
671 |
+
'Vimeo' => array(
|
672 |
+
'title' => __('Vimeo','easy-fancybox'),
|
673 |
+
'input' => 'multiple',
|
674 |
+
'options' => array(
|
675 |
+
'enable' => array (
|
676 |
+
'id' => 'fancybox_enableVimeo',
|
677 |
+
'input' => 'checkbox',
|
678 |
+
'hide' => true,
|
679 |
+
'default' => '',
|
680 |
+
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('Vimeo','easy-fancybox') . '</strong>'
|
681 |
+
),
|
682 |
+
'autoAttribute' => array (
|
683 |
+
'id' => 'fancybox_autoAttributeVimeo',
|
684 |
+
'input' => 'checkbox',
|
685 |
+
'hide' => true,
|
686 |
+
'default' => '',
|
687 |
+
'selector' => 'href*="vimeo.com/"',
|
688 |
+
//'href-replace' => "return attr.replace(new RegExp('/([0-9])', 'i'), '/moogaloop.swf?clip_id=$1')",
|
689 |
+
'description' => __('Auto-detect','easy-fancybox')
|
690 |
+
),
|
691 |
+
'class' => array (
|
692 |
+
'hide' => true,
|
693 |
+
'default' => 'fancybox-vimeo'
|
694 |
+
),
|
695 |
+
'intro' => array (
|
696 |
+
'hide' => true,
|
697 |
+
'description' => __('To make any Vimeo movie open in an overlay, switch on auto-detect or use the tag class="fancybox-vimeo" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
698 |
+
),
|
699 |
+
'type' => array(
|
700 |
+
'default' => 'swf'
|
701 |
+
),
|
702 |
+
'width' => array (
|
703 |
+
'id' => 'fancybox_VimeoWidth',
|
704 |
+
'title' => __('Width'),
|
705 |
+
'label_for' => 'fancybox_VimeoWidth',
|
706 |
+
'input' => 'text',
|
707 |
+
'class' => 'small-text',
|
708 |
+
'default' => '640',
|
709 |
+
'description' => ' '
|
710 |
+
),
|
711 |
+
'height' => array (
|
712 |
+
'id' => 'fancybox_VimeoHeight',
|
713 |
+
'title' => __('Height'),
|
714 |
+
'label_for' => 'fancybox_VimeoHeight',
|
715 |
+
'input' => 'text',
|
716 |
+
'class' => 'small-text',
|
717 |
+
'default' => '360'
|
718 |
+
),
|
719 |
+
'padding' => array (
|
720 |
+
'id' => 'fancybox_Vimeopadding',
|
721 |
+
'title' => __('Border'),
|
722 |
+
'label_for' => 'fancybox_Vimeopadding',
|
723 |
+
'input' => 'text',
|
724 |
+
'class' => 'small-text',
|
725 |
+
'default' => '0',
|
726 |
+
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
727 |
+
),
|
728 |
+
'autoScale' => array (
|
729 |
+
'noquotes' => true,
|
730 |
+
'default' => 'false'
|
731 |
+
),
|
732 |
+
'transitionOut' => array (
|
733 |
+
'id' => 'fancybox_VimeotransitionOut',
|
734 |
+
'title' => __('Transition Out','easy-fancybox'),
|
735 |
+
'label_for' => 'fancybox_VimeotransitionOut',
|
736 |
+
'input' => 'select',
|
737 |
+
'options' => array(
|
738 |
+
'fade' => __('Fade','easy-fancybox'),
|
739 |
+
//'elastic' => __('Elastic','easy-fancybox'),
|
740 |
+
'none' => __('None','easy-fancybox')
|
741 |
+
),
|
742 |
+
'default' => 'fade',
|
743 |
+
'description' => __('Transition effect when closing the overlay.','easy-fancybox')
|
744 |
+
),
|
745 |
+
'easingIn' => array (
|
746 |
+
'default' => 'swing'
|
747 |
+
),
|
748 |
+
'titleShow' => array (
|
749 |
+
'id' => 'fancybox_VimeotitleShow',
|
750 |
+
'input' => 'checkbox',
|
751 |
+
'default' => '',
|
752 |
+
'description' => __('Show title','easy-fancybox')
|
753 |
+
),
|
754 |
+
'titlePosition' => array (
|
755 |
+
'id' => 'fancybox_VimeotitlePosition',
|
756 |
+
'title' => __('Title Position','easy-fancybox'),
|
757 |
+
'label_for' => 'fancybox_VimeotitlePosition',
|
758 |
+
'input' => 'select',
|
759 |
+
'options' => array(
|
760 |
+
'float' => __('Float','easy-fancybox'), // same as 'float'
|
761 |
+
'outside' => __('Outside','easy-fancybox'),
|
762 |
+
'inside' => __('Inside','easy-fancybox')
|
763 |
+
//,'over' => __('Overlay','easy-fancybox')
|
764 |
+
),
|
765 |
+
'default' => 'float',
|
766 |
+
),
|
767 |
+
'titleFromAlt' => array (
|
768 |
+
'id' => 'fancybox_VimeotitleFromAlt',
|
769 |
+
'input' => 'checkbox',
|
770 |
+
'default' => '',
|
771 |
+
'description' => __('Allow title from thumbnail alt tag','easy-fancybox')
|
772 |
+
),
|
773 |
+
'transitionOut' => array (
|
774 |
+
'id' => 'fancybox_VimeotransitionOut',
|
775 |
+
'title' => __('Transition Out','easy-fancybox'),
|
776 |
+
'label_for' => 'fancybox_VimeotransitionOut',
|
777 |
+
'input' => 'select',
|
778 |
+
'options' => array(
|
779 |
+
'fade' => __('Fade','easy-fancybox'),
|
780 |
+
//'elastic' => __('Elastic','easy-fancybox'),
|
781 |
+
'none' => __('None','easy-fancybox')
|
782 |
+
),
|
783 |
+
'default' => 'fade',
|
784 |
+
'description' => __('Transition effect when closing the overlay.','easy-fancybox')
|
785 |
+
),
|
786 |
+
'easingIn' => array (
|
787 |
+
'default' => 'swing'
|
788 |
+
),
|
789 |
+
'swf' => array (
|
790 |
+
'noquotes' => true,
|
791 |
+
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
792 |
+
),
|
793 |
+
'onStart' => array (
|
794 |
+
'noquotes' => true,
|
795 |
+
'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.href = selectedArray[selectedIndex].href.replace(new RegExp(\'/([0-9])\', \'i\'), \'/moogaloop.swf?clip_id=$1\') }'
|
796 |
+
)
|
797 |
+
)
|
798 |
+
),
|
799 |
+
|
800 |
+
|
801 |
+
'Dailymotion' => array(
|
802 |
+
'title' => __('Dailymotion','easy-fancybox'),
|
803 |
+
'input' => 'multiple',
|
804 |
+
'options' => array(
|
805 |
+
'enable' => array (
|
806 |
+
'id' => 'fancybox_enableDailymotion',
|
807 |
+
'input' => 'checkbox',
|
808 |
+
'hide' => true,
|
809 |
+
'default' => '',
|
810 |
+
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('Dailymotion','easy-fancybox') . '</strong>'
|
811 |
+
),
|
812 |
+
'autoAttribute' => array (
|
813 |
+
'id' => 'fancybox_autoAttributeDailymotion',
|
814 |
+
'input' => 'checkbox',
|
815 |
+
'hide' => true,
|
816 |
+
'default' => '',
|
817 |
+
'selector' => 'href*="dailymotion.com/"',
|
818 |
+
//'href-replace' => "return attr.replace(new RegExp('/video/', 'i'), '/swf/')",
|
819 |
+
'description' => __('Auto-detect','easy-fancybox')
|
820 |
+
),
|
821 |
+
'class' => array (
|
822 |
+
'hide' => true,
|
823 |
+
'default' => 'fancybox-dailymotion'
|
824 |
+
),
|
825 |
+
'intro' => array (
|
826 |
+
'hide' => true,
|
827 |
+
'description' => __('To make any Dailymotion movie open in an overlay, switch on auto-detect or use the tag class="fancybox-dailymotion" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
828 |
+
),
|
829 |
+
'type' => array(
|
830 |
+
'default' => 'swf'
|
831 |
+
),
|
832 |
+
'width' => array (
|
833 |
+
'id' => 'fancybox_DailymotionWidth',
|
834 |
+
'title' => __('Width'),
|
835 |
+
'label_for' => 'fancybox_DailymotionWidth',
|
836 |
+
'input' => 'text',
|
837 |
+
'class' => 'small-text',
|
838 |
+
'default' => '480',
|
839 |
+
'description' => ' '
|
840 |
+
),
|
841 |
+
'height' => array (
|
842 |
+
'id' => 'fancybox_DailymotionHeight',
|
843 |
+
'title' => __('Height'),
|
844 |
+
'label_for' => 'fancybox_DailymotionHeight',
|
845 |
+
'input' => 'text',
|
846 |
+
'class' => 'small-text',
|
847 |
+
'default' => '485'
|
848 |
+
),
|
849 |
+
'padding' => array (
|
850 |
+
'id' => 'fancybox_DailymotionPadding',
|
851 |
+
'title' => __('Border'),
|
852 |
+
'label_for' => 'fancybox_DailymotionPadding',
|
853 |
+
'input' => 'text',
|
854 |
+
'class' => 'small-text',
|
855 |
+
'default' => '0',
|
856 |
+
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
857 |
+
),
|
858 |
+
'autoScale' => array (
|
859 |
+
'noquotes' => true,
|
860 |
+
'default' => 'false'
|
861 |
+
),
|
862 |
+
'transitionOut' => array (
|
863 |
+
'id' => 'fancybox_DailymotiontransitionOut',
|
864 |
+
'title' => __('Transition Out','easy-fancybox'),
|
865 |
+
'label_for' => 'fancybox_DailymotiontransitionOut',
|
866 |
+
'input' => 'select',
|
867 |
+
'options' => array(
|
868 |
+
'fade' => __('Fade','easy-fancybox'),
|
869 |
+
//'elastic' => __('Elastic','easy-fancybox'),
|
870 |
+
'none' => __('None','easy-fancybox')
|
871 |
+
),
|
872 |
+
'default' => 'fade',
|
873 |
+
'description' => __('Transition effect when closing the overlay.','easy-fancybox')
|
874 |
+
),
|
875 |
+
'easingIn' => array (
|
876 |
+
'default' => 'swing'
|
877 |
+
),
|
878 |
+
'titleShow' => array (
|
879 |
+
'id' => 'fancybox_DailymotiontitleShow',
|
880 |
+
'input' => 'checkbox',
|
881 |
+
'default' => '',
|
882 |
+
'description' => __('Show title','easy-fancybox')
|
883 |
+
),
|
884 |
+
'titlePosition' => array (
|
885 |
+
'id' => 'fancybox_DailymotiontitlePosition',
|
886 |
+
'title' => __('Title Position','easy-fancybox'),
|
887 |
+
'label_for' => 'fancybox_DailymotiontitlePosition',
|
888 |
+
'input' => 'select',
|
889 |
+
'options' => array(
|
890 |
+
'float' => __('Float','easy-fancybox'), // same as 'float'
|
891 |
+
'outside' => __('Outside','easy-fancybox'),
|
892 |
+
'inside' => __('Inside','easy-fancybox')
|
893 |
+
//,'over' => __('Overlay','easy-fancybox')
|
894 |
+
),
|
895 |
+
'default' => 'float',
|
896 |
+
),
|
897 |
+
'titleFromAlt' => array (
|
898 |
+
'id' => 'fancybox_DailymotiontitleFromAlt',
|
899 |
+
'input' => 'checkbox',
|
900 |
+
'default' => '',
|
901 |
+
'description' => __('Allow title from thumbnail alt tag','easy-fancybox')
|
902 |
+
),
|
903 |
+
'transitionOut' => array (
|
904 |
+
'id' => 'fancybox_DailymotiontransitionOut',
|
905 |
+
'title' => __('Transition Out','easy-fancybox'),
|
906 |
+
'label_for' => 'fancybox_DailymotiontransitionOut',
|
907 |
+
'input' => 'select',
|
908 |
+
'options' => array(
|
909 |
+
'fade' => __('Fade','easy-fancybox'),
|
910 |
+
//'elastic' => __('Elastic','easy-fancybox'),
|
911 |
+
'none' => __('None','easy-fancybox')
|
912 |
+
),
|
913 |
+
'default' => 'fade',
|
914 |
+
'description' => __('Transition effect when closing the overlay.','easy-fancybox')
|
915 |
+
),
|
916 |
+
'easingIn' => array (
|
917 |
+
'default' => 'swing'
|
918 |
+
),
|
919 |
+
'swf' => array (
|
920 |
+
'noquotes' => true,
|
921 |
+
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
922 |
+
),
|
923 |
+
'onStart' => array (
|
924 |
+
'noquotes' => true,
|
925 |
+
'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.href = selectedArray[selectedIndex].href.replace(new RegExp(\'/video/\', \'i\'), \'/swf/\') }'
|
926 |
+
)
|
927 |
+
)
|
928 |
+
),
|
929 |
+
|
930 |
+
/* 'Tudou' => array(
|
931 |
+
'id' => 'fancybox_Tudou',
|
932 |
+
'title' => __('Tudou','easy-fancybox'),
|
933 |
+
'label_for' => '',
|
934 |
+
'input' => 'multiple',
|
935 |
+
'class' => '', 'description' => '',
|
936 |
+
'options' => array(
|
937 |
+
'autoAttributeTudou' => array (
|
938 |
+
'id' => 'fancybox_autoAttributeTudou',
|
939 |
+
'label_for' => '',
|
940 |
+
'input' => 'checkbox',
|
941 |
+
'class' => '',
|
942 |
+
'options' => array(),
|
943 |
+
'hide' => true,
|
944 |
+
'default' => '1',
|
945 |
+
'description' => __('Tudou links','easy-fancybox')
|
946 |
+
)
|
947 |
+
)
|
948 |
+
),*/
|
949 |
+
|
950 |
+
/* 'Animoto' => array(),
|
951 |
+
|
952 |
+
Example ANIMOTO page link http://animoto.com/play/Kf9POzQMSOGWyu41gtOtsw should become
|
953 |
+
http://static.animoto.com/swf/w.swf?w=swf/vp1&f=Kf9POzQMSOGWyu41gtOtsw&i=m
|
954 |
+
|
955 |
+
*/
|
956 |
+
|
957 |
+
'iFrame' => array(
|
958 |
+
'title' => __('iFrames','easy-fancybox'),
|
959 |
+
'input' => 'multiple',
|
960 |
+
'options' => array(
|
961 |
+
'enable' => array (
|
962 |
+
'id' => 'fancybox_enableiFrame',
|
963 |
+
'input' => 'checkbox',
|
964 |
+
'hide' => true,
|
965 |
+
'default' => '',
|
966 |
+
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('iFrames','easy-fancybox') . '</strong>'
|
967 |
+
),
|
968 |
+
'class' => array (
|
969 |
+
'hide' => true,
|
970 |
+
'default' => 'fancybox-iframe, li.fancybox-iframe a'
|
971 |
+
),
|
972 |
+
'intro' => array (
|
973 |
+
'hide' => true,
|
974 |
+
'description' => __('To make a website or HTML document open in an overlay, use the tag class="fancybox-iframe" or class="fancybox iframe" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
975 |
+
),
|
976 |
+
'type' => array (
|
977 |
+
'default' => 'iframe'
|
978 |
+
),
|
979 |
+
'width' => array (
|
980 |
+
'id' => 'fancybox_iFramewidth',
|
981 |
+
'title' => __('Width'),
|
982 |
+
'label_for' => 'fancybox_iFramewidth',
|
983 |
+
'input' => 'text',
|
984 |
+
'class' => 'small-text',
|
985 |
+
'default' => '70%',
|
986 |
+
'description' => ' '
|
987 |
+
),
|
988 |
+
'height' => array (
|
989 |
+
'id' => 'fancybox_iFrameheight',
|
990 |
+
'title' => __('Height'),
|
991 |
+
'label_for' => 'fancybox_iFrameheight',
|
992 |
+
'input' => 'text',
|
993 |
+
'class' => 'small-text',
|
994 |
+
'default' => '90%',
|
995 |
+
),
|
996 |
+
'padding' => array (
|
997 |
+
'id' => 'fancybox_iFramepadding',
|
998 |
+
'title' => __('Border'),
|
999 |
+
'label_for' => 'fancybox_iFramepadding',
|
1000 |
+
'input' => 'text',
|
1001 |
+
'class' => 'small-text',
|
1002 |
+
'default' => '0',
|
1003 |
+
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
1004 |
+
),
|
1005 |
+
'scrolling' => array (
|
1006 |
+
'default' => 'auto'
|
1007 |
+
),
|
1008 |
+
'autoScale' => array (
|
1009 |
+
'noquotes' => true,
|
1010 |
+
'default' => 'false'
|
1011 |
+
),
|
1012 |
+
'titleShow' => array (
|
1013 |
+
'id' => 'fancybox_iFrametitleShow',
|
1014 |
+
'input' => 'checkbox',
|
1015 |
+
'default' => '',
|
1016 |
+
'description' => __('Show title','easy-fancybox')
|
1017 |
+
),
|
1018 |
+
'titlePosition' => array (
|
1019 |
+
'id' => 'fancybox_iFrametitlePosition',
|
1020 |
+
'title' => __('Title Position','easy-fancybox'),
|
1021 |
+
'label_for' => 'fancybox_iFrametitlePosition',
|
1022 |
+
'input' => 'select',
|
1023 |
+
'options' => array(
|
1024 |
+
'float' => __('Float','easy-fancybox'), // same as 'float'
|
1025 |
+
'outside' => __('Outside','easy-fancybox'),
|
1026 |
+
'inside' => __('Inside','easy-fancybox')
|
1027 |
+
//,'over' => __('Overlay','easy-fancybox')
|
1028 |
+
),
|
1029 |
+
'default' => 'float',
|
1030 |
+
),
|
1031 |
+
'titleFromAlt' => array (
|
1032 |
+
'id' => 'fancybox_iFrametitleFromAlt',
|
1033 |
+
'input' => 'checkbox',
|
1034 |
+
'default' => '',
|
1035 |
+
'description' => __('Allow title from thumbnail alt tag','easy-fancybox')
|
1036 |
+
),
|
1037 |
+
'transitionOut' => array (
|
1038 |
+
'id' => 'fancybox_iFrametransitionOut',
|
1039 |
+
'title' => __('Transition Out','easy-fancybox'),
|
1040 |
+
'label_for' => 'fancybox_iFrametransitionOut',
|
1041 |
+
'input' => 'select',
|
1042 |
+
'options' => array(
|
1043 |
+
'fade' => __('Fade','easy-fancybox'),
|
1044 |
+
//'elastic' => __('Elastic','easy-fancybox'),
|
1045 |
+
'none' => __('None','easy-fancybox')
|
1046 |
+
),
|
1047 |
+
'default' => 'fade'
|
1048 |
+
),
|
1049 |
+
'easingIn' => array (
|
1050 |
+
'default' => 'swing'
|
1051 |
+
)
|
1052 |
+
)
|
1053 |
+
)
|
1054 |
+
|
1055 |
+
);
|
1056 |
+
}
|
easy-fancybox.css.php
CHANGED
@@ -13,14 +13,18 @@
|
|
13 |
/* remove comments */
|
14 |
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
|
15 |
/* remove tabs, spaces, newlines, etc. */
|
16 |
-
$buffer = str_replace(array("\r
|
17 |
/* and squeeze some more */
|
18 |
-
$buffer = str_replace(array(", ", ": ", " {", "{ ", " }", "} ", ";}", " 0;"), array(",", ":", "{", "{", "}", "}", "}", ";"), $buffer);
|
19 |
return $buffer;
|
20 |
}
|
21 |
|
22 |
/* the css file */
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
|
25 |
ob_end_flush();
|
26 |
?>
|
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' );
|
25 |
+
|
26 |
+
/* extra styles */
|
27 |
+
echo '.fancybox-hidden{display:none}';
|
28 |
|
29 |
ob_end_flush();
|
30 |
?>
|
easy-fancybox.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
/*
|
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, YouTube and Vimeo links.
|
6 |
-
Version: 1.3.4.
|
7 |
Author: RavanH
|
8 |
Author URI: http://4visions.nl/
|
9 |
*/
|
@@ -13,884 +13,30 @@ Author URI: http://4visions.nl/
|
|
13 |
define( 'FANCYBOX_VERSION', '1.3.4' );
|
14 |
define( 'MOUSEWHEEL_VERSION', '3.0.4' );
|
15 |
define( 'EASING_VERSION', '1.3' );
|
16 |
-
|
17 |
-
//
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
|
27 |
-
'Global' => array(
|
28 |
-
'title' => __('Global settings','easy-fancybox'),
|
29 |
-
'input' => 'multiple',
|
30 |
-
'hide' => true,
|
31 |
-
'options' => array(
|
32 |
-
'intro' => array (
|
33 |
-
'hide' => true,
|
34 |
-
'description' => __('These settings determine the global overlay appearance and behaviour controlled by FancyBox.','easy-fancybox') . '<br />'
|
35 |
-
),
|
36 |
-
'p0' => array (
|
37 |
-
'hide' => true,
|
38 |
-
'description' => '<br /><strong>' . __('Links') . '</strong><br />'
|
39 |
-
),
|
40 |
-
'attributeLimit' => array (
|
41 |
-
'id' => 'fancybox_attributeLimit',
|
42 |
-
'title' => __('Exclude','easy-fancybox'),
|
43 |
-
'label_for' => 'fancybox_attributeLimit',
|
44 |
-
'hide' => true,
|
45 |
-
'input' => 'select',
|
46 |
-
'options' => array(
|
47 |
-
'' => __('None'),
|
48 |
-
'.not(\':empty\')' => __('Empty (hidden)','easy-fancybox'),
|
49 |
-
'.has(\'img\')' => __('Without thumbnail image','easy-fancybox'),
|
50 |
-
),
|
51 |
-
'default' => '.not(\':empty\')'
|
52 |
-
),
|
53 |
-
'p1' => array (
|
54 |
-
'hide' => true,
|
55 |
-
'description' => '<br /><br /><strong>' . __('Overlay','easy-fancybox') . '</strong><br />'
|
56 |
-
),
|
57 |
-
'overlayShow' => array (
|
58 |
-
'id' => 'fancybox_overlayShow',
|
59 |
-
'input' => 'checkbox',
|
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'),
|
66 |
-
'label_for' => 'fancybox_overlayOpacity',
|
67 |
-
'input' => 'text',
|
68 |
-
'class' => 'small-text',
|
69 |
-
'default' => '',
|
70 |
-
'description' => __('Value between 0 and 1. ','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 0.7</em><br />'
|
71 |
-
),
|
72 |
-
'overlayColor' => array (
|
73 |
-
'id' => 'fancybox_overlayColor',
|
74 |
-
'title' => __('Overlay color','easy-fancybox'),
|
75 |
-
'label_for' => 'fancybox_overlayColor',
|
76 |
-
'input' => 'text',
|
77 |
-
'class' => 'small-text',
|
78 |
-
'default' => '',
|
79 |
-
'description' => __('Enter a HTML color value.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' #777</em><br />'
|
80 |
-
),
|
81 |
-
'p2' => array (
|
82 |
-
'hide' => true,
|
83 |
-
'description' => '<br /><strong>' . __('Overlay window','easy-fancybox') . '</strong><br />'
|
84 |
-
),
|
85 |
-
'width' => array (
|
86 |
-
'id' => 'fancybox_width',
|
87 |
-
'title' => __('Width'),
|
88 |
-
'label_for' => 'fancybox_width',
|
89 |
-
'input' => 'text',
|
90 |
-
'class' => 'small-text',
|
91 |
-
'default' => '',
|
92 |
-
'description' => ' '
|
93 |
-
),
|
94 |
-
'height' => array (
|
95 |
-
'id' => 'fancybox_height',
|
96 |
-
'title' => __('Height'),
|
97 |
-
'label_for' => 'fancybox_height',
|
98 |
-
'input' => 'text',
|
99 |
-
'class' => 'small-text',
|
100 |
-
'default' => ''
|
101 |
-
),
|
102 |
-
'padding' => array (
|
103 |
-
'id' => 'fancybox_padding',
|
104 |
-
'title' => __('Border'),
|
105 |
-
'label_for' => 'fancybox_padding',
|
106 |
-
'input' => 'text',
|
107 |
-
'class' => 'small-text',
|
108 |
-
'default' => '',
|
109 |
-
'description' => '<br />' . __('Change default width, heigth and border of the overlay window.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 560 x 340 x 10</em><br />'
|
110 |
-
),
|
111 |
-
'centerOnScroll' => array (
|
112 |
-
'id' => 'fancybox_centerOnScroll',
|
113 |
-
'input' => 'checkbox',
|
114 |
-
'default' => '1',
|
115 |
-
'description' => __('Center while scrolling.','easy-fancybox')
|
116 |
-
),
|
117 |
-
'showCloseButton' => array (
|
118 |
-
'id' => 'fancybox_showCloseButton',
|
119 |
-
'input' => 'checkbox',
|
120 |
-
'default' => '1',
|
121 |
-
'description' => __('Show the (X) close button.','easy-fancybox')
|
122 |
-
),
|
123 |
-
'showNavArrows' => array (
|
124 |
-
'id' => 'fancybox_showNavArrows',
|
125 |
-
'input' => 'checkbox',
|
126 |
-
'default' => '1',
|
127 |
-
'description' => __('Show the gallery navigation arrows.','easy-fancybox')
|
128 |
-
),
|
129 |
-
'titleShow' => array (
|
130 |
-
'id' => 'fancybox_titleShow',
|
131 |
-
'input' => 'checkbox',
|
132 |
-
'default' => '1',
|
133 |
-
'description' => __('Show title','easy-fancybox')
|
134 |
-
),
|
135 |
-
'titlePosition' => array (
|
136 |
-
'id' => 'fancybox_titlePosition',
|
137 |
-
'title' => __('Title Position','easy-fancybox'),
|
138 |
-
'label_for' => 'fancybox_titlePosition',
|
139 |
-
'input' => 'select',
|
140 |
-
'options' => array(
|
141 |
-
'' => __('Float','easy-fancybox'), // same as 'float'
|
142 |
-
'outside' => __('Outside','easy-fancybox'),
|
143 |
-
'inside' => __('Inside','easy-fancybox'),
|
144 |
-
'over' => __('Overlay','easy-fancybox')
|
145 |
-
),
|
146 |
-
'default' => 'over',
|
147 |
-
),
|
148 |
-
'titleFromAlt' => array (
|
149 |
-
'id' => 'fancybox_titleFromAlt',
|
150 |
-
'input' => 'checkbox',
|
151 |
-
'default' => '1',
|
152 |
-
'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
|
153 |
-
),
|
154 |
-
'p3' => array (
|
155 |
-
'hide' => true,
|
156 |
-
'description' => '<br /><strong>' . __('Transition','easy-fancybox') . '</strong><br />'
|
157 |
-
),
|
158 |
-
'transitionIn' => array (
|
159 |
-
'id' => 'fancybox_transitionIn',
|
160 |
-
'title' => __('Transition In','easy-fancybox'),
|
161 |
-
'label_for' => 'fancybox_transitionIn',
|
162 |
-
'input' => 'select',
|
163 |
-
'options' => array(
|
164 |
-
'' => __('Fade','easy-fancybox'),
|
165 |
-
'elastic' => __('Elastic','easy-fancybox'),
|
166 |
-
'none' => __('None','easy-fancybox')
|
167 |
-
),
|
168 |
-
'default' => 'elastic',
|
169 |
-
'description' => ' '
|
170 |
-
),
|
171 |
-
'easingIn' => array (
|
172 |
-
'id' => 'fancybox_easingIn',
|
173 |
-
'title' => __('Easing In','easy-fancybox'),
|
174 |
-
'label_for' => 'fancybox_easingIn',
|
175 |
-
'input' => 'select',
|
176 |
-
'options' => array(
|
177 |
-
'' => __('Swing','easy-fancybox'),
|
178 |
-
'easeOutBack' => __('Back','easy-fancybox'),
|
179 |
-
'easeOutQuad' => __('Quad','easy-fancybox'),
|
180 |
-
'easeOutExpo' => __('Expo','easy-fancybox'),
|
181 |
-
),
|
182 |
-
'default' => 'easeOutBack',
|
183 |
-
'description' => '<br />'
|
184 |
-
),
|
185 |
-
'transitionOut' => array (
|
186 |
-
'id' => 'fancybox_transitionOut',
|
187 |
-
'title' => __('Transition Out','easy-fancybox'),
|
188 |
-
'label_for' => 'fancybox_transitionOut',
|
189 |
-
'input' => 'select',
|
190 |
-
'options' => array(
|
191 |
-
'' => __('Fade','easy-fancybox'),
|
192 |
-
'elastic' => __('Elastic','easy-fancybox'),
|
193 |
-
'none' => __('None','easy-fancybox')
|
194 |
-
),
|
195 |
-
'default' => 'elastic',
|
196 |
-
'description' => ' '
|
197 |
-
),
|
198 |
-
'easingOut' => array (
|
199 |
-
'id' => 'fancybox_easingOut',
|
200 |
-
'title' => __('Easing Out','easy-fancybox'),
|
201 |
-
'label_for' => 'fancybox_easingOut',
|
202 |
-
'input' => 'select',
|
203 |
-
'options' => array(
|
204 |
-
'' => __('Swing','easy-fancybox'),
|
205 |
-
'easeInBack' => __('Back','easy-fancybox'),
|
206 |
-
'easeInQuad' => __('Quad','easy-fancybox'),
|
207 |
-
'easeInExpo' => __('Expo','easy-fancybox'),
|
208 |
-
),
|
209 |
-
'default' => 'easeInBack',
|
210 |
-
'description' => '<br />' . __('Easing effects only apply when Transition is set to Elastic. ','easy-fancybox') . '<br /><br />'
|
211 |
-
),
|
212 |
-
'opacity' => array (
|
213 |
-
'id' => 'fancybox_opacity',
|
214 |
-
'input' => 'checkbox',
|
215 |
-
'default' => '',
|
216 |
-
'description' => __('Transparency fade during elastic transition.','easy-fancybox')
|
217 |
-
),
|
218 |
-
'speedIn' => array (
|
219 |
-
'id' => 'fancybox_speedIn',
|
220 |
-
'title' => __('Opening speed','easy-fancybox'),
|
221 |
-
'label_for' => 'fancybox_speedIn',
|
222 |
-
'input' => 'text',
|
223 |
-
'class' => 'small-text',
|
224 |
-
'default' => '',
|
225 |
-
),
|
226 |
-
'speedOut' => array (
|
227 |
-
'id' => 'fancybox_speedIn',
|
228 |
-
'title' => __('Closing speed','easy-fancybox'),
|
229 |
-
'label_for' => 'fancybox_speedOut',
|
230 |
-
'input' => 'text',
|
231 |
-
'class' => 'small-text',
|
232 |
-
'default' => '',
|
233 |
-
),
|
234 |
-
'changeFade' => array (
|
235 |
-
'id' => 'fancybox_changeFade',
|
236 |
-
'title' => __('Fade speed','easy-fancybox'),
|
237 |
-
'label_for' => 'fancybox_changeFade',
|
238 |
-
'input' => 'text',
|
239 |
-
'class' => 'small-text',
|
240 |
-
'default' => '',
|
241 |
-
'description' => '<br />' . __('Duration in milliseconds. Higher is slower.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 300</em>'
|
242 |
-
)
|
243 |
-
)
|
244 |
-
),
|
245 |
-
'IMG' => array(
|
246 |
-
'title' => __('Images','easy-fancybox'),
|
247 |
-
'input' => 'multiple',
|
248 |
-
'options' => array(
|
249 |
-
'enable' => array (
|
250 |
-
'id' => 'fancybox_enableImg',
|
251 |
-
'input' => 'checkbox',
|
252 |
-
'hide' => true,
|
253 |
-
'default' => ( function_exists('is_plugin_active_for_network') && is_plugin_active_for_network(plugin_basename( __FILE__ )) ) ? '' : '1',
|
254 |
-
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('Images','easy-fancybox') . '</strong>'
|
255 |
-
),
|
256 |
-
'intro' => array (
|
257 |
-
'hide' => true,
|
258 |
-
'description' => __('To make any image file open in an overlay, add its extension to the auto-detect field or use the tag class="fancybox" for its link.','easy-fancybox') . '<br />'
|
259 |
-
),
|
260 |
-
'autoAttribute' => array (
|
261 |
-
'id' => 'fancybox_autoAttribute',
|
262 |
-
'title' => __('Auto-detect','easy-fancybox'),
|
263 |
-
'label_for' => 'fancybox_autoAttribute',
|
264 |
-
'input' => 'text',
|
265 |
-
'class' => 'regular-text',
|
266 |
-
'hide' => true,
|
267 |
-
'default' => 'jpg gif png',
|
268 |
-
'selector' => 'href$=',
|
269 |
-
'description' => '<br />' . __('Enter file types FancyBox should be automatically enabled for. Clear field to switch off auto-enabling.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' jpg gif png</em>'
|
270 |
-
),
|
271 |
-
'class' => array (
|
272 |
-
'hide' => true,
|
273 |
-
'default' => 'fancybox'
|
274 |
-
)
|
275 |
-
/* TODO : only use this parm when 'titlePosition' : 'over'
|
276 |
-
,'onComplete' => array (
|
277 |
-
'noquotes' => true,
|
278 |
-
'default' => 'function() { $(\'#fancybox-wrap\').hover(function() { $(\'#fancybox-title\').show(); }, function() { $(\'#fancybox-title\').hide(); }); }'
|
279 |
-
)*/
|
280 |
-
)
|
281 |
-
),
|
282 |
-
|
283 |
-
'PDF' => array(
|
284 |
-
'title' => __('PDF','easy-fancybox'),
|
285 |
-
'input' => 'multiple',
|
286 |
-
'options' => array(
|
287 |
-
'enable' => array (
|
288 |
-
'id' => 'fancybox_enablePDF',
|
289 |
-
'input' => 'checkbox',
|
290 |
-
'hide' => true,
|
291 |
-
'default' => '',
|
292 |
-
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('PDF','easy-fancybox') . '</strong>'
|
293 |
-
),
|
294 |
-
'autoAttribute' => array (
|
295 |
-
'id' => 'fancybox_autoAttributePDF',
|
296 |
-
'input' => 'checkbox',
|
297 |
-
'hide' => true,
|
298 |
-
'default' => '',
|
299 |
-
'selector' => 'href$=".pdf"',
|
300 |
-
'description' => __('Auto-detect','easy-fancybox')
|
301 |
-
),
|
302 |
-
'class' => array (
|
303 |
-
'hide' => true,
|
304 |
-
'default' => 'fancybox-pdf'
|
305 |
-
),
|
306 |
-
'intro' => array (
|
307 |
-
'hide' => true,
|
308 |
-
'description' => __('To make any PDF document file open in an overlay, switch on auto-detect or use the tag class="fancybox-pdf" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
309 |
-
),
|
310 |
-
'type' => array (
|
311 |
-
'default' => 'html'
|
312 |
-
),
|
313 |
-
'width' => array (
|
314 |
-
'id' => 'fancybox_PDFwidth',
|
315 |
-
'title' => __('Width'),
|
316 |
-
'label_for' => 'fancybox_PDFwidth',
|
317 |
-
'input' => 'text',
|
318 |
-
'class' => 'small-text',
|
319 |
-
'default' => '90%',
|
320 |
-
'description' => ' '
|
321 |
-
),
|
322 |
-
'height' => array (
|
323 |
-
'id' => 'fancybox_PDFheight',
|
324 |
-
'title' => __('Height'),
|
325 |
-
'label_for' => 'fancybox_PDFheight',
|
326 |
-
'input' => 'text',
|
327 |
-
'class' => 'small-text',
|
328 |
-
'default' => '90%'
|
329 |
-
),
|
330 |
-
'margin' => array (
|
331 |
-
'default' => '0'
|
332 |
-
),
|
333 |
-
'padding' => array (
|
334 |
-
'id' => 'fancybox_PDFpadding',
|
335 |
-
'title' => __('Border'),
|
336 |
-
'label_for' => 'fancybox_PDFpadding',
|
337 |
-
'input' => 'text',
|
338 |
-
'class' => 'small-text',
|
339 |
-
'default' => '0',
|
340 |
-
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
341 |
-
),
|
342 |
-
'autoScale' => array (
|
343 |
-
'noquotes' => true,
|
344 |
-
'default' => 'false'
|
345 |
-
),
|
346 |
-
'titleShow' => array (
|
347 |
-
'id' => 'fancybox_PDFtitleShow',
|
348 |
-
'input' => 'checkbox',
|
349 |
-
'default' => '',
|
350 |
-
'description' => __('Show title','easy-fancybox')
|
351 |
-
),
|
352 |
-
'titlePosition' => array (
|
353 |
-
'id' => 'fancybox_PDFtitlePosition',
|
354 |
-
'title' => __('Title Position','easy-fancybox'),
|
355 |
-
'label_for' => 'fancybox_PDFtitlePosition',
|
356 |
-
'input' => 'select',
|
357 |
-
'options' => array(
|
358 |
-
'float' => __('Float','easy-fancybox'), // same as 'float'
|
359 |
-
'outside' => __('Outside','easy-fancybox'),
|
360 |
-
'inside' => __('Inside','easy-fancybox')
|
361 |
-
//,'over' => __('Overlay','easy-fancybox')
|
362 |
-
),
|
363 |
-
'default' => 'float',
|
364 |
-
),
|
365 |
-
'titleFromAlt' => array (
|
366 |
-
'id' => 'fancybox_PDFtitleFromAlt',
|
367 |
-
'input' => 'checkbox',
|
368 |
-
'default' => '',
|
369 |
-
'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
|
370 |
-
),
|
371 |
-
'transitionOut' => array (
|
372 |
-
'id' => 'fancybox_PDFtransitionOut',
|
373 |
-
'title' => __('Transition Out','easy-fancybox'),
|
374 |
-
'label_for' => 'fancybox_PDFtransitionOut',
|
375 |
-
'input' => 'select',
|
376 |
-
'class' => '',
|
377 |
-
'options' => array(
|
378 |
-
'fade' => __('Fade','easy-fancybox'),
|
379 |
-
//'elastic' => __('Elastic','easy-fancybox'),
|
380 |
-
'none' => __('None','easy-fancybox')
|
381 |
-
),
|
382 |
-
'default' => 'fade',
|
383 |
-
),
|
384 |
-
'easingIn' => array (
|
385 |
-
'default' => 'swing'
|
386 |
-
),
|
387 |
-
'autoDimensions' => array (
|
388 |
-
'noquotes' => true,
|
389 |
-
'default' => 'false'
|
390 |
-
),
|
391 |
-
'scrolling' => array (
|
392 |
-
'default' => 'no',
|
393 |
-
),
|
394 |
-
'onStart' => array (
|
395 |
-
'noquotes' => true,
|
396 |
-
'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%" />\' }'
|
397 |
-
)
|
398 |
-
)
|
399 |
-
),
|
400 |
-
|
401 |
-
'SWF' => array(
|
402 |
-
'title' => __('SWF','easy-fancybox'),
|
403 |
-
'input' => 'multiple',
|
404 |
-
'options' => array(
|
405 |
-
'enable' => array (
|
406 |
-
'id' => 'fancybox_enableSWF',
|
407 |
-
'input' => 'checkbox',
|
408 |
-
'hide' => true,
|
409 |
-
'default' => '',
|
410 |
-
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('SWF','easy-fancybox') . '</strong>'
|
411 |
-
),
|
412 |
-
'autoAttribute' => array (
|
413 |
-
'id' => 'fancybox_autoAttributeSWF',
|
414 |
-
'input' => 'checkbox',
|
415 |
-
'hide' => true,
|
416 |
-
'default' => '',
|
417 |
-
'selector' => 'href$=".swf"',
|
418 |
-
'description' => __('Auto-detect','easy-fancybox')
|
419 |
-
),
|
420 |
-
'class' => array (
|
421 |
-
'hide' => true,
|
422 |
-
'default' => 'fancybox-swf'
|
423 |
-
),
|
424 |
-
'intro' => array (
|
425 |
-
'hide' => true,
|
426 |
-
'description' => __('To make any Flash (.swf) file open in an overlay, switch on auto-detect or use the tag class="fancybox-swf" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
427 |
-
),
|
428 |
-
'type' => array(
|
429 |
-
'default' => 'swf'
|
430 |
-
),
|
431 |
-
'width' => array (
|
432 |
-
'id' => 'fancybox_SWFWidth',
|
433 |
-
'title' => __('Width'),
|
434 |
-
'label_for' => 'fancybox_SWFWidth',
|
435 |
-
'input' => 'text',
|
436 |
-
'class' => 'small-text',
|
437 |
-
'options' => array(),
|
438 |
-
'default' => '680',
|
439 |
-
'description' => ' '
|
440 |
-
),
|
441 |
-
'height' => array (
|
442 |
-
'id' => 'fancybox_SWFHeight',
|
443 |
-
'title' => __('Height'),
|
444 |
-
'label_for' => 'fancybox_SWFHeight',
|
445 |
-
'input' => 'text',
|
446 |
-
'class' => 'small-text',
|
447 |
-
'options' => array(),
|
448 |
-
'default' => '495',
|
449 |
-
),
|
450 |
-
'padding' => array (
|
451 |
-
'id' => 'fancybox_SWFpadding',
|
452 |
-
'title' => __('Border'),
|
453 |
-
'label_for' => 'fancybox_SWFpadding',
|
454 |
-
'input' => 'text',
|
455 |
-
'class' => 'small-text',
|
456 |
-
'default' => '0',
|
457 |
-
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
458 |
-
),
|
459 |
-
'autoScale' => array (
|
460 |
-
'noquotes' => true,
|
461 |
-
'default' => 'false'
|
462 |
-
),
|
463 |
-
'titleShow' => array (
|
464 |
-
'id' => 'fancybox_SWFtitleShow',
|
465 |
-
'input' => 'checkbox',
|
466 |
-
'default' => '',
|
467 |
-
'description' => __('Show title','easy-fancybox')
|
468 |
-
),
|
469 |
-
'titlePosition' => array (
|
470 |
-
'id' => 'fancybox_SWFtitlePosition',
|
471 |
-
'title' => __('Title Position','easy-fancybox'),
|
472 |
-
'label_for' => 'fancybox_SWFtitlePosition',
|
473 |
-
'input' => 'select',
|
474 |
-
'options' => array(
|
475 |
-
'float' => __('Float','easy-fancybox'), // same as 'float'
|
476 |
-
'outside' => __('Outside','easy-fancybox'),
|
477 |
-
'inside' => __('Inside','easy-fancybox')
|
478 |
-
//,'over' => __('Overlay','easy-fancybox')
|
479 |
-
),
|
480 |
-
'default' => 'float',
|
481 |
-
),
|
482 |
-
'titleFromAlt' => array (
|
483 |
-
'id' => 'fancybox_SWFtitleFromAlt',
|
484 |
-
'input' => 'checkbox',
|
485 |
-
'default' => '',
|
486 |
-
'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
|
487 |
-
),
|
488 |
-
'transitionOut' => array (
|
489 |
-
'id' => 'fancybox_SWFtransitionOut',
|
490 |
-
'title' => __('Transition Out','easy-fancybox'),
|
491 |
-
'label_for' => 'fancybox_SWFtransitionOut',
|
492 |
-
'input' => 'select',
|
493 |
-
'class' => '',
|
494 |
-
'options' => array(
|
495 |
-
'fade' => __('Fade','easy-fancybox'),
|
496 |
-
//'elastic' => __('Elastic','easy-fancybox'),
|
497 |
-
'none' => __('None','easy-fancybox')
|
498 |
-
),
|
499 |
-
'default' => 'fade',
|
500 |
-
),
|
501 |
-
'easingIn' => array (
|
502 |
-
'default' => 'swing'
|
503 |
-
),
|
504 |
-
'swf' => array (
|
505 |
-
'noquotes' => true,
|
506 |
-
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
507 |
-
)
|
508 |
-
)
|
509 |
-
),
|
510 |
-
|
511 |
-
'YouTube' => array(
|
512 |
-
'title' => __('YouTube','easy-fancybox'),
|
513 |
-
'input' => 'multiple',
|
514 |
-
'options' => array(
|
515 |
-
'enable' => array (
|
516 |
-
'id' => 'fancybox_enableYoutube',
|
517 |
-
'input' => 'checkbox',
|
518 |
-
'hide' => true,
|
519 |
-
'default' => '',
|
520 |
-
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('YouTube','easy-fancybox') . '</strong>'
|
521 |
-
),
|
522 |
-
'autoAttribute' => array (
|
523 |
-
'id' => 'fancybox_autoAttributeYoutube',
|
524 |
-
'input' => 'checkbox',
|
525 |
-
'hide' => true,
|
526 |
-
'default' => '',
|
527 |
-
'selector' => 'href*="youtube.com/"',
|
528 |
-
//'href-replace' => "return attr.replace(new RegExp('watch\\\?v=', 'i'), 'v/')",
|
529 |
-
'description' => __('Auto-detect','easy-fancybox')
|
530 |
-
),
|
531 |
-
'autoAttributeAlt' => array (
|
532 |
-
'id' => 'fancybox_autoAttributeYoutubeShortURL',
|
533 |
-
'input' => 'checkbox',
|
534 |
-
'hide' => true,
|
535 |
-
'default' => '',
|
536 |
-
'selector' => 'href*="youtu.be/"',
|
537 |
-
//'href-replace' => "return attr.replace(new RegExp('youtu.be', 'i'), 'www.youtube.com/v')",
|
538 |
-
'description' => __('Auto-detect Short links','easy-fancybox')
|
539 |
-
),
|
540 |
-
'class' => array (
|
541 |
-
'hide' => true,
|
542 |
-
'default' => 'fancybox-youtube'
|
543 |
-
),
|
544 |
-
'intro' => array (
|
545 |
-
'hide' => true,
|
546 |
-
'description' => __('To make any YouTube movie open in an overlay, switch on auto-detect or use the tag class="fancybox-youtube" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
547 |
-
),
|
548 |
-
'type' => array(
|
549 |
-
'default' => 'swf'
|
550 |
-
),
|
551 |
-
'width' => array (
|
552 |
-
'id' => 'fancybox_YoutubeWidth',
|
553 |
-
'title' => __('Width'),
|
554 |
-
'label_for' => 'fancybox_YoutubeWidth',
|
555 |
-
'input' => 'text',
|
556 |
-
'class' => 'small-text',
|
557 |
-
'default' => '640',
|
558 |
-
'description' => ' '
|
559 |
-
),
|
560 |
-
'height' => array (
|
561 |
-
'id' => 'fancybox_YoutubeHeight',
|
562 |
-
'title' => __('Height'),
|
563 |
-
'label_for' => 'fancybox_YoutubeHeight',
|
564 |
-
'input' => 'text',
|
565 |
-
'class' => 'small-text',
|
566 |
-
'default' => '385',
|
567 |
-
),
|
568 |
-
'padding' => array (
|
569 |
-
'id' => 'fancybox_Youtubepadding',
|
570 |
-
'title' => __('Border'),
|
571 |
-
'label_for' => 'fancybox_Youtubepadding',
|
572 |
-
'input' => 'text',
|
573 |
-
'class' => 'small-text',
|
574 |
-
'default' => '0',
|
575 |
-
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
576 |
-
),
|
577 |
-
'autoScale' => array (
|
578 |
-
'noquotes' => true,
|
579 |
-
'default' => 'false'
|
580 |
-
),
|
581 |
-
'titleShow' => array (
|
582 |
-
'id' => 'fancybox_YoutubetitleShow',
|
583 |
-
'input' => 'checkbox',
|
584 |
-
'default' => '',
|
585 |
-
'description' => __('Show title','easy-fancybox')
|
586 |
-
),
|
587 |
-
'titlePosition' => array (
|
588 |
-
'id' => 'fancybox_YoutubetitlePosition',
|
589 |
-
'title' => __('Title Position','easy-fancybox'),
|
590 |
-
'label_for' => 'fancybox_YoutubetitlePosition',
|
591 |
-
'input' => 'select',
|
592 |
-
'options' => array(
|
593 |
-
'float' => __('Float','easy-fancybox'), // same as 'float'
|
594 |
-
'outside' => __('Outside','easy-fancybox'),
|
595 |
-
'inside' => __('Inside','easy-fancybox')
|
596 |
-
//,'over' => __('Overlay','easy-fancybox')
|
597 |
-
),
|
598 |
-
'default' => 'float',
|
599 |
-
),
|
600 |
-
'titleFromAlt' => array (
|
601 |
-
'id' => 'fancybox_YoutubetitleFromAlt',
|
602 |
-
'input' => 'checkbox',
|
603 |
-
'default' => '',
|
604 |
-
'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
|
605 |
-
),
|
606 |
-
'transitionOut' => array (
|
607 |
-
'id' => 'fancybox_YoutubetransitionOut',
|
608 |
-
'title' => __('Transition Out','easy-fancybox'),
|
609 |
-
'label_for' => 'fancybox_YoutubetransitionOut',
|
610 |
-
'input' => 'select',
|
611 |
-
'options' => array(
|
612 |
-
'fade' => __('Fade','easy-fancybox'),
|
613 |
-
//'elastic' => __('Elastic','easy-fancybox'),
|
614 |
-
'none' => __('None','easy-fancybox')
|
615 |
-
),
|
616 |
-
'default' => 'fade'
|
617 |
-
),
|
618 |
-
'easingIn' => array (
|
619 |
-
'default' => 'swing'
|
620 |
-
),
|
621 |
-
'swf' => array (
|
622 |
-
'noquotes' => true,
|
623 |
-
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
624 |
-
),
|
625 |
-
'onStart' => array (
|
626 |
-
'noquotes' => true,
|
627 |
-
'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.href = selectedArray[selectedIndex].href.replace(new RegExp(\'youtu.be\', \'i\'), \'www.youtube.com/v\').replace(new RegExp(\'watch\\\?v=\', \'i\'), \'v/\') }'
|
628 |
-
)
|
629 |
-
)
|
630 |
-
),
|
631 |
|
632 |
-
'Vimeo' => array(
|
633 |
-
'title' => __('Vimeo','easy-fancybox'),
|
634 |
-
'input' => 'multiple',
|
635 |
-
'options' => array(
|
636 |
-
'enable' => array (
|
637 |
-
'id' => 'fancybox_enableVimeo',
|
638 |
-
'input' => 'checkbox',
|
639 |
-
'hide' => true,
|
640 |
-
'default' => '',
|
641 |
-
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('Vimeo','easy-fancybox') . '</strong>'
|
642 |
-
),
|
643 |
-
'autoAttribute' => array (
|
644 |
-
'id' => 'fancybox_autoAttributeVimeo',
|
645 |
-
'input' => 'checkbox',
|
646 |
-
'hide' => true,
|
647 |
-
'default' => '',
|
648 |
-
'selector' => 'href*="vimeo.com/"',
|
649 |
-
//'href-replace' => "return attr.replace(new RegExp('/([0-9])', 'i'), '/moogaloop.swf?clip_id=$1')",
|
650 |
-
'description' => __('Auto-detect','easy-fancybox')
|
651 |
-
),
|
652 |
-
'class' => array (
|
653 |
-
'hide' => true,
|
654 |
-
'default' => 'fancybox-vimeo'
|
655 |
-
),
|
656 |
-
'intro' => array (
|
657 |
-
'hide' => true,
|
658 |
-
'description' => __('To make any Vimeo movie open in an overlay, switch on auto-detect or use the tag class="fancybox-vimeo" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
659 |
-
),
|
660 |
-
'type' => array(
|
661 |
-
'default' => 'swf'
|
662 |
-
),
|
663 |
-
'width' => array (
|
664 |
-
'id' => 'fancybox_VimeoWidth',
|
665 |
-
'title' => __('Width'),
|
666 |
-
'label_for' => 'fancybox_VimeoWidth',
|
667 |
-
'input' => 'text',
|
668 |
-
'class' => 'small-text',
|
669 |
-
'default' => '640',
|
670 |
-
'description' => ' '
|
671 |
-
),
|
672 |
-
'height' => array (
|
673 |
-
'id' => 'fancybox_VimeoHeight',
|
674 |
-
'title' => __('Height'),
|
675 |
-
'label_for' => 'fancybox_VimeoHeight',
|
676 |
-
'input' => 'text',
|
677 |
-
'class' => 'small-text',
|
678 |
-
'default' => '360'
|
679 |
-
),
|
680 |
-
'padding' => array (
|
681 |
-
'id' => 'fancybox_Vimeopadding',
|
682 |
-
'title' => __('Border'),
|
683 |
-
'label_for' => 'fancybox_Vimeopadding',
|
684 |
-
'input' => 'text',
|
685 |
-
'class' => 'small-text',
|
686 |
-
'default' => '0',
|
687 |
-
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
688 |
-
),
|
689 |
-
'autoScale' => array (
|
690 |
-
'noquotes' => true,
|
691 |
-
'default' => 'false'
|
692 |
-
),
|
693 |
-
'transitionOut' => array (
|
694 |
-
'id' => 'fancybox_VimeotransitionOut',
|
695 |
-
'title' => __('Transition Out','easy-fancybox'),
|
696 |
-
'label_for' => 'fancybox_VimeotransitionOut',
|
697 |
-
'input' => 'select',
|
698 |
-
'options' => array(
|
699 |
-
'fade' => __('Fade','easy-fancybox'),
|
700 |
-
//'elastic' => __('Elastic','easy-fancybox'),
|
701 |
-
'none' => __('None','easy-fancybox')
|
702 |
-
),
|
703 |
-
'default' => 'fade',
|
704 |
-
'description' => __('Transition effect when closing the overlay.','easy-fancybox')
|
705 |
-
),
|
706 |
-
'easingIn' => array (
|
707 |
-
'default' => 'swing'
|
708 |
-
),
|
709 |
-
'titleShow' => array (
|
710 |
-
'id' => 'fancybox_VimeotitleShow',
|
711 |
-
'input' => 'checkbox',
|
712 |
-
'default' => '',
|
713 |
-
'description' => __('Show title','easy-fancybox')
|
714 |
-
),
|
715 |
-
'titlePosition' => array (
|
716 |
-
'id' => 'fancybox_VimeotitlePosition',
|
717 |
-
'title' => __('Title Position','easy-fancybox'),
|
718 |
-
'label_for' => 'fancybox_VimeotitlePosition',
|
719 |
-
'input' => 'select',
|
720 |
-
'options' => array(
|
721 |
-
'float' => __('Float','easy-fancybox'), // same as 'float'
|
722 |
-
'outside' => __('Outside','easy-fancybox'),
|
723 |
-
'inside' => __('Inside','easy-fancybox')
|
724 |
-
//,'over' => __('Overlay','easy-fancybox')
|
725 |
-
),
|
726 |
-
'default' => 'float',
|
727 |
-
),
|
728 |
-
'titleFromAlt' => array (
|
729 |
-
'id' => 'fancybox_VimeotitleFromAlt',
|
730 |
-
'input' => 'checkbox',
|
731 |
-
'default' => '',
|
732 |
-
'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
|
733 |
-
),
|
734 |
-
'transitionOut' => array (
|
735 |
-
'id' => 'fancybox_VimeotransitionOut',
|
736 |
-
'title' => __('Transition Out','easy-fancybox'),
|
737 |
-
'label_for' => 'fancybox_VimeotransitionOut',
|
738 |
-
'input' => 'select',
|
739 |
-
'options' => array(
|
740 |
-
'fade' => __('Fade','easy-fancybox'),
|
741 |
-
//'elastic' => __('Elastic','easy-fancybox'),
|
742 |
-
'none' => __('None','easy-fancybox')
|
743 |
-
),
|
744 |
-
'default' => 'fade',
|
745 |
-
'description' => __('Transition effect when closing the overlay.','easy-fancybox')
|
746 |
-
),
|
747 |
-
'easingIn' => array (
|
748 |
-
'default' => 'swing'
|
749 |
-
),
|
750 |
-
'swf' => array (
|
751 |
-
'noquotes' => true,
|
752 |
-
'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
|
753 |
-
),
|
754 |
-
'onStart' => array (
|
755 |
-
'noquotes' => true,
|
756 |
-
'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.href = selectedArray[selectedIndex].href.replace(new RegExp(\'/([0-9])\', \'i\'), \'/moogaloop.swf?clip_id=$1\') }'
|
757 |
-
)
|
758 |
-
)
|
759 |
-
),
|
760 |
|
761 |
-
|
762 |
-
'id' => 'fancybox_Tudou',
|
763 |
-
'title' => __('Tudou','easy-fancybox'),
|
764 |
-
'label_for' => '',
|
765 |
-
'input' => 'multiple',
|
766 |
-
'class' => '', 'description' => '',
|
767 |
-
'options' => array(
|
768 |
-
'autoAttributeTudou' => array (
|
769 |
-
'id' => 'fancybox_autoAttributeTudou',
|
770 |
-
'label_for' => '',
|
771 |
-
'input' => 'checkbox',
|
772 |
-
'class' => '',
|
773 |
-
'options' => array(),
|
774 |
-
'hide' => true,
|
775 |
-
'default' => '1',
|
776 |
-
'description' => __('Tudou links','easy-fancybox')
|
777 |
-
)
|
778 |
-
)
|
779 |
-
),*/
|
780 |
-
|
781 |
-
/* 'Animoto' => array(),
|
782 |
-
|
783 |
-
Example ANIMOTO page link http://animoto.com/play/Kf9POzQMSOGWyu41gtOtsw should become
|
784 |
-
http://static.animoto.com/swf/w.swf?w=swf/vp1&f=Kf9POzQMSOGWyu41gtOtsw&i=m
|
785 |
-
|
786 |
-
*/
|
787 |
-
|
788 |
-
'iFrame' => array(
|
789 |
-
'title' => __('iFrames','easy-fancybox'),
|
790 |
-
'input' => 'multiple',
|
791 |
-
'options' => array(
|
792 |
-
'enable' => array (
|
793 |
-
'id' => 'fancybox_enableiFrame',
|
794 |
-
'input' => 'checkbox',
|
795 |
-
'hide' => true,
|
796 |
-
'default' => '',
|
797 |
-
'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('iFrames','easy-fancybox') . '</strong>'
|
798 |
-
),
|
799 |
-
'class' => array (
|
800 |
-
'hide' => true,
|
801 |
-
'default' => 'fancybox-iframe'
|
802 |
-
),
|
803 |
-
'intro' => array (
|
804 |
-
'hide' => true,
|
805 |
-
'description' => __('To make a website or HTML document open in an overlay, use the tag class="fancybox-iframe" or class="fancybox iframe" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
|
806 |
-
),
|
807 |
-
'type' => array (
|
808 |
-
'default' => 'iframe'
|
809 |
-
),
|
810 |
-
'width' => array (
|
811 |
-
'id' => 'fancybox_iFramewidth',
|
812 |
-
'title' => __('Width'),
|
813 |
-
'label_for' => 'fancybox_iFramewidth',
|
814 |
-
'input' => 'text',
|
815 |
-
'class' => 'small-text',
|
816 |
-
'default' => '70%',
|
817 |
-
'description' => ' '
|
818 |
-
),
|
819 |
-
'height' => array (
|
820 |
-
'id' => 'fancybox_iFrameheight',
|
821 |
-
'title' => __('Height'),
|
822 |
-
'label_for' => 'fancybox_iFrameheight',
|
823 |
-
'input' => 'text',
|
824 |
-
'class' => 'small-text',
|
825 |
-
'default' => '90%',
|
826 |
-
),
|
827 |
-
'padding' => array (
|
828 |
-
'id' => 'fancybox_iFramepadding',
|
829 |
-
'title' => __('Border'),
|
830 |
-
'label_for' => 'fancybox_iFramepadding',
|
831 |
-
'input' => 'text',
|
832 |
-
'class' => 'small-text',
|
833 |
-
'default' => '0',
|
834 |
-
'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
|
835 |
-
),
|
836 |
-
'scrolling' => array (
|
837 |
-
'default' => 'auto'
|
838 |
-
),
|
839 |
-
'autoScale' => array (
|
840 |
-
'noquotes' => true,
|
841 |
-
'default' => 'false'
|
842 |
-
),
|
843 |
-
'titleShow' => array (
|
844 |
-
'id' => 'fancybox_iFrametitleShow',
|
845 |
-
'input' => 'checkbox',
|
846 |
-
'default' => '',
|
847 |
-
'description' => __('Show title','easy-fancybox')
|
848 |
-
),
|
849 |
-
'titlePosition' => array (
|
850 |
-
'id' => 'fancybox_iFrametitlePosition',
|
851 |
-
'title' => __('Title Position','easy-fancybox'),
|
852 |
-
'label_for' => 'fancybox_iFrametitlePosition',
|
853 |
-
'input' => 'select',
|
854 |
-
'options' => array(
|
855 |
-
'float' => __('Float','easy-fancybox'), // same as 'float'
|
856 |
-
'outside' => __('Outside','easy-fancybox'),
|
857 |
-
'inside' => __('Inside','easy-fancybox')
|
858 |
-
//,'over' => __('Overlay','easy-fancybox')
|
859 |
-
),
|
860 |
-
'default' => 'float',
|
861 |
-
),
|
862 |
-
'titleFromAlt' => array (
|
863 |
-
'id' => 'fancybox_iFrametitleFromAlt',
|
864 |
-
'input' => 'checkbox',
|
865 |
-
'default' => '',
|
866 |
-
'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
|
867 |
-
),
|
868 |
-
'transitionOut' => array (
|
869 |
-
'id' => 'fancybox_iFrametransitionOut',
|
870 |
-
'title' => __('Transition Out','easy-fancybox'),
|
871 |
-
'label_for' => 'fancybox_iFrametransitionOut',
|
872 |
-
'input' => 'select',
|
873 |
-
'options' => array(
|
874 |
-
'fade' => __('Fade','easy-fancybox'),
|
875 |
-
//'elastic' => __('Elastic','easy-fancybox'),
|
876 |
-
'none' => __('None','easy-fancybox')
|
877 |
-
),
|
878 |
-
'default' => 'fade'
|
879 |
-
),
|
880 |
-
'easingIn' => array (
|
881 |
-
'default' => 'swing'
|
882 |
-
)
|
883 |
-
)
|
884 |
-
)
|
885 |
-
|
886 |
-
);
|
887 |
-
}
|
888 |
|
889 |
function easy_fancybox() {
|
890 |
$easy_fancybox_array = easy_fancybox_settings();
|
891 |
|
892 |
-
echo
|
893 |
-
<!-- Easy FancyBox plugin for WordPress using FancyBox
|
894 |
|
895 |
// check for any enabled sections
|
896 |
$do_fancybox = false;
|
@@ -900,18 +46,20 @@ function easy_fancybox() {
|
|
900 |
break;
|
901 |
}
|
902 |
}
|
|
|
903 |
if (!$do_fancybox) {
|
904 |
-
|
905 |
<!-- No sections enabled under Settings > Media > FancyBox -->
|
906 |
|
907 |
-
|
908 |
return;
|
909 |
}
|
910 |
|
911 |
// begin output FancyBox settings
|
912 |
-
echo
|
913 |
-
<script type
|
914 |
-
|
|
|
915 |
|
916 |
/*
|
917 |
* Global settings routine
|
@@ -949,33 +97,52 @@ var fb_opts = {';
|
|
949 |
* Auto-detection routines (2x)
|
950 |
*/
|
951 |
$autoAttribute = get_option( $value['options']['autoAttribute']['id'], $value['options']['autoAttribute']['default'] );
|
952 |
-
|
|
|
|
|
|
|
|
|
|
|
953 |
if(!empty($autoAttribute)) {
|
954 |
if(is_numeric($autoAttribute)) {
|
955 |
echo '
|
956 |
-
$(\'a['.$value['options']['autoAttribute']['selector'].']\')';
|
957 |
if ($value['options']['autoAttribute']['href-replace'])
|
958 |
echo '.attr(\'href\', function(index, attr){'.$value['options']['autoAttribute']['href-replace'].'})';
|
959 |
echo '.addClass(\''.$value['options']['class']['default'].'\');';
|
960 |
} else {
|
961 |
-
$file_types = array_filter( explode( ' ',
|
962 |
$more=0;
|
963 |
echo '
|
964 |
var fb_'.$key.'_selector = \'';
|
965 |
foreach ($file_types as $type) {
|
966 |
if ($more>0)
|
967 |
echo ',';
|
968 |
-
echo 'a['.$value['options']['autoAttribute']['selector'].'".'.$type.'"],a['.$value['options']['autoAttribute']['selector'].'".'.strtoupper($type).'"]';
|
969 |
$more++;
|
970 |
}
|
971 |
echo '\';';
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
979 |
}
|
980 |
}
|
981 |
}
|
@@ -983,7 +150,7 @@ fb_'.$key.'_posts.each(function() { jQuery(this).find(fb_'.$key.'_selector)'.$at
|
|
983 |
$autoAttributeAlt = get_option( $value['options']['autoAttributeAlt']['id'], $value['options']['autoAttributeAlt']['default'] );
|
984 |
if(!empty($autoAttributeAlt) && is_numeric($autoAttributeAlt)) {
|
985 |
echo '
|
986 |
-
|
987 |
if ($value['options']['autoAttributeAlt']['href-replace'])
|
988 |
echo '.attr(\'href\', function(index, attr){'.$value['options']['autoAttributeAlt']['href-replace']. '})';
|
989 |
echo '.addClass(\''.$value['options']['class']['default'].'\');';
|
@@ -993,8 +160,12 @@ fb_'.$key.'_posts.each(function() { jQuery(this).find(fb_'.$key.'_selector)'.$at
|
|
993 |
* Append .fancybox() routine
|
994 |
*/
|
995 |
$more=0;
|
|
|
|
|
|
|
|
|
996 |
echo '
|
997 |
-
$(\'a.'.$value['options']['class']['default'].'\')
|
998 |
foreach ($value['options'] as $_key => $_values) {
|
999 |
$parm = ($_values['id']) ? get_option($_values['id'], $_values['default']) : $_values['default'];
|
1000 |
$parm = ('checkbox'==$_values['input'] && ''==$parm) ? '0' : $parm;
|
@@ -1010,15 +181,31 @@ $(\'a.'.$value['options']['class']['default'].'\')'.$attributeLimit.'.fancybox(
|
|
1010 |
$more++;
|
1011 |
}
|
1012 |
}
|
1013 |
-
echo ' }) );';
|
1014 |
-
|
1015 |
}
|
1016 |
|
1017 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1018 |
});
|
|
|
1019 |
</script>
|
|
|
1020 |
|
1021 |
-
";
|
1022 |
}
|
1023 |
|
1024 |
// FancyBox Media Settings Section on Settings > Media admin page
|
@@ -1125,14 +312,9 @@ function easy_fancybox_enqueue() {
|
|
1125 |
if (!$do_fancybox)
|
1126 |
return;
|
1127 |
|
1128 |
-
|
1129 |
-
// check if easy-fancybox.php is moved one dir up like in WPMU's /mu-plugins/
|
1130 |
-
// NOTE: don't use WP_PLUGIN_URL to avoid problems when installed in /mu-plugins/
|
1131 |
-
$efb_subdir = (file_exists(dirname(__FILE__).'/easy-fancybox')) ? 'easy-fancybox' : '';
|
1132 |
-
|
1133 |
// ENQUEUE
|
1134 |
// register main fancybox script
|
1135 |
-
wp_enqueue_script('jquery.fancybox', plugins_url(
|
1136 |
|
1137 |
foreach ($easy_fancybox_array as $value) {
|
1138 |
if( ( 'elastic' == get_option($value['options']['transitionIn']['id'],$value['options']['transitionIn']['default']) || 'elastic' == get_option($value['options']['transitionOut']['id'],$value['options']['transitionOut']['default']) ) && ( '' != get_option($value['options']['easingIn']['id'],$value['options']['easingIn']['default']) || '' != get_option($value['options']['easingOut']['id'],$value['options']['easingOut']['default']) ) ) {
|
@@ -1147,7 +329,7 @@ function easy_fancybox_enqueue() {
|
|
1147 |
wp_deregister_script('jquery-easing');
|
1148 |
wp_deregister_script('easing');
|
1149 |
// then register our version
|
1150 |
-
wp_enqueue_script('jquery.easing', plugins_url(
|
1151 |
}
|
1152 |
|
1153 |
// first get rid of previously registered variants of jquery.mousewheel (by other plugins)
|
@@ -1156,10 +338,10 @@ function easy_fancybox_enqueue() {
|
|
1156 |
wp_deregister_script('jquery-mousewheel');
|
1157 |
wp_deregister_script('mousewheel');
|
1158 |
// then register our version
|
1159 |
-
wp_enqueue_script('jquery.mousewheel', plugins_url(
|
1160 |
|
1161 |
// register style
|
1162 |
-
wp_enqueue_style('easy-fancybox.css', plugins_url(
|
1163 |
|
1164 |
}
|
1165 |
|
2 |
/*
|
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&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 |
*/
|
13 |
define( 'FANCYBOX_VERSION', '1.3.4' );
|
14 |
define( 'MOUSEWHEEL_VERSION', '3.0.4' );
|
15 |
define( 'EASING_VERSION', '1.3' );
|
16 |
+
// check if easy-fancybox.php is moved one dir up like in WPMU's /mu-plugins/
|
17 |
+
// NOTE: don't use WP_PLUGIN_URL to avoid problems when installed in /mu-plugins/
|
18 |
+
if(file_exists(dirname(__FILE__).'/easy-fancybox'))
|
19 |
+
define( 'FANCYBOX_SUBDIR', '/easy-fancybox' );
|
20 |
+
else
|
21 |
+
define( 'FANCYBOX_SUBDIR', '' );
|
22 |
+
|
23 |
+
/* CHECK FOR NETWORK ACTIVATION
|
24 |
+
if (function_exists('is_plugin_active_for_network') && is_plugin_active_for_network(plugin_basename( __FILE__ )))
|
25 |
+
$no_network_activate = '';
|
26 |
+
else
|
27 |
+
$no_network_activate = '1';
|
28 |
+
*/
|
29 |
|
30 |
+
require_once(dirname(__FILE__) . FANCYBOX_SUBDIR . '/easy-fancybox-settings.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
+
// FUNCTIONS //
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
function easy_fancybox() {
|
36 |
$easy_fancybox_array = easy_fancybox_settings();
|
37 |
|
38 |
+
echo '
|
39 |
+
<!-- Easy FancyBox plugin for WordPress using FancyBox ' . FANCYBOX_VERSION . ' - RavanH (http://4visions.nl/en/wordpress-plugins/easy-fancybox/) -->';
|
40 |
|
41 |
// check for any enabled sections
|
42 |
$do_fancybox = false;
|
46 |
break;
|
47 |
}
|
48 |
}
|
49 |
+
// and break off when none are active
|
50 |
if (!$do_fancybox) {
|
51 |
+
echo '
|
52 |
<!-- No sections enabled under Settings > Media > FancyBox -->
|
53 |
|
54 |
+
';
|
55 |
return;
|
56 |
}
|
57 |
|
58 |
// begin output FancyBox settings
|
59 |
+
echo '
|
60 |
+
<script type="text/javascript">
|
61 |
+
/* <![CDATA[ */
|
62 |
+
jQuery(document).ready(function($){';
|
63 |
|
64 |
/*
|
65 |
* Global settings routine
|
97 |
* Auto-detection routines (2x)
|
98 |
*/
|
99 |
$autoAttribute = get_option( $value['options']['autoAttribute']['id'], $value['options']['autoAttribute']['default'] );
|
100 |
+
// update from previous version:
|
101 |
+
if($attributeLimit == '.not(\':empty\')')
|
102 |
+
$attributeLimit = ':not(:empty)';
|
103 |
+
elseif($attributeLimit == '.has(\'img\')')
|
104 |
+
$attributeLimit = ':has(img)';
|
105 |
+
|
106 |
if(!empty($autoAttribute)) {
|
107 |
if(is_numeric($autoAttribute)) {
|
108 |
echo '
|
109 |
+
$(\'a['.$value['options']['autoAttribute']['selector'].']:not(.nofancybox)'.$attributeLimit.'\')';
|
110 |
if ($value['options']['autoAttribute']['href-replace'])
|
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 ',';
|
121 |
+
echo 'a['.$value['options']['autoAttribute']['selector'].'".'.$type.'"]:not(.nofancybox)'.$attributeLimit.',a['.$value['options']['autoAttribute']['selector'].'".'.strtoupper($type).'"]:not(.nofancybox)'.$attributeLimit;
|
122 |
$more++;
|
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 |
}
|
150 |
$autoAttributeAlt = get_option( $value['options']['autoAttributeAlt']['id'], $value['options']['autoAttributeAlt']['default'] );
|
151 |
if(!empty($autoAttributeAlt) && is_numeric($autoAttributeAlt)) {
|
152 |
echo '
|
153 |
+
$(\'a['.$value['options']['autoAttributeAlt']['selector'].']\')';
|
154 |
if ($value['options']['autoAttributeAlt']['href-replace'])
|
155 |
echo '.attr(\'href\', function(index, attr){'.$value['options']['autoAttributeAlt']['href-replace']. '})';
|
156 |
echo '.addClass(\''.$value['options']['class']['default'].'\');';
|
160 |
* Append .fancybox() routine
|
161 |
*/
|
162 |
$more=0;
|
163 |
+
$trigger='';
|
164 |
+
if( $key == $autoClick )
|
165 |
+
$trigger = '.filter(\':first\').trigger(\'click\')';
|
166 |
+
|
167 |
echo '
|
168 |
+
$(\'a.'.$value['options']['class']['default'].'\').fancybox( $.extend({}, fb_opts, {';
|
169 |
foreach ($value['options'] as $_key => $_values) {
|
170 |
$parm = ($_values['id']) ? get_option($_values['id'], $_values['default']) : $_values['default'];
|
171 |
$parm = ('checkbox'==$_values['input'] && ''==$parm) ? '0' : $parm;
|
181 |
$more++;
|
182 |
}
|
183 |
}
|
184 |
+
echo ' }) )'.$trigger.';';
|
185 |
+
|
186 |
}
|
187 |
|
188 |
+
switch( $autoClick ) {
|
189 |
+
case '':
|
190 |
+
default :
|
191 |
+
break;
|
192 |
+
case '1':
|
193 |
+
echo '
|
194 |
+
/* Auto-click */
|
195 |
+
$(\'#fancybox-auto\').trigger(\'click\');';
|
196 |
+
break;
|
197 |
+
case '99':
|
198 |
+
echo '
|
199 |
+
/* Auto-load */
|
200 |
+
$(\'a[class*="fancybox"]\').filter(\':first\').trigger(\'click\');';
|
201 |
+
break;
|
202 |
+
}
|
203 |
+
echo '
|
204 |
});
|
205 |
+
/* ]]> */
|
206 |
</script>
|
207 |
+
';
|
208 |
|
|
|
209 |
}
|
210 |
|
211 |
// FancyBox Media Settings Section on Settings > Media admin page
|
312 |
if (!$do_fancybox)
|
313 |
return;
|
314 |
|
|
|
|
|
|
|
|
|
|
|
315 |
// ENQUEUE
|
316 |
// register main fancybox script
|
317 |
+
wp_enqueue_script('jquery.fancybox', plugins_url(FANCYBOX_SUBDIR.'/fancybox/jquery.fancybox-'.FANCYBOX_VERSION.'.pack.js', __FILE__), array('jquery'), FANCYBOX_VERSION);
|
318 |
|
319 |
foreach ($easy_fancybox_array as $value) {
|
320 |
if( ( 'elastic' == get_option($value['options']['transitionIn']['id'],$value['options']['transitionIn']['default']) || 'elastic' == get_option($value['options']['transitionOut']['id'],$value['options']['transitionOut']['default']) ) && ( '' != get_option($value['options']['easingIn']['id'],$value['options']['easingIn']['default']) || '' != get_option($value['options']['easingOut']['id'],$value['options']['easingOut']['default']) ) ) {
|
329 |
wp_deregister_script('jquery-easing');
|
330 |
wp_deregister_script('easing');
|
331 |
// then register our version
|
332 |
+
wp_enqueue_script('jquery.easing', plugins_url(FANCYBOX_SUBDIR.'/fancybox/jquery.easing-'.EASING_VERSION.'.pack.js', __FILE__), array('jquery'), EASING_VERSION);
|
333 |
}
|
334 |
|
335 |
// first get rid of previously registered variants of jquery.mousewheel (by other plugins)
|
338 |
wp_deregister_script('jquery-mousewheel');
|
339 |
wp_deregister_script('mousewheel');
|
340 |
// then register our version
|
341 |
+
wp_enqueue_script('jquery.mousewheel', plugins_url(FANCYBOX_SUBDIR.'/fancybox/jquery.mousewheel-'.MOUSEWHEEL_VERSION.'.pack.js', __FILE__), array('jquery'), MOUSEWHEEL_VERSION);
|
342 |
|
343 |
// register style
|
344 |
+
wp_enqueue_style('easy-fancybox.css', plugins_url(FANCYBOX_SUBDIR.'/easy-fancybox.css.php', __FILE__), false, FANCYBOX_VERSION, 'screen');
|
345 |
|
346 |
}
|
347 |
|
readme.txt
CHANGED
@@ -1,29 +1,30 @@
|
|
1 |
=== Easy FancyBox ===
|
2 |
Contributors: RavanH
|
3 |
Donate link: 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
|
4 |
-
Tags: fancybox,
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 3.1
|
7 |
-
Stable tag: 1.3.4.
|
8 |
|
9 |
-
Easily enable the FancyBox 1.3.4 jQuery extension on
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
|
20 |
-
- *Auto-detect*: control auto-detection and enabling for links to YouTube and Vimeo movies.
|
21 |
-
- *Title Position*: Overlay / Inside / Outside to control the position of the image title. Includes the new "Overlay" position.
|
22 |
-
- *Transition In / Out*: Elastic / Fade / None to control the transition effects during opening and closing of the overlay.
|
23 |
|
24 |
-
See [FAQ's](http://wordpress.org/extend/plugins/easy-fancybox/faq/) for instructions to manage YouTube and Vimeo movies (and similar services) and make
|
25 |
|
26 |
-
Visit [FancyBox](http://fancybox.net/) for more information, examples and the Support Forum. Please consider a DONATION for continued development of the FancyBox project.
|
27 |
|
28 |
= Translations =
|
29 |
|
@@ -85,11 +86,28 @@ There is no new settings page but there are a few options you can change. You wi
|
|
85 |
|
86 |
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"]`.
|
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"` (notice the space instead of the hyphen) to any web page or .htm(l) file in your content.
|
91 |
|
92 |
-
NOTE: The difference between these two classes (- or space) is in size of the overlay window. Try it out and use the one that works best :)
|
93 |
|
94 |
= Can I show PDF files in a FancyBox overlay? =
|
95 |
|
@@ -103,7 +121,7 @@ Yes. Just place a link _with the URL ending in .swf_ to your Flash file in the p
|
|
103 |
|
104 |
If you do'nt have *Auto-detect* checked under **SWF** on Settings > Media admin page, you will need to add either `class="fancybox"` or `class="fancybox-swf"` (to force swf content recognition) to the link to enable FancyBox for it.
|
105 |
|
106 |
-
= Can I play YouTube and Vimeo movies in a FancyBox overlay? =
|
107 |
|
108 |
Yes.
|
109 |
|
@@ -143,6 +161,45 @@ just add `<param name="wmode" value="opaque" />` among the other parameters. Or
|
|
143 |
`
|
144 |
just change that `wmode="window"` to `wmode="opaque"` or add the tag if it is missing.
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
= Is Easy FancyBox multi-site compatible? =
|
147 |
|
148 |
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.
|
@@ -153,7 +210,8 @@ Yes. Designed to work with **Network Activate** and does not require manual acti
|
|
153 |
|
154 |
- 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.
|
155 |
- 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.
|
156 |
-
- 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 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' or 'transparent' (when you need transparency) for your embedded content.
|
|
|
157 |
|
158 |
== Screenshots ==
|
159 |
|
@@ -163,11 +221,21 @@ Yes. Designed to work with **Network Activate** and does not require manual acti
|
|
163 |
|
164 |
== Upgrade Notice ==
|
165 |
|
166 |
-
= 1.3.4.
|
167 |
-
|
168 |
|
169 |
== Changelog ==
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
= 1.3.4.5 =
|
172 |
* Added Support for PDF
|
173 |
* Added Easing options
|
1 |
=== Easy FancyBox ===
|
2 |
Contributors: RavanH
|
3 |
Donate link: 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
|
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 |
|
11 |
== Description ==
|
12 |
|
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**
|
19 |
+
- hidden inline content
|
20 |
+
- iframes
|
21 |
+
- popup (auto-activate) on page load
|
22 |
|
23 |
+
See [Screenshots](http://wordpress.org/extend/plugins/easy-fancybox/screenshots/) for an impression on how images and YouTube movies will be presented on your site as soon as you have installed and (network) activated this simple plugin.
|
|
|
|
|
|
|
24 |
|
25 |
+
See [FAQ's](http://wordpress.org/extend/plugins/easy-fancybox/faq/) for instructions to manage YouTube, Dailymotion and Vimeo movies (and similar services) and tips to make inline content display in a FancyBox overlay. Subscribe to [4Visions](http://4visions.nl/rss/) for tips on how to get a high degree of control over what will be shown in a FancyBox overlay on your website.
|
26 |
|
27 |
+
Visit [FancyBox](http://fancybox.net/) for more information, examples and the FancyBox Support Forum. Please consider a DONATION for continued development of the FancyBox project.
|
28 |
|
29 |
= Translations =
|
30 |
|
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 |
+
|
97 |
+
It *can* be. Switch off any gallery overlay scripts in NextGen and either use the FancyBox Auto-detect feature (turned ON by default for jpg, gif and png files) or set the NextGen option "Effects" to "Custom" and fill the code line field with
|
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.
|
109 |
|
110 |
+
NOTE: The difference between these two classes ('-' or space) is in size of the overlay window. Try it out and use the one that works best for you :)
|
111 |
|
112 |
= Can I show PDF files in a FancyBox overlay? =
|
113 |
|
121 |
|
122 |
If you do'nt have *Auto-detect* checked under **SWF** on Settings > Media admin page, you will need to add either `class="fancybox"` or `class="fancybox-swf"` (to force swf content recognition) to the link to enable FancyBox for it.
|
123 |
|
124 |
+
= Can I play YouTube, Dailymotion and Vimeo movies in a FancyBox overlay? =
|
125 |
|
126 |
Yes.
|
127 |
|
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 |
+
|
190 |
+
Same can be done with an image, flash movie, PDF or iframe link! But please remember there can be only **one** item using the ID fancybox-auto per page...
|
191 |
+
|
192 |
+
= Can I make a menu item open in a FancyBox overlay ? =
|
193 |
+
|
194 |
+
Yes. But it depends on you theme what you need to do to make it work. If you are on WordPress 3+ and your theme supports the new internal Custom Menu feature or if you are using a custom menu in a sidebar widget, it's easy:
|
195 |
+
|
196 |
+
1. Go to Settings > Media and enable FancyBox iFrame support.
|
197 |
+
2. Go to Appearance > Menus and open the little tab "Screen Options" in the top-right corner.
|
198 |
+
3. Enable the option "CSS Classes" under Advanced menu proterties.
|
199 |
+
4. Now give the menu item you want to open in a FancyBox iframe the class `fancybox-iframe`.
|
200 |
+
|
201 |
+
If you are on an older version of WordPress or if you cannot use WP's Menus, you will need to do some heavy theme hacking to get it to work. Basically, what you need to achieve is that the menu item you want opened in a lightbox overlay, should get a class="fancybox-iframe" tag.
|
202 |
+
|
203 |
= Is Easy FancyBox multi-site compatible? =
|
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.
|
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 |
|
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
|