Changeset 167851
- Timestamp:
- 10/28/2009 01:07:34 AM (16 years ago)
- Location:
- fotobook/trunk
- Files:
-
- 23 added
- 4 edited
-
fotobook.php (modified) (9 diffs)
-
js/admin.js (modified) (1 diff)
-
options-fotobook.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
styles/colorbox (added)
-
styles/colorbox/album.php (added)
-
styles/colorbox/colorbox.css (added)
-
styles/colorbox/images (added)
-
styles/colorbox/images/border.png (added)
-
styles/colorbox/images/controls.png (added)
-
styles/colorbox/images/internet_explorer (added)
-
styles/colorbox/images/internet_explorer/borderBottomCenter.png (added)
-
styles/colorbox/images/internet_explorer/borderBottomLeft.png (added)
-
styles/colorbox/images/internet_explorer/borderBottomRight.png (added)
-
styles/colorbox/images/internet_explorer/borderMiddleLeft.png (added)
-
styles/colorbox/images/internet_explorer/borderMiddleRight.png (added)
-
styles/colorbox/images/internet_explorer/borderTopCenter.png (added)
-
styles/colorbox/images/internet_explorer/borderTopLeft.png (added)
-
styles/colorbox/images/internet_explorer/borderTopRight.png (added)
-
styles/colorbox/images/loading.gif (added)
-
styles/colorbox/images/loading_background.png (added)
-
styles/colorbox/images/overlay.png (added)
-
styles/colorbox/js (added)
-
styles/colorbox/js/colorbox.js (added)
-
styles/colorbox/js/init.js (added)
-
styles/colorbox/main.php (added)
-
styles/colorbox/style.css (added)
Legend:
- Unmodified
- Added
- Removed
-
fotobook/trunk/fotobook.php
r167834 r167851 7 7 Author: Aaron Harp 8 8 Author URI: http://www.aaronharp.com/ 9 Version: 3. 1.79 Version: 3.2 10 10 */ 11 11 … … 34 34 define('FB_POSTS_TABLE', $table_prefix.'posts'); 35 35 define('FB_PLUGIN_PATH', ABSPATH.'/wp-content/plugins/fotobook/'); 36 define('FB_PLUGIN_URL', get_option('siteurl').'/wp-content/plugins/fotobook/');37 define('FB_STYLE_URL', FB_PLUGIN_URL.'styles/'.get_option('fb_style').'/');38 define('FB_STYLE_PATH', FB_PLUGIN_PATH.'styles/'.get_option('fb_style').'/');39 define('FB_MANAGE_URL', (get_bloginfo('version') >= 2.7 ? 'media-new.php' : 'edit.php') .'?page=fotobook/manage-fotobook.php');36 define('FB_PLUGIN_URL', get_option('siteurl').'/wp-content/plugins/fotobook/'); 37 define('FB_STYLE_URL', FB_PLUGIN_URL.'styles/'.get_option('fb_style').'/'); 38 define('FB_STYLE_PATH', FB_PLUGIN_PATH.'styles/'.get_option('fb_style').'/'); 39 define('FB_MANAGE_URL', (get_bloginfo('version') >= 2.7 ? 'media-new.php' : 'edit.php') .'?page=fotobook/manage-fotobook.php'); 40 40 define('FB_OPTIONS_URL', 'options-general.php?page=fotobook/options-fotobook.php'); 41 define('FB_WEBSITE', 'http://www.aaronharp.com/dev/wp-fotobook/');42 define('FB_VERSION', 3.17);43 define('FB_DONATE', 'https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=aaron%40freshwebs%2enet&item_name=Fotobook%20Donation&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8');41 define('FB_WEBSITE', 'http://www.aaronharp.com/dev/wp-fotobook/'); 42 define('FB_VERSION', 3.2); 43 define('FB_DONATE', 'https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=aaron%40freshwebs%2enet&item_name=Fotobook%20Donation&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8'); 44 44 45 45 // facebook configuration variables … … 84 84 85 85 function FacebookAPI() { 86 include_once('facebook-platform/facebook.php'); 86 if(!class_exists('Facebook')) 87 include_once('facebook-platform/facebook.php'); 87 88 88 89 $this->facebook = new Facebook(FB_API_KEY, FB_API_SECRET, null, true); … … 831 832 WHERE ".FB_PHOTO_TABLE.".aid = ".FB_ALBUM_TABLE.".aid AND ".FB_ALBUM_TABLE.".hidden = 0 832 833 ORDER BY ".FB_PHOTO_TABLE.".created DESC LIMIT ".$count; 833 $photos = $wpdb->get_results($query, ARRAY_A); 834 $photos = $wpdb->get_results($query, ARRAY_A); 834 835 for($i = 0; $i < count($photos); $i++) { 835 836 $photos[$i]['link'] = fb_get_photo_link($photos[$i]); … … 852 853 switch (get_option('fb_style')) { 853 854 case 'lightbox': 855 case 'colorbox': 854 856 $page_link .= strstr($page_link, '?') ? '&' : '?'; 855 857 $page_link .= 'album_p='.$album_p; … … 1059 1061 // buttons in lightbox will display these images as well 1060 1062 $hidden_top = ''; $hidden_bottom = ''; 1061 for($i = 1; $i < =$first_photo; $i++) {1062 $hidden_top .= "<a href=\"{$photos[$i]['src_big']}\" rel=\" lightbox[fotobook]\" title=\"{$photos[$i]['caption']}\"></a>";1063 for($i = 1; $i < $first_photo; $i++) { 1064 $hidden_top .= "<a href=\"{$photos[$i]['src_big']}\" rel=\"fotobook\" title=\"{$photos[$i]['caption']}\"></a>"; 1063 1065 } 1064 1066 for($i = $last_photo+1; $i <= $photo_count; $i++) { 1065 $hidden_bottom .= "<a href=\"{$photos[$i]['src_big']}\" rel=\" lightbox[fotobook]\" title=\"{$photos[$i]['caption']}\"></a>";1067 $hidden_bottom .= "<a href=\"{$photos[$i]['src_big']}\" rel=\"fotobook\" title=\"{$photos[$i]['caption']}\"></a>"; 1066 1068 } 1067 1069 … … 1174 1176 } 1175 1177 1176 function fb_head() { 1178 function fb_display_scripts() { 1179 if(defined('WP_ADMIN')) 1180 return; 1181 if(get_option('fb_style') == 'colorbox') { 1182 wp_enqueue_script('jquery'); 1183 wp_enqueue_script('jquery-colorbox', FB_STYLE_URL . 'js/colorbox.js', array('jquery')); 1184 wp_enqueue_script('fotobook-style', FB_STYLE_URL . 'js/init.js', array('jquery')); 1185 } 1186 if(is_active_widget('fb_photos_widget')) { 1187 wp_enqueue_script('fotobook-widget', FB_PLUGIN_URL.'js/widget.js'); 1188 } 1189 } 1190 1191 function fb_display_styles() { 1177 1192 $post = $GLOBALS['post']; 1178 1193 $albums_page = get_option('fb_albums_page'); … … 1182 1197 if(is_active_widget('fb_photos_widget')) { 1183 1198 echo '<link rel="stylesheet" href="'.FB_PLUGIN_URL.'styles/sidebar-style.css" type="text/css" media="screen" charset="utf-8" />'."\r\n"; 1184 echo '<script type="text/javascript" src="'.FB_PLUGIN_URL.'js/widget.js"></script>';1185 1199 } 1186 1200 } … … 1482 1496 add_filter('the_content', 'fb_display'); 1483 1497 add_action('widgets_init', 'fb_widget_init'); 1484 add_action('wp_head', 'fb_head'); 1498 add_action('init', 'fb_display_scripts'); 1499 add_action('wp_head', 'fb_display_styles'); 1485 1500 add_action('wp_ajax_fotobook', 'fb_ajax_handler'); 1486 1501 -
fotobook/trunk/js/admin.js
r167834 r167851 16 16 // submit apply permissions form when Thickbox closes 17 17 $j('#grant-permissions').click(function() { 18 setTimeout(function() { 18 $j(this).css('opacity', 0.5).css('cursor', 'pointer'); 19 setTimeout(function() { 19 20 $j('#TB_window').unload(function() { 20 21 $j('#apply-permissions').submit(); -
fotobook/trunk/options-fotobook.php
r167834 r167851 78 78 79 79 // get options to fill in input fields 80 $fb_session = get_option('fb_facebook_session');81 $fb_albums_page = get_option('fb_albums_page');82 $fb_number_rows = get_option('fb_number_rows');83 $fb_number_cols = get_option('fb_number_cols');84 $fb_album_cmts = get_option('fb_album_cmts');85 $fb_thumb_size = get_option('fb_thumb_size');80 $fb_session = get_option('fb_facebook_session'); 81 $fb_albums_page = get_option('fb_albums_page'); 82 $fb_number_rows = get_option('fb_number_rows'); 83 $fb_number_cols = get_option('fb_number_cols'); 84 $fb_album_cmts = get_option('fb_album_cmts'); 85 $fb_thumb_size = get_option('fb_thumb_size'); 86 86 $fb_albums_per_page = get_option('fb_albums_per_page'); 87 $fb_style = get_option('fb_style');88 $fb_embedded_width = get_option('fb_embedded_width');89 $fb_hide_pages = get_option('fb_hide_pages');90 91 ?> 87 $fb_style = get_option('fb_style'); 88 $fb_embedded_width = get_option('fb_embedded_width'); 89 $fb_hide_pages = get_option('fb_hide_pages'); 90 91 ?> 92 92 93 93 <style type="text/css"> -
fotobook/trunk/readme.txt
r167815 r167851 83 83 84 84 * PHP 4 is now longer supported 85 * Added a new Colorbox style which which works out of the box 86 * Fixed bug where the first photo would show twice in the Lightbox 85 87 * Thickbox is used for account activation to make things less confusing 86 88 * Upgraded to latest version of the Facebook PHP Client (which kills support for PHP4) 89 * Fotobook plays better with other plugins using the Facebook API 87 90 88 91 = 3.1.7 =
Note: See TracChangeset
for help on using the changeset viewer.