diff --strip-trailing-cr -r -u photopress/photopress.php photopress-0.9.5sd/photopress.php --- photopress/photopress.php 2006-04-26 02:04:36.000000000 +0100 +++ photopress-0.9.5sd/photopress.php 2007-01-07 18:36:07.000000000 +0000 @@ -3,7 +3,7 @@ Plugin Name: Photopress Plugin URI: http://familypress.net/photopress/ Description: Photopress adds user-friendly image handling tools to Wordpress, including a popup upload and browse tool, a random image template function, and a simple album. Installs and uses database tables. -Version: 0.9.4 +Version: 0.9.5sd Author: Isaac Wedin Author URI: http://familypress.net/ */ @@ -270,7 +270,11 @@ $random_image_address = $pp_options['photosaddress'] . '/' . $random_image['imgfile']; $random_image_size = @getimagesize($pp_options['photospath'] . '/' . $random_image['imgfile']); } - $random_linked_thumb[] = '' . $random_thumb[$k] . ''; + if ($pp_options['use_lightbox'] == 'on') { + $random_linked_thumb[] = '' . $random_thumb[$k] . ''; + } else { + $random_linked_thumb[] = '' . $random_thumb[$k] . ''; + } $k++; } } @@ -539,6 +543,21 @@ add_action('wp_head','pp_album_css'); add_action('admin_head','pp_album_css'); +function pp_add_lightbox_js() { + global $pp_options; + + echo ' + + + + +'; +} + +if ($pp_options['use_lightbox'] == 'on') { + add_action('wp_head','pp_add_lightbox_js'); +} + // do the Options page, setting the min level to use it at 8 function pp_add_options_page() { add_options_page('Photopress', 'Photopress', 8, basename(__FILE__), 'pp_options_subpanel'); @@ -847,6 +866,22 @@ ' . __('Watermark text shadow color:','photopress') . '
' . __('Color of the shadow of your watermark-text in hex style. Must have if you choose watermark type \'text\'','photopress') . ' + + ' . __('Use LightBox:','photopress') . ' + + +
' . __('Rather than a popup image, Photopress will use the LightBox JavaScript.','photopress') . ' + + + + + ' . __('LightBox Path:','photopress') . ' +
' . __('Location of the Lightbox JavaScript code','photopress') . ' +

@@ -1789,7 +1824,11 @@ $image_size = @getimagesize($pp_options['photospath'] . '/' . $file[0]); $image_address = $pp_options['photosaddress'] . '/' . $file[0]; } - return '' . htmlentities2($image_data['imgname']) . ''; + if ($pp_options['use_lightbox'] == 'on') { + return '' . htmlentities2($image_data['imgname']) . ''; + } else { + return '' . htmlentities2($image_data['imgname']) . ''; + } } } else { return ''; // if the image isn't there return nothing @@ -1807,7 +1846,11 @@ $image_size = @getimagesize($pp_options['photospath'] . '/' . $file[0]); $image_address = $pp_options['photosaddress'] . '/' . $file[0]; } - return '' . htmlentities2($image_data['imgname']) . ''; + if ($pp_options['use_lightbox'] == 'on') { + return '' . htmlentities2($image_data['imgname']) . ''; + } else { + return '' . htmlentities2($image_data['imgname']) . ''; + } } } else { return ''; // if the image isn't there return nothing