| 1 |
<?php |
| 2 |
|
| 3 |
function mfbfw_options_page() { |
| 4 |
|
| 5 |
// Get array with all the options |
| 6 |
$settings = mfbfw_get_settings(); |
| 7 |
|
| 8 |
// Make selects data |
| 9 |
$closePositionArray = array('left','right'); |
| 10 |
$overlayArray = array(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1); |
| 11 |
$msArray = array(0,100,200,300,400,500,600,700,800,900,1000,1250,1500,1750,2000); |
| 12 |
$easingArray = array('easeInQuad','easeOutQuad','easeInOutQuad','easeInCubic','easeOutCubic','easeInOutCubic','easeInQuart','easeOutQuart', |
| 13 |
'easeInOutQuart','easeInQuint','easeOutQuint','easeInOutQuint','easeInSine','easeOutSine','easeInOutSine','easeInExpo', |
| 14 |
'easeOutExpo','easeInOutExpo','easeInCirc','easeOutCirc','easeInOutCirc','easeInElastic','easeOutElastic','easeInOutElastic', |
| 15 |
'easeInBack','easeOutBack','easeInOutBack','easeInBounce','easeOutBounce','easeInOutBounce'); |
| 16 |
|
| 17 |
// Start the Options Page ?> |
| 18 |
|
| 19 |
<div class="wrap"> |
| 20 |
|
| 21 |
<div id="icon-plugins" class="icon32"></div><h2><?php printf(__('Fancybox for WordPress Options (version %s)', 'mfbfw'), $settings['version']); ?></h2> |
| 22 |
|
| 23 |
<div style="float:right;margin-left:10px;background:#FFFBCC;text-align:center;width:200px;" class="updated"> |
| 24 |
|
| 25 |
<p style="line-height:1.5em;"><?php _e('If you use FancyBox and like it, buy the author a beer!', 'mfbfw'); ?></p> |
| 26 |
|
| 27 |
<form id="donate_form" action="https://www.paypal.com/cgi-bin/webscr" method="post"> |
| 28 |
<input name="cmd" value="_donations" type="hidden"> |
| 29 |
<input name="business" value="janis.skarnelis@gmail.com" type="hidden"> |
| 30 |
<input name="item_name" value="FancyBox" type="hidden"> |
| 31 |
<input name="amount" value="10.00" type="hidden"> |
| 32 |
<input name="no_shipping" value="0" type="hidden"> |
| 33 |
<input name="logo_custom" value="http://donate.png" type="hidden"> |
| 34 |
<input name="no_note" value="1" type="hidden"> |
| 35 |
<input name="currency_code" value="EUR" type="hidden"> |
| 36 |
<input name="tax" value="0" type="hidden"> |
| 37 |
<input name="lc" value="LV" type="hidden"> |
| 38 |
<input name="bn" value="PP-DonationsBF" type="hidden"> |
| 39 |
<input type="image" border="0" src="<?php echo WP_PLUGIN_URL ?>/fancybox-for-wordpress/img/extra_donate.png" name="submit" alt="PayPal - The safer, easier way to pay online!"/> |
| 40 |
</form> |
| 41 |
|
| 42 |
</div> |
| 43 |
|
| 44 |
<div style="clear:right;float:right;margin-left:10px;background:#FFFBCC;text-align:center;width:200px;" class="updated"> |
| 45 |
|
| 46 |
<p style="line-height:1.5em;"><?php _e('The author of this WordPress Plugin also likes beer :P', 'mfbfw'); ?></p> |
| 47 |
|
| 48 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> |
| 49 |
<input type="hidden" name="cmd" value="_s-xclick"/> |
| 50 |
<input type="hidden" name="hosted_button_id" value="3878319"/> |
| 51 |
<input type="image" border="0" src="<?php echo WP_PLUGIN_URL ?>/fancybox-for-wordpress/img/extra_donate.png" name="submit" alt="PayPal - The safer, easier way to pay online!"/> |
| 52 |
<img height="1" width="1" border="0" alt="" src="https://www.paypal.com/es_ES/i/scr/pixel.gif" /> |
| 53 |
</form> |
| 54 |
|
| 55 |
</div> |
| 56 |
|
| 57 |
<div style="clear:right;float:right;margin-left:10px;background:#9DD1F2;border-color:#419ED9;padding-bottom:5px;text-align:center;width:200px;" class="updated"> |
| 58 |
|
| 59 |
<p style="line-height:1.5em;"><a href="http://twitter.com/moskis/"><?php _e('Follow me on Twitter for more WordPress Plugins and Themes', 'mfbfw'); ?></a></p> |
| 60 |
|
| 61 |
<img height="16" width="16" border="0" alt="" src="<?php echo WP_PLUGIN_URL ?>/fancybox-for-wordpress/img/extra_twitter.png" /> |
| 62 |
|
| 63 |
</div> |
| 64 |
|
| 65 |
|
| 66 |
<h2><?php _e('Info & Support', 'mfbfw'); ?></h2> |
| 67 |
|
| 68 |
<p><?php _e('<a href="http://fancy.klade.lv/home">FancyBox</a> developed by <a href="http://kac.klade.lv/">Janis Skarnelis</a>, ported to WordPress by <a href="http://moskis.net/">José Pardilla</a>. Licensed under the <a target="_blank" href="http://en.wikipedia.org/wiki/MIT_License">MIT License</a>.', 'mfbfw'); ?></p> |
| 69 |
|
| 70 |
<p><?php _e('As you can see, this plugin has many options you can edit, but have no fear, you can leave everything as it is if you want, since the default options should be a good start... :)', 'mfbfw'); ?></p> |
| 71 |
|
| 72 |
<ul style="list-style-type:disc;padding-left:15px;"> |
| 73 |
|
| 74 |
<li><?php _e('If you have problems or questions about FancyBox, please start with these links: <a href="http://fancy.klade.lv/howto">How-To</a> & <a href="http://fancy.klade.lv/faq">FAQ</a>.<br />If that does not help, go to <a href="http://groups.google.com/group/fancybox">the FancyBox Google Group</a>, use the <strong>Search</strong> option, and if necesary, post your question.', 'mfbfw'); ?></li> |
| 75 |
|
| 76 |
<li><?php _e('If you are having trouble with this plugin try to localize the problem (switch your theme and/or deactivate plugins until you find the source of the problem). You can also try the Troubleshooting settings at the bottom of this page if necesary. If you still can not get the plugin to work, <a href="http://blog.moskis.net/downloads/plugins/fancybox-for-wordpress/">leave a comment here</a> explaining the problem.', 'mfbfw'); ?></li> |
| 77 |
|
| 78 |
</ul> |
| 79 |
|
| 80 |
|
| 81 |
<h2><?php _e('Appearance Settings <span style="color:green">(basic)</span>', 'mfbfw'); ?></h2> |
| 82 |
|
| 83 |
<p><?php _e('These are the main settings, which let you tweak color, borders and animation.', 'mfbfw'); ?></p> |
| 84 |
|
| 85 |
<small><em><?php _e('<strong>Note:</strong> Having a cache plugin may prevent changes from taking effect immidiately, so clear cache after saving changes here or deactivate cache until you finish editing these options.', 'mfbfw'); ?></em></small><br /><br /> |
| 86 |
|
| 87 |
<form method="post" action="options.php" id="options"> |
| 88 |
|
| 89 |
<?php echo wp_nonce_field('update-options'); ?> |
| 90 |
|
| 91 |
<table class="form-table" style="clear:none;"> |
| 92 |
<tbody> |
| 93 |
|
| 94 |
<tr valign="top"> |
| 95 |
<th scope="row"><?php _e('Border Color', 'mfbfw'); ?></th> |
| 96 |
<td> |
| 97 |
<fieldset> |
| 98 |
|
| 99 |
<label for="mfbfw_borderColor"> |
| 100 |
<input type="text" name="mfbfw_borderColor" id="mfbfw_borderColor" value="<?php echo $settings['borderColor'] ?>" size="7" maxlength="7" /> |
| 101 |
<?php _e('HTML color of the border (default: #BBBBBB)', 'mfbfw'); ?> |
| 102 |
</label><br /><br /> |
| 103 |
|
| 104 |
</fieldset> |
| 105 |
</td> |
| 106 |
</tr> |
| 107 |
|
| 108 |
<tr valign="top"> |
| 109 |
<th scope="row"><?php _e('Close Button Position', 'mfbfw'); ?></th> |
| 110 |
<td> |
| 111 |
<fieldset> |
| 112 |
|
| 113 |
<input id="mfbfw_closePosLeft" type="radio" value="left" name="mfbfw_closeHorPos"<?php if ($settings['closeHorPos'] == 'left') echo ' checked="yes"';?> /> |
| 114 |
<label for="mfbfw_closePosLeft" style="padding-right:15px"> |
| 115 |
<?php _e('Left', 'mfbfw'); ?> |
| 116 |
</label> |
| 117 |
|
| 118 |
<input id="mfbfw_closePosRight" type="radio" value="right" name="mfbfw_closeHorPos"<?php if ($settings['closeHorPos'] == 'right') echo ' checked="yes"';?> /> |
| 119 |
<label for="mfbfw_closePosRight"> |
| 120 |
<?php _e('Right (default)', 'mfbfw'); ?> |
| 121 |
</label><br /><br /> |
| 122 |
|
| 123 |
<input id="mfbfw_closePosBottom" type="radio" value="bottom" name="mfbfw_closeVerPos"<?php if ($settings['closeVerPos'] == 'bottom') echo ' checked="yes"';?> /> |
| 124 |
<label for="mfbfw_closePosBottom" style="padding-right:15px"> |
| 125 |
<?php _e('Bottom', 'mfbfw'); ?> |
| 126 |
</label> |
| 127 |
|
| 128 |
<input id="mfbfw_closePosTop" type="radio" value="top" name="mfbfw_closeVerPos"<?php if ($settings['closeVerPos'] == 'top') echo ' checked="yes"';?> /> |
| 129 |
<label for="mfbfw_closePosTop"> |
| 130 |
<?php _e('Top (default)', 'mfbfw'); ?> |
| 131 |
</label><br /><br /> |
| 132 |
|
| 133 |
</fieldset> |
| 134 |
</td> |
| 135 |
</tr> |
| 136 |
|
| 137 |
<tr valign="top"> |
| 138 |
<th scope="row"><?php _e('Padding', 'mfbfw'); ?></th> |
| 139 |
<td> |
| 140 |
<fieldset> |
| 141 |
|
| 142 |
<label for="mfbfw_paddingColor"> |
| 143 |
<input type="text" name="mfbfw_paddingColor" id="mfbfw_paddingColor" value="<?php echo $settings['paddingColor'] ?>" size="7" maxlength="7" /> |
| 144 |
<?php _e('HTML color of the padding (default: #FFFFFF)', 'mfbfw'); ?> |
| 145 |
</label><br /><br /> |
| 146 |
|
| 147 |
<label for="mfbfw_padding"> |
| 148 |
<input type="text" name="mfbfw_padding" id="mfbfw_padding" value="<?php echo $settings['padding']; ?>" size="7" maxlength="7" /> |
| 149 |
<?php _e('Padding size in pixels (default: 10)', 'mfbfw'); ?> |
| 150 |
</label><br /> |
| 151 |
|
| 152 |
<small><em><?php _e('(Set <strong>Border Color</strong> to "#000000" and <strong>Padding Size</strong> to "0" for the classic FancyBox look)', 'mfbfw'); ?></em></small><br /><br /> |
| 153 |
|
| 154 |
</fieldset> |
| 155 |
</td> |
| 156 |
</tr> |
| 157 |
|
| 158 |
<tr valign="top"> |
| 159 |
<th scope="row"><?php _e('Overlay Options', 'mfbfw'); ?></th> |
| 160 |
<td> |
| 161 |
<fieldset> |
| 162 |
|
| 163 |
<label for="mfbfw_overlayShow"> |
| 164 |
<input type="checkbox" name="mfbfw_overlayShow" id="mfbfw_overlayShow"<?php if ($settings['overlayShow']) echo ' checked="yes"';?> /> |
| 165 |
<?php _e('Add overlay (default: on)', 'mfbfw'); ?> |
| 166 |
</label><br /><br /> |
| 167 |
|
| 168 |
<label for="mfbfw_overlayColor"> |
| 169 |
<input type="text" name="mfbfw_overlayColor" id="mfbfw_overlayColor" value="<?php echo $settings['overlayColor']; ?>" size="7" maxlength="7" /> |
| 170 |
<?php _e('HTML color of the overlay (default: #666666)', 'mfbfw'); ?> |
| 171 |
</label><br /><br /> |
| 172 |
|
| 173 |
<label for="mfbfw_overlayOpacity"> |
| 174 |
<select name="mfbfw_overlayOpacity" id="mfbfw_overlayOpacity"> |
| 175 |
<?php |
| 176 |
foreach($overlayArray as $key=> $opacity) { |
| 177 |
if($settings['overlayOpacity'] != $opacity) $selected = ''; |
| 178 |
else $selected = ' selected'; |
| 179 |
echo "<option value='$opacity'$selected>$opacity</option>\n"; |
| 180 |
} |
| 181 |
?> |
| 182 |
</select> |
| 183 |
<?php _e('Opacity of overlay. 0 is transparent, 1 is opaque (default: 0.3)', 'mfbfw'); ?> |
| 184 |
</label><br /><br /> |
| 185 |
|
| 186 |
</fieldset> |
| 187 |
</td> |
| 188 |
</tr> |
| 189 |
|
| 190 |
<tr valign="top"> |
| 191 |
<th scope="row"><?php _e('Zoom Options', 'mfbfw'); ?></th> |
| 192 |
<td> |
| 193 |
<fieldset> |
| 194 |
|
| 195 |
<label for="mfbfw_zoomOpacity"> |
| 196 |
<input type="checkbox" name="mfbfw_zoomOpacity" id="mfbfw_zoomOpacity"<?php if ($settings['zoomOpacity']) echo ' checked="yes"';?> /> |
| 197 |
<?php _e('Change content transparency during zoom animations (default: on)', 'mfbfw'); ?> |
| 198 |
</label><br /><br /> |
| 199 |
|
| 200 |
<label for="mfbfw_zoomSpeedIn"> |
| 201 |
<select name="mfbfw_zoomSpeedIn" id="mfbfw_zoomSpeedIn"> |
| 202 |
<?php |
| 203 |
foreach($msArray as $key=> $ms) { |
| 204 |
if($settings['zoomSpeedIn'] != $ms) $selected = ''; |
| 205 |
else $selected = ' selected'; |
| 206 |
echo "<option value='$ms'$selected>$ms</option>\n"; |
| 207 |
} ?> |
| 208 |
</select> |
| 209 |
<?php _e('Speed in miliseconds of the zooming-in animation (default: 500)', 'mfbfw'); ?> |
| 210 |
</label><br /><br /> |
| 211 |
|
| 212 |
<label for="mfbfw_zoomSpeedOut"> |
| 213 |
<select name="mfbfw_zoomSpeedOut" id="mfbfw_zoomSpeedOut"> |
| 214 |
<?php |
| 215 |
foreach($msArray as $key=> $ms) { |
| 216 |
if($settings['zoomSpeedOut'] != $ms) $selected = ''; |
| 217 |
else $selected = ' selected'; |
| 218 |
echo "<option value='$ms'$selected>$ms</option>\n"; |
| 219 |
} ?> |
| 220 |
</select> |
| 221 |
<?php _e('Speed in miliseconds of the zooming-out animation (default: 500)', 'mfbfw'); ?> |
| 222 |
</label><br /><br /> |
| 223 |
|
| 224 |
</fieldset> |
| 225 |
</td> |
| 226 |
</tr> |
| 227 |
|
| 228 |
<tr valign="top"> |
| 229 |
<th scope="row"><?php _e('Easing', 'mfbfw'); ?></th> |
| 230 |
<td> |
| 231 |
<fieldset> |
| 232 |
|
| 233 |
<label for="mfbfw_easing"> |
| 234 |
<input type="checkbox" name="mfbfw_easing" id="mfbfw_easing"<?php if ($settings['easing']) echo ' checked="yes"';?> /> |
| 235 |
<?php _e('Activate easing (default: off)', 'mfbfw'); ?> |
| 236 |
</label><br /><br /> |
| 237 |
|
| 238 |
<label for="mfbfw_easingIn"> |
| 239 |
<select name="mfbfw_easingIn" id="mfbfw_easingIn"> |
| 240 |
<?php |
| 241 |
foreach($easingArray as $key=> $easingIn) { |
| 242 |
if($settings['easingIn'] != $easingIn) $selected = ''; |
| 243 |
else $selected = ' selected'; |
| 244 |
echo "<option value='$easingIn'$selected>$easingIn</option>\n"; |
| 245 |
} |
| 246 |
?> |
| 247 |
</select> |
| 248 |
<?php _e('Easing method when opening FancyBox. (default: easeOutBack)', 'mfbfw'); ?> |
| 249 |
</label><br /><br /> |
| 250 |
|
| 251 |
<label for="mfbfw_easingOut"> |
| 252 |
<select name="mfbfw_easingOut" id="mfbfw_easingOut"> |
| 253 |
<?php |
| 254 |
foreach($easingArray as $key=> $easingOut) { |
| 255 |
if($settings['easingOut'] != $easingOut) $selected = ''; |
| 256 |
else $selected = ' selected'; |
| 257 |
echo "<option value='$easingOut'$selected>$easingOut</option>\n"; |
| 258 |
} |
| 259 |
?> |
| 260 |
</select> |
| 261 |
<?php _e('Easing method when closing FancyBox. (default: easeInBack)', 'mfbfw'); ?> |
| 262 |
</label><br /><br /> |
| 263 |
|
| 264 |
<label for="mfbfw_easingChange"> |
| 265 |
<select name="mfbfw_easingChange" id="mfbfw_easingChange"> |
| 266 |
<?php |
| 267 |
foreach($easingArray as $key=> $easingChange) { |
| 268 |
if($settings['easingChange'] != $easingChange) $selected = ''; |
| 269 |
else $selected = ' selected'; |
| 270 |
echo "<option value='$easingChange'$selected>$easingChange</option>\n"; |
| 271 |
} |
| 272 |
?> |
| 273 |
</select> |
| 274 |
<?php _e('Easing method when navigating through gallery items. (default: easeInOutQuart)', 'mfbfw'); ?> |
| 275 |
</label><br /> |
| 276 |
|
| 277 |
<small><em><?php _e('(There are 30 different easing methods, the first ones are the most boring. You can test them <a href="http://commadot.com/jquery/easing.php" target="_blank">here</a> or <a href="http://hosted.zeh.com.br/mctween/animationtypes.html" target="_blank">here</a>)', 'mfbfw'); ?></em></small><br /><br /> |
| 278 |
|
| 279 |
</fieldset> |
| 280 |
</td> |
| 281 |
</tr> |
| 282 |
|
| 283 |
</tbody> |
| 284 |
</table> |
| 285 |
|
| 286 |
<span id="advOpsSwitch" class="button"><?php _e('Show/Hide Advanced Settings', 'mfbfw'); ?></span> |
| 287 |
<span id="troOpsSwitch" class="button"><?php _e('Show/Hide Troubleshooting & Uninstall Settings', 'mfbfw'); ?></span><br /><br /> |
| 288 |
|
| 289 |
<div style="display:none" class="advOpts"> |
| 290 |
|
| 291 |
|
| 292 |
<h2><?php _e('Behavior Settings <span style="color:orange">(medium)</span>', 'mfbfw'); ?></h2> |
| 293 |
|
| 294 |
<p><?php _e('The following settings should be left on default unless you know what you are doing.', 'mfbfw'); ?></p> |
| 295 |
|
| 296 |
<table class="form-table" style="clear:none;"> |
| 297 |
<tbody> |
| 298 |
|
| 299 |
<tr valign="top"> |
| 300 |
<th scope="row"><?php _e('Auto Resize to Fit', 'mfbfw'); ?></th> |
| 301 |
<td> |
| 302 |
<fieldset> |
| 303 |
|
| 304 |
<label for="mfbfw_imageScale"> |
| 305 |
<input type="checkbox" name="mfbfw_imageScale" id="mfbfw_imageScale"<?php if ($settings['imageScale']) echo ' checked="yes"';?> /> |
| 306 |
<?php _e('Scale images to fit in viewport (default: on)', 'mfbfw'); ?> |
| 307 |
</label><br /><br /> |
| 308 |
|
| 309 |
</fieldset> |
| 310 |
</td> |
| 311 |
</tr> |
| 312 |
|
| 313 |
<tr valign="top"> |
| 314 |
<th scope="row"><?php _e('Center on Scroll', 'mfbfw'); ?></th> |
| 315 |
<td> |
| 316 |
<fieldset> |
| 317 |
|
| 318 |
<label for="mfbfw_centerOnScroll"> |
| 319 |
<input type="checkbox" name="mfbfw_centerOnScroll" id="mfbfw_centerOnScroll"<?php if ($settings['centerOnScroll']) echo ' checked="yes"';?> /> |
| 320 |
<?php _e('Keep image in the center of the browser window when scrolling (default: on)', 'mfbfw'); ?> |
| 321 |
</label><br /><br /> |
| 322 |
|
| 323 |
</fieldset> |
| 324 |
</td> |
| 325 |
</tr> |
| 326 |
|
| 327 |
<tr valign="top"> |
| 328 |
<th scope="row"><?php _e('Close on Click', 'mfbfw'); ?></th> |
| 329 |
<td> |
| 330 |
<fieldset> |
| 331 |
|
| 332 |
<label for="mfbfw_hideOnContentClick"> |
| 333 |
<input type="checkbox" name="mfbfw_hideOnContentClick" id="mfbfw_hideOnContentClick"<?php if ($settings['hideOnContentClick']) echo ' checked="yes"';?> /> |
| 334 |
<?php _e('Close FancyBox by clicking on the image (default: off)', 'mfbfw'); ?> |
| 335 |
</label><br /> |
| 336 |
|
| 337 |
<small><em><?php _e('(You may want to leave this off if you display iframed or inline content and it containts clickable elements - for example: play buttons for movies, links to other pages)', 'mfbfw'); ?></em></small><br /><br /> |
| 338 |
|
| 339 |
</fieldset> |
| 340 |
</td> |
| 341 |
</tr> |
| 342 |
|
| 343 |
</tbody> |
| 344 |
</table> |
| 345 |
|
| 346 |
|
| 347 |
<h2><?php _e('Gallery Settings <span style="color:red">(advanced)</span>', 'mfbfw'); ?></h2> |
| 348 |
|
| 349 |
<p><?php _e('Here you can choose if you want the plugin to group all images into a gallery, or make a gallery for each post. You can also define you own jQuery expression if you like.', 'mfbfw'); ?></p> |
| 350 |
|
| 351 |
<table class="form-table" style="clear:none;"> |
| 352 |
<tbody> |
| 353 |
|
| 354 |
<tr valign="top"> |
| 355 |
<th scope="row"><?php _e('Frame Size', 'mfbfw'); ?></th> |
| 356 |
<td> |
| 357 |
<fieldset> |
| 358 |
|
| 359 |
<label for="mfbfw_frameWidth"> |
| 360 |
<input type="text" name="mfbfw_frameWidth" id="mfbfw_frameWidth" value="<?php echo $settings['frameWidth']; ?>" size="4" maxlength="4" /> |
| 361 |
<?php _e('Width in pixels of FancyBox when showing iframe content (default: 640)', 'mfbfw'); ?> |
| 362 |
</label><br /><br /> |
| 363 |
|
| 364 |
<label for="mfbfw_frameHeight"> |
| 365 |
<input type="text" name="mfbfw_frameHeight" id="mfbfw_frameHeight" value="<?php echo $settings['frameHeight']; ?>" size="4" maxlength="4" /> |
| 366 |
<?php _e('Height in pixels of FancyBox when showing iframe content (default: 500)', 'mfbfw'); ?> |
| 367 |
</label><br /><br /> |
| 368 |
|
| 369 |
</fieldset> |
| 370 |
</td> |
| 371 |
</tr> |
| 372 |
|
| 373 |
<tr valign="top"> |
| 374 |
<th scope="row"><?php _e('Gallery Type', 'mfbfw'); ?></th> |
| 375 |
<td> |
| 376 |
<fieldset> |
| 377 |
|
| 378 |
<input id="mfbfw_galleryTypeAll" type="radio" value="all" name="mfbfw_galleryType"<?php if ($settings['galleryType'] == 'all') echo ' checked="yes"';?> /> |
| 379 |
<label for="mfbfw_galleryTypeAll"> |
| 380 |
<?php _e('Make a gallery for all images on the page (default)', 'mfbfw'); ?> |
| 381 |
</label><br /> |
| 382 |
|
| 383 |
<input id="mfbfw_galleryTypeAll" type="radio" value="none" name="mfbfw_galleryType"<?php if ($settings['galleryType'] == 'none') echo ' checked="yes"';?> /> |
| 384 |
<label for="mfbfw_galleryTypeAll"> |
| 385 |
<?php _e('Do not group images in gallery automatically (use this if you want to make galleries manually with the <code>REL</code> attribute)', 'mfbfw'); ?> |
| 386 |
</label><br /> |
| 387 |
|
| 388 |
<input id="mfbfw_galleryTypePost" type="radio" value="post" name="mfbfw_galleryType"<?php if ($settings['galleryType'] == 'post') echo ' checked="yes"';?> /> |
| 389 |
<label for="mfbfw_galleryTypePost"> |
| 390 |
<?php _e('Make a gallery for each post (will only work if your theme uses <code>class="post"</code> on each post, which is common in WordPress', 'mfbfw'); ?> |
| 391 |
</label><br /> |
| 392 |
|
| 393 |
<input id="mfbfw_galleryTypeCustom" type="radio" value="custom" name="mfbfw_galleryType"<?php if ($settings['galleryType'] == 'custom') echo ' checked="yes"';?> /> |
| 394 |
<label for="mfbfw_galleryTypeCustom"> |
| 395 |
<?php _e('Use a custom expression to apply FancyBox', 'mfbfw'); ?> |
| 396 |
</label><br /><br /> |
| 397 |
|
| 398 |
<div id="customExpressionBlock"> |
| 399 |
|
| 400 |
<label for="mfbfw_customExpression"> |
| 401 |
<textarea rows="8" cols="30" name="mfbfw_customExpression" wrap="physical" id="mfbfw_customExpression"><?php echo ($settings['customExpression']); ?></textarea> |
| 402 |
</label><br /> |
| 403 |
|
| 404 |
<small><strong><em><?php _e('Custom expression guidelines:', 'mfbfw'); ?></em></strong></small><br /> |
| 405 |
|
| 406 |
<small><em><?php _e('The custom expression has to apply <code>class="fancybox"</code> to the links where you want to use FancyBox.', 'mfbfw'); ?></em></small><br /> |
| 407 |
|
| 408 |
<small><em><?php _e('The jQuery <code>addClass()</code> function is a good way to add the class to the desired links conserving any existing class.', 'mfbfw'); ?></em></small><br /> |
| 409 |
|
| 410 |
<small><em><?php _e('You can use <code>getTitle()</code> in your expression to copy the title attribute from the <code>IMG</code> tag to the <code>A</code> tag, so that FancyBox can show captions.', 'mfbfw'); ?></em></small><br /> |
| 411 |
|
| 412 |
<small><em><?php _e('Do not call the <code>fancybox()</code> function here, the plugin does this for you.', 'mfbfw'); ?></em></small><br /><br /> |
| 413 |
|
| 414 |
</div> |
| 415 |
|
| 416 |
</fieldset> |
| 417 |
</td> |
| 418 |
</tr> |
| 419 |
|
| 420 |
</tbody> |
| 421 |
</table> |
| 422 |
|
| 423 |
</div> |
| 424 |
|
| 425 |
|
| 426 |
<div style="display:none" class="troOpts"> |
| 427 |
|
| 428 |
<h2><?php _e('Troubleshooting Settings', 'mfbfw'); ?></h2> |
| 429 |
|
| 430 |
<p><span style="color:red;"><?php _e('Settings in this section should only be changed if you are having problems with the plugin!', 'mfbfw'); ?></span></p> |
| 431 |
|
| 432 |
<p><?php _e('If the plugin doesn\'t seem to work, first you should check for other plugins that may be conflicting with this one, especially other Lightbox, Slimbox, etc. Make sure all your plugins and WordPress itself are up to date (this plugin has only been tested in WordPress 2.7 and above).', 'mfbfw'); ?></p> |
| 433 |
|
| 434 |
<p><?php _e('Change them one at a time and test to see if they help. Remember that having a cache plugin may prevent changes from taking effect immidiately, so clear cache after saving changes here or deactivate cache until you finish editing these options.', 'mfbfw'); ?></p><br /> |
| 435 |
|
| 436 |
<table class="form-table" style="clear:none;"> |
| 437 |
<tbody> |
| 438 |
|
| 439 |
<tr valign="top"> |
| 440 |
<th scope="row"><?php _e('Do not call jQuery', 'mfbfw'); ?></th> |
| 441 |
<td> |
| 442 |
<fieldset> |
| 443 |
|
| 444 |
<label for="mfbfw_nojQuery"> |
| 445 |
<input type="checkbox" name="mfbfw_nojQuery" id="mfbfw_nojQuery"<?php if ($settings['nojQuery']) echo ' checked="yes"';?> /> |
| 446 |
<?php _e('Skip jQuery call. Use this only if jQuery is being loaded twice (default: off)', 'mfbfw'); ?> |
| 447 |
</label><br /> |
| 448 |
|
| 449 |
</fieldset> |
| 450 |
</td> |
| 451 |
</tr> |
| 452 |
|
| 453 |
<tr valign="top"> |
| 454 |
<th scope="row"><?php _e('jQuery "noConflict" Mode', 'mfbfw'); ?></th> |
| 455 |
<td> |
| 456 |
<fieldset> |
| 457 |
|
| 458 |
<label for="mfbfw_jQnoConflict"> |
| 459 |
<input type="checkbox" name="mfbfw_jQnoConflict" id="mfbfw_jQnoConflict"<?php if ($settings['jQnoConflict']) echo ' checked="yes"';?> /> |
| 460 |
<?php _e('Use jQuery noConflict mode (default: on)', 'mfbfw'); ?> |
| 461 |
</label><br /> |
| 462 |
|
| 463 |
<small><em><?php _e('(Turning this off may cause problems if there are plugins activated that use other js framework like mootools, prototype, scriptaculous, etc.)', 'mfbfw'); ?></em></small><br /><br /> |
| 464 |
|
| 465 |
</fieldset> |
| 466 |
</td> |
| 467 |
</tr> |
| 468 |
|
| 469 |
</tbody> |
| 470 |
</table> |
| 471 |
|
| 472 |
<h2><?php _e('Uninstall', 'mfbfw'); ?></h2> |
| 473 |
|
| 474 |
<p><?php _e('Like many other plugins, FancyBox for WordPress stores its settings on your WordPress\' options database table. Actually, these settings are not using more than a couple of kilobytes of space, but if you want to completely uninstall this plugin, check the option below, then save changes, and <strong>when you deactivate the plugin</strong>, all its settings will be removed from the database.', 'mfbfw'); ?></p> |
| 475 |
|
| 476 |
<table class="form-table" style="clear:none;"> |
| 477 |
<tbody> |
| 478 |
|
| 479 |
<tr valign="top"> |
| 480 |
<th scope="row"><?php _e('Remove settings', 'mfbfw'); ?></th> |
| 481 |
<td> |
| 482 |
<fieldset> |
| 483 |
|
| 484 |
<label for="mfbfw_uninstall"> |
| 485 |
<input type="checkbox" name="mfbfw_uninstall" id="mfbfw_uninstall"<?php if ($settings['uninstall']) echo ' checked="yes"';?> /> |
| 486 |
<?php _e('Remove Settings when plugin is deactivated from the "Manage Plugins" page. (default: off)', 'mfbfw'); ?> |
| 487 |
</label><br /> |
| 488 |
|
| 489 |
</fieldset> |
| 490 |
</td> |
| 491 |
</tr> |
| 492 |
|
| 493 |
</tbody> |
| 494 |
</table> |
| 495 |
|
| 496 |
</div> |
| 497 |
|
| 498 |
|
| 499 |
<input type="hidden" name="action" value="update" /> |
| 500 |
<input type="hidden" name="page_options" value="mfbfw_autoApply,mfbfw_imageScale,mfbfw_borderColor,mfbfw_closeHorPos,mfbfw_closeVerPos,mfbfw_padding,mfbfw_paddingColor,mfbfw_zoomOpacity,mfbfw_zoomSpeedIn,mfbfw_zoomSpeedOut,mfbfw_overlayShow,mfbfw_overlayColor,mfbfw_overlayOpacity,mfbfw_easing,mfbfw_easingIn,mfbfw_easingOut,mfbfw_easingChange,mfbfw_hideOnContentClick,mfbfw_centerOnScroll,mfbfw_noTextLinks,mfbfw_galleryType,mfbfw_customExpression,mfbfw_frameWidth,mfbfw_frameHeight,mfbfw_nojQuery,mfbfw_jQnoConflict,mfbfw_uninstall" /> |
| 501 |
|
| 502 |
<p class="submit"> |
| 503 |
<input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes','mfbfw'); ?>" /> |
| 504 |
</p> |
| 505 |
|
| 506 |
</form> |
| 507 |
|
| 508 |
</div> |
| 509 |
|
| 510 |
<?php } ?> |
| 511 |
|