WordPress.org

Plugin Directory

Changeset 405242


Ignore:
Timestamp:
07/06/11 08:01:13 (3 years ago)
Author:
kirilln
Message:

WP 3.2 compatibility release

Location:
tweet-blender/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • tweet-blender/trunk/admin-page.php

    r383451 r405242  
    11<?php 
    22 
    3 // Version 3.3.9 
     3// Version 3.3.10 
    44 
    55// include TweetBlender library 
     
    272272    TB_pluginPath = '<?php echo plugins_url("tweet-blender") ?>', 
    273273    TB_CM_pluginPath = '<?php echo plugins_url('tweet-blender-cache-manager'); ?>', 
    274     TB_cacheManagerAvailable = <?php if ($tb_installed_addons[1] && $tb_active_addons[1]) { echo 'true'; } else { echo 'false'; } ?>; 
     274    TB_cacheManagerAvailable = <?php if ($tb_installed_addons[1] && $tb_active_addons[1]) { echo 'true'; } else { echo 'false'; } ?>, 
     275    TB_NS_pluginPath = '<?php echo plugins_url('tweet-blender-nstyle'); ?>', 
     276    TB_nStyleAvailable = <?php if ($tb_installed_addons[2] && $tb_active_addons[2]) { echo 'true'; } else { echo 'false'; } ?>; 
    275277</script> 
    276278 
     
    292294        <li id="statustab"><a href="#tab-6"><span><?php _e('Status', 'tweetblender'); ?></span></a></li> 
    293295        <li id="cache-manager-tab"><a href="#tab-7"><span><?php _e('Cache', 'tweetblender'); ?></span></a></li> 
    294         <li><a href="#tab-8"><span><?php _e('Help', 'tweetblender'); ?></span></a></li> 
     296        <li id="nstyle-tab"><a href="#tab-8"><span><?php _e('nStyle', 'tweetblender'); ?></span></a></li> 
     297        <li><a href="#tab-9"><span><?php _e('Help', 'tweetblender'); ?></span></a></li> 
    295298    </ul> 
    296299 
     
    309312            <th class="th-full" colspan="2" scope="row"> 
    310313            <label for="general_link_urls"> 
    311             <input type="checkbox" name="general_link_urls" <?php checked('on', $tb_o['general_link_urls']); ?>/> 
     314            <input type="checkbox" name="general_link_urls" <?php checked('on', isset($tb_o['general_link_urls'])); ?>/> 
    312315            <?php _e("Link http &amp; https URLs insde tweet text", 'tweetblender' ); ?> 
    313316            </label> 
     
    317320            <th class="th-full" colspan="2" scope="row"> 
    318321            <label for="general_link_screen_names"> 
    319             <input type="checkbox" name="general_link_screen_names" <?php checked('on', $tb_o['general_link_screen_names']); ?>/> 
     322            <input type="checkbox" name="general_link_screen_names" <?php checked('on', isset($tb_o['general_link_screen_names'])); ?>/> 
    320323            <?php _e('Link @screenname inside tweet text', 'tweetblender' ); ?> 
    321324            </label> 
     
    325328            <th class="th-full" colspan="2" scope="row"> 
    326329            <label for="general_link_hash_tags"> 
    327             <input type="checkbox" name="general_link_hash_tags" <?php checked('on', $tb_o['general_link_hash_tags']); ?>/> 
     330            <input type="checkbox" name="general_link_hash_tags" <?php checked('on', isset($tb_o['general_link_hash_tags'])); ?>/> 
    328331            <?php _e("Link #hashtags insde tweet text", 'tweetblender' ); ?> 
    329332            </label> 
     
    334337            <h3><?php _e('SEO', 'tweetblender'); ?></h3> 
    335338            <label for="general_seo_tweets_googleoff"> 
    336             <input type="checkbox" name="general_seo_tweets_googleoff" <?php checked('on', $tb_o['general_seo_tweets_googleoff']); ?>/> 
     339            <input type="checkbox" name="general_seo_tweets_googleoff" <?php checked('on', isset($tb_o['general_seo_tweets_googleoff'])); ?>/> 
    337340            <?php _e('Wrap all tweets with googleoff/googleon tags to prevent indexing', 'tweetblender' ); ?> 
    338341            </label> 
     
    342345            <th class="th-full" colspan="2" scope="row"> 
    343346            <label for="general_seo_footer_googleoff"> 
    344             <input type="checkbox" name="general_seo_footer_googleoff" <?php checked('on', $tb_o['general_seo_footer_googleoff']); ?>/> 
     347            <input type="checkbox" name="general_seo_footer_googleoff" <?php checked('on', isset($tb_o['general_seo_footer_googleoff'])); ?>/> 
    345348            <?php _e('Wrap footer with date and time in all tweets with googleoff/googleon tags to prevent indexing', 'tweetblender' ); ?> 
    346349            </label> 
     
    356359            <th class="th-full" colspan="2" scope="row"> 
    357360            <label for="widget_check_sources"> 
    358             <input type="checkbox" name="widget_check_sources" <?php checked('on', $tb_o['widget_check_sources']); ?>/> 
     361            <input type="checkbox" name="widget_check_sources" <?php checked('on', isset($tb_o['widget_check_sources'])); ?>/> 
    359362            <?php _e("Check and verify sources when widget settings are saved", 'tweetblender' ); ?> 
    360363            </label> 
     
    364367            <th class="th-full" colspan="2" scope="row"> 
    365368            <label for="widget_show_header"> 
    366             <input type="checkbox" name="widget_show_header" <?php checked('on', $tb_o['widget_show_header']); ?>/> 
     369            <input type="checkbox" name="widget_show_header" <?php checked('on', isset($tb_o['widget_show_header'])); ?>/> 
    367370            <?php _e("Show header with Twitter logo and refresh link for each widget", 'tweetblender' ); ?> 
    368371            </label> 
     
    372375            <th class="th-full" colspan="2" scope="row"> 
    373376            <label for="widget_show_photos"> 
    374             <input type="checkbox" name="widget_show_photos" <?php checked('on', $tb_o['widget_show_photos']); ?>/> 
     377            <input type="checkbox" name="widget_show_photos" <?php checked('on', isset($tb_o['widget_show_photos'])); ?>/> 
    375378            <?php _e("Show the photo from the author for each tweet", 'tweetblender' ); ?> 
    376379            </label> 
     
    388391            <th class="th-full" colspan="2" scope="row"> 
    389392            <label for="widget_show_source"> 
    390             <input type="checkbox" name="widget_show_source" <?php checked('on', $tb_o['widget_show_source']); ?>/> 
     393            <input type="checkbox" name="widget_show_source" <?php checked('on', isset($tb_o['widget_show_source'])); ?>/> 
    391394            <?php _e("Show tweet source for each tweet", 'tweetblender' ); ?> 
    392395            </label> 
     
    396399            <th class="th-full" colspan="2" scope="row"> 
    397400            <label for="widget_show_reply_link"> 
    398             <input type="checkbox" name="widget_show_reply_link" <?php checked('on', $tb_o['widget_show_reply_link']); ?>/> 
     401            <input type="checkbox" name="widget_show_reply_link" <?php checked('on', isset($tb_o['widget_show_reply_link'])); ?>/> 
    399402            <?php _e("Show reply link for each tweet (on mouse over)", 'tweetblender' ); ?> 
    400403            </label> 
     
    404407            <th class="th-full" colspan="2" scope="row"> 
    405408            <label for="widget_show_follow_link"> 
    406             <input type="checkbox" name="widget_show_follow_link" <?php checked('on', $tb_o['widget_show_follow_link']); ?>/> 
     409            <input type="checkbox" name="widget_show_follow_link" <?php checked('on', isset($tb_o['widget_show_follow_link'])); ?>/> 
    407410            <?php _e("Show follow link for each tweet (on mouse over)", 'tweetblender' ); ?> 
    408411            </label> 
     
    418421            <th class="th-full" colspan="2" scope="row"> 
    419422            <label for="archive_is_disabled"> 
    420             <input type="checkbox" id="archive_is_disabled" name="archive_is_disabled" <?php checked('on', $tb_o['archive_is_disabled']); ?>/> 
     423            <input type="checkbox" id="archive_is_disabled" name="archive_is_disabled" <?php checked('on', isset($tb_o['archive_is_disabled'])); ?>/> 
    421424            <?php _e('Disable archive page', 'tweetblender' ); ?>  
    422425            </label> 
     
    426429            <th class="th-full" colspan="2" scope="row"> 
    427430            <label for="archive_auto_page"> 
    428             <input type="checkbox" id="archive_auto_page" name="archive_auto_page" <?php checked('on', $tb_o['archive_auto_page']); ?>/> 
     431            <input type="checkbox" id="archive_auto_page" name="archive_auto_page" <?php checked('on', isset($tb_o['archive_auto_page'])); ?>/> 
    429432            <?php _e('Create archive page automatically', 'tweetblender' ); ?>  
    430433            </label> 
     
    439442                for ($i = 10; $i <= 90; $i+=10) { 
    440443                    echo '<option value="' . $i . '"'; 
    441                     if ($i == $tb_o['archive_tweets_num']) { 
     444                    if (isset($tb_o['archive_tweets_num']) && $i == $tb_o['archive_tweets_num']) { 
    442445                        echo ' selected'; 
    443446                    } 
     
    461464                foreach ($tb_keep_tweets_options as $name => $days) { 
    462465                    echo '<option value="' . $days . '"'; 
    463                     if ($days == $tb_o['archive_keep_tweets']) { 
     466                    if (isset($tb_o['archive_keep_tweets']) && $days == $tb_o['archive_keep_tweets']) { 
    464467                        echo ' selected'; 
    465468                    } 
     
    521524                foreach (range(1,10) as $lim) { 
    522525                    $throttle_select1 .= '<option value="' . $lim . '"'; 
    523                     if ($lim == $tb_o['filter_limit_per_source']) { 
     526                    if (isset($tb_o['filter_limit_per_source']) && $lim == $tb_o['filter_limit_per_source']) { 
    524527                        $throttle_select1 .= ' selected'; 
    525528                    } 
     
    531534                foreach ($tb_throttle_time_options as $name => $sec) { 
    532535                    $throttle_select2 .= '<option value="' . $sec . '"'; 
    533                     if ($sec == $tb_o['filter_limit_per_source_time']) { 
     536                    if (isset($tb_o['filter_limit_per_source_time']) && $sec == $tb_o['filter_limit_per_source_time']) { 
    534537                        $throttle_select2 .= ' selected'; 
    535538                    } 
     
    549552                foreach ($tb_languages as $code => $lang) { 
    550553                    echo '<option value="' . $code . '"'; 
    551                     if ($code == $tb_o['filter_lang']) { 
     554                    if (isset($tb_o['filter_lang']) && $code == $tb_o['filter_lang']) { 
    552555                        echo ' selected'; 
    553556                    } 
     
    627630            <th class="th-full" colspan="2" scope="row"> 
    628631            <label for="advanced_reroute_on"> 
    629             <input type="checkbox" name="advanced_reroute_on" <?php checked('on', $tb_o['advanced_reroute_on']); ?>/> 
     632            <input type="checkbox" name="advanced_reroute_on" <?php checked('on', isset($tb_o['advanced_reroute_on'])); ?>/> 
    630633            <?php _e('Re-route Twitter traffic through this server', 'tweetblender' ); ?>  
    631634            </label> (<input type="radio" value="oauth" name="advanced_reroute_type" <?php checked('oauth', $tb_o['advanced_reroute_type']); ?>/> <?php _e('user account based with oAuth', 'tweetblender' ); ?> <input type="radio" value="direct" name="advanced_reroute_type" <?php checked('direct', $tb_o['advanced_reroute_type']); ?>/> <?php _e('IP based', 'tweetblender' ); ?>)<br/> 
     
    636639            <th class="th-full" colspan="2" scope="row"> 
    637640            <label for="advanced_show_limit_msg"> 
    638             <input type="checkbox" name="advanced_show_limit_msg" <?php checked('on', $tb_o['advanced_show_limit_msg']); ?>/> 
     641            <input type="checkbox" name="advanced_show_limit_msg" <?php checked('on', isset($tb_o['advanced_show_limit_msg'])); ?>/> 
    639642            <?php _e('Notify user when Twitter API connection limit is reached', 'tweetblender' ); ?>  
    640643            </label><br/> 
     
    647650            <th class="th-full" colspan="2" scope="row"> 
    648651            <label for="advanced_disable_cache"> 
    649             <input type="checkbox" name="advanced_disable_cache" <?php checked('on', $tb_o['advanced_disable_cache']); ?>/> 
     652            <input type="checkbox" name="advanced_disable_cache" <?php checked('on', isset($tb_o['advanced_disable_cache'])); ?>/> 
    650653            <?php _e('Disable data caching', 'tweetblender' ); ?>  
    651654            </label><br/> 
     
    682685            <th class="th-full" colspan="2" scope="row"> 
    683686            <label for="advanced_no_search_api"> 
    684             <input type="checkbox" name="advanced_no_search_api" <?php checked('on', $tb_o['advanced_no_search_api']); ?>/> 
     687            <input type="checkbox" name="advanced_no_search_api" <?php checked('on', isset($tb_o['advanced_no_search_api'])); ?>/> 
    685688            <?php _e('Do not use search API for screen names', 'tweetblender' ); ?>  
    686689            </label><br/> 
     
    705708                    } 
    706709                    else { 
    707                         echo sprintf(__('You have %s left', 'tweetblender') . ' &middot; <span class="fail">'. 0 . '</span>') ; 
     710                        echo sprintf(__('You have %s left', 'tweetblender') . ' &middot; ', '<span class="fail">'. 0 . '</span>'); 
    708711                    } 
    709712                    echo __('Next reset', 'tweetblender') . ' ' . tb_verbal_time($api_limit_data->reset_time_in_seconds); 
     
    759762                    echo '<label for="delete_cache_src[]"> &nbsp;&uarr; ' . __('Check the boxes above to clear cached tweets from the database', 'tweetblender') . '</label>'; 
    760763                } 
    761                 elseif ($tb_o['advanced_disable_cache'] == false) { 
     764                elseif (!isset($tb_o['advanced_disable_cache']) || $tb_o['advanced_disable_cache'] == false) { 
    762765                    echo '<span class="fail">' . __('no cached tweets found and caching is ON', 'tweetblender') . '</span>'; 
    763766                } 
     
    834837 
    835838    <div id="tab-8"> 
     839 
     840    <?php  
     841        // if nStyle is not installed 
     842        if (!$tb_installed_addons[2]) {  
     843    ?> 
     844     
     845    <h2><?php _e('Tweet Blender nStyle Is Not Installed', 'tweetblender' ); ?></h2> 
     846    <div class="box-left"> 
     847    <p><?php _e('Install nStyle addon for Tweet Blender and instantly take advantage of the following features', 'tweetblender' ); ?>:</p> 
     848    <ol class="feature-set"> 
     849        <li><?php _e('Adjust colors for text, links, backgrounds', 'tweetblender' ); ?></li> 
     850        <li><?php _e('Adust font style, size, and spacing', 'tweetblender' ); ?></li> 
     851        <li><?php _e('Control the size of widget', 'tweetblender' ); ?></li> 
     852        <li><?php _e('Enable smooth scrolling', 'tweetblender' ); ?></li> 
     853        <li><?php _e('Control the size of thumbnails', 'tweetblender' ); ?></li> 
     854        <li><?php _e('Show alternating background colors', 'tweetblender' ); ?></li> 
     855        <li><?php _e('Switch layout from vertical to horizontal', 'tweetblender' ); ?></li> 
     856        <li><?php _e('Define completely custom template for tweets', 'tweetblender' ); ?></li> 
     857        <li><?php _e('Turn off default plugin CSS', 'tweetblender' ); ?></li> 
     858    </ol> 
     859    <p><?php echo sprintf(__('Click the button below to purchase the addon for a <b>one time flat fee of $%s</b>. This will perform a one-click install of a new plugin and you will get FREE upgrades with new features in the future.', 'tweetblender' ),'8.99'); ?></p> 
     860    <div class="centered"> 
     861    <!-- Coming soon 
     862        <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
     863        <input type="hidden" name="cmd" value="_xclick" /> 
     864        <input type="hidden" name="business" value="tweetblender@gmail.com" /> 
     865        <input type="hidden" name="lc" value="US" /> 
     866        <input type="hidden" name="currency_code" value="USD" /> 
     867        <input type="hidden" name="no_note" value="1" /> 
     868        <input type="hidden" name="amount" value="8.99" /> 
     869        <input type="hidden" name="item_name" value="nStyle for Tweet Blender" /> 
     870        <input type="hidden" name="item_number" value="2" /> 
     871        <input type="hidden" name="no_shipping" value="1" /> 
     872        <input type="hidden" name="custom" value="<?php bloginfo('url'); ?>" /> 
     873        <input type="hidden" name="notify_url" value="http://tweetblender.com/ipn.php" /> 
     874        <input type="hidden" name="image_url" value="http://tweetblender.com/tweet-blender-logo_150x50.png" /> 
     875        <input type="hidden" name="return" value="<?php echo tb_get_current_page_url(); ?>&install_addon=1" /> 
     876        <input type="hidden" name="cbt" value="Return to your site to complete installation" /> 
     877        <input type="hidden" name="cancel_return" value="<?php echo tb_get_current_page_url(); ?>#tab-8" /> 
     878        <input type="submit" name="submit" class="button-secondary" value="<?php _e('Get nStyle', 'tweetblender' ); ?>" /> 
     879        <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /> 
     880    </form> 
     881     --> 
     882     [COMING SOON!] 
     883    </div> 
     884    </div> 
     885    <div class="box-right centered"> 
     886        <!--  a href="<?php echo plugins_url('tweet-blender/screenshot-11.png'); ?>" title="nStyle for Tweet Blender"><img class="tb-addon-screenshot" src="<?php echo plugins_url('tweet-blender/img/nstyle_th.jpg'); ?>" /></a  --> 
     887    </div> 
     888    <br clear="all" /> 
     889    <?php  
     890        // if nStyle is not active 
     891        } else if(!$tb_active_addons[2]) {  
     892    ?> 
     893    <h2><?php _e('nStyle Is Not Active', 'tweetblender' ); ?></h2> 
     894    <p><?php _e('You have the Tweet Blender nStyle plugin installed but not activated. Please use the [Plugins] menu on the left to activate the plugin', 'tweetblender' ); ?></p> 
     895 
     896    <?php 
     897        // else nStyle is available 
     898        } else { 
     899            echo tb_ns_get_page_html(); 
     900        }  
     901    ?> 
     902     
     903    </div> 
     904 
     905    <div id="tab-9"> 
    836906    <?php _e('GetSatisfaction.com Community', 'tweetblender' ); ?>: <a href="http://getsatisfaction.com/tweet_blender">http://getsatisfaction.com/tweet_blender</a><br/> 
    837907    <?php _e('Facebook Page', 'tweetblender' ); ?>: <a href="http://www.facebook.com/pages/Tweet-Blender/96201618006">http://www.facebook.com/pages/Tweet-Blender/96201618006</a><br/> 
     
    841911 
    842912    </div> 
     913     
     914     
    843915 
    844916    <p class="submit"> 
  • tweet-blender/trunk/js/admin.js

    r381114 r405242  
    22 * @author kirill 
    33 *  
    4  * v3.3.6 
     4 * v3.3.10 
    55 */ 
    66var ajaxURLs = new Array(), 
     
    100100       }); 
    101101    } 
     102 
     103    // nStyle add-on 
     104    if (typeof(TB_nStyleAvailable) == 'undefined' || !TB_nStyleAvailable) { 
     105        jQuery('#nstyle-tab a').css('text-decoration','line-through'); 
     106        jQuery('img.tb-addon-screenshot').parent().lightBox({ 
     107            imageLoading: TB_pluginPath + '/img/lightbox/lightbox-ico-loading.gif', 
     108            imageBtnClose: TB_pluginPath + '/img/lightbox/lightbox-btn-close.gif', 
     109            imageBtnPrev: TB_pluginPath + '/img/lightbox/lightbox-btn-prev.gif', 
     110            imageBtnNext: TB_pluginPath + '/img/lightbox/lightbox-btn-next.gif', 
     111            imageBlank: TB_pluginPath + '/img/lightbox/lightbox-blank.gif', 
     112            txtImage: 'Screenshot' 
     113       }); 
     114    } 
    102115}); 
    103116 
  • tweet-blender/trunk/js/main.js

    r383451 r405242  
    33 */ 
    44 
    5 var TB_version = '3.3.9',   // Plugin version  
     5var TB_version = '3.3.10',  // Plugin version  
    66TB_rateLimitData, 
    77TB_tmp, 
     
    677677 
    678678    if (TB_getObjectSize(TB_tweetsToCache) > 0) { 
     679 
     680        if (typeof(jQuery.toJSON) == 'undefined' && typeof(jQnc.toJSON) == 'function') { 
     681            jQuery.toJSON = jQnc.toJSON; 
     682        } 
    679683         
    680684        jQuery.ajax({ 
  • tweet-blender/trunk/lib/lib.php

    r381114 r405242  
    11<?php 
    22 
    3 // Version 3.3.6 
     3// Version 3.3.10 
    44 
    55// aliases for sources 
     
    288288); 
    289289 
     290// if we don't have json class, get own PHP4 compatible library 
     291if (!isset($wp_json) || !is_a($wp_json, 'Services_JSON') ) { 
     292    require_once( dirname(__FILE__) . '/JSON.php' ); 
     293    $wp_json = new Services_JSON(); 
     294} 
     295 
    290296function tb_get_url_content($url) 
    291297{ 
     
    454460    global $wpdb, $wp_json; 
    455461 
    456     if (is_array($tweets) || (is_object($tweets) && !version_compare(PHP_VERSION, '5.0.0', '<'))) { 
     462    if (is_object($tweets)) { 
     463        $tweets = (array)$tweets; 
     464    } 
     465     
     466    if (is_array($tweets)) { 
    457467 
    458468        $table_name = $wpdb->prefix . "tweetblender"; 
     
    504514 
    505515    global $wp_json; 
    506  
    507     // if we don't have json class, get the library 
    508     if ( !is_a($wp_json, 'Services_JSON') ) { 
    509         require_once( ABSPATH . WPINC . '/class-json.php' ); 
    510         $wp_json = new Services_JSON(); 
    511     } 
    512516     
    513517    // get options 
     
    727731    return $wpdb->get_row("SELECT id FROM $wpdb->posts WHERE id = $id && post_status = 'publish' && post_type = 'page'", 'ARRAY_N'); 
    728732} 
     733 
     734 
    729735 
    730736function tb_get_archive_post_id() { 
  • tweet-blender/trunk/readme.txt

    r383451 r405242  
    33Tags: sidebar, twitter, tweets, multiple authors, favorites, tweet, tags, lists, hashtags, archive, widget, admin, AJAX, jquery, keywords, BuddyPress, blender 
    44Requires at least: 2.8.0 
    5 Tested up to: 3.1.2 
    6 Stable tag: 3.3.9 
     5Tested up to: 3.2 
     6Stable tag: 3.3.10 
    77Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5907095 
    88 
     
    185185== Changelog == 
    186186 
     187= 3.3.10 = 
     188* Tested with WordPress 3.2 
     189 
    187190= 3.3.9 = 
    188191* Improvement: special workaround for an issue where english and localized labels did not load on some hosts. 
  • tweet-blender/trunk/tweet-blender.php

    r383458 r405242  
    44Plugin URI: http://www.tweetblender.com 
    55Description: Provides several Twitter widgets: show your own tweets, show tweets relevant to post's tags, show tweets for Twitter lists, show tweets for hashtags, show tweets for keyword searches, show favorite tweets. Multiple widgets on the same page are supported. Can combine sources and blend all of them into a single stream. 
    6 Version: 3.3.9 
     6Version: 3.3.10 
    77Author: Kirill Novitchenko 
    88Author URI: http://kirill-novitchenko.com 
     
    131131    $table_name = $wpdb->prefix . "tweetblender"; 
    132132 
    133     // delete tweets that are older than a day 
     133    // delete tweets that are older than predefined period 
    134134    $wpdb->query("DELETE FROM $table_name $where_sql"); 
    135135} 
  • tweet-blender/trunk/widget.php

    r381114 r405242  
    11<?php 
    22 
    3 // version 3.3.6 
     3// version 3.3.10 
    44 
    55class TweetBlender extends WP_Widget { 
     
    2929        if ($post == null || ($post->ID != $archive_post_id && $archive_page_url != "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])) { 
    3030 
    31             echo $before_widget; 
    32             $instance['title'] = trim($instance['title']); 
    33             $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); 
     31            if (isset($before_widget)) { 
     32                echo $before_widget; 
     33            } 
     34             
     35            $title = empty($instance['title']) ? '' : apply_filters('widget_title', trim($instance['title'])); 
    3436            if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; 
    3537             
    3638            $sources = preg_split('/[\n\r]/m',trim($instance['widget_sources'])); 
    3739            $private_sources = array(); 
    38             if ($instance['widget_private_sources'] != '') { 
     40            if (isset($instance['widget_private_sources']) && $instance['widget_private_sources'] != '') { 
    3941                $private_sources = split(',',$instance['widget_private_sources']); 
    4042            } 
     
    6769             
    6870            echo '<div class="tb_footer">'; 
    69             if(!$tb_o['archive_is_disabled']) { 
     71            if(!isset($tb_o['archive_is_disabled'])) { 
    7072                 
    7173                // indicate that using default url 
     
    8486 
    8587            echo '</div>'; 
    86             echo $after_widget; 
     88            if (isset($after_widget)) { 
     89                echo $after_widget; 
     90            } 
    8791        } 
    8892    } 
Note: See TracChangeset for help on using the changeset viewer.