Changeset 711217
- Timestamp:
- 05/11/2013 02:33:51 AM (13 years ago)
- Location:
- globalfeed/trunk
- Files:
-
- 11 edited
-
. (modified) (1 prop)
-
admin/pages/admin_presentation.php (modified) (4 diffs)
-
admin/pages/admin_settings.php (modified) (3 diffs)
-
feeds/mb_facebook/mb_facebook.php (modified) (5 diffs)
-
feeds/mb_facebook/pages/js/mb_facebook.js (modified) (2 diffs)
-
feeds/mb_facebook/pages/settings-main.php (modified) (5 diffs)
-
feeds/mb_twitter/mb_twitter.php (modified) (3 diffs)
-
feeds/mb_twitter/pages/settings-main.php (modified) (2 diffs)
-
feeds/mb_youtube/pages/settings-main.php (modified) (2 diffs)
-
feeds/mbgf_rss/pages/settings-main.php (modified) (5 diffs)
-
mb_globalfeed.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
globalfeed/trunk
- Property svn:ignore
-
old new 1 1 log.txt 2 .user.ini
-
- Property svn:ignore
-
globalfeed/trunk/admin/pages/admin_presentation.php
r593074 r711217 13 13 */ 14 14 function show_mbgf_admin_page( &$settings ) { 15 global $mb_globalfeed; 15 global $mb_globalfeed, $mbgfa_theme; 16 $mbgfa_theme->queue_js_client_tools(); 16 17 17 18 $update = false; … … 31 32 ?> 32 33 <h1>Presentation Settings</h1> 34 <div id="notices"> 35 <?php // Show saved message 36 if ( $update ) : ?> 37 <div class="notice updated no-hide" ><?php _e('<p>Your settings were successfully saved.</p>') ?></div> 38 <?php endif; // Saved message ?> 39 </div> 33 40 <p>GlobalFeed can present itself by integrating into the WordPress loop, or by using<br /> 34 41 a widget or shortcode. Here you can change how it does this.</p> … … 43 50 <p><label for="presentation-autodetect_link_open_new_window"><input type="checkbox" <?php echo $settings['autodetect_link_open_new_window'] ? 'checked="checked"' : ''; ?> id="presentation-autodetect_link_open_new_window" name="presentation-autodetect_link_open_new_window" /> Open GlobalFeed-generated links in a new window</label></p> 44 51 45 <input type="submit" value="Save Settings" />52 <input type="submit" class="button-secondary" value="Save Settings" /> 46 53 </fieldset><fieldset class="optgrp"><legend> Shortcode Settings</legend> 47 54 <p>To use GlobalFeed as a shortcode simply use the shortcode [globalfeed].</p> … … 58 65 </fieldset> 59 66 </form><small>Please note: If there are any settings you would like to see added to the GlobalFeed UI, please let us know!</small> 60 61 67 <?php 62 68 return $settings; -
globalfeed/trunk/admin/pages/admin_settings.php
r593074 r711217 13 13 */ 14 14 function show_mbgf_admin_page( &$settings ) { 15 global $mb_globalfeed; 15 global $mb_globalfeed, $mbgfa_theme; 16 $mbgfa_theme->queue_js_client_tools(); 16 17 17 18 $update = false; … … 33 34 ?> 34 35 <h1>Configuration Settings</h1> 36 <div id="notices"> 37 <?php // Show saved message 38 if ( $update ) : ?> 39 <div class="notice updated no-hide" ><?php _e('<p>Your settings were successfully saved.</p>') ?></div> 40 <?php endif; // Saved message ?> 41 </div> 35 42 <p>GlobalFeed controls some basic behaviour for its feeds, here you can configure<br /> 36 43 some of this, however some feeds may override these settings.</p> … … 47 54 </select></label></p> 48 55 49 <input type="submit" value="Save Settings" />56 <input type="submit" class="button-secondary" value="Save Settings" /> 50 57 </fieldset> 51 58 </form><small>Please note: If there are any settings you would like to see added to the GlobalFeed UI, please let us know!</small> -
globalfeed/trunk/feeds/mb_facebook/mb_facebook.php
r625019 r711217 126 126 'show_welcome_message' => true, 127 127 'override_post_time_on_timezone_discrepency' => false, 128 'show_posts_from_other_users' => false, 128 129 ); 129 130 … … 666 667 $globalfeed = &$this->globalfeed; 667 668 $feed_options = &$this->feed_options; 668 $globalfeed->print_debug_info('Update Feed Called.', $this->feed_slug);669 $globalfeed->print_debug_info('Update Feed Called.', $this->feed_slug); 669 670 670 671 // Check and make sure the oauth token is set … … 701 702 702 703 // Check that the update is from the object we're subscribing to 703 if ( ((int) $update->from->id) != ((int) $page_id) )704 if ( ((int) $update->from->id) != ((int) $page_id) && $feed_options['show_posts_from_other_users'] ) 704 705 continue; 705 706 … … 787 788 else 788 789 $globalfeed->print_debug_info ($img); 789 $globalfeed->print_debug_info($update);790 // $globalfeed->print_debug_info($update); 790 791 $post_args['meta']['link'] = $update->link; 791 792 $content_args['media_format'] = 'image'; … … 820 821 $introspect = json_decode($introspect['body']); 821 822 $type = $introspect->type; 822 //$globalfeed->print_debug_info($introspect, 'mb_facebook');823 823 } 824 824 825 825 if ( !empty($type) ) { 826 $action_name = 'View ' . ucwords($ type);826 $action_name = 'View ' . ucwords($value->name); 827 827 828 828 $obj = new stdClass(); -
globalfeed/trunk/feeds/mb_facebook/pages/js/mb_facebook.js
r593074 r711217 54 54 case 'application': 55 55 output_div += '<div class="obj_info">Type: <strong>App</strong></div>'; 56 output_div += '<div class="obj_info description">' + fb_obj.description + '</div>'; 56 if (typeof fb_obj.description != "undefined") 57 output_div += '<div class="obj_info description">' + fb_obj.description + '</div>'; 57 58 break 58 59 case 'page': … … 149 150 } else { 150 151 hideAjaxIndicator( statusdiv ); 152 showMessage('The authorization failed for an unknown reason.\n\nPlease try again.', 'authFailedUnknown', true, 10000); 151 153 fail(); 152 154 } -
globalfeed/trunk/feeds/mb_facebook/pages/settings-main.php
r615145 r711217 14 14 $update = false; 15 15 if (isset($_POST['_update'])){ 16 if (!(check_admin_referer( 'facebook-connect- admin' ) && wp_verify_nonce( $_POST['_wpnonce'], 'facebook-connect-admin' )))16 if (!(check_admin_referer( 'facebook-connect-settings_main' ) && wp_verify_nonce( $_POST['_wpnonce'], 'facebook-connect-settings_main' ))) 17 17 die('Security check failed.'); 18 18 … … 21 21 22 22 $feed_options['override_post_time_on_timezone_discrepency'] = isset($_POST['general-override_post_time_on_timezone_discrepency']) && $_POST['general-override_post_time_on_timezone_discrepency'] == 'on'; 23 $show_posts_from_other_users = $feed_options['show_posts_from_other_users']; 24 $feed_options['show_posts_from_other_users'] = isset($_POST['general-show_posts_from_other_users']) && $_POST['general-show_posts_from_other_users'] == 'on'; 25 26 if ($show_posts_from_other_users != $feed_options['show_posts_from_other_users']) 27 $feed_options['last_feed_update'] = 0; 23 28 } 24 29 … … 28 33 <form action="<?php $_SERVER['REQUEST_URI'] ?>" method="post"> 29 34 <?php if (function_exists('wp_nonce_field')){ 30 echo wp_nonce_field('facebook-connect- admin');35 echo wp_nonce_field('facebook-connect-settings_main'); 31 36 } ?> 32 37 <div id="notices"> … … 60 65 <table> 61 66 <p>Note: If you are encountering an issue wherein posts are showing up late with an incorrect date/time and/or WordPress is marking posts as "future", enabling the option below may fix any timezone handling problems.</p> 62 <p><label for="general-override_post_time_on_timezone_discrepency"><input type="checkbox" <?php echo $feed_options['override_post_time_on_timezone_discrepency'] ? 'checked="checked"' : ''; ?> id="general-override_post_time_on_timezone_discrepency" name="general-override_post_time_on_timezone_discrepency" /> Override post date/time if the time is in the future</label></p> 63 64 <input name="_update" type="submit" value="Save Settings" /> 67 <p><label for="general-override_post_time_on_timezone_discrepency"><input type="checkbox" <?php echo isset($feed_options['override_post_time_on_timezone_discrepency']) && $feed_options['override_post_time_on_timezone_discrepency'] ? 'checked="checked"' : ''; ?> id="general-override_post_time_on_timezone_discrepency" name="general-override_post_time_on_timezone_discrepency" /> Override post date/time if the time is in the future</label></p> 68 <p><label for="general-show_posts_from_other_users"><input type="checkbox" <?php echo isset($feed_options['show_posts_from_other_users']) && $feed_options['show_posts_from_other_users'] ? 'checked="checked"' : ''; ?> id="general-show_posts_from_other_users" name="general-show_posts_from_other_users" /> Display posts from other users on this <?php echo $feed_options['subscribe_object_type'] ?>'s wall</label></p> 69 70 <input name="_update" type="submit" class="button-secondary" value="Save Settings" /> 65 71 </table> 66 72 </fieldset> … … 69 75 <fieldset id="fb_reset_options" class="optgrp"><legend>Reset Feed</legend> 70 76 <table> 71 <tr id="manual_update_cont"><td><input type="button" value="Update Feed Manually" id="manual_update" /></td><td><?php $mbgfa_theme->informative('This will tell the feed to update, typically usefull if the feed is not updating automatically. <p>P.s. If things arent working right, make sure to let us know so we can fix it!</p>'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>72 <tr id="reset_fb_auth_cont"><td><input type="button" value="Reset Facebook Authorization" id="reset_fb_auth" /></td><td><?php $mbgfa_theme->informative('This will re-request access codes from Facebook. Handy if you've had to reset any or if authentication is failing.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>73 <tr id="redo_initial_setup_cont"><td><input type="button" value="Redo Initial Setup" id="redo_initial_setup" /></td><td><?php $mbgfa_theme->informative('This will bring up the initial setup wizard, however it will not reset any settings.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>74 <tr id="reset_feed_defaults_cont"><td><input type="button" value="Reset Feed Defaults" id="reset_feed_defaults" /></td><td><?php $mbgfa_theme->informative('This function completely resets the plugin to defaults.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>77 <tr id="manual_update_cont"><td><input type="button" class="button-secondary" value="Update Feed Manually" id="manual_update" /></td><td><?php $mbgfa_theme->informative('This will tell the feed to update, typically usefull if the feed is not updating automatically. <p>P.s. If things arent working right, make sure to let us know so we can fix it!</p>'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 78 <tr id="reset_fb_auth_cont"><td><input type="button" class="button-secondary" value="Reset Facebook Authorization" id="reset_fb_auth" /></td><td><?php $mbgfa_theme->informative('This will re-request access codes from Facebook. Handy if you've had to reset any or if authentication is failing.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 79 <tr id="redo_initial_setup_cont"><td><input type="button" class="button-secondary" value="Redo Initial Setup" id="redo_initial_setup" /></td><td><?php $mbgfa_theme->informative('This will bring up the initial setup wizard, however it will not reset any settings.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 80 <tr id="reset_feed_defaults_cont"><td><input type="button" class="button-secondary" value="Reset Feed Defaults" id="reset_feed_defaults" /></td><td><?php $mbgfa_theme->informative('This function completely resets the plugin to defaults.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 75 81 </table> 76 82 </fieldset> -
globalfeed/trunk/feeds/mb_twitter/mb_twitter.php
r625019 r711217 948 948 else 949 949 $request = wp_remote_get( $endpoint ); 950 951 $this->globalfeed->print_debug_info($endpoint);952 950 953 951 // Check for a WP Error … … 955 953 return $request; 956 954 955 // Hide any previous alerts 956 $this->hide_alert('request_error'); 957 $this->hide_alert('rate_limiting'); 958 957 959 // Check the response code 958 960 $request['response']['code'] = (int) $request['response']['code']; … … 976 978 } 977 979 } 978 979 // Hide any previous alerts980 $this->hide_alert('request_error');981 $this->hide_alert('rate_limiting');982 980 983 981 // Use the regex to replace numerical values to strings for older versions of php -
globalfeed/trunk/feeds/mb_twitter/pages/settings-main.php
r613498 r711217 56 56 <p><label for="general-override_post_time_on_timezone_discrepency"><input type="checkbox" <?php echo $feed_options['override_post_time_on_timezone_discrepency'] ? 'checked="checked"' : ''; ?> id="general-override_post_time_on_timezone_discrepency" name="general-override_post_time_on_timezone_discrepency" /> Override tweet date/time if the time is in the future</label></p> 57 57 58 <input name="_update" type="submit" value="Save Settings" />58 <input name="_update" type="submit" class="button-secondary" value="Save Settings" /> 59 59 </table> 60 60 </fieldset> … … 62 62 <fieldset id="tw_reset_options" class="optgrp"><legend>Reset Feed</legend> 63 63 <table> 64 <tr id="manual_update_cont"><td><input type="button" value="Update Feed Manually" id="manual_update" /></td><td><?php $mbgfa_theme->informative('This will tell the feed to update, typically usefull if the feed is not updating automatically. <p>P.s. If things arent working right, make sure to let us know so we can fix it!</p>'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>65 <tr id="redo_initial_setup_cont"><td><input type="button" value="Redo Initial Setup" id="redo_initial_setup" /></td><td><?php $mbgfa_theme->informative('This will bring up the initial setup wizard and remove all stored feed items, however it will not reset any settings.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>66 <tr id="reset_feed_defaults_cont"><td><input type="button" value="Reset Feed Defaults" id="reset_feed_defaults" /></td><td><?php $mbgfa_theme->informative('This will completely reset the feed to its initial settings, simultaneously removing all stored feed items.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>64 <tr id="manual_update_cont"><td><input type="button" class="button-secondary" value="Update Feed Manually" id="manual_update" /></td><td><?php $mbgfa_theme->informative('This will tell the feed to update, typically usefull if the feed is not updating automatically. <p>P.s. If things arent working right, make sure to let us know so we can fix it!</p>'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 65 <tr id="redo_initial_setup_cont"><td><input type="button" class="button-secondary" value="Redo Initial Setup" id="redo_initial_setup" /></td><td><?php $mbgfa_theme->informative('This will bring up the initial setup wizard and remove all stored feed items, however it will not reset any settings.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 66 <tr id="reset_feed_defaults_cont"><td><input type="button" class="button-secondary" value="Reset Feed Defaults" id="reset_feed_defaults" /></td><td><?php $mbgfa_theme->informative('This will completely reset the feed to its initial settings, simultaneously removing all stored feed items.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 67 67 </table> 68 68 </fieldset> -
globalfeed/trunk/feeds/mb_youtube/pages/settings-main.php
r613498 r711217 55 55 <p><label for="general-override_post_time_on_timezone_discrepency"><input type="checkbox" <?php echo $feed_options['override_post_time_on_timezone_discrepency'] ? 'checked="checked"' : ''; ?> id="general-override_post_time_on_timezone_discrepency" name="general-override_post_time_on_timezone_discrepency" /> Override post date/time if the time is in the future</label></p> 56 56 57 <input name="_update" type="submit" value="Save Settings" />57 <input name="_update" type="submit" class="button-secondary" value="Save Settings" /> 58 58 </table> 59 59 </fieldset> … … 61 61 <fieldset id="yt_reset_options" class="optgrp"><legend>Reset Feed</legend> 62 62 <table> 63 <tr id="manual_update_cont"><td><input type="button" value="Update Feed Manually" id="manual_update" /></td><td><?php $mbgfa_theme->informative('This will tell the feed to update, typically usefull if the feed is not updating automatically. <p>P.s. If things arent working right, make sure to let us know so we can fix it!</p>'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>64 <tr id="redo_initial_setup_cont"><td><input type="button" value="Redo Initial Setup" id="redo_initial_setup" /></td><td><?php $mbgfa_theme->informative('This will bring up the initial setup wizard and remove all saved feed items, however it will not reset any settings.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>65 <tr id="reset_feed_defaults_cont"><td><input type="button" value="Reset Feed Defaults" id="reset_feed_defaults" /></td><td><?php $mbgfa_theme->informative('This will completely reset the feed to its default settings, removing all stored feed items.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>63 <tr id="manual_update_cont"><td><input type="button" class="button-secondary" value="Update Feed Manually" id="manual_update" /></td><td><?php $mbgfa_theme->informative('This will tell the feed to update, typically usefull if the feed is not updating automatically. <p>P.s. If things arent working right, make sure to let us know so we can fix it!</p>'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 64 <tr id="redo_initial_setup_cont"><td><input type="button" class="button-secondary" value="Redo Initial Setup" id="redo_initial_setup" /></td><td><?php $mbgfa_theme->informative('This will bring up the initial setup wizard and remove all saved feed items, however it will not reset any settings.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 65 <tr id="reset_feed_defaults_cont"><td><input type="button" class="button-secondary" value="Reset Feed Defaults" id="reset_feed_defaults" /></td><td><?php $mbgfa_theme->informative('This will completely reset the feed to its default settings, removing all stored feed items.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 66 66 </table> 67 67 </fieldset> -
globalfeed/trunk/feeds/mbgf_rss/pages/settings-main.php
r613498 r711217 31 31 } ?> 32 32 <div id="notices"> 33 <?php // Show welcome Message34 if ( $feed_options['show_welcome_message'] == true ) :35 //$feed_options['show_welcome_message'] = false;36 ?>37 <div class="notice updated no-hide" ><?php _e('<p>Welcome to MB RSS. To start, simply enter in the URL to an RSS feed and click the + button.</p><p>Please report any bugs you find by using the bug report feature at the top right of the page. Thank you for using MB GlobalFeed!</p>') ?></div>38 <?php endif; // Welcome message33 <?php // Show welcome Message 34 if ( $feed_options['show_welcome_message'] == true ) : 35 //$feed_options['show_welcome_message'] = false; 36 ?> 37 <div class="notice updated no-hide" ><?php _e('<p>Welcome to MB RSS. To start, simply enter in the URL to an RSS feed and click the + button.</p><p>Please report any bugs you find by using the bug report feature at the top right of the page. Thank you for using MB GlobalFeed!</p>') ?></div> 38 <?php endif; // Welcome message 39 39 // Show saved message 40 40 if ( $update ) : ?> 41 41 <div class="notice updated no-hide" ><?php _e('<p>Your settings were successfully saved.</p>') ?></div> 42 <?php endif; // Welcomemessage ?>42 <?php endif; // Saved message ?> 43 43 </div> 44 44 <!-- RSS Object Information --> … … 62 62 <p><label for="general-override_post_time_on_timezone_discrepency"><input type="checkbox" <?php echo $feed_options['override_post_time_on_timezone_discrepency'] ? 'checked="checked"' : ''; ?> id="general-override_post_time_on_timezone_discrepency" name="general-override_post_time_on_timezone_discrepency" /> Override post date/time if the time is in the future</label></p> 63 63 64 <input name="_update" type="submit" value="Save Settings" />64 <input name="_update" type="submit" class="button-secondary" value="Save Settings" /> 65 65 </table> 66 66 </fieldset> … … 68 68 <fieldset id="rss_reset_options" class="optgrp"><legend>Reset Feed</legend> 69 69 <table> 70 <tr id="manual_update_cont"><td><input type="button" value="Update Feed Manually" id="manual_update" /></td><td><?php $mbgfa_theme->informative('This will tell the feed to update, typically usefull if the feed is not updating automatically. <p>P.s. If things arent working right, make sure to let us know so we can fix it!</p>'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>71 <tr id="reset_feed_defaults_cont"><td><input type="button" value="Reset Feed Defaults" id="reset_feed_defaults" /></td><td><?php $mbgfa_theme->informative('This function completely resets the plugin to defaults.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr>70 <tr id="manual_update_cont"><td><input type="button" class="button-secondary" value="Update Feed Manually" id="manual_update" /></td><td><?php $mbgfa_theme->informative('This will tell the feed to update, typically usefull if the feed is not updating automatically. <p>P.s. If things arent working right, make sure to let us know so we can fix it!</p>'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 71 <tr id="reset_feed_defaults_cont"><td><input type="button" class="button-secondary" value="Reset Feed Defaults" id="reset_feed_defaults" /></td><td><?php $mbgfa_theme->informative('This function completely resets the plugin to defaults.'); ?><?php $mbgfa_theme->ajaxIndicator(true); ?></td></tr> 72 72 </table> 73 73 </fieldset> … … 187 187 188 188 jQuery('#reset_feed_defaults').click(function(){ 189 $this = this; 189 190 toggleAjaxIndicator('#reset_feed_defaults_cont'); 190 191 jQuery(this).attr('disabled', true); … … 195 196 statusCode: { 196 197 200: function (response) { 198 jQuery($this).removeAttr('disabled'); 197 199 window.location.reload(); 198 200 }}, -
globalfeed/trunk/mb_globalfeed.php
r613488 r711217 55 55 'notification', 56 56 'debug', 57 'mb_youtube', 58 'mb_twitter', 57 'mb_facebook', 59 58 'register_feeds', 60 59 'request_modify',
Note: See TracChangeset
for help on using the changeset viewer.