Plugin Directory

Changeset 711217


Ignore:
Timestamp:
05/11/2013 02:33:51 AM (13 years ago)
Author:
mobius5150
Message:

Fixed a number of bugs

Location:
globalfeed/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • globalfeed/trunk

    • Property svn:ignore
      •  

        old new  
        11log.txt
         2.user.ini
  • globalfeed/trunk/admin/pages/admin_presentation.php

    r593074 r711217  
    1313 */
    1414function show_mbgf_admin_page( &$settings ) {
    15     global $mb_globalfeed;
     15    global $mb_globalfeed, $mbgfa_theme;
     16    $mbgfa_theme->queue_js_client_tools();
    1617   
    1718    $update = false;
     
    3132?>
    3233<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>
    3340<p>GlobalFeed can present itself by integrating into the WordPress loop, or by using<br />
    3441a widget or shortcode. Here you can change how it does this.</p>
     
    4350        <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>
    4451       
    45         <input type="submit" value="Save Settings" />
     52        <input type="submit" class="button-secondary" value="Save Settings" />
    4653    </fieldset><fieldset class="optgrp"><legend> Shortcode Settings</legend>
    4754        <p>To use GlobalFeed as a shortcode simply use the shortcode [globalfeed].</p>
     
    5865    </fieldset>
    5966</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 
    6167<?php
    6268    return $settings;
  • globalfeed/trunk/admin/pages/admin_settings.php

    r593074 r711217  
    1313 */
    1414function show_mbgf_admin_page( &$settings ) {
    15     global $mb_globalfeed;
     15    global $mb_globalfeed, $mbgfa_theme;
     16    $mbgfa_theme->queue_js_client_tools();
    1617   
    1718    $update = false;
     
    3334?>
    3435<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>
    3542<p>GlobalFeed controls some basic behaviour for its feeds, here you can configure<br />
    3643some of this, however some feeds may override these settings.</p>
     
    4754        </select></label></p>
    4855       
    49         <input type="submit" value="Save Settings" />
     56        <input type="submit" class="button-secondary" value="Save Settings" />
    5057    </fieldset>
    5158</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  
    126126        'show_welcome_message' => true,
    127127        'override_post_time_on_timezone_discrepency' => false,
     128        'show_posts_from_other_users' => false,
    128129    );
    129130   
     
    666667        $globalfeed = &$this->globalfeed;
    667668        $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);
    669670       
    670671        // Check and make sure the oauth token is set
     
    701702           
    702703            // 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'] )
    704705                continue;
    705706           
     
    787788                    else
    788789                        $globalfeed->print_debug_info ($img);
    789                     $globalfeed->print_debug_info($update);
     790//                    $globalfeed->print_debug_info($update);
    790791                    $post_args['meta']['link'] = $update->link;
    791792                    $content_args['media_format'] = 'image';
     
    820821                        $introspect = json_decode($introspect['body']);
    821822                        $type = $introspect->type;
    822                         //$globalfeed->print_debug_info($introspect, 'mb_facebook');
    823823                    }
    824824
    825825                    if ( !empty($type) ) {
    826                         $action_name = 'View ' . ucwords($type);
     826                        $action_name = 'View ' . ucwords($value->name);
    827827
    828828                        $obj = new stdClass();
  • globalfeed/trunk/feeds/mb_facebook/pages/js/mb_facebook.js

    r593074 r711217  
    5454        case 'application':
    5555            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>';
    5758            break
    5859        case 'page':
     
    149150                } else {
    150151                    hideAjaxIndicator( statusdiv );
     152                    showMessage('The authorization failed for an unknown reason.\n\nPlease try again.', 'authFailedUnknown', true, 10000);
    151153                    fail();
    152154                }
  • globalfeed/trunk/feeds/mb_facebook/pages/settings-main.php

    r615145 r711217  
    1414$update = false;
    1515if (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' )))
    1717            die('Security check failed.');
    1818
     
    2121
    2222    $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;
    2328}
    2429
     
    2833<form action="<?php $_SERVER['REQUEST_URI'] ?>" method="post">
    2934    <?php if (function_exists('wp_nonce_field')){
    30         echo wp_nonce_field('facebook-connect-admin');
     35        echo wp_nonce_field('facebook-connect-settings_main');
    3136    } ?>
    3237    <div id="notices">
     
    6065        <table>
    6166            <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" />
    6571        </table>
    6672    </fieldset>
     
    6975    <fieldset id="fb_reset_options" class="optgrp"><legend>Reset Feed</legend>
    7076        <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&apos;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&apos;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>
    7581        </table>
    7682    </fieldset>
  • globalfeed/trunk/feeds/mb_twitter/mb_twitter.php

    r625019 r711217  
    948948            else
    949949                $request = wp_remote_get( $endpoint );
    950 
    951             $this->globalfeed->print_debug_info($endpoint);
    952950           
    953951            // Check for a WP Error
     
    955953                return $request;
    956954
     955            // Hide any previous alerts
     956            $this->hide_alert('request_error');
     957            $this->hide_alert('rate_limiting');
     958           
    957959            // Check the response code
    958960            $request['response']['code'] = (int) $request['response']['code'];
     
    976978                }
    977979            }
    978            
    979             // Hide any previous alerts
    980             $this->hide_alert('request_error');
    981             $this->hide_alert('rate_limiting');
    982980
    983981            // 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  
    5656            <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>
    5757           
    58             <input name="_update" type="submit" value="Save Settings" />
     58            <input name="_update" type="submit" class="button-secondary" value="Save Settings" />
    5959        </table>
    6060    </fieldset>
     
    6262    <fieldset id="tw_reset_options" class="optgrp"><legend>Reset Feed</legend>
    6363        <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>
    6767        </table>
    6868    </fieldset>
  • globalfeed/trunk/feeds/mb_youtube/pages/settings-main.php

    r613498 r711217  
    5555            <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>
    5656           
    57             <input name="_update" type="submit" value="Save Settings" />
     57            <input name="_update" type="submit" class="button-secondary" value="Save Settings" />
    5858        </table>
    5959    </fieldset>
     
    6161    <fieldset id="yt_reset_options" class="optgrp"><legend>Reset Feed</legend>
    6262        <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>
    6666        </table>
    6767    </fieldset>
  • globalfeed/trunk/feeds/mbgf_rss/pages/settings-main.php

    r613498 r711217  
    3131    } ?>
    3232    <div id="notices">
    33 <?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
     33    <?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
    3939        // Show saved message
    4040        if ( $update ) : ?>
    4141            <div class="notice updated no-hide" ><?php _e('<p>Your settings were successfully saved.</p>') ?></div>
    42         <?php endif; // Welcome message ?>
     42        <?php endif; // Saved message ?>
    4343    </div>
    4444    <!-- RSS Object Information  -->
     
    6262            <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>
    6363           
    64             <input name="_update" type="submit" value="Save Settings" />
     64            <input name="_update" type="submit" class="button-secondary" value="Save Settings" />
    6565        </table>
    6666    </fieldset>
     
    6868    <fieldset id="rss_reset_options" class="optgrp"><legend>Reset Feed</legend>
    6969        <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>
    7272        </table>
    7373    </fieldset>
     
    187187
    188188            jQuery('#reset_feed_defaults').click(function(){
     189                $this = this;
    189190                toggleAjaxIndicator('#reset_feed_defaults_cont');
    190191                jQuery(this).attr('disabled', true);
     
    195196                    statusCode: {
    196197                        200: function (response) {
     198                            jQuery($this).removeAttr('disabled');
    197199                            window.location.reload();
    198200                        }},
  • globalfeed/trunk/mb_globalfeed.php

    r613488 r711217  
    5555            'notification',
    5656            'debug',
    57             'mb_youtube',
    58             'mb_twitter',
     57            'mb_facebook',
    5958            'register_feeds',
    6059            'request_modify',
Note: See TracChangeset for help on using the changeset viewer.