jQuery Colorbox - Version 2.0

Version Description

(2010-02-11) = * NEW: Decided to move from 1.3.3 to 2.0 because I implemented many new features. * BUGFIX: fixed relative paths for theme1 and theme4 by adding the CSS for the Internet Explorer workaround directly into the page. Thx to Andrew Radke for the suggestion! * NEW: switch adding of "colorbox-postId" classes to images in posts and pages on and off through setting. Default: off. * NEW: now works for images outside of posts (e.g. sidebar or header) if CSS class "colorbox-manual" is added manually * NEW: jQuery Colorbox now working for WordPress attachment pages * NEW: Added switch that adds slideshow functionality to all Colorbox groups. (no way to add slideshows individually yet) * NEW: Added switch that adds automatic start to slideshows (no way to add slideshows individually yet) * NEW: Added configuration of slideshow speed * NEW: Added switch that allows the user to decide whether Colorbox scales images * NEW: Added demos of the plugin on the plugin page * NEW: Added configuration for adding colorbox class only to WordPress galleries * NEW: Automatically resets settings if settings of a version prior to 1.4 are found upon activation * NEW: width and height can now be configured as percent relative to browser window size or in pixels (default is percent) * CHANGE: jQuery Colorbox is now only working on Image links (of type jpeg, jpg, gif, png, bmp) * CHANGE: Improved translation. Thx to Fabian Wolf for the help! * CHANGE: updated the FAQ * CHANGE: Updated readme. * CHANGE: Updated descriptions and translations

Download this release

Release Info

Developer techotronic
Plugin Icon 128x128 jQuery Colorbox
Version 2.0
Comparing to
See all releases

Code changes from version 1.3.3 to 2.0

jquery-colorbox.php CHANGED
@@ -6,7 +6,7 @@
6
  * Plugin Name: jQuery Colorbox
7
  * Plugin URI: http://www.techotronic.de/index.php/plugins/jquery-colorbox/
8
  * Description: Used to overlay images on the current page. Images in one post are grouped automatically.
9
- * Version: 1.3.3
10
  * Author: Arne Franken
11
  * Author URI: http://www.techotronic.de/
12
  * License: GPL
@@ -18,9 +18,45 @@
18
  */
19
  ?>
20
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  class jQueryColorbox {
22
  var $colorboxThemes = array();
23
 
 
 
24
  var $colorboxSettings = array();
25
 
26
  var $colorboxDefaultSettings = array();
@@ -35,61 +71,139 @@ class jQueryColorbox {
35
  function jQueryColorbox() {
36
  if ( !function_exists('plugins_url') )
37
  return;
38
-
39
  // it seems that there is no way to find the plugin dir relative to the WP_PLUGIN_DIR through the Wordpress API...
40
- load_plugin_textdomain( 'jquery-colorbox', false, '/jquery-colorbox/localization/' );
41
 
42
- add_action( 'wp_head', array(&$this, 'buildWordpressHeader') );
43
- add_action( 'admin_init', array(&$this, 'registerSettings') );
44
- add_action('admin_post_jQueryDeleteSettings', array(&$this, 'jQueryDeleteSettings') );
45
- add_action('admin_post_jQueryUpdateSettings', array(&$this, 'jQueryUpdateSettings') );
46
  // add options page
47
  add_action( 'admin_menu', array(&$this, 'registerAdminMenu') );
48
- //register plugin for uninstall
49
  if ( function_exists('register_uninstall_hook') ){
50
- register_uninstall_hook(__FILE__, 'uninstallJqueryColorbox');
51
  }
52
 
 
 
 
 
 
 
 
53
  if ( !is_admin() ) {
54
  wp_enqueue_script( 'colorbox', plugins_url( 'js/jquery.colorbox-min.js', __FILE__ ), array( 'jquery' ), '1.3.6' );
55
-
56
- wp_register_style( 'colorbox-theme1', plugins_url( 'themes/theme1/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
57
- wp_register_style( 'colorbox-theme2', plugins_url( 'themes/theme2/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
58
- wp_register_style( 'colorbox-theme3', plugins_url( 'themes/theme3/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
59
- wp_register_style( 'colorbox-theme4', plugins_url( 'themes/theme4/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
60
- wp_register_style( 'colorbox-theme5', plugins_url( 'themes/theme5/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
61
  }
62
 
63
  // Create list of themes and their human readable names
64
  $this->colorboxThemes = array(
65
- 'theme1' => __( 'Theme #1', 'jquery-colorbox' ),
66
- 'theme2' => __( 'Theme #2', 'jquery-colorbox' ),
67
- 'theme3' => __( 'Theme #3', 'jquery-colorbox' ),
68
- 'theme4' => __( 'Theme #4', 'jquery-colorbox' ),
69
- 'theme5' => __( 'Theme #5', 'jquery-colorbox' ),
 
 
 
 
 
 
70
  );
71
 
72
  // Create array of default settings
73
  $this->colorboxDefaultSettings = array(
 
74
  'colorboxTheme' => 'theme1',
75
  'maxWidth' => 'false',
 
 
76
  'maxHeight' => 'false',
 
 
77
  'height' => 'false',
78
- 'width' => 'false'
 
 
 
 
 
 
 
 
 
 
79
  );
80
 
81
  // Create the settings array by merging the user's settings and the defaults
82
- $usersettings = (array) get_option('jquery-colorbox_settings');
83
- $this->colorboxSettings = wp_parse_args( $usersettings, $this->colorboxDefaultSettings );
84
 
85
  // Enqueue the theme in wordpress
86
- if ( empty($this->colorboxThemes[$this->colorboxSettings['colorboxTheme']]) )
87
- $this->colorboxSettings['colorboxTheme'] = $this->colorboxDefaultSettings['colorboxTheme'];
88
- wp_enqueue_style( 'colorbox-' . $this->colorboxSettings['colorboxTheme'] );
 
 
 
 
 
89
  }
90
 
91
  //jQueryColorbox()
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  /**
94
  * Register the settings page in wordpress
95
  *
@@ -98,11 +212,9 @@ class jQueryColorbox {
98
  * @author Arne Franken
99
  */
100
  function registerSettingsPage() {
101
- static $plugin_basename;
102
  if ( current_user_can('manage_options') ) {
103
- $plugin_basename = plugin_basename(__FILE__);
104
- add_filter( 'plugin_action_links_' . $plugin_basename, array(&$this, 'addPluginActionLinks') );
105
- add_options_page( __('jQuery Colorbox', 'jquery-colorbox'), __('jQuery Colorbox', 'jquery-colorbox'), 'manage_options', $plugin_basename, array(&$this, 'renderSettingsPage') );
106
  }
107
  }
108
 
@@ -119,9 +231,7 @@ class jQueryColorbox {
119
  * @return action_links with link to settings page
120
  */
121
  function addPluginActionLinks($action_links) {
122
- static $plugin_basename;
123
- if ( !$plugin_basename ) $plugin_basename = plugin_basename(__FILE__);
124
- $settings_link = '<a href="options-general.php?page='.$plugin_basename.'">' . __('Settings', 'jquery-colorbox') . '</a>';
125
  array_unshift( $action_links, $settings_link );
126
 
127
  return $action_links;
@@ -129,61 +239,126 @@ class jQueryColorbox {
129
 
130
  //addPluginActionLinks()
131
 
132
- /**
133
- * Register the plugins settings
134
- *
135
- * @since 1.0
136
- * @access private
137
- * @author Arne Franken
138
- */
139
- function registerSettings() {
140
- register_setting( 'jquery-colorbox_settings', 'jquery-colorbox_settings', array(&$this, 'validateSettings') );
141
- }
142
-
143
- //registerSettings()
144
-
145
  /**
146
  * Insert JavaScript for Colorbox into WP Header
147
  *
148
  * @since 1.0
149
  * @access private
150
  * @author Arne Franken
 
151
  *
152
  * @return rewritten content or excerpt
153
  */
154
  function buildWordpressHeader() {
155
  ?>
156
- <!-- jQuery Colorbox 1.3.3 | by Arne Franken, http://www.techotronic.de/ -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  <script type="text/javascript">
158
  // <![CDATA[
159
  jQuery(document).ready(function($) {
160
  //gets all "a" elements that have a nested "img"
161
  $("a:has(img)").each(function(index, obj) {
162
- //in this context, the first child is always an image if fundamental Wordpress functions are used
163
- var $nestedElement = $(obj).children(0);
164
- if ($nestedElement.is("img")) {
165
- var $groupId = $nestedElement.attr("class").match('colorbox-[0-9]+');
166
- //only call colorbox if there is a groupId for the image.
167
- if ($groupId && !$nestedElement.attr("class").match('colorbox-off')) {
168
- //and calls colorbox function on each img.
169
- //elements with the same groupId in the class attribute are grouped
170
- //the title of the img is used as the title for the colorbox.
171
- $(obj).colorbox({rel:$groupId.toString(), <?php echo('maxWidth:' . '"' . $this->colorboxSettings['maxWidth'] . '"' . ',');
172
- echo('maxHeight:' . '"' . $this->colorboxSettings['maxHeight'] . '"' . ',');
173
- echo('height:' . '"' . $this->colorboxSettings['height'] . '"' . ',');
174
- echo('width:' . '"' . $this->colorboxSettings['width'] . '"' . ',') ?> title:$nestedElement.attr("title")});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  }
176
  }
177
  });
178
  });
179
  // ]]>
180
  </script>
181
- <!-- jQuery Colorbox | by Arne Franken, http://www.techotronic.de/ -->
182
  <?php
183
- //write "colorbox-postID" to "img"-tags class attribute.
184
- //Priority = 100, hopefully the preg_replace is then executed after other plugins messed with the_content
185
- add_filter('the_content', 'addColorboxGroupIdToImages', 100);
186
- add_filter('the_excerpt', 'addColorboxGroupIdToImages', 100);
187
  }
188
 
189
  //buildWordpressHeader()
@@ -198,110 +373,277 @@ class jQueryColorbox {
198
  function renderSettingsPage() {
199
  ?>
200
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  <div class="wrap">
202
  <?php screen_icon(); ?>
203
- <h2><?php _e( 'jQuery Colorbox Settings', 'jquery-colorbox' ); ?></h2>
204
- <br class="clear"/>
205
-
206
- <?php settings_fields('jquery-colorbox_settings'); ?>
207
-
208
- <div id="poststuff" class="ui-sortable meta-box-sortables">
209
- <div id="jquery-colorbox-settings" class="postbox">
210
- <h3 id="settings"><?php _e( 'Settings', 'jquery-colorbox' ); ?></h3>
211
-
212
- <div class="inside">
213
- <form name="jquery-colorbox-settings-update" method="post" action="admin-post.php">
214
- <?php if (function_exists('wp_nonce_field') === true) wp_nonce_field('jquery-colorbox-settings-form'); ?>
215
-
216
- <table class="form-table">
217
- <tr valign="top">
218
- <th scope="row">
219
- <label for="jquery-colorbox-theme"><?php _e('Theme', 'jquery-colorbox'); ?></label>
220
- </th>
221
- <td>
222
- <select name="jquery-colorbox_settings[colorboxTheme]" id="jquery-colorbox-theme" class="postform" style="margin:0">
223
- <?php
224
- foreach ( $this->colorboxThemes as $theme => $name ) {
225
- echo '<option value="' . esc_attr($theme) . '"';
226
- selected( $this->colorboxSettings['colorboxTheme'], $theme );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  echo '>' . htmlspecialchars($name) . "</option>\n";
228
  }
229
- ?>
230
- </select>
231
- <br/><?php _e( 'Select the theme you want to use on your blog.', 'jquery-colorbox' ); ?>
232
  </td>
233
- </tr>
234
- <tr>
235
- <th scope="row">
236
- <label for="jquery-colorbox-maxWidth"><?php _e('Maximum width of an image', 'jquery-colorbox'); ?>:</label>
237
- </th>
238
- <td>
239
- <input type="text" name="jquery-colorbox_settings[maxWidth]" id="jquery-colorbox-maxWidth" value="<?php echo $this->colorboxSettings['maxWidth'] ?>"/>
240
- <br/><?php _e('Set the maximum width of the picture in the Colorbox in relation to the browser window. The picture is resized to the appropriate size. Set to either "false" (no maximum width for the picture, picture is as wide as the Colorbox) or a percent value, e.g. "95%"', 'jquery-colorbox'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  </td>
242
- </tr>
243
- <tr>
244
- <th scope="row">
245
- <label for="jquery-colorbox-maxHeight"><?php _e('Maximum height of an image', 'jquery-colorbox'); ?>:</label>
246
- </th>
247
- <td>
248
- <input type="text" name="jquery-colorbox_settings[maxHeight]" id="jquery-colorbox-maxHeight" value="<?php echo $this->colorboxSettings['maxHeight'] ?>"/>
249
- <br/><?php _e('Set the maximum height of the picture in the Colorbox in relation to the browser window. The picture is resized to the appropriate size. Set to either "false" (no maximum height for the picture, picture is as high as the Colorbox) or a percent value, e.g. "95%"', 'jquery-colorbox'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  </td>
251
- </tr>
252
- <tr>
253
- <th scope="row">
254
- <label for="jquery-colorbox-width"><?php _e('Maximum width of the Colorbox', 'jquery-colorbox'); ?>:</label>
255
- </th>
256
- <td>
257
- <input type="text" name="jquery-colorbox_settings[width]" id="jquery-colorbox-width" value="<?php echo $this->colorboxSettings['width'] ?>"/>
258
- <br/><?php _e('Set the maximum width of the Colorbox itself in relation to the browser window. The picture is NOT resized, if bigger than the colorbox, scrollbars are displayed. Set to either "false" (no maximum width for Colorbox, Colorbox is as big as the picture in it) or a percent value, e.g. "95%"', 'jquery-colorbox'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  </td>
260
- </tr>
261
- <tr>
262
- <th scope="row">
263
- <label for="jquery-colorbox-height"><?php _e('Maximum height of the Colorbox', 'jquery-colorbox'); ?>:</label>
264
- </th>
265
- <td>
266
- <input type="text" name="jquery-colorbox_settings[height]" id="jquery-colorbox-height" value="<?php echo $this->colorboxSettings['height'] ?>"/>
267
- <br/><?php _e('Set the maximum height of the Colorbox itself in relation to the browser window. The picture is NOT resized, if bigger than the colorbox, scrollbars are displayed. Set to either "false" (no maximum height for Colorbox, Colorbox is as big as the picture in it) or a percent value, e.g. "95%"', 'jquery-colorbox'); ?>
268
  </td>
269
- </tr>
270
- </table>
271
- <p class="submit">
272
- <input type="hidden" name="action" value="jQueryUpdateSettings"/>
273
- <input type="submit" name="jquery-colorbox-submit" class="button-primary" value="<?php _e('Save Changes') ?>"/>
274
- </p>
275
- </form>
276
- </div>
277
  </div>
278
  </div>
 
279
 
280
- <div id="poststuff" class="ui-sortable meta-box-sortables">
281
- <div id="jquery-colorbox-delete_settings" class="postbox">
282
- <h3 id="delete_options"><?php _e('Delete Settings','jquery-colorbox') ?></h3>
283
 
284
- <div class="inside">
285
- <p><?php _e('Check the box and click this button to delete settings of this plugin.','jquery-colorbox'); ?></p>
286
 
287
- <form name="delete_settings" method="post" action="admin-post.php">
288
- <?php if (function_exists('wp_nonce_field') === true) wp_nonce_field('jquery-delete_settings-form'); ?>
289
  <p id="submitbutton">
290
- <input type="hidden" name="action" value="jQueryDeleteSettings"/>
291
- <input type="submit" value="<?php _e('Delete Settings','jquery-colorbox'); ?> &raquo;" class="button-secondary"/>
292
- <input type="checkbox" name="delete_settings-true"/>
293
- </p>
294
- </form>
295
- </div>
296
  </div>
297
  </div>
 
298
 
299
- <div id="poststuff" class="ui-sortable meta-box-sortables">
300
- <div id="jquery-colorbox-donate" class="postbox">
301
- <h3 id="donate"><?php _e('Donate','jquery-colorbox') ?></h3>
302
 
303
- <div class="inside">
304
- <p>
305
  <span style="float: left;">
306
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
307
  <input type="hidden" name="cmd" value="_s-xclick">
@@ -310,16 +652,15 @@ class jQueryColorbox {
310
  <img alt="" border="0" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1">
311
  </form>
312
  </span>
313
- </p>
314
- <p>
315
- <?php _e('If you would like to make a small (or large) contribution towards future development please consider making a donation.', 'jquery-colorbox') ?>
316
  <br/>&copy; Copyright 2009 - <?php echo date("Y"); ?> <a href="http://www.techotronic.de">Arne Franken</a>
317
- </p>
318
- </div>
319
  </div>
320
  </div>
321
  </div>
322
-
323
  <?php
324
 
325
  }
@@ -336,53 +677,62 @@ class jQueryColorbox {
336
  function registerAdminMenu() {
337
  if ( function_exists('add_management_page') && current_user_can('manage_options') ) {
338
 
339
- if ( !isset($_GET['update']) )
340
- $_GET['update'] = 'false';
341
-
342
- if ( !isset($_GET['uninstall']) )
343
- $_GET['uninstall'] = 'false';
344
-
345
- // update, uninstall message
346
- if ( strpos($_SERVER['REQUEST_URI'], 'jquery-colorbox.php') && $_GET['update'] == 'true' ) {
347
- $return_message = __('Sucessfully updated jQuery Colorbox Settings.', 'jquery-colorbox');
348
- } elseif ( $_GET['uninstall'] == 'true' ) {
349
- $return_message = __('jQuery Colorbox settings were successfully deleted. Please deactivate the plugin now.', 'jquery-colorbox');
350
- } elseif (isset($_GET['delete_settings-true'])) {
351
- $return_message = __('jQuery Colorbox settings were successfully deleted. Please deactivate the plugin now.', 'jquery-colorbox');
352
  } else {
353
  $return_message = '';
354
  }
355
  }
356
- $message = '<div class="updated fade"><p>' . $return_message . '</p></div>';
357
-
358
- if ( $return_message !== '' ) {
359
- add_action('admin_notices', create_function( '', "echo '$message';" ) );
360
- }
361
 
362
  $this->registerSettingsPage();
363
  }
364
 
365
-
366
  // registerAdminMenu()
367
 
368
  /**
369
- * Validate the settings sent from the settings page
370
  *
371
- * @since 1.0
372
  * @access private
373
  * @author Arne Franken
374
- *
375
- * @param $colorboxSettings settings to be validated
376
- * @return valid settings
377
  */
378
- function validateSettings( $colorboxSettings ) {
379
- if ( empty($colorboxSettings['colorboxTheme']) || empty($this->colorboxThemes[$colorboxSettings['colorboxTheme']]) )
380
- $colorboxSettings['colorboxTheme'] = $this->colorboxDefaultSettings['colorboxTheme'];
381
-
382
- return $colorboxSettings;
383
  }
384
 
385
- // validateSettings()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
 
387
  /**
388
  * Update jQuery Colorbox settings
@@ -393,21 +743,20 @@ class jQueryColorbox {
393
  * @access private
394
  * @author Arne Franken
395
  */
396
- function jQueryUpdateSettings() {
397
 
398
  if ( !current_user_can('manage_options') )
399
- wp_die( __('Did not update options, you do not have the necessary rights.', 'jquery-colorbox') );
400
 
401
  //cross check the given referer for nonce set in settings form
402
  check_admin_referer('jquery-colorbox-settings-form');
403
-
404
  $this->updateSettingsInDatabase();
405
-
406
- $referer = str_replace('&update=true&update=true', '', $_POST['_wp_http_referer'] );
407
- wp_redirect($referer . '&update=true' );
408
  }
409
 
410
- // jQueryUpdateSettings()
411
 
412
  /**
413
  * Update jQuery Colorbox settings
@@ -419,8 +768,7 @@ class jQueryColorbox {
419
  * @author Arne Franken
420
  */
421
  function updateSettingsInDatabase() {
422
- $this->colorboxSettings = $_POST['jquery-colorbox_settings'];
423
- update_option('jquery-colorbox_settings', $this->colorboxSettings);
424
  }
425
 
426
  //updateSettings()
@@ -434,19 +782,22 @@ class jQueryColorbox {
434
  * @access private
435
  * @author Arne Franken
436
  */
437
- function jQueryDeleteSettings() {
438
 
439
  if ( current_user_can('manage_options') && isset($_POST['delete_settings-true']) ){
440
  //cross check the given referer for nonce set in delete settings form
441
  check_admin_referer('jquery-delete_settings-form');
442
  $this->deleteSettingsFromDatabase();
 
443
  } else {
444
- wp_die( __('Did not delete jQuery Colorbox settings. Either you dont have the nececssary rights or you didnt check the checkbox.', 'jquery-colorbox') );
445
  }
446
- wp_redirect( 'plugins.php' );
 
 
447
  }
448
 
449
- // jQueryDeleteSettings()
450
 
451
  /**
452
  * Delete jQuery Colorbox settings
@@ -458,10 +809,32 @@ class jQueryColorbox {
458
  * @author Arne Franken
459
  */
460
  function deleteSettingsFromDatabase() {
461
- delete_option('jquery-colorbox_settings');
462
  }
463
 
464
  // deleteSettings()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
465
  }
466
 
467
  // class jQueryColorbox()
@@ -484,29 +857,6 @@ function jQueryColorbox() {
484
  // add jQueryColorbox() to WordPress initialization
485
  add_action( 'init', 'jQueryColorbox', 7 );
486
 
487
- /**
488
- * ugly way to make the images Colorbox-ready by adding the necessary CSS class.
489
- *
490
- * function is called for every page or post rendering.
491
- *
492
- * unfortunately, Wordpress does not offer a convenient way to get certain elements from the_content,
493
- * so I had to do this by regexp replacement...
494
- *
495
- * @since 1.0
496
- * @access public
497
- * @author Arne Franken
498
- *
499
- * @param the_content or the_excerpt
500
- * @return replaced content or excerpt
501
- */
502
- function addColorboxGroupIdToImages ($content) {
503
- global
504
- $post;
505
- $pattern = "/<img(.*?)class=('|\")([A-Za-z0-9 \/_\.\~\:-]*?)('|\")([^\>]*?)>/i";
506
- $replacement = '<img$1class=$2$3 colorbox-'.$post->ID.'$4$5>';
507
- $content = preg_replace($pattern, $replacement, $content);
508
- return $content;
509
- }
510
-
511
- //addColorboxGroupIdToImages()
512
  ?>
6
  * Plugin Name: jQuery Colorbox
7
  * Plugin URI: http://www.techotronic.de/index.php/plugins/jquery-colorbox/
8
  * Description: Used to overlay images on the current page. Images in one post are grouped automatically.
9
+ * Version: 2.0
10
  * Author: Arne Franken
11
  * Author URI: http://www.techotronic.de/
12
  * License: GPL
18
  */
19
  ?>
20
  <?php
21
+
22
+ /**
23
+ * define vital constants
24
+ */
25
+ define( 'JQUERYCOLORBOX_VERSION', '2.0' );
26
+
27
+ if ( ! defined( 'JQUERYCOLORBOX_PLUGIN_BASENAME' ) ) {
28
+ define( 'JQUERYCOLORBOX_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
29
+ }
30
+ if ( ! defined( 'JQUERYCOLORBOX_PLUGIN_NAME' ) ) {
31
+ define( 'JQUERYCOLORBOX_PLUGIN_NAME', trim( dirname( JQUERYCOLORBOX_PLUGIN_BASENAME ), '/' ) );
32
+ }
33
+ if ( ! defined( 'JQUERYCOLORBOX_NAME' ) ) {
34
+ define( 'JQUERYCOLORBOX_NAME', 'jQuery Colorbox' );
35
+ }
36
+ if ( ! defined( 'JQUERYCOLORBOX_TEXTDOMAIN' ) ) {
37
+ define( 'JQUERYCOLORBOX_TEXTDOMAIN', 'jquery-colorbox' );
38
+ }
39
+ if ( ! defined( 'JQUERYCOLORBOX_WP_PLUGIN_DIR' ) ) {
40
+ define( 'JQUERYCOLORBOX_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . JQUERYCOLORBOX_PLUGIN_NAME );
41
+ }
42
+ if ( ! defined( 'JQUERYCOLORBOX_PLUGIN_DIR' ) ) {
43
+ define( 'JQUERYCOLORBOX_PLUGIN_DIR', ABSPATH . '/' . PLUGINDIR . '/' . JQUERYCOLORBOX_PLUGIN_NAME );
44
+ }
45
+ if ( ! defined( 'JQUERYCOLORBOX_PLUGIN_URL' ) ) {
46
+ define( 'JQUERYCOLORBOX_PLUGIN_URL', WP_PLUGIN_URL . '/' . JQUERYCOLORBOX_PLUGIN_NAME );
47
+ }
48
+ if ( ! defined( 'JQUERYCOLORBOX_PLUGIN_LOCALIZATION_DIR' ) ){
49
+ define( 'JQUERYCOLORBOX_PLUGIN_LOCALIZATION_DIR', JQUERYCOLORBOX_PLUGIN_DIR . '/localization' );
50
+ }
51
+ if ( ! defined( 'JQUERYCOLORBOX_SETTINGSNAME' ) ) {
52
+ define( 'JQUERYCOLORBOX_SETTINGSNAME', 'jquery-colorbox_settings' );
53
+ }
54
+
55
  class jQueryColorbox {
56
  var $colorboxThemes = array();
57
 
58
+ var $colorboxUnits = array();
59
+
60
  var $colorboxSettings = array();
61
 
62
  var $colorboxDefaultSettings = array();
71
  function jQueryColorbox() {
72
  if ( !function_exists('plugins_url') )
73
  return;
 
74
  // it seems that there is no way to find the plugin dir relative to the WP_PLUGIN_DIR through the Wordpress API...
75
+ load_plugin_textdomain(JQUERYCOLORBOX_TEXTDOMAIN, false, '/jquery-colorbox/localization/' );
76
 
77
+ add_action('wp_head', array(&$this, 'buildWordpressHeader') );
78
+ add_action('admin_post_jQueryColorboxDeleteSettings', array(&$this, 'jQueryColorboxDeleteSettings') );
79
+ add_action('admin_post_jQueryColorboxUpdateSettings', array(&$this, 'jQueryColorboxUpdateSettings') );
 
80
  // add options page
81
  add_action( 'admin_menu', array(&$this, 'registerAdminMenu') );
82
+ //register method for uninstall
83
  if ( function_exists('register_uninstall_hook') ){
84
+ register_uninstall_hook(__FILE__, array('jQueryColorbox', 'deleteSettingsFromDatabase' ) );
85
  }
86
 
87
+ //write "colorbox-postID" to "img"-tags class attribute.
88
+ //Priority = 100, hopefully the preg_replace is then executed after other plugins messed with the_content
89
+ add_filter('the_content', array(&$this, 'addColorboxGroupIdToImages'), 100);
90
+ add_filter('the_excerpt', array(&$this, 'addColorboxGroupIdToImages'), 100);
91
+ add_filter('wp_get_attachment_image_attributes', array(&$this, 'wpPostThumbnailClassFilter') );
92
+
93
+
94
  if ( !is_admin() ) {
95
  wp_enqueue_script( 'colorbox', plugins_url( 'js/jquery.colorbox-min.js', __FILE__ ), array( 'jquery' ), '1.3.6' );
 
 
 
 
 
 
96
  }
97
 
98
  // Create list of themes and their human readable names
99
  $this->colorboxThemes = array(
100
+ 'theme1' => __( 'Theme #1', JQUERYCOLORBOX_TEXTDOMAIN ),
101
+ 'theme2' => __( 'Theme #2', JQUERYCOLORBOX_TEXTDOMAIN ),
102
+ 'theme3' => __( 'Theme #3', JQUERYCOLORBOX_TEXTDOMAIN ),
103
+ 'theme4' => __( 'Theme #4', JQUERYCOLORBOX_TEXTDOMAIN ),
104
+ 'theme5' => __( 'Theme #5', JQUERYCOLORBOX_TEXTDOMAIN ),
105
+ );
106
+
107
+ // create list of units
108
+ $this->colorboxUnits = array (
109
+ '%' => __( 'percent', JQUERYCOLORBOX_TEXTDOMAIN ),
110
+ 'px' => __( 'pixels', JQUERYCOLORBOX_TEXTDOMAIN )
111
  );
112
 
113
  // Create array of default settings
114
  $this->colorboxDefaultSettings = array(
115
+ 'jQueryColorboxVersion' => JQUERYCOLORBOX_VERSION,
116
  'colorboxTheme' => 'theme1',
117
  'maxWidth' => 'false',
118
+ 'maxWidthValue' => '',
119
+ 'maxWidthUnit' => '%',
120
  'maxHeight' => 'false',
121
+ 'maxHeightValue' => '',
122
+ 'maxHeightUnit' => '%',
123
  'height' => 'false',
124
+ 'heightValue' => '',
125
+ 'heightUnit' => '%',
126
+ 'width' => 'false',
127
+ 'widthValue' => '',
128
+ 'widthUnit' => '%',
129
+ 'autoColorbox' => false,
130
+ 'autoColorboxGalleries' => false,
131
+ 'slideshow' => false,
132
+ 'slideshowAuto' => false,
133
+ 'scalePhotos' => false,
134
+ 'slideshowSpeed' => '2500'
135
  );
136
 
137
  // Create the settings array by merging the user's settings and the defaults
138
+ $usersettings = (array) get_option(JQUERYCOLORBOX_SETTINGSNAME);
139
+ $this->colorboxSettings = wp_parse_args( $usersettings, jQueryColorbox::jQueryColorboxDefaultSettings() );
140
 
141
  // Enqueue the theme in wordpress
142
+ if ( empty($this->colorboxThemes[$this->colorboxSettings['colorboxTheme']]) ) {
143
+ $defaultArray = jQueryColorbox::jQueryColorboxDefaultSettings();
144
+ $this->colorboxSettings['colorboxTheme'] = $defaultArray['colorboxTheme'];
145
+ }
146
+ if ( !is_admin() ) {
147
+ wp_register_style('colorbox-' . $this->colorboxSettings['colorboxTheme'], plugins_url( 'themes/' . $this->colorboxSettings['colorboxTheme'] . '/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
148
+ wp_enqueue_style('colorbox-' . $this->colorboxSettings['colorboxTheme'] );
149
+ }
150
  }
151
 
152
  //jQueryColorbox()
153
 
154
+ /**
155
+ * ugly way to make the images Colorbox-ready by adding the necessary CSS class.
156
+ *
157
+ * function is called for every page or post rendering.
158
+ *
159
+ * unfortunately, Wordpress does not offer a convenient way to get certain elements from the_content,
160
+ * so I had to do this by regexp replacement...
161
+ *
162
+ * @since 1.0
163
+ * @access public
164
+ * @author Arne Franken
165
+ *
166
+ * @param the_content or the_excerpt
167
+ * @return replaced content or excerpt
168
+ */
169
+ function addColorboxGroupIdToImages ($content) {
170
+ $colorboxSettings = (array) get_option(JQUERYCOLORBOX_SETTINGSNAME);
171
+ if(isset($colorboxSettings['autoColorbox']) && $colorboxSettings['autoColorbox']){
172
+ global
173
+ $post;
174
+ $pattern = "/<img(.*?)class=('|\")([A-Za-z0-9 \/_\.\~\:-]*?)('|\")([^\>]*?)>/i";
175
+ $replacement = '<img$1class=$2$3 colorbox-'.$post->ID.'$4$5>';
176
+ $content = preg_replace($pattern, $replacement, $content);
177
+ }
178
+ return $content;
179
+ }
180
+
181
+ //addColorboxGroupIdToImages()
182
+
183
+ /**
184
+ * Add colorbox-CSS-Class to WP Galleries
185
+ * If wp_get_attachment_image() is called, filters registered for the_content are not applied on the img-tag.
186
+ * So we'll need to manipulate the class attribute separately.
187
+ *
188
+ * @since 2.0
189
+ * @access public
190
+ * @author Arne Franken
191
+ *
192
+ * @param $attr class attribute of the attachment link
193
+ * @return repaced attributes
194
+ */
195
+ function wpPostThumbnailClassFilter( $attr ) {
196
+ $colorboxSettings = (array) get_option(JQUERYCOLORBOX_SETTINGSNAME);
197
+ if(isset($colorboxSettings['autoColorboxGalleries']) && $colorboxSettings['autoColorboxGalleries']){
198
+ global
199
+ $post;
200
+ $attr['class'] .= ' colorbox-'.$post->ID.' ';
201
+ }
202
+ return $attr;
203
+ }
204
+
205
+ // wpPostThumbnailClassFilter()
206
+
207
  /**
208
  * Register the settings page in wordpress
209
  *
212
  * @author Arne Franken
213
  */
214
  function registerSettingsPage() {
 
215
  if ( current_user_can('manage_options') ) {
216
+ add_filter( 'plugin_action_links_' . JQUERYCOLORBOX_PLUGIN_BASENAME, array(&$this, 'addPluginActionLinks') );
217
+ add_options_page( JQUERYCOLORBOX_NAME, JQUERYCOLORBOX_NAME, 'manage_options', JQUERYCOLORBOX_PLUGIN_BASENAME, array(&$this, 'renderSettingsPage') );
 
218
  }
219
  }
220
 
231
  * @return action_links with link to settings page
232
  */
233
  function addPluginActionLinks($action_links) {
234
+ $settings_link = '<a href="options-general.php?page='.JQUERYCOLORBOX_PLUGIN_BASENAME.'">' . __('Settings', JQUERYCOLORBOX_TEXTDOMAIN) . '</a>';
 
 
235
  array_unshift( $action_links, $settings_link );
236
 
237
  return $action_links;
239
 
240
  //addPluginActionLinks()
241
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  /**
243
  * Insert JavaScript for Colorbox into WP Header
244
  *
245
  * @since 1.0
246
  * @access private
247
  * @author Arne Franken
248
+ * @author Fabian Wolf (http://usability-idealist.de/)
249
  *
250
  * @return rewritten content or excerpt
251
  */
252
  function buildWordpressHeader() {
253
  ?>
254
+ <!-- <?php echo JQUERYCOLORBOX_NAME ?> <?php echo JQUERYCOLORBOX_VERSION ?> | by Arne Franken, http://www.techotronic.de/ -->
255
+ <?php
256
+ if($this->colorboxSettings['colorboxTheme']=='theme1'){
257
+ ?>
258
+ <!--[if IE]>
259
+ <style type="text/css">
260
+ /*
261
+ The following fixes png-transparency for IE6.
262
+ It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition
263
+
264
+ Since this method does not support CSS background-positioning, it is incompatible with CSS sprites.
265
+ Colorbox preloads navigation hover classes to account for this.
266
+
267
+ !! Important Note: AlphaImageLoader src paths are relative to the HTML document,
268
+ while regular CSS background images are relative to the CSS document.
269
+ */
270
+ .cboxIE #cboxTopLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme1/images/internet_explorer/borderTopLeft.png, sizingMethod='scale');}
271
+ .cboxIE #cboxTopCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme1/images/internet_explorer/borderTopCenter.png, sizingMethod='scale');}
272
+ .cboxIE #cboxTopRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme1/images/internet_explorer/borderTopRight.png, sizingMethod='scale');}
273
+ .cboxIE #cboxBottomLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme1/images/internet_explorer/borderBottomLeft.png, sizingMethod='scale');}
274
+ .cboxIE #cboxBottomCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme1/images/internet_explorer/borderBottomCenter.png, sizingMethod='scale');}
275
+ .cboxIE #cboxBottomRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme1/images/internet_explorer/borderBottomRight.png, sizingMethod='scale');}
276
+ .cboxIE #cboxMiddleLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme1/images/internet_explorer/borderMiddleLeft.png, sizingMethod='scale');}
277
+ .cboxIE #cboxMiddleRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme1/images/internet_explorer/borderMiddleRight.png, sizingMethod='scale');}
278
+ </style>
279
+ <![endif]-->
280
+ <?php
281
+
282
+ } elseif ($this->colorboxSettings['colorboxTheme']=='theme4'){
283
+ ?>
284
+ <!--[if IE]>
285
+ <style type="text/css">
286
+ /*
287
+ The following fixes png-transparency for IE6.
288
+ It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition
289
+
290
+ Since this method does not support CSS background-positioning, it is incompatible with CSS sprites.
291
+ Colorbox preloads navigation hover classes to account for this.
292
+
293
+ !! Important Note: AlphaImageLoader src paths are relative to the HTML document,
294
+ while regular CSS background images are relative to the CSS document.
295
+ */
296
+ .cboxIE #cboxTopLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme4/images/internet_explorer/borderTopLeft.png, sizingMethod='scale');}
297
+ .cboxIE #cboxTopCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme4/images/internet_explorer/borderTopCenter.png, sizingMethod='scale');}
298
+ .cboxIE #cboxTopRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme4/images/internet_explorer/borderTopRight.png, sizingMethod='scale');}
299
+ .cboxIE #cboxBottomLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme4/images/internet_explorer/borderBottomLeft.png, sizingMethod='scale');}
300
+ .cboxIE #cboxBottomCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme4/images/internet_explorer/borderBottomCenter.png, sizingMethod='scale');}
301
+ .cboxIE #cboxBottomRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme4/images/internet_explorer/borderBottomRight.png, sizingMethod='scale');}
302
+ .cboxIE #cboxMiddleLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme4/images/internet_explorer/borderMiddleLeft.png, sizingMethod='scale');}
303
+ .cboxIE #cboxMiddleRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo JQUERYCOLORBOX_PLUGIN_URL ?>/themes/theme4/images/internet_explorer/borderMiddleRight.png, sizingMethod='scale');}
304
+ </style>
305
+ <![endif]-->
306
+ <?php
307
+
308
+ }
309
+ ?>
310
+
311
  <script type="text/javascript">
312
  // <![CDATA[
313
  jQuery(document).ready(function($) {
314
  //gets all "a" elements that have a nested "img"
315
  $("a:has(img)").each(function(index, obj) {
316
+ //only go on if link points to an image
317
+ if ($(obj).attr("href").match('\.(?:jpe?g|gif|png|bmp)')) {
318
+ //in this context, the first child is always an image if fundamental Wordpress functions are used
319
+ var $nestedElement = $(obj).children(0);
320
+ if ($nestedElement.is("img")) {
321
+ var $nestedElementClassAttribute = $nestedElement.attr("class");
322
+ //either the groupId has to be the automatically created colorbox-123 or the manually added colorbox-manual
323
+ var $groupId = $nestedElementClassAttribute.match('colorbox-[0-9]+') || $nestedElementClassAttribute.match('colorbox-manual');
324
+ //only call Colorbox if there is a groupId for the image and the image is not excluded
325
+ if ($groupId && !$nestedElementClassAttribute.match('colorbox-off')) {
326
+ //convert groupId to string for easier use
327
+ $groupId = $groupId.toString();
328
+ //if groudId is colorbox-manual, set groupId to false so that images with that class are not grouped
329
+ if ($groupId == "colorbox-manual") {
330
+ $groupId = false;
331
+ }
332
+ //call Colorbox function on each img. elements with the same groupId in the class attribute are grouped
333
+ //the title of the img is used as the title for the Colorbox.
334
+ $(obj).colorbox({
335
+ rel:$groupId,
336
+ title:$nestedElement.attr("title"),
337
+ <?php echo $this->colorboxSettings['maxWidth']=="false"?'':'maxWidth:"'.$this->colorboxSettings['maxWidthValue'].$this->colorboxSettings['maxWidthUnit'].'",';
338
+ echo $this->colorboxSettings['maxHeight']=="false"?'':'maxHeight:"'.$this->colorboxSettings['maxHeightValue'].$this->colorboxSettings['maxHeightUnit'].'",';
339
+ echo $this->colorboxSettings['height']=="false"?'':'height:"'.$this->colorboxSettings['heightValue'].$this->colorboxSettings['heightUnit'].'",';
340
+ echo $this->colorboxSettings['width']=="false"?'':'width:"'.$this->colorboxSettings['widthValue'].$this->colorboxSettings['widthUnit'].'",';
341
+ echo !$this->colorboxSettings['slideshow']?'':'slideshow:true,';
342
+ echo !$this->colorboxSettings['slideshowAuto']?'':'slideshowAuto:true,';
343
+ echo $this->colorboxSettings['scalePhotos']?'':'scalePhotos:false,'; ?>
344
+ slideshowSpeed:"<?php echo $this->colorboxSettings['slideshowSpeed']; ?>",
345
+ close:"<?php _e( 'close', JQUERYCOLORBOX_TEXTDOMAIN ); ?>",
346
+ next:"<?php _e( 'next', JQUERYCOLORBOX_TEXTDOMAIN ); ?>",
347
+ previous:"<?php _e( 'previous', JQUERYCOLORBOX_TEXTDOMAIN ); ?>",
348
+ slideshowStart:"<?php _e( 'start slideshow', JQUERYCOLORBOX_TEXTDOMAIN ); ?>",
349
+ slideshowStop:"<?php _e( 'stop slideshow', JQUERYCOLORBOX_TEXTDOMAIN ); ?>",
350
+ current:"<?php _e( '{current} of {total} images', JQUERYCOLORBOX_TEXTDOMAIN ); ?>"
351
+ });
352
+ }
353
  }
354
  }
355
  });
356
  });
357
  // ]]>
358
  </script>
359
+ <!-- <?php echo JQUERYCOLORBOX_NAME ?> <?php echo JQUERYCOLORBOX_VERSION ?> | by Arne Franken, http://www.techotronic.de/ -->
360
  <?php
361
+
 
 
 
362
  }
363
 
364
  //buildWordpressHeader()
373
  function renderSettingsPage() {
374
  ?>
375
 
376
+ <script type="text/javascript">
377
+ //<![CDATA[
378
+ jQuery(document).ready(function($) {
379
+ //delete value from maxWidthValue if maxWidth radio button is selected
380
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxWidth]']").click(function() {
381
+ if ("jquery-colorbox-maxWidth-custom-radio" != $(this).attr("id"))
382
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxWidthValue]']").val("");
383
+ });
384
+ //set maxWidth radio button if cursor is set into maxWidthValue
385
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxWidthValue]']").focus(function() {
386
+ $("#jquery-colorbox-maxWidth-custom-radio").attr("checked", "checked");
387
+ });
388
+
389
+ //delete value from maxHeightValue if maxHeight radio button is selected
390
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxHeight]']").click(function() {
391
+ if ("jquery-colorbox-maxHeight-custom-radio" != $(this).attr("id"))
392
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxHeightValue]']").val("");
393
+ });
394
+ //set maxHeight radio button if cursor is set into maxHeightValue
395
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxHeightValue]']").focus(function() {
396
+ $("#jquery-colorbox-maxHeight-custom-radio").attr("checked", "checked");
397
+ });
398
+
399
+ //delete value from widthValue if width radio button is selected
400
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[width]']").click(function() {
401
+ if ("jquery-colorbox-width-custom-radio" != $(this).attr("id"))
402
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[widthValue]']").val("");
403
+ });
404
+ //set width radio button if cursor is set into widthValue
405
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[widthValue]']").focus(function() {
406
+ $("#jquery-colorbox-width-custom-radio").attr("checked", "checked");
407
+ });
408
+
409
+ //delete value from heightValue if height radio button is selected
410
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[height]']").click(function() {
411
+ if ("jquery-colorbox-height-custom-radio" != $(this).attr("id"))
412
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[heightValue]']").val("");
413
+ });
414
+ //set height radio button if cursor is set into heightValue
415
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[heightValue]']").focus(function() {
416
+ $("#jquery-colorbox-height-custom-radio").attr("checked", "checked");
417
+ });
418
+
419
+ //only one of the checkboxes is allowed to be selected.
420
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[autoColorbox]']").click(function() {
421
+ if ($("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[autoColorbox]']").is(':checked')) {
422
+ $("#jquery-colorbox-autoColorboxGalleries").attr("checked", false);
423
+ }
424
+ });
425
+ $("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[autoColorboxGalleries]']").click(function() {
426
+ if ($("input[name='<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[autoColorboxGalleries]']").is(':checked')) {
427
+ $("#jquery-colorbox-autoColorbox").attr("checked", false);
428
+ }
429
+ });
430
+ });
431
+ //]]>
432
+ </script>
433
  <div class="wrap">
434
  <?php screen_icon(); ?>
435
+ <h2><?php printf(__( '%1$s Settings', JQUERYCOLORBOX_TEXTDOMAIN ),JQUERYCOLORBOX_NAME); ?></h2>
436
+ <br class="clear"/>
437
+
438
+ <?php settings_fields(JQUERYCOLORBOX_SETTINGSNAME); ?>
439
+
440
+ <div id="poststuff" class="ui-sortable meta-box-sortables">
441
+ <div id="jquery-colorbox-settings" class="postbox">
442
+ <h3 id="settings"><?php _e( 'Settings', JQUERYCOLORBOX_TEXTDOMAIN ); ?></h3>
443
+
444
+ <div class="inside">
445
+ <form name="jquery-colorbox-settings-update" method="post" action="admin-post.php">
446
+ <?php if (function_exists('wp_nonce_field') === true) wp_nonce_field('jquery-colorbox-settings-form'); ?>
447
+
448
+ <table class="form-table">
449
+ <tr valign="top">
450
+ <th scope="row">
451
+ <label for="jquery-colorbox-theme"><?php _e('Theme', JQUERYCOLORBOX_TEXTDOMAIN); ?></label>
452
+ </th>
453
+ <td>
454
+ <select name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[colorboxTheme]" id="jquery-colorbox-theme" class="postform" style="margin:0">
455
+ <?php
456
+ foreach ( $this->colorboxThemes as $theme => $name ) {
457
+ echo '<option value="' . esc_attr($theme) . '"';
458
+ selected( $this->colorboxSettings['colorboxTheme'], $theme );
459
+ echo '>' . htmlspecialchars($name) . "</option>\n";
460
+ }
461
+ ?>
462
+ </select>
463
+ <br/><?php _e( 'Select the theme you want to use on your blog.', JQUERYCOLORBOX_TEXTDOMAIN ); ?>
464
+ </td>
465
+ </tr>
466
+ <tr>
467
+ <th scope="row">
468
+ <label for="jquery-colorbox-autoColorbox"><?php printf(__('Automate %1$s for all images', JQUERYCOLORBOX_TEXTDOMAIN),JQUERYCOLORBOX_NAME); ?>:</label>
469
+ </th>
470
+ <td>
471
+ <input type="checkbox" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[autoColorbox]" id="jquery-colorbox-autoColorbox" value="true" <?php echo ($this->colorboxSettings['autoColorbox'])?'checked="checked"':'';?>/>
472
+ <br/><?php _e('Automatically add colorbox-class to images in posts and pages. Also adds colorbox-class to galleries. Images in one page or post are grouped automatically.', JQUERYCOLORBOX_TEXTDOMAIN); ?>
473
+ </td>
474
+ </tr>
475
+ <tr>
476
+ <th scope="row">
477
+ <label for="jquery-colorbox-autoColorboxGalleries"><?php printf(__('Automate %1$s for images in WordPress galleries', JQUERYCOLORBOX_TEXTDOMAIN),JQUERYCOLORBOX_NAME); ?>:</label>
478
+ </th>
479
+ <td>
480
+ <input type="checkbox" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[autoColorboxGalleries]" id="jquery-colorbox-autoColorboxGalleries" value="true" <?php echo ($this->colorboxSettings['autoColorboxGalleries'])?'checked="checked"':'';?>/>
481
+ <br/><?php _e('Automatically add colorbox-class to images in WordPress galleries, but nowhere else. Images in one page or post are grouped automatically.', JQUERYCOLORBOX_TEXTDOMAIN); ?>
482
+ </td>
483
+ </tr>
484
+ <tr>
485
+ <th scope="row">
486
+ <label for="jquery-colorbox-slideshow"><?php _e('Add Slideshow to groups', JQUERYCOLORBOX_TEXTDOMAIN); ?>:</label>
487
+ </th>
488
+ <td>
489
+ <input type="checkbox" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[slideshow]" id="jquery-colorbox-slideshow" value="true" <?php echo ($this->colorboxSettings['slideshow'])?'checked="checked"':'';?>/>
490
+ <br/><?php printf(__('Add Slideshow functionality for %1$s Groups', JQUERYCOLORBOX_TEXTDOMAIN),JQUERYCOLORBOX_NAME); ?>
491
+ </td>
492
+ </tr>
493
+ <tr>
494
+ <th scope="row">
495
+ <label for="jquery-colorbox-slideshowAuto"><?php _e('Start Slideshow automatically', JQUERYCOLORBOX_TEXTDOMAIN); ?>:</label>
496
+ </th>
497
+ <td>
498
+ <input type="checkbox" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[slideshowAuto]" id="jquery-colorbox-slideshowAuto" value="true" <?php echo ($this->colorboxSettings['slideshowAuto'])?'checked="checked"':'';?>/>
499
+ <br/><?php printf(__('Start Slideshow automatically if slideshow functionality is added to %1$s Groups', JQUERYCOLORBOX_TEXTDOMAIN),JQUERYCOLORBOX_NAME); ?>
500
+ </td>
501
+ </tr>
502
+ <tr>
503
+ <th scope="row">
504
+ <label for="jquery-colorbox-slideshowSpeed"><?php _e('Speed of the slideshow', JQUERYCOLORBOX_TEXTDOMAIN); ?>:</label>
505
+ </th>
506
+ <td>
507
+ <input type="text" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[slideshowSpeed]" id="jquery-colorbox-slideshowSpeed" value="<?php echo $this->colorboxSettings['slideshowSpeed'] ?>" size="5" maxlength="5"/>ms
508
+ <br/><?php _e('Sets the speed of the slideshow, in milliseconds', JQUERYCOLORBOX_TEXTDOMAIN); ?>.
509
+ </td>
510
+ </tr>
511
+ <tr>
512
+ <th scope="row">
513
+ <label for="jquery-colorbox-maxWidthValue"><?php _e('Maximum width of an image', JQUERYCOLORBOX_TEXTDOMAIN); ?>:</label>
514
+ </th>
515
+ <td>
516
+ <input type="radio" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxWidth]" id="jquery-colorbox-maxWidth-false-radio" value="false" <?php echo ($this->colorboxSettings['maxWidth'])=='false'?'checked="checked"':''; ?>"/>
517
+ <label for="jquery-colorbox-maxWidth-false-radio"><?php _e('Do not set width', JQUERYCOLORBOX_TEXTDOMAIN); ?>.</label>
518
+ <br/>
519
+ <input type="radio" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxWidth]" id="jquery-colorbox-maxWidth-custom-radio" value="custom" <?php echo ($this->colorboxSettings['maxWidth'])=='custom'?'checked="checked"':''; ?>"/>
520
+ <label for="jquery-colorbox-maxWidth-custom-radio"><?php _e('Set maximum width of an image', JQUERYCOLORBOX_TEXTDOMAIN); ?>.</label>
521
+ <input type="text" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxWidthValue]" id="jquery-colorbox-maxWidthValue" value="<?php echo $this->colorboxSettings['maxWidthValue'] ?>" size="3" maxlength="3"/>
522
+ <select name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxWidthUnit]" id="jquery-colorbox-maxWidth-unit" class="postform" style="margin:0">
523
+ <?php
524
+ foreach ( $this->colorboxUnits as $unit => $name ) {
525
+ echo '<option value="' . esc_attr($unit) . '"';
526
+ selected( $this->colorboxSettings['maxWidthUnit'], $unit );
527
  echo '>' . htmlspecialchars($name) . "</option>\n";
528
  }
529
+ ?>
530
+ </select>
531
+ <br/><?php _e('Set the maximum width of the image in the Colorbox in relation to the browser window in percent or pixels. If maximum width is not set, image is as wide as the Colorbox', JQUERYCOLORBOX_TEXTDOMAIN); ?>.
532
  </td>
533
+ </tr>
534
+ <tr>
535
+ <th scope="row">
536
+ <label for="jquery-colorbox-maxHeightValue"><?php _e('Maximum height of an image', JQUERYCOLORBOX_TEXTDOMAIN); ?>:</label>
537
+ </th>
538
+ <td>
539
+ <input type="radio" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxHeight]" id="jquery-colorbox-maxHeight-false-radio" value="false" <?php echo ($this->colorboxSettings['maxHeight'])=='false'?'checked="checked"':''; ?>"/>
540
+ <label for="jquery-colorbox-maxHeight-false-radio"><?php _e('Do not set height', JQUERYCOLORBOX_TEXTDOMAIN); ?>.</label>
541
+ <br/>
542
+ <input type="radio" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxHeight]" id="jquery-colorbox-maxHeight-custom-radio" value="custom" <?php echo ($this->colorboxSettings['maxHeight'])=='custom'?'checked="checked"':''; ?>"/>
543
+ <label for="jquery-colorbox-maxHeight-custom-radio"><?php _e('Set maximum height of an image', JQUERYCOLORBOX_TEXTDOMAIN); ?>.</label>
544
+ <input type="text" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxHeightValue]" id="jquery-colorbox-maxHeightValue" value="<?php echo $this->colorboxSettings['maxHeightValue'] ?>" size="3" maxlength="3"/>
545
+ <select name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[maxHeightUnit]" id="jquery-colorbox-maxHeight-unit" class="postform" style="margin:0">
546
+ <?php
547
+ foreach ( $this->colorboxUnits as $unit => $name ) {
548
+ echo '<option value="' . esc_attr($unit) . '"';
549
+ selected( $this->colorboxSettings['maxHeightUnit'], $unit );
550
+ echo '>' . htmlspecialchars($name) . "</option>\n";
551
+ }
552
+ ?>
553
+ </select>
554
+ <br/><?php _e('Set the maximum height of the image in the Colorbox in relation to the browser window to a value in percent or pixels. If maximum height is not set, the image is as high as the Colorbox', JQUERYCOLORBOX_TEXTDOMAIN); ?>.
555
  </td>
556
+ </tr>
557
+ <tr>
558
+ <th scope="row">
559
+ <label for="jquery-colorbox-widthValue"><?php _e('Maximum width of the Colorbox', JQUERYCOLORBOX_TEXTDOMAIN); ?>:</label>
560
+ </th>
561
+ <td>
562
+ <input type="radio" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[width]" id="jquery-colorbox-width-false-radio" value="false" <?php echo ($this->colorboxSettings['width'])=='false'?'checked="checked"':''; ?>"/>
563
+ <label for="jquery-colorbox-width-false-radio"><?php _e('Do not set width', JQUERYCOLORBOX_TEXTDOMAIN); ?>.</label>
564
+ <br/>
565
+ <input type="radio" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[width]" id="jquery-colorbox-width-custom-radio" value="custom" <?php echo ($this->colorboxSettings['width'])=='custom'?'checked="checked"':''; ?>"/>
566
+ <label for="jquery-colorbox-width-custom-radio"><?php _e('Set width of the Colorbox', JQUERYCOLORBOX_TEXTDOMAIN); ?>.</label>
567
+ <input type="text" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[widthValue]" id="jquery-colorbox-widthValue" value="<?php echo $this->colorboxSettings['widthValue'] ?>" size="3" maxlength="3"/>
568
+ <select name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[widthUnit]" id="jquery-colorbox-width-unit" class="postform" style="margin:0">
569
+ <?php
570
+ foreach ( $this->colorboxUnits as $unit => $name ) {
571
+ echo '<option value="' . esc_attr($unit) . '"';
572
+ selected( $this->colorboxSettings['widthUnit'], $unit );
573
+ echo '>' . htmlspecialchars($name) . "</option>\n";
574
+ }
575
+ ?>
576
+ </select>
577
+ <br/><?php _e('Set the maximum width of the Colorbox itself in relation to the browser window to a value between in percent or pixels. If the image is bigger than the colorbox, scrollbars are displayed. If width is not set, the Colorbox will be as wide as the picture in it', JQUERYCOLORBOX_TEXTDOMAIN); ?>.
578
  </td>
579
+ </tr>
580
+ <tr>
581
+ <th scope="row">
582
+ <label for="jquery-colorbox-heightValue"><?php _e('Maximum height of the Colorbox', JQUERYCOLORBOX_TEXTDOMAIN); ?>:</label>
583
+ </th>
584
+ <td>
585
+ <input type="radio" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[height]" id="jquery-colorbox-height-false-radio" value="false" <?php echo ($this->colorboxSettings['height'])=='false'?'checked="checked"':''; ?>"/>
586
+ <label for="jquery-colorbox-height-false-radio"><?php _e('Do not set height', JQUERYCOLORBOX_TEXTDOMAIN); ?>.</label>
587
+ <br/>
588
+ <input type="radio" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[height]" id="jquery-colorbox-height-custom-radio" value="custom" <?php echo ($this->colorboxSettings['height'])=='custom'?'checked="checked"':''; ?>"/>
589
+ <label for="jquery-colorbox-height-custom-radio"><?php _e('Set height of the Colorbox', JQUERYCOLORBOX_TEXTDOMAIN); ?>.</label>
590
+ <input type="text" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[heightValue]" id="jquery-colorbox-heightValue" value="<?php echo $this->colorboxSettings['heightValue'] ?>" size="3" maxlength="3"/>
591
+ <select name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[heightUnit]" id="jquery-colorbox-height-unit" class="postform" style="margin:0">
592
+ <?php
593
+ foreach ( $this->colorboxUnits as $unit => $name ) {
594
+ echo '<option value="' . esc_attr($unit) . '"';
595
+ selected( $this->colorboxSettings['heightUnit'], $unit );
596
+ echo '>' . htmlspecialchars($name) . "</option>\n";
597
+ }
598
+ ?>
599
+ </select>
600
+ <br/><?php _e('Set the maximum height of the Colorbox itself in relation to the browser window to a value between in percent or pixels. If the image is bigger than the colorbox, scrollbars are displayed. If height is not set, the Colorbox will be as high as the picture in it', JQUERYCOLORBOX_TEXTDOMAIN); ?>.
601
  </td>
602
+ </tr>
603
+ <tr>
604
+ <th scope="row">
605
+ <label for="jquery-colorbox-scalePhotos"><?php _e('Resize images', JQUERYCOLORBOX_TEXTDOMAIN); ?>:</label>
606
+ </th>
607
+ <td>
608
+ <input type="checkbox" name="<?php echo JQUERYCOLORBOX_SETTINGSNAME ?>[scalePhotos]" id="jquery-colorbox-scalePhotos" value="true" <?php echo ($this->colorboxSettings['scalePhotos'])?'checked="checked"':'';?>/>
609
+ <br/><?php _e('If enabled and if maximum width of images, maximum height of images, width of the Colorbox, or height of the Colorbox have been defined, ColorBox will scale photos to fit within the those values', JQUERYCOLORBOX_TEXTDOMAIN); ?>.
610
  </td>
611
+ </tr>
612
+ </table>
613
+ <p class="submit">
614
+ <input type="hidden" name="action" value="jQueryColorboxUpdateSettings"/>
615
+ <input type="submit" name="jQueryColorboxUpdateSettings" class="button-primary" value="<?php _e('Save Changes') ?>"/>
616
+ </p>
617
+ </form>
 
618
  </div>
619
  </div>
620
+ </div>
621
 
622
+ <div id="poststuff" class="ui-sortable meta-box-sortables">
623
+ <div id="jquery-colorbox-delete_settings" class="postbox">
624
+ <h3 id="delete_options"><?php _e('Delete Settings',JQUERYCOLORBOX_TEXTDOMAIN) ?></h3>
625
 
626
+ <div class="inside">
627
+ <p><?php _e('Check the box and click this button to delete settings of this plugin.',JQUERYCOLORBOX_TEXTDOMAIN); ?></p>
628
 
629
+ <form name="delete_settings" method="post" action="admin-post.php">
630
+ <?php if (function_exists('wp_nonce_field') === true) wp_nonce_field('jquery-delete_settings-form'); ?>
631
  <p id="submitbutton">
632
+ <input type="hidden" name="action" value="jQueryColorboxDeleteSettings"/>
633
+ <input type="submit" name="jQueryColorboxDeleteSettings" value="<?php _e('Delete Settings',JQUERYCOLORBOX_TEXTDOMAIN); ?> &raquo;" class="button-secondary"/>
634
+ <input type="checkbox" name="delete_settings-true"/>
635
+ </p>
636
+ </form>
 
637
  </div>
638
  </div>
639
+ </div>
640
 
641
+ <div id="poststuff" class="ui-sortable meta-box-sortables">
642
+ <div id="jquery-colorbox-donate" class="postbox">
643
+ <h3 id="donate"><?php _e('Donate',JQUERYCOLORBOX_TEXTDOMAIN) ?></h3>
644
 
645
+ <div class="inside">
646
+ <p>
647
  <span style="float: left;">
648
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
649
  <input type="hidden" name="cmd" value="_s-xclick">
652
  <img alt="" border="0" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1">
653
  </form>
654
  </span>
655
+ </p>
656
+ <p>
657
+ <?php _e('If you would like to make a small (or large) contribution towards future development please consider making a donation.', JQUERYCOLORBOX_TEXTDOMAIN) ?>
658
  <br/>&copy; Copyright 2009 - <?php echo date("Y"); ?> <a href="http://www.techotronic.de">Arne Franken</a>
659
+ </p>
 
660
  </div>
661
  </div>
662
  </div>
663
+ </div>
664
  <?php
665
 
666
  }
677
  function registerAdminMenu() {
678
  if ( function_exists('add_management_page') && current_user_can('manage_options') ) {
679
 
680
+ // update, uninstall message
681
+ if ( strpos($_SERVER['REQUEST_URI'], 'jquery-colorbox.php') && isset($_GET['jQueryColorboxUpdateSettings'])) {
682
+ $return_message = sprintf(__('Successfully updated %1$s settings.', JQUERYCOLORBOX_TEXTDOMAIN),JQUERYCOLORBOX_NAME);
683
+ } elseif (strpos($_SERVER['REQUEST_URI'], 'jquery-colorbox.php') && isset($_GET['jQueryColorboxDeleteSettings'])) {
684
+ $return_message = sprintf(__('%1$s settings were successfully deleted.', JQUERYCOLORBOX_TEXTDOMAIN),JQUERYCOLORBOX_NAME);
 
 
 
 
 
 
 
 
685
  } else {
686
  $return_message = '';
687
  }
688
  }
689
+ $this->registerAdminNotice($return_message);
 
 
 
 
690
 
691
  $this->registerSettingsPage();
692
  }
693
 
 
694
  // registerAdminMenu()
695
 
696
  /**
697
+ * Registers Admin Notices
698
  *
699
+ * @since 2.0
700
  * @access private
701
  * @author Arne Franken
 
 
 
702
  */
703
+ function registerAdminNotice($notice){
704
+ if ( $notice != '' ) {
705
+ $message = '<div class="updated fade"><p>' . $notice . '</p></div>';
706
+ add_action('admin_notices', create_function( '', "echo '$message';" ) );
707
+ }
708
  }
709
 
710
+ static function jQueryColorboxDefaultSettings(){
711
+
712
+ // Create and return array of default settings
713
+ return array(
714
+ 'jQueryColorboxVersion' => JQUERYCOLORBOX_VERSION,
715
+ 'colorboxTheme' => 'theme1',
716
+ 'maxWidth' => 'false',
717
+ 'maxWidthValue' => '',
718
+ 'maxWidthUnit' => '%',
719
+ 'maxHeight' => 'false',
720
+ 'maxHeightValue' => '',
721
+ 'maxHeightUnit' => '%',
722
+ 'height' => 'false',
723
+ 'heightValue' => '',
724
+ 'heightUnit' => '%',
725
+ 'width' => 'false',
726
+ 'widthValue' => '',
727
+ 'widthUnit' => '%',
728
+ 'autoColorbox' => false,
729
+ 'autoColorboxGalleries' => false,
730
+ 'slideshow' => false,
731
+ 'slideshowAuto' => false,
732
+ 'scalePhotos' => false,
733
+ 'slideshowSpeed' => '2500'
734
+ );
735
+ }
736
 
737
  /**
738
  * Update jQuery Colorbox settings
743
  * @access private
744
  * @author Arne Franken
745
  */
746
+ function jQueryColorboxUpdateSettings() {
747
 
748
  if ( !current_user_can('manage_options') )
749
+ wp_die( __('Did not update settings, you do not have the necessary rights.', JQUERYCOLORBOX_TEXTDOMAIN) );
750
 
751
  //cross check the given referer for nonce set in settings form
752
  check_admin_referer('jquery-colorbox-settings-form');
753
+ $this->colorboxSettings = $_POST[JQUERYCOLORBOX_SETTINGSNAME];
754
  $this->updateSettingsInDatabase();
755
+ $referrer = str_replace(array('&jQueryColorboxUpdateSettings','&jQueryColorboxDeleteSettings'), '', $_POST['_wp_http_referer'] );
756
+ wp_redirect($referrer . '&jQueryColorboxUpdateSettings' );
 
757
  }
758
 
759
+ // jQueryColorboxUpdateSettings()
760
 
761
  /**
762
  * Update jQuery Colorbox settings
768
  * @author Arne Franken
769
  */
770
  function updateSettingsInDatabase() {
771
+ update_option(JQUERYCOLORBOX_SETTINGSNAME, $this->colorboxSettings);
 
772
  }
773
 
774
  //updateSettings()
782
  * @access private
783
  * @author Arne Franken
784
  */
785
+ function jQueryColorboxDeleteSettings() {
786
 
787
  if ( current_user_can('manage_options') && isset($_POST['delete_settings-true']) ){
788
  //cross check the given referer for nonce set in delete settings form
789
  check_admin_referer('jquery-delete_settings-form');
790
  $this->deleteSettingsFromDatabase();
791
+ $this->colorboxSettings = jQueryColorbox::jQueryColorboxDefaultSettings();
792
  } else {
793
+ wp_die( sprintf(__('Did not delete %1$s settings. Either you dont have the nececssary rights or you didnt check the checkbox.', JQUERYCOLORBOX_TEXTDOMAIN),JQUERYCOLORBOX_NAME) );
794
  }
795
+ //clean up referrer
796
+ $referrer = str_replace(array('&jQueryColorboxUpdateSettings','&jQueryColorboxDeleteSettings'), '', $_POST['_wp_http_referer'] );
797
+ wp_redirect($referrer . '&jQueryColorboxDeleteSettings' );
798
  }
799
 
800
+ // jQueryColorboxDeleteSettings()
801
 
802
  /**
803
  * Delete jQuery Colorbox settings
809
  * @author Arne Franken
810
  */
811
  function deleteSettingsFromDatabase() {
812
+ delete_option(JQUERYCOLORBOX_SETTINGSNAME);
813
  }
814
 
815
  // deleteSettings()
816
+
817
+ /**
818
+ * execute during activation.
819
+ *
820
+ * @since 2.0
821
+ * @access private
822
+ * @author Arne Franken
823
+ */
824
+ function activateJqueryColorbox() {
825
+ $jquery_colorbox_settings = get_option(JQUERYCOLORBOX_SETTINGSNAME);
826
+ if($jquery_colorbox_settings){
827
+ //if jQueryColorboxVersion does not exist, the plugin is a version prior to 2.0
828
+ //settings are incompatible with 2.0, restore default settings.
829
+ if(!array_key_exists('jQueryColorboxVersion',$jquery_colorbox_settings)){
830
+ //in case future versions require resetting the settings
831
+ //if($jquery_colorbox_settings['jQueryColorboxVersion'] < JQUERYCOLORBOX_VERSION)
832
+ update_option(JQUERYCOLORBOX_SETTINGSNAME, jQueryColorbox::jQueryColorboxDefaultSettings());
833
+ }
834
+ }
835
+ }
836
+
837
+ // activateJqueryColorbox()
838
  }
839
 
840
  // class jQueryColorbox()
857
  // add jQueryColorbox() to WordPress initialization
858
  add_action( 'init', 'jQueryColorbox', 7 );
859
 
860
+ //register method for activation
861
+ register_activation_hook(__FILE__,array('jQueryColorbox', 'activateJqueryColorbox'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
862
  ?>
localization/jquery-colorbox-de_DE.mo CHANGED
Binary file
localization/jquery-colorbox-de_DE.po CHANGED
@@ -2,9 +2,9 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: jQuery-Colorbox\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2010-01-17 13:47+0100\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -14,91 +14,240 @@ msgstr ""
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
- #: jquery-colorbox.php:48
18
  msgid "Theme #1"
19
  msgstr ""
20
 
21
- #: jquery-colorbox.php:49
22
  msgid "Theme #2"
23
  msgstr ""
24
 
25
- #: jquery-colorbox.php:50
26
  msgid "Theme #3"
27
  msgstr ""
28
 
29
- #: jquery-colorbox.php:51
30
  msgid "Theme #4"
31
  msgstr ""
32
 
33
- #: jquery-colorbox.php:52
34
  msgid "Theme #5"
35
  msgstr ""
36
 
37
- #: jquery-colorbox.php:85
38
- msgid "jQuery Colorbox"
39
- msgstr ""
 
 
 
 
40
 
41
- #: jquery-colorbox.php:100
42
- #: jquery-colorbox.php:175
43
  msgid "Settings"
44
  msgstr "Einstellungen"
45
 
46
- #: jquery-colorbox.php:166
47
- msgid "jQuery Colorbox Settings"
48
- msgstr "jQuery Colorbox Einstellungen"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
- #: jquery-colorbox.php:181
51
  msgid "Theme"
52
  msgstr ""
53
 
54
- #: jquery-colorbox.php:193
55
  msgid "Select the theme you want to use on your blog."
56
  msgstr "W&auml;hle das Theme aus, das Du auf Deinem Blog benutzen m&ouml;chtest."
57
 
58
- #: jquery-colorbox.php:198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  msgid "Maximum width of an image"
60
  msgstr "Maximale Breite eines Bildes"
61
 
62
- #: jquery-colorbox.php:202
63
- msgid "Set the maximum width of the picture in the Colorbox in relation to the browser window. The picture is resized to the appropriate size. Set to either \"false\" (no maximum width for the picture, picture is as wide as the Colorbox) or a percent value, e.g. \"95%\""
64
- msgstr "Hier l&auml;sst sich die maximale Breite des Bildes in der colorbox in relation zum Browserfenster festlegen. Das Bild wird verkleinert falls n&ouml;tig. Entweder auf \"false\" (keine maximale Breite des Bildes, das Bild ist so breit wie die Colorbox) oder auf einen Prozentwert setzen, z.B. \"95%\""
 
 
 
 
 
 
 
 
 
65
 
66
- #: jquery-colorbox.php:207
67
  msgid "Maximum height of an image"
68
  msgstr "Maximale H&ouml;he eines Bildes"
69
 
70
- #: jquery-colorbox.php:211
71
- msgid "Set the maximum height of the picture in the Colorbox in relation to the browser window. The picture is resized to the appropriate size. Set to either \"false\" (no maximum height for the picture, picture is as high as the Colorbox) or a percent value, e.g. \"95%\""
72
- msgstr "Hier l&auml;sst sich die maximale H&ouml;he des Bildes in der colorbox in relation zum Browserfenster festlegen. Das Bild wird verkleinert falls n&ouml;tig. Entweder auf \"false\" (keine maximale H&oumlhe des Bildes, das Bild ist so hoch wie die Colorbox) oder auf einen Prozentwert setzen, z.B. \"95%\""
 
73
 
74
- #: jquery-colorbox.php:216
 
 
 
 
 
 
 
 
75
  msgid "Maximum width of the Colorbox"
76
  msgstr "Maximale Breite der Colorbox"
77
 
78
- #: jquery-colorbox.php:220
79
- msgid "Set the maximum width of the Colorbox itself in relation to the browser window. The picture is NOT resized, if bigger than the colorbox, scrollbars are displayed. Set to either \"false\" (no maximum width for Colorbox, Colorbox is as big as the picture in it) or a percent value, e.g. \"95%\""
80
- msgstr "Hier l&auml;sst sich die maximale Breite der Colorbox in relation zum Browserfenster festlegen. Das Bild wird NICHT verkleinert. Wenn das Bild gr&ouml;sser als die Colorbox ist, werden Scrollbalken dargestellt. Entweder auf \"false\" (keine maximale Breite f&uuml;r die Colorbox, die Colorbox wird so gross wie das Bild) oder auf einen Prozentwert setzen, z.B. \"95%\""
81
 
82
- #: jquery-colorbox.php:225
 
 
 
 
83
  msgid "Maximum height of the Colorbox"
84
  msgstr "Maximale H&ouml;he der Colorbox"
85
 
86
- #: jquery-colorbox.php:229
87
- msgid "Set the maximum height of the Colorbox itself in relation to the browser window. The picture is NOT resized, if bigger than the colorbox, scrollbars are displayed. Set to either \"false\" (no maximum height for Colorbox, Colorbox is as big as the picture in it) or a percent value, e.g. \"95%\""
88
- msgstr "Hier l&auml;sst sich die maximale H&ouml;he der Colorbox in relation zum Browserfenster festlegen. Das Bild wird NICHT verkleinert. Wenn das Bild gr&ouml;sser als die Colorbox ist, werden Scrollbalken dargestellt. Entweder auf \"false\" (keine maximale H&ouml;he f&uuml;r die Colorbox, die Colorbox wird so gross wie das Bild) oder auf einen Prozentwert setzen, z.B. \"95%\""
 
 
 
 
89
 
90
- #: jquery-colorbox.php:234
 
 
 
 
 
 
 
 
91
  msgid "Save Changes"
92
  msgstr "&Auml;nderungen speichern"
93
 
94
- #: jquery-colorbox.php:243
 
 
 
 
 
 
 
 
 
95
  msgid "Donate"
96
  msgstr "Spenden"
97
 
98
- #: jquery-colorbox.php:256
99
  msgid "If you would like to make a small (or large) contribution towards future development please consider making a donation."
100
  msgstr "Wenn Du eine kleine (oder grosse) Spende f&uuml;r die Weiterentwicklung abgeben m&ouml;chtest, kannst Du das per PayPal tun."
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  #~ msgid "maxWidth"
103
  #~ msgstr "Maximale Breite des Bildes"
104
  #~ msgid "maxHeight"
@@ -109,15 +258,6 @@ msgstr "Wenn Du eine kleine (oder grosse) Spende f&uuml;r die Weiterentwicklung
109
  #~ msgstr "Maximale H&ouml;he der Colorbox"
110
  #~ msgid "donation"
111
  #~ msgstr "Spende"
112
- #~ msgid "Automate Colorbox:"
113
- #~ msgstr "Colorbox automatisieren:"
114
- #~ msgid ""
115
- #~ "Automatically add rel='colorbox[post-ID]' to images in posts. All images "
116
- #~ "in a post are grouped into a colorbox set."
117
- #~ msgstr ""
118
- #~ "Automatisch rel='colorbox[post-ID]' f&uuml;r Bilder in Beitr&auml;gen und "
119
- #~ "Seite einf&uuml;gen. Alle Bilder innerhalb eines Beitrags oder einer "
120
- #~ "Seite werden automatisch in ein Set gruppiert."
121
  #~ msgid "Enable Automatic"
122
  #~ msgstr "Automatismus aktivieren"
123
  #~ msgid "You can disable the colorbox effect from the Wordpress editor."
2
  msgstr ""
3
  "Project-Id-Version: jQuery-Colorbox\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-02-10 22:12+0100\n"
6
+ "PO-Revision-Date: 2010-02-10 22:13+0100\n"
7
+ "Last-Translator: Arne Franken <blog@techotronic.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
+ #: jquery-colorbox.php:101
18
  msgid "Theme #1"
19
  msgstr ""
20
 
21
+ #: jquery-colorbox.php:102
22
  msgid "Theme #2"
23
  msgstr ""
24
 
25
+ #: jquery-colorbox.php:103
26
  msgid "Theme #3"
27
  msgstr ""
28
 
29
+ #: jquery-colorbox.php:104
30
  msgid "Theme #4"
31
  msgstr ""
32
 
33
+ #: jquery-colorbox.php:105
34
  msgid "Theme #5"
35
  msgstr ""
36
 
37
+ #: jquery-colorbox.php:110
38
+ msgid "percent"
39
+ msgstr "Prozent"
40
+
41
+ #: jquery-colorbox.php:111
42
+ msgid "pixels"
43
+ msgstr "Pixel"
44
 
45
+ #: jquery-colorbox.php:235
46
+ #: jquery-colorbox.php:456
47
  msgid "Settings"
48
  msgstr "Einstellungen"
49
 
50
+ #: jquery-colorbox.php:359
51
+ msgid "close"
52
+ msgstr "Schließen"
53
+
54
+ #: jquery-colorbox.php:360
55
+ msgid "next"
56
+ msgstr "Vor"
57
+
58
+ #: jquery-colorbox.php:361
59
+ msgid "previous"
60
+ msgstr "Zurück"
61
+
62
+ #: jquery-colorbox.php:362
63
+ msgid "start slideshow"
64
+ msgstr "Slideshow starten"
65
+
66
+ #: jquery-colorbox.php:363
67
+ msgid "stop slideshow"
68
+ msgstr "Slideshow beenden"
69
+
70
+ #: jquery-colorbox.php:364
71
+ msgid "{current} of {total} images"
72
+ msgstr "{current} von {total} Bildern"
73
+
74
+ #: jquery-colorbox.php:449
75
+ #, php-format
76
+ msgid "%1$s Settings"
77
+ msgstr "%1$s Einstellungen"
78
 
79
+ #: jquery-colorbox.php:465
80
  msgid "Theme"
81
  msgstr ""
82
 
83
+ #: jquery-colorbox.php:477
84
  msgid "Select the theme you want to use on your blog."
85
  msgstr "W&auml;hle das Theme aus, das Du auf Deinem Blog benutzen m&ouml;chtest."
86
 
87
+ #: jquery-colorbox.php:482
88
+ #, php-format
89
+ msgid "Automate %1$s for all images"
90
+ msgstr "%1$s f&uuml;r alle Bilder automatisieren"
91
+
92
+ #: jquery-colorbox.php:486
93
+ msgid "Automatically add colorbox-class to images in posts and pages. Also adds colorbox-class to galleries. Images in one page or post are grouped automatically."
94
+ msgstr "Automatisch die Colorbox-CSS-Klasse f&uuml;r Bilder in Beitr&auml;gen und Seite einf&uuml;gen. F&uuml;gt die Klasse auch f&uuml;r Gallerien ein. Alle Bilder innerhalb eines Beitrags oder einer Seite werden automatisch gruppiert."
95
+
96
+ #: jquery-colorbox.php:491
97
+ #, php-format
98
+ msgid "Automate %1$s for images in WordPress galleries"
99
+ msgstr "%1$s f&uuml;r Bilder in WordPress Gallerien automatisieren"
100
+
101
+ #: jquery-colorbox.php:495
102
+ msgid "Automatically add colorbox-class to images in WordPress galleries, but nowhere else. Images in one page or post are grouped automatically."
103
+ msgstr "Automatisch die Colorbox-CSS-Klasse f&uuml;r Bilder in Gallerien einf&uuml;gen, sonst nirgends. Alle Bilder innerhalb eines Beitrags oder einer Seite werden automatisch gruppiert."
104
+
105
+ #: jquery-colorbox.php:500
106
+ msgid "Add Slideshow to groups"
107
+ msgstr "Slideshow f&uuml;r Gruppen"
108
+
109
+ #: jquery-colorbox.php:504
110
+ #, php-format
111
+ msgid "Add Slideshow functionality for %1$s Groups"
112
+ msgstr "Slideshow Funktionalit&auml;t zu %1$s Gruppen hinzuf&uuml;gen"
113
+
114
+ #: jquery-colorbox.php:509
115
+ msgid "Start Slideshow automatically"
116
+ msgstr "Slideshow automatisch starten"
117
+
118
+ #: jquery-colorbox.php:513
119
+ #, php-format
120
+ msgid "Start Slideshow automatically if slideshow functionality is added to %1$s Groups"
121
+ msgstr "Slideshow automatisch starten, wenn die Slideshow Funktionalit&auml;t zu %1$s Gruppen hinzugef&uuml;gt wird"
122
+
123
+ #: jquery-colorbox.php:518
124
+ msgid "Speed of the slideshow"
125
+ msgstr "Geschwindigkeit der Slideshow"
126
+
127
+ #: jquery-colorbox.php:522
128
+ msgid "Sets the speed of the slideshow, in milliseconds"
129
+ msgstr "Die Geschwindigkeit der Slideshow in Millisekunden einstellen"
130
+
131
+ #: jquery-colorbox.php:527
132
  msgid "Maximum width of an image"
133
  msgstr "Maximale Breite eines Bildes"
134
 
135
+ #: jquery-colorbox.php:531
136
+ #: jquery-colorbox.php:577
137
+ msgid "Do not set width"
138
+ msgstr "Breite nicht setzen"
139
+
140
+ #: jquery-colorbox.php:534
141
+ msgid "Set maximum width of an image"
142
+ msgstr "Maximale Breite eines Bildes setzen"
143
+
144
+ #: jquery-colorbox.php:545
145
+ msgid "Set the maximum width of the image in the Colorbox in relation to the browser window in percent or pixels. If maximum width is not set, image is as wide as the Colorbox"
146
+ msgstr "Hier l&auml;sst sich die maximale Breite des Bildes in der Colorbox in Relation zum Browserfenster als Prozentwert oder in Pixeln festlegen. Das Bild wird verkleinert falls n&ouml;tig. Wenn die maximale Breite des Bildes nicht gesetzt ist, ist das Bild ist so breit wie die Colorbox"
147
 
148
+ #: jquery-colorbox.php:550
149
  msgid "Maximum height of an image"
150
  msgstr "Maximale H&ouml;he eines Bildes"
151
 
152
+ #: jquery-colorbox.php:554
153
+ #: jquery-colorbox.php:600
154
+ msgid "Do not set height"
155
+ msgstr "Die H&ouml;he nicht setzen"
156
 
157
+ #: jquery-colorbox.php:557
158
+ msgid "Set maximum height of an image"
159
+ msgstr "Maximale H&ouml;he eines Bildes setzen"
160
+
161
+ #: jquery-colorbox.php:568
162
+ msgid "Set the maximum height of the image in the Colorbox in relation to the browser window to a value in percent or pixels. If maximum height is not set, the image is as high as the Colorbox"
163
+ msgstr "Hier l&auml;sst sich die maximale H&ouml;he des Bildes in der colorbox in Relation zum Browserfenster als Prozentwert oder in Pixeln festlegen. Das Bild wird verkleinert falls n&ouml;tig. Wenn die maximale H&oumlhe des Bildes nicht gesetzt ist, ist das Bild so hoch wie die Colorbox"
164
+
165
+ #: jquery-colorbox.php:573
166
  msgid "Maximum width of the Colorbox"
167
  msgstr "Maximale Breite der Colorbox"
168
 
169
+ #: jquery-colorbox.php:580
170
+ msgid "Set width of the Colorbox"
171
+ msgstr "Breite der Colorbox"
172
 
173
+ #: jquery-colorbox.php:591
174
+ msgid "Set the maximum width of the Colorbox itself in relation to the browser window to a value between in percent or pixels. If the image is bigger than the colorbox, scrollbars are displayed. If width is not set, the Colorbox will be as wide as the picture in it"
175
+ msgstr "Hier l&auml;sst sich die maximale Breite der Colorbox in Relation zum Browserfenster als Prozentwert oder in Pixeln festlegen. Wenn das Bild gr&ouml;sser als die Colorbox ist, werden Scrollbalken dargestellt. Wenn keine maximale Breite f&uuml;r die Colorbox gesetzt ist, wird die Colorbox so breit wie das Bild"
176
+
177
+ #: jquery-colorbox.php:596
178
  msgid "Maximum height of the Colorbox"
179
  msgstr "Maximale H&ouml;he der Colorbox"
180
 
181
+ #: jquery-colorbox.php:603
182
+ msgid "Set height of the Colorbox"
183
+ msgstr "H&ouml;he der Colorbox"
184
+
185
+ #: jquery-colorbox.php:614
186
+ msgid "Set the maximum height of the Colorbox itself in relation to the browser window to a value between in percent or pixels. If the image is bigger than the colorbox, scrollbars are displayed. If height is not set, the Colorbox will be as high as the picture in it"
187
+ msgstr "Hier l&auml;sst sich die maximale H&ouml;he der Colorbox inRrelation zum Browserfenster als Prozentwert oder in Pixeln festlegen. Wenn das Bild gr&ouml;sser als die Colorbox ist, werden Scrollbalken dargestellt. Wenn keine maximale H&ouml;he f&uuml;r die Colorbox gesetzt ist, wird die Colorbox so hoch wie das Bild"
188
 
189
+ #: jquery-colorbox.php:619
190
+ msgid "Resize images"
191
+ msgstr "Bilder skalieren"
192
+
193
+ #: jquery-colorbox.php:623
194
+ msgid "If enabled and if maximum width of images, maximum height of images, width of the Colorbox, or height of the Colorbox have been defined, ColorBox will scale photos to fit within the those values"
195
+ msgstr "Wenn diese Option aktiviert ist und die maximale Breite von Bildern, die maximale H&ouml;he von Bildern, die Breite der Colorbox oder die H&ouml;he der Colorbox gesetzt ist, wird Colorbox Bilder skalieren"
196
+
197
+ #: jquery-colorbox.php:629
198
  msgid "Save Changes"
199
  msgstr "&Auml;nderungen speichern"
200
 
201
+ #: jquery-colorbox.php:638
202
+ #: jquery-colorbox.php:647
203
+ msgid "Delete Settings"
204
+ msgstr "Einstellungen löschen"
205
+
206
+ #: jquery-colorbox.php:641
207
+ msgid "Check the box and click this button to delete settings of this plugin."
208
+ msgstr "Aktivieren Sie die Checkbox und klicken Sie anschließend die folgende Schaltfläche, um die Einstellungen dieses Plugins zu entfernen."
209
+
210
+ #: jquery-colorbox.php:657
211
  msgid "Donate"
212
  msgstr "Spenden"
213
 
214
+ #: jquery-colorbox.php:671
215
  msgid "If you would like to make a small (or large) contribution towards future development please consider making a donation."
216
  msgstr "Wenn Du eine kleine (oder grosse) Spende f&uuml;r die Weiterentwicklung abgeben m&ouml;chtest, kannst Du das per PayPal tun."
217
 
218
+ #: jquery-colorbox.php:696
219
+ #, php-format
220
+ msgid "Successfully updated %1$s settings."
221
+ msgstr "&Auml;nderungen der %1$s Einstellungen wurden erfolgreich gespeichert"
222
+
223
+ #: jquery-colorbox.php:698
224
+ #, php-format
225
+ msgid "%1$s settings were successfully deleted."
226
+ msgstr "Die Einstellungen von %1$s wurden erfolgreich entfernt."
227
+
228
+ #: jquery-colorbox.php:780
229
+ msgid "Did not update settings, you do not have the necessary rights."
230
+ msgstr "Einstellungen nicht aktualisiert, da Sie nicht die hierfür erforderlichen Rechte besitzen."
231
+
232
+ #: jquery-colorbox.php:830
233
+ #, php-format
234
+ msgid "Did not delete %1$s settings. Either you dont have the nececssary rights or you didnt check the checkbox."
235
+ msgstr "Konnte die Einstellungen von %1$s nicht entfernen. Entweder besitzen Sie nicht die notwendigen Rechte hierzu oder Sie haben vergessen, die Checkbox [x] zu aktivieren."
236
+
237
+ #~ msgid "jQuery Colorbox"
238
+ #~ msgstr "jQuery ColorBox"
239
+ #~ msgid "jQuery Colorbox Settings"
240
+ #~ msgstr "jQuery Colorbox Einstellungen"
241
+ #~ msgid "Automate jQuery Colorbox"
242
+ #~ msgstr "Colorbox automatisieren"
243
+ #~ msgid "Do not set maximum width"
244
+ #~ msgstr "Maximale Breite nicht setzen"
245
+ #~ msgid "Do not set maximum height"
246
+ #~ msgstr "Die maximale H&ouml;he nicht setzen"
247
+ #~ msgid "Set width of an image"
248
+ #~ msgstr "Maximale Breite eines Bildes setzen"
249
+ #~ msgid "Set height of an image"
250
+ #~ msgstr "Maximale H&ouml;he eines Bildes setzen"
251
  #~ msgid "maxWidth"
252
  #~ msgstr "Maximale Breite des Bildes"
253
  #~ msgid "maxHeight"
258
  #~ msgstr "Maximale H&ouml;he der Colorbox"
259
  #~ msgid "donation"
260
  #~ msgstr "Spende"
 
 
 
 
 
 
 
 
 
261
  #~ msgid "Enable Automatic"
262
  #~ msgstr "Automatismus aktivieren"
263
  #~ msgid "You can disable the colorbox effect from the Wordpress editor."
localization/jquery-colorbox-en_EN.mo CHANGED
Binary file
localization/jquery-colorbox-en_EN.po CHANGED
@@ -2,9 +2,9 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: jQuery-Colorbox\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2010-01-17 13:47+0100\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -14,91 +14,226 @@ msgstr ""
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
- #: jquery-colorbox.php:48
18
  msgid "Theme #1"
19
  msgstr ""
20
 
21
- #: jquery-colorbox.php:49
22
  msgid "Theme #2"
23
  msgstr ""
24
 
25
- #: jquery-colorbox.php:50
26
  msgid "Theme #3"
27
  msgstr ""
28
 
29
- #: jquery-colorbox.php:51
30
  msgid "Theme #4"
31
  msgstr ""
32
 
33
- #: jquery-colorbox.php:52
34
  msgid "Theme #5"
35
  msgstr ""
36
 
37
- #: jquery-colorbox.php:85
38
- msgid "jQuery Colorbox"
39
  msgstr ""
40
 
41
- #: jquery-colorbox.php:100
42
- #: jquery-colorbox.php:175
 
 
 
 
43
  msgid "Settings"
44
  msgstr ""
45
 
46
- #: jquery-colorbox.php:166
47
- msgid "jQuery Colorbox Settings"
 
 
 
 
 
 
 
 
 
 
 
 
48
  msgstr ""
49
 
50
- #: jquery-colorbox.php:181
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  msgid "Theme"
52
  msgstr ""
53
 
54
- #: jquery-colorbox.php:193
55
  msgid "Select the theme you want to use on your blog."
56
  msgstr ""
57
 
58
- #: jquery-colorbox.php:198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  msgid "Maximum width of an image"
60
  msgstr ""
61
 
62
- #: jquery-colorbox.php:202
63
- msgid "Set the maximum width of the picture in the Colorbox in relation to the browser window. The picture is resized to the appropriate size. Set to either \"false\" (no maximum width for the picture, picture is as wide as the Colorbox) or a percent value, e.g. \"95%\""
 
 
 
 
 
 
 
 
 
64
  msgstr ""
65
 
66
- #: jquery-colorbox.php:207
67
  msgid "Maximum height of an image"
68
  msgstr ""
69
 
70
- #: jquery-colorbox.php:211
71
- msgid "Set the maximum height of the picture in the Colorbox in relation to the browser window. The picture is resized to the appropriate size. Set to either \"false\" (no maximum height for the picture, picture is as high as the Colorbox) or a percent value, e.g. \"95%\""
 
 
 
 
 
 
 
 
 
72
  msgstr ""
73
 
74
- #: jquery-colorbox.php:216
75
  msgid "Maximum width of the Colorbox"
76
  msgstr ""
77
 
78
- #: jquery-colorbox.php:220
79
- msgid "Set the maximum width of the Colorbox itself in relation to the browser window. The picture is NOT resized, if bigger than the colorbox, scrollbars are displayed. Set to either \"false\" (no maximum width for Colorbox, Colorbox is as big as the picture in it) or a percent value, e.g. \"95%\""
 
 
 
 
80
  msgstr ""
81
 
82
- #: jquery-colorbox.php:225
83
  msgid "Maximum height of the Colorbox"
84
  msgstr ""
85
 
86
- #: jquery-colorbox.php:229
87
- msgid "Set the maximum height of the Colorbox itself in relation to the browser window. The picture is NOT resized, if bigger than the colorbox, scrollbars are displayed. Set to either \"false\" (no maximum height for Colorbox, Colorbox is as big as the picture in it) or a percent value, e.g. \"95%\""
 
 
 
 
88
  msgstr ""
89
 
90
- #: jquery-colorbox.php:234
 
 
 
 
 
 
 
 
91
  msgid "Save Changes"
92
  msgstr ""
93
 
94
- #: jquery-colorbox.php:243
 
 
 
 
 
 
 
 
 
95
  msgid "Donate"
96
  msgstr ""
97
 
98
- #: jquery-colorbox.php:256
99
  msgid "If you would like to make a small (or large) contribution towards future development please consider making a donation."
100
  msgstr ""
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  #~ msgid "maxWidth"
103
  #~ msgstr "Maximum width of an image"
104
  #~ msgid "maxHeight"
2
  msgstr ""
3
  "Project-Id-Version: jQuery-Colorbox\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-02-10 22:12+0100\n"
6
+ "PO-Revision-Date: 2010-02-10 22:12+0100\n"
7
+ "Last-Translator: Arne Franken <blog@techotronic.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
+ #: jquery-colorbox.php:101
18
  msgid "Theme #1"
19
  msgstr ""
20
 
21
+ #: jquery-colorbox.php:102
22
  msgid "Theme #2"
23
  msgstr ""
24
 
25
+ #: jquery-colorbox.php:103
26
  msgid "Theme #3"
27
  msgstr ""
28
 
29
+ #: jquery-colorbox.php:104
30
  msgid "Theme #4"
31
  msgstr ""
32
 
33
+ #: jquery-colorbox.php:105
34
  msgid "Theme #5"
35
  msgstr ""
36
 
37
+ #: jquery-colorbox.php:110
38
+ msgid "percent"
39
  msgstr ""
40
 
41
+ #: jquery-colorbox.php:111
42
+ msgid "pixels"
43
+ msgstr ""
44
+
45
+ #: jquery-colorbox.php:235
46
+ #: jquery-colorbox.php:456
47
  msgid "Settings"
48
  msgstr ""
49
 
50
+ #: jquery-colorbox.php:359
51
+ msgid "close"
52
+ msgstr ""
53
+
54
+ #: jquery-colorbox.php:360
55
+ msgid "next"
56
+ msgstr ""
57
+
58
+ #: jquery-colorbox.php:361
59
+ msgid "previous"
60
+ msgstr ""
61
+
62
+ #: jquery-colorbox.php:362
63
+ msgid "start slideshow"
64
  msgstr ""
65
 
66
+ #: jquery-colorbox.php:363
67
+ msgid "stop slideshow"
68
+ msgstr ""
69
+
70
+ #: jquery-colorbox.php:364
71
+ msgid "{current} of {total} images"
72
+ msgstr ""
73
+
74
+ #: jquery-colorbox.php:449
75
+ #, php-format
76
+ msgid "%1$s Settings"
77
+ msgstr ""
78
+
79
+ #: jquery-colorbox.php:465
80
  msgid "Theme"
81
  msgstr ""
82
 
83
+ #: jquery-colorbox.php:477
84
  msgid "Select the theme you want to use on your blog."
85
  msgstr ""
86
 
87
+ #: jquery-colorbox.php:482
88
+ #, php-format
89
+ msgid "Automate %1$s for all images"
90
+ msgstr ""
91
+
92
+ #: jquery-colorbox.php:486
93
+ msgid "Automatically add colorbox-class to images in posts and pages. Also adds colorbox-class to galleries. Images in one page or post are grouped automatically."
94
+ msgstr ""
95
+
96
+ #: jquery-colorbox.php:491
97
+ #, php-format
98
+ msgid "Automate %1$s for images in WordPress galleries"
99
+ msgstr ""
100
+
101
+ #: jquery-colorbox.php:495
102
+ msgid "Automatically add colorbox-class to images in WordPress galleries, but nowhere else. Images in one page or post are grouped automatically."
103
+ msgstr ""
104
+
105
+ #: jquery-colorbox.php:500
106
+ msgid "Add Slideshow to groups"
107
+ msgstr ""
108
+
109
+ #: jquery-colorbox.php:504
110
+ #, php-format
111
+ msgid "Add Slideshow functionality for %1$s Groups"
112
+ msgstr ""
113
+
114
+ #: jquery-colorbox.php:509
115
+ msgid "Start Slideshow automatically"
116
+ msgstr ""
117
+
118
+ #: jquery-colorbox.php:513
119
+ #, php-format
120
+ msgid "Start Slideshow automatically if slideshow functionality is added to %1$s Groups"
121
+ msgstr ""
122
+
123
+ #: jquery-colorbox.php:518
124
+ msgid "Speed of the slideshow"
125
+ msgstr ""
126
+
127
+ #: jquery-colorbox.php:522
128
+ msgid "Sets the speed of the slideshow, in milliseconds"
129
+ msgstr ""
130
+
131
+ #: jquery-colorbox.php:527
132
  msgid "Maximum width of an image"
133
  msgstr ""
134
 
135
+ #: jquery-colorbox.php:531
136
+ #: jquery-colorbox.php:577
137
+ msgid "Do not set width"
138
+ msgstr ""
139
+
140
+ #: jquery-colorbox.php:534
141
+ msgid "Set maximum width of an image"
142
+ msgstr ""
143
+
144
+ #: jquery-colorbox.php:545
145
+ msgid "Set the maximum width of the image in the Colorbox in relation to the browser window in percent or pixels. If maximum width is not set, image is as wide as the Colorbox"
146
  msgstr ""
147
 
148
+ #: jquery-colorbox.php:550
149
  msgid "Maximum height of an image"
150
  msgstr ""
151
 
152
+ #: jquery-colorbox.php:554
153
+ #: jquery-colorbox.php:600
154
+ msgid "Do not set height"
155
+ msgstr ""
156
+
157
+ #: jquery-colorbox.php:557
158
+ msgid "Set maximum height of an image"
159
+ msgstr ""
160
+
161
+ #: jquery-colorbox.php:568
162
+ msgid "Set the maximum height of the image in the Colorbox in relation to the browser window to a value in percent or pixels. If maximum height is not set, the image is as high as the Colorbox"
163
  msgstr ""
164
 
165
+ #: jquery-colorbox.php:573
166
  msgid "Maximum width of the Colorbox"
167
  msgstr ""
168
 
169
+ #: jquery-colorbox.php:580
170
+ msgid "Set width of the Colorbox"
171
+ msgstr ""
172
+
173
+ #: jquery-colorbox.php:591
174
+ msgid "Set the maximum width of the Colorbox itself in relation to the browser window to a value between in percent or pixels. If the image is bigger than the colorbox, scrollbars are displayed. If width is not set, the Colorbox will be as wide as the picture in it"
175
  msgstr ""
176
 
177
+ #: jquery-colorbox.php:596
178
  msgid "Maximum height of the Colorbox"
179
  msgstr ""
180
 
181
+ #: jquery-colorbox.php:603
182
+ msgid "Set height of the Colorbox"
183
+ msgstr ""
184
+
185
+ #: jquery-colorbox.php:614
186
+ msgid "Set the maximum height of the Colorbox itself in relation to the browser window to a value between in percent or pixels. If the image is bigger than the colorbox, scrollbars are displayed. If height is not set, the Colorbox will be as high as the picture in it"
187
  msgstr ""
188
 
189
+ #: jquery-colorbox.php:619
190
+ msgid "Resize images"
191
+ msgstr ""
192
+
193
+ #: jquery-colorbox.php:623
194
+ msgid "If enabled and if maximum width of images, maximum height of images, width of the Colorbox, or height of the Colorbox have been defined, ColorBox will scale photos to fit within the those values"
195
+ msgstr ""
196
+
197
+ #: jquery-colorbox.php:629
198
  msgid "Save Changes"
199
  msgstr ""
200
 
201
+ #: jquery-colorbox.php:638
202
+ #: jquery-colorbox.php:647
203
+ msgid "Delete Settings"
204
+ msgstr ""
205
+
206
+ #: jquery-colorbox.php:641
207
+ msgid "Check the box and click this button to delete settings of this plugin."
208
+ msgstr ""
209
+
210
+ #: jquery-colorbox.php:657
211
  msgid "Donate"
212
  msgstr ""
213
 
214
+ #: jquery-colorbox.php:671
215
  msgid "If you would like to make a small (or large) contribution towards future development please consider making a donation."
216
  msgstr ""
217
 
218
+ #: jquery-colorbox.php:696
219
+ #, php-format
220
+ msgid "Successfully updated %1$s settings."
221
+ msgstr ""
222
+
223
+ #: jquery-colorbox.php:698
224
+ #, php-format
225
+ msgid "%1$s settings were successfully deleted."
226
+ msgstr ""
227
+
228
+ #: jquery-colorbox.php:780
229
+ msgid "Did not update settings, you do not have the necessary rights."
230
+ msgstr ""
231
+
232
+ #: jquery-colorbox.php:830
233
+ #, php-format
234
+ msgid "Did not delete %1$s settings. Either you dont have the nececssary rights or you didnt check the checkbox."
235
+ msgstr ""
236
+
237
  #~ msgid "maxWidth"
238
  #~ msgstr "Maximum width of an image"
239
  #~ msgid "maxHeight"
readme.txt CHANGED
@@ -4,33 +4,34 @@ Donate link: http://www.techotronic.de/index.php/donate/
4
  Tags: jquery, colorbox, lightbox, images, gallery, javascript, overlay
5
  Requires at least: 2.8.5
6
  Tested up to: 2.9.1
7
- Stable tag: 1.3.3
8
 
9
- Automatically adds Colorbox/Lightbox functionality to all images on the blog. Images are grouped by post.
10
 
11
  == Description ==
12
 
13
  Yet another Colorbox plugin for Wordpress.
14
 
15
  When adding an image to a post or page, usually a thumbnail is inserted and linked to the image in original size.
16
- All images in posts and pages are displayed in a layer when the tumbnail is clicked.
17
- Images are grouped as galleries when linked in the same blog post or page.
18
 
19
  Images can be excluded by giving them a special CSS class.
20
 
 
 
21
  For more information visit the <a href="http://wordpress.org/extend/plugins/jquery-colorbox/faq/">FAQ</a>.
 
22
 
23
  Localization
24
 
25
  * English (en_EN) by <a href="http://www.techotronic.de/">Arne Franken</a>
26
  * German (de_DE) by <a href="http://www.techotronic.de/">Arne Franken</a>
27
 
28
- Includes <a href="http://colorpowered.com/colorbox/">ColorBox</a> 1.3.6 jQuery plugin from Jack Moore. Colorbox is licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>.
29
- jQuery Colorbox uses the jQuery library version 1.3.2 bundled with Wordpress.
30
-
31
- == Demo ==
32
 
33
- Click on any image on [My Blog](http://www.techotronic.de/) to see jQuery Colorbox in action.
 
34
 
35
  == Installation ==
36
 
@@ -44,18 +45,24 @@ Extract all files from the ZIP file, making sure to keep the file structure inta
44
 
45
  ###Configuring The Plugin###
46
 
47
- Go to the settings page and choose one of the five themes bundled with the plugin.
48
 
49
- **See Also:** ["Installing Plugins" article on the WP Codex](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins)
50
 
51
  == Frequently Asked Questions ==
 
 
 
 
 
 
52
  * How does jQuery Colorbox work?
53
 
54
  When inserting a picture, the field "Link URL" needs to contain the link to the full-sized image. (press the button "Link to Image" below the field)
55
  When rendering the blog, a special CSS class ("colorbox-postId", e.g. "colorbox-123") is added to linked images.
56
  This CSS class is then passed to the colorbox JavaScript.
57
 
58
- * How do I exclude an image?
59
 
60
  Add the CSS class "colorbox-off" to the image you want to exclude.
61
  jQuery Colorbox does not add the colorbox effect to images that have the CSS class "colorbox-off".
@@ -76,15 +83,49 @@ In short:
76
  * I installed your plugin, but when I click on a thumbnail, the original picture is loaded directly instead of in the Colorbox. What could be the problem?
77
 
78
  Tricky.
 
79
  I have seen problems where other plugins include older, incompatible versions of the jQuery library my plugin uses.
80
  Since I include the jQuery library in a non-conflicting way, the other jQuery library is usually loaded.
81
 
82
  Maybe the images you want jQuery Colorbox to work on are added by a plugin and the images are added after jQuery Colorbox manipulates the HTML when rendering your blog.
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
  = 1.3.3 (2010-01-21) =
87
- * CHANGE: fixed settings page, options can be saved now
88
  * NEW: added settings deletion on uninstall and "delete settings from database" functionality to settings page
89
  * CHANGE: moved adding of CSS class priority lower, hopefully now the CSS class is added to pictures after other plugins update the HTML
90
  * CHANGE: updated the <a href="http://wordpress.org/extend/plugins/jquery-colorbox/faq/">FAQ</a>
@@ -105,11 +146,11 @@ Maybe the images you want jQuery Colorbox to work on are added by a plugin and t
105
  * CHANGE: updated the <a href="http://wordpress.org/extend/plugins/jquery-colorbox/faq/">FAQ</a>
106
 
107
  = 1.2 =
108
- * CHANGE: fixes bug where colorbox was not working if linked images were used (by the theme) outside of blog posts and pages.
109
  * NEW: adds configuration for Colorbox and picture resizing
110
 
111
  = 1.1 =
112
- * CHANGE: fixes critical bug which would break rendering the blog. Sorry, was not aware that the plugin would be listed before I tagged the files as 1.0 in subversion...
113
 
114
  = 1.0 =
115
  * NEW: Initial release.
4
  Tags: jquery, colorbox, lightbox, images, gallery, javascript, overlay
5
  Requires at least: 2.8.5
6
  Tested up to: 2.9.1
7
+ Stable tag: 2.0
8
 
9
+ Adds Colorbox/Lightbox functionality to images on the blog. Images are grouped by post or page. Also works on WordPress galleries.
10
 
11
  == Description ==
12
 
13
  Yet another Colorbox plugin for Wordpress.
14
 
15
  When adding an image to a post or page, usually a thumbnail is inserted and linked to the image in original size.
16
+ All images in posts and pages can be displayed in a layer when the thumbnail is clicked.
17
+ Images are grouped as galleries when linked in the same post or page. Groups can be displayed in an automatic slideshow.
18
 
19
  Images can be excluded by giving them a special CSS class.
20
 
21
+ See the <a href="http://www.techotronic.de/index.php/plugins/jquery-colorbox/">plugin page</a> for demo pages.
22
+
23
  For more information visit the <a href="http://wordpress.org/extend/plugins/jquery-colorbox/faq/">FAQ</a>.
24
+ If you have questions or problems, feel free to write an email to blog [at] techotronic.de or write a entry at <a href="http://wordpress.org/tags/jquery-colorbox?forum_id=10">the jQuery Colorbox WordPress.org forum</a>
25
 
26
  Localization
27
 
28
  * English (en_EN) by <a href="http://www.techotronic.de/">Arne Franken</a>
29
  * German (de_DE) by <a href="http://www.techotronic.de/">Arne Franken</a>
30
 
31
+ Is your native language missing? Translating the plugin is easy if you understand english and are fluent in another language. Just send me an email.
 
 
 
32
 
33
+ Includes <a href="http://colorpowered.com/colorbox/">ColorBox</a> 1.3.6 jQuery plugin from Jack Moore. Colorbox is licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>.
34
+ jQuery Colorbox uses the jQuery library version 1.3.2 bundled with Wordpress. Should work with jQuery 1.4 too.
35
 
36
  == Installation ==
37
 
45
 
46
  ###Configuring The Plugin###
47
 
48
+ Go to the settings page and choose one of the five themes bundled with the plugin and other settings.
49
 
50
+ **See Also:** <a href="http://codex.wordpress.org/Managing_Plugins#Installing_Plugins">"Installing Plugins" article on the WP Codex</a>
51
 
52
  == Frequently Asked Questions ==
53
+ * I have installed and activated (or updated) jQuery Colorbox, but it doesn't show up when I click on a thumbnail in my blog. Is the plugin broken?
54
+
55
+ Since version 2.0, jQuery Colorbox' automatic behaviour can be switched on and off in the settings. That way, you can apply the Colorbox functionality manually to single images.
56
+
57
+ The default ist OFF.
58
+
59
  * How does jQuery Colorbox work?
60
 
61
  When inserting a picture, the field "Link URL" needs to contain the link to the full-sized image. (press the button "Link to Image" below the field)
62
  When rendering the blog, a special CSS class ("colorbox-postId", e.g. "colorbox-123") is added to linked images.
63
  This CSS class is then passed to the colorbox JavaScript.
64
 
65
+ * How do I exclude an image from Colorbox in a page or post?
66
 
67
  Add the CSS class "colorbox-off" to the image you want to exclude.
68
  jQuery Colorbox does not add the colorbox effect to images that have the CSS class "colorbox-off".
83
  * I installed your plugin, but when I click on a thumbnail, the original picture is loaded directly instead of in the Colorbox. What could be the problem?
84
 
85
  Tricky.
86
+
87
  I have seen problems where other plugins include older, incompatible versions of the jQuery library my plugin uses.
88
  Since I include the jQuery library in a non-conflicting way, the other jQuery library is usually loaded.
89
 
90
  Maybe the images you want jQuery Colorbox to work on are added by a plugin and the images are added after jQuery Colorbox manipulates the HTML when rendering your blog.
91
 
92
+ Sometimes I have seen Images without the "class" attribute. If there is no "class" attribute present in the IMG-Tag, jQuery Colorbox can't add the necessary CSS class and won't work on that image.
93
+
94
+ * Why is jQuery Colorbox not available in my language?
95
+
96
+ I speak German and English fluently, but unfortunately no other language well enough to do a translation.
97
+
98
+ Would you like to help? Translating the plugin is easy if you understand English and are fluent in another language.
99
+
100
+ * My question isn't answered here. What do I do now?
101
+
102
+ Feel free to write an email to blog [at] techotronic.de or write a entry at <a href="http://wordpress.org/tags/jquery-colorbox?forum_id=10">the jQuery Colorbox WordPress.org forum</a>.
103
+
104
+ I'll include new FAQs in every new version. Promise.
105
+
106
  == Changelog ==
107
+ = 2.0 (2010-02-11) =
108
+ * NEW: Decided to move from 1.3.3 to 2.0 because I implemented many new features.
109
+ * BUGFIX: fixed relative paths for theme1 and theme4 by adding the CSS for the Internet Explorer workaround directly into the page. Thx to <a href="http://www.deepport.net/">Andrew Radke</a> for the suggestion!
110
+ * NEW: switch adding of "colorbox-postId" classes to images in posts and pages on and off through setting. Default: off.
111
+ * NEW: now works for images outside of posts (e.g. sidebar or header) if CSS class "colorbox-manual" is added manually
112
+ * NEW: jQuery Colorbox now working for WordPress attachment pages
113
+ * NEW: Added switch that adds slideshow functionality to all Colorbox groups. (no way to add slideshows individually yet)
114
+ * NEW: Added switch that adds automatic start to slideshows (no way to add slideshows individually yet)
115
+ * NEW: Added configuration of slideshow speed
116
+ * NEW: Added switch that allows the user to decide whether Colorbox scales images
117
+ * NEW: Added demos of the plugin on the <a href="http://www.techotronic.de/index.php/plugins/jquery-colorbox/">plugin page</a>
118
+ * NEW: Added configuration for adding colorbox class only to WordPress galleries
119
+ * NEW: Automatically resets settings if settings of a version prior to 1.4 are found upon activation
120
+ * NEW: width and height can now be configured as percent relative to browser window size or in pixels (default is percent)
121
+ * CHANGE: jQuery Colorbox is now only working on Image links (of type jpeg, jpg, gif, png, bmp)
122
+ * CHANGE: Improved translation. Thx to <a href="http://usability-idealist.de/">Fabian Wolf</a> for the help!
123
+ * CHANGE: updated the <a href="http://wordpress.org/extend/plugins/jquery-colorbox/faq/">FAQ</a>
124
+ * CHANGE: Updated readme.
125
+ * CHANGE: Updated descriptions and translations
126
 
127
  = 1.3.3 (2010-01-21) =
128
+ * BUGFIX: fixed settings page, options can be saved now
129
  * NEW: added settings deletion on uninstall and "delete settings from database" functionality to settings page
130
  * CHANGE: moved adding of CSS class priority lower, hopefully now the CSS class is added to pictures after other plugins update the HTML
131
  * CHANGE: updated the <a href="http://wordpress.org/extend/plugins/jquery-colorbox/faq/">FAQ</a>
146
  * CHANGE: updated the <a href="http://wordpress.org/extend/plugins/jquery-colorbox/faq/">FAQ</a>
147
 
148
  = 1.2 =
149
+ * BUGFIX: fixes bug where colorbox was not working if linked images were used (by the theme) outside of blog posts and pages.
150
  * NEW: adds configuration for Colorbox and picture resizing
151
 
152
  = 1.1 =
153
+ * BUGFIX: fixes critical bug which would break rendering the blog. Sorry, was not aware that the plugin would be listed before I tagged the files as 1.0 in subversion...
154
 
155
  = 1.0 =
156
  * NEW: Initial release.
themes/theme1/colorbox.css CHANGED
@@ -40,23 +40,4 @@
40
  #cboxLoadingOverlay{background:url(images/loading_background.png) center center no-repeat;}
41
  #cboxLoadingGraphic{background:url(images/loading.gif) center center no-repeat;}
42
  #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) -25px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
43
- #cboxClose.hover{background-position:-25px -25px;}
44
-
45
- /*
46
- The following fixes png-transparency for IE6.
47
- It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition
48
-
49
- Since this method does not support CSS background-positioning, it is incompatible with CSS sprites.
50
- Colorbox preloads navigation hover classes to account for this.
51
-
52
- !! Important Note: AlphaImageLoader src paths are relative to the HTML document,
53
- while regular CSS background images are relative to the CSS document.
54
- */
55
- .cboxIE #cboxTopLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopLeft.png, sizingMethod='scale');}
56
- .cboxIE #cboxTopCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopCenter.png, sizingMethod='scale');}
57
- .cboxIE #cboxTopRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopRight.png, sizingMethod='scale');}
58
- .cboxIE #cboxBottomLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomLeft.png, sizingMethod='scale');}
59
- .cboxIE #cboxBottomCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomCenter.png, sizingMethod='scale');}
60
- .cboxIE #cboxBottomRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomRight.png, sizingMethod='scale');}
61
- .cboxIE #cboxMiddleLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderMiddleLeft.png, sizingMethod='scale');}
62
- .cboxIE #cboxMiddleRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderMiddleRight.png, sizingMethod='scale');}
40
  #cboxLoadingOverlay{background:url(images/loading_background.png) center center no-repeat;}
41
  #cboxLoadingGraphic{background:url(images/loading.gif) center center no-repeat;}
42
  #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) -25px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
43
+ #cboxClose.hover{background-position:-25px -25px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
themes/theme4/colorbox.css CHANGED
@@ -37,23 +37,4 @@
37
  #cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
38
  #cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
39
  #cboxLoadingOverlay{background:url(images/loading.gif) 5px 5px no-repeat #fff;}
40
- #cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
41
-
42
- /*
43
- The following fixes png-transparency for IE6.
44
- It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition
45
-
46
- Since this method does not support CSS background-positioning, it is incompatible with CSS sprites.
47
- Colorbox preloads navigation hover classes to account for this.
48
-
49
- !! Important Note: AlphaImageLoader src paths are relative to the HTML document,
50
- while regular CSS background images are relative to the CSS document.
51
- */
52
- .cboxIE #cboxTopLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopLeft.png, sizingMethod='scale');}
53
- .cboxIE #cboxTopCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopCenter.png, sizingMethod='scale');}
54
- .cboxIE #cboxTopRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopRight.png, sizingMethod='scale');}
55
- .cboxIE #cboxBottomLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomLeft.png, sizingMethod='scale');}
56
- .cboxIE #cboxBottomCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomCenter.png, sizingMethod='scale');}
57
- .cboxIE #cboxBottomRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomRight.png, sizingMethod='scale');}
58
- .cboxIE #cboxMiddleLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderMiddleLeft.png, sizingMethod='scale');}
59
- .cboxIE #cboxMiddleRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderMiddleRight.png, sizingMethod='scale');}
37
  #cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
38
  #cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
39
  #cboxLoadingOverlay{background:url(images/loading.gif) 5px 5px no-repeat #fff;}
40
+ #cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}