WordPress.org

Plugin Directory

Changeset 590242


Ignore:
Timestamp:
08/25/12 14:37:44 (20 months ago)
Author:
SteveAtty
Message:

Version 2.1.15 - lots of small fixes

Location:
wordbooker
Files:
4 edited
17 copied

Legend:

Unmodified
Added
Removed
  • wordbooker/tags/2.1.15/includes/wordbooker_facebook_curl.php

    r555357 r590242  
    129129    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    130130    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
     131    curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    131132        $response = curl_exec($ch); 
    132133    $err_no=curl_errno($ch); 
     
    149150    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    150151    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
     152    curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    151153        $response = curl_exec($ch); 
    152154    $err_no=curl_errno($ch); 
     
    170172    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    171173    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
     174    curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    172175     curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
    173176        $response = curl_exec($ch); 
  • wordbooker/tags/2.1.15/includes/wordbooker_options.php

    r548667 r590242  
    8989    $wpdb->query($sql); 
    9090    if ( ($wordbooker_settings['wordbooker_comment_cron']=='Never') || ($wordbooker_settings['wordbooker_comment_cron']=='Manual')){} else { 
    91     $dummy=wp_schedule_event(time(), $wordbooker_settings['wordbooker_comment_cron'], 'wb_comment_job');} 
     91    $dummy=wp_schedule_event(current_time( 'timestamp' ), $wordbooker_settings['wordbooker_comment_cron'], 'wb_comment_job');} 
    9292    }  
    9393    //Set some defaults: 
     
    173173        # If the user saved their config after setting permissions or chose to refresh the cache then lets refresh the cache 
    174174        if ( isset ($_POST["perm_save"])) { wordbooker_cache_refresh($user_ID,$fbclient); } 
     175         
     176                 
     177    // Lets poll if they want to - we only poll for this user 
     178        if ( isset($wordbooker_settings["wordbooker_comment_poll"])  && ADVANCED_DEBUG ){ 
     179            $dummy=wordbooker_poll_facebook($user_ID); 
     180        } 
     181        wordbooker_blog_level_options(); 
     182        wordbooker_user_level_options(); 
     183        wordbooker_render_errorlogs(); 
     184        wordbooker_status($user_ID); 
     185        wordbooker_option_status($wbuser); 
     186 
     187        echo "<br /><hr><h3>"; 
     188    _e("Donate", 'wordbooker'); 
     189        echo "</h3>"; 
     190 
     191    if (defined('WORDBOOKER_PREMIUM')) { _e("You're using the Premium options in Wordbooker. You really should contribute something to the support and development of this plugin.  Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a>  list on the web site", 'wordbooker'); 
     192}        
     193    _e("If you've found this extension useful then please feel free to donate to its support and future development. Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a> page on the Website", 'wordbooker');  
     194      ?><br /><br /> 
     195    <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
     196<input type="hidden" name="cmd" value="_s-xclick"> 
     197<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBDfKX9AcMfN/MIo3zwRXAv9YPG2539XZThjHzv6atBFA8tCg7Lz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XfrrWdgRpvnVpDn4A/wvPL0f0FHjkjtM3VTkRp/anX0bkjw==-----END PKCS7----- 
     200"> 
     201<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal — The safer, easier way to pay online."> 
     202<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"> 
     203</form> 
     204<br /><br /><hr><h3> 
     205        <?php 
     206 
     207        wordbooker_option_support(); 
     208?> 
     209    <script type="text/javascript"> 
     210        //<![CDATA[ 
     211        jQuery(document).ready( function($) { 
     212            // close postboxes that should be closed 
     213            $('.if-js-closed').removeClass('if-js-closed').addClass('closed'); 
     214            // postboxes setup 
     215            //save_postboxes_state('<?php echo $wordbooker_hook; ?>'); 
     216            postboxes.add_postbox_toggles('<?php echo $wordbooker_hook; ?>'); 
     217        }); 
     218        //]]> 
     219    </script> 
     220         
     221        <?php 
     222 
     223        } 
     224     else { 
     225        wordbooker_option_setup($wbuser); 
     226        wordbooker_render_errorlogs(); 
     227        wordbooker_option_support(); 
     228    }    
     229 
     230}    
     231 
    175232 
    176233function wordbooker_blog_level_options() { 
     
    740797 
    741798} 
    742          
    743     // Lets poll if they want to - we only poll for this user 
    744         if ( isset($wordbooker_settings["wordbooker_comment_poll"])  && ADVANCED_DEBUG ){ 
    745             $dummy=wordbooker_poll_facebook($user_ID); 
    746         } 
    747         wordbooker_blog_level_options(); 
    748         wordbooker_user_level_options(); 
    749         wordbooker_render_errorlogs(); 
    750         wordbooker_status($user_ID); 
    751         wordbooker_option_status($wbuser); 
    752  
    753         echo "<br /><hr><h3>"; 
    754     _e("Donate", 'wordbooker'); 
    755         echo "</h3>"; 
    756  
    757     if (defined('WORDBOOKER_PREMIUM')) { _e("You're using the Premium options in Wordbooker. You really should contribute something to the support and development of this plugin.  Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a>  list on the web site", 'wordbooker'); 
    758 }        
    759     _e("If you've found this extension useful then please feel free to donate to its support and future development. Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a> page on the Website", 'wordbooker');  
    760       ?><br /><br /> 
    761         <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
    762         <input type="hidden" name="cmd" value="_s-xclick"> 
    763         <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBS1CS6j8gSPzUcHkKZ5UYKF2n97UX8EhSB+QgoExXlfJWLo6S7MJFvuzay0RhJNefA9Y1Jkz8UQahqaR7SuIDBkz0Ys4Mfx6opshuXQqxp17YbZSUlO6zuzdJT4qBny2fNWqutEpXe6GkCopRuOHCvI/Ogxc0QHtIlHT5TKRfpejELMAkGBSsOAwIaBQAwgbwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIitf6nEQBOsSAgZgWnlCfjf2E3Yekw5n9DQrNMDoUZTckFlqkQaLYLwnSYbtKanICptkU2fkRQ3T9tYFMhe1LhAuHVQmbVmZWtPb/djud5uZW6Lp5kREe7c01YtI5GRlK63cAF6kpxDL9JT2GH10Cojt9UF15OH46Q+2V3gu98d0Lad77PXz3V1XY0cto29buKZZRfGG8u9NfpXZjv1utEG2CP6CCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBg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elUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA5MTAyODE0MzM1OVowIwYJKoZIhvcNAQkEMRYEFIf+6qkVI7LG/jPumIrQXIOhI4hJMA0GCSqGSIb3DQEBAQUABIGAdpAB4Mj4JkQ6K44Xxp4Da3GsRCeiLr2LMqrAgzF8jYGgV9zjf7PXxpC8XJTVC7L7oKDtoW442T9ntYj6RM/hSjmRO2iaJq0CAZkz2sPZWvGlnhYrpEB/XB3dhmd2nGhUMSXbtQzZvR7JMVoPR0zxL/X/Hfj6c+uF7BxW8xTSBqw=-----END PKCS7-----"> 
    764         <input type="image" src="https://www.paypal.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online."> 
    765         <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1"> 
    766         </form><br /><br /><hr><h3> 
    767         <?php 
    768  
    769         wordbooker_option_support(); 
    770 ?> 
    771     <script type="text/javascript"> 
    772         //<![CDATA[ 
    773         jQuery(document).ready( function($) { 
    774             // close postboxes that should be closed 
    775             $('.if-js-closed').removeClass('if-js-closed').addClass('closed'); 
    776             // postboxes setup 
    777             //save_postboxes_state('<?php echo $wordbooker_hook; ?>'); 
    778             postboxes.add_postbox_toggles('<?php echo $wordbooker_hook; ?>'); 
    779         }); 
    780         //]]> 
    781     </script> 
    782          
    783         <?php 
    784  
    785         } 
    786      else { 
    787         wordbooker_option_setup($wbuser); 
    788         wordbooker_render_errorlogs(); 
    789         wordbooker_option_support(); 
    790     }    
    791  
    792     }    
    793799 
    794800 
  • wordbooker/tags/2.1.15/readme.txt

    r579402 r590242  
    55Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=8XNJMQCYDJT6U&lc=GB&currency_code=GBP&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted 
    66Requires at least: 2.9 
    7 Tested up to: 3.4 
    8 Stable tag: 2.1.14 
     7Tested up to: 3.4.1 
     8Stable tag: 2.1.15 
    99 
    1010This plugin allows you to cross-post your blog posts to your Facebook Wall and to any Facebook Fan Page / Group that you are an administrator for.  
     
    115115 
    116116== Changelog == 
     117 
     118= Version 2.1.15 25/08/2012 = 
     119- Changes to the PayPal code to use different servers which should speed up load times. 
     120- Added response timing code to the Curl checker to help diagnose performance problems. 
     121- Added a Curl Version diagnostic line 
     122- Added option to Curl initialisation to hopefully make IPv6 enabled servers run faster. 
     123- Changed the way the comment and cache refresh jobs are scheduled to fix potential problems. 
     124- Changed the Avatar handling code to handle Google+ Comments. 
     125- Removed stray debug command which was confusing. 
     126 
    117127 
    118128= Version 2.1.14 30/07/2012 = 
     
    358368 
    359369 
     370== Upgrade Notice == 
     371 
     372= 2.1.15 = 
     373Adds some extra Curl diagnostics and also fixes a problem with Curl running in combined IP6 and IP4 environments. Plus fixed up some other minor bugs. 
  • wordbooker/tags/2.1.15/wordbooker.php

    r579402 r590242  
    66Author: Steve Atty  
    77Author URI: http://wordbooker.tty.org.uk 
    8 Version: 2.1.14 
     8Version: 2.1.15 
    99*/ 
    1010 
     
    3939define('WORDBOOKER_DEBUG', false); 
    4040define('WORDBOOKER_TESTING', false); 
    41 define('WORDBOOKER_CODE_RELEASE',"2.1.14 R00 - One Foot Before The Other"); 
     41define('WORDBOOKER_CODE_RELEASE',"2.1.15 R00 - A Decent Cup of Tea"); 
    4242 
    4343# For Troubleshooting  
     
    488488    } 
    489489    $dummy=wp_clear_scheduled_hook('wb_cron_job'); 
    490     $dummy=wp_schedule_event(time(), 'hourly', 'wb_cron_job'); 
     490    $dummy=wp_schedule_event(current_time( 'timestamp' ), 'hourly', 'wb_cron_job'); 
    491491    #wordbooker_set_option('schema_vers', WORDBOOKER_SCHEMA_VERSION ); 
    492492    wp_cache_flush(); 
     
    827827 
    828828function wordbooker_render_errorlogs() { 
    829     wordbooker_renew_access_token(); 
     829//  wordbooker_renew_access_token(); 
    830830    global $user_ID, $wpdb,$blog_id; 
    831831    $diaglevel=wordbooker_get_option('wordbooker_advanced_diagnostics_level'); 
     
    11101110     else  { 
    11111111        wordbooker_debugger("Everything looks good so lets ask them to refresh "," ",0,99) ; 
     1112        wordbooker_renew_access_token(); 
    11121113            echo __("Wordbooker should now be authorised. Please click on the Reload Page Button",'wordbooker').'<br> <form action="options-general.php?page=wordbooker" method="post">'; 
    11131114        echo '<p style="text-align: center;"><input type="submit" name="perm_save" class="button-primary" value="'. __('Reload Page', 'wordbooker').'" /></p>'; 
     
    12451246    <li><?php _e('Check the Wordbooker ', 'wordbooker'); ?><a href="http://wordbooker.tty.org.uk/faqs/">Wordbooker</a> <?php _e('FAQs', 'wordbooker'); ?></li> 
    12461247    </ul> 
    1247     <br /> 
    1248     <?php _e('Please provide the following information about your installation:', 'wordbooker'); ?> 
    1249     <ul> 
    12501248<?php 
    12511249    $active_plugins = get_option('active_plugins'); 
     
    12711269        $mb_language=mb_language(); 
    12721270    } 
    1273     $curlcontent=__("Curl is not installed",'wordbooker'); 
     1271    $curlstatus=__("Curl is not installed",'wordbooker'); 
    12741272    if (function_exists('curl_init')) { 
    12751273      $ch = curl_init(); 
     
    12801278       curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/includes/fb_ca_chain_bundle.crt'); 
    12811279       curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0'); 
     1280       curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     1281       $mtime = microtime();  
     1282       $mtime = explode(' ', $mtime);  
     1283       $mtime = $mtime[1] + $mtime[0];  
     1284       $starttime = $mtime;  
    12821285       $curlcontent = @curl_exec($ch); 
     1286       $mtime = microtime();  
     1287       $mtime = explode(" ", $mtime);  
     1288       $mtime = $mtime[1] + $mtime[0];  
     1289       $endtime = $mtime;  
     1290       $totaltime = ($endtime - $starttime); 
    12831291       $x=json_decode($curlcontent); 
    12841292       $curlstatus=__("Curl is available but cannot access Facebook - This is a problem (",'wordbooker').curl_errno($ch)." - ". curl_error($ch) ." )"; 
    1285        if ($x->name=="Wordbooker") {$curlstatus=__("Curl is available and can access Facebook - All is OK",'wordbooker');} 
     1293       if ($x->name=="Wordbooker") {$curlstatus=__("Curl is available and can access Facebook - All is OK ( <i> Response Time was :  
     1294        ".$totaltime." seconds </i> )",'wordbooker');} 
     1295     //   print_r(curl_getinfo($ch)); 
     1296    //    echo "<br />"; 
    12861297     curl_close($ch); 
    1287     } 
    1288  
     1298       $curlv2=curl_version(); 
     1299     $curlv=$curlv2['version']; 
     1300    } 
    12891301    $new_wb_table_prefix=$wpdb->base_prefix; 
    12901302    if (isset ($db_prefix) ) { $new_wb_table_prefix=$db_prefix;} 
    12911303    $info = array(   
    12921304        'Wordbooker' => $plug_info['wordbooker/wordbooker.php']['Version'], 
     1305        'Wordbooker Code Base' => WORDBOOKER_CODE_RELEASE, 
    12931306        'Wordbooker ID'=>WORDBOOKER_FB_ID, 
    12941307        'Wordbooker Schema' => $wordbooker_settings['schema_vers'], 
     
    13011314        'JSON Decode' => WORDBOOKER_JSON_DECODE, 
    13021315        'Curl Status' => $curlstatus, 
     1316        'Curl Version' => $curlv, 
    13031317#       'Fopen Status' => $fopenstat2.$fopenstat, 
    13041318        'JSON Version' => $jsonvers, 
     
    13171331        $version_errors['MySQL'] = $mysqlminvers; 
    13181332    } 
    1319  
     1333    echo "<br />"; 
     1334    _e('Please provide the following information about your installation:', 'wordbooker');  
     1335    echo "<ul>"; 
    13201336    foreach ($info as $key => $value) { 
    13211337        $suffix = ''; 
     
    14161432              $og_image=$junk[0]; 
    14171433              if(!isset($og_image)) {$og_image=wp_get_attachment_url($attachment->ID);} 
    1418               wordbooker_debugger("Adding image",$og_image,$postidD,80) ; 
     1434            //  wordbooker_debugger("Adding image",$og_image,$postidD,80) ; 
    14191435     
    14201436        #   $post_content2 .= ' <img src="' . wp_get_attachment_url($attachment->ID) . '"> ';} 
     
    19591975function display_wordbooker_fb_comment() { 
    19601976    global $post; 
    1961     if(!is_single()){return;} 
     1977    if(!is_single || is_front_page() && !is_category() && !is_archive() && !is_home()){return;} 
    19621978    $wordbooker_settings = wordbooker_options();  
    19631979    if (!isset($wordbooker_settings['wordbooker_use_fb_comments'])) { return;} 
     
    27252741function wordbooker_schema($attr) { 
    27262742       # $attr .= " xmlns:fb=\"http://www.facebook.com/2008/fbml\" xmlns:og=\"http://ogp.me/ns#\" "; 
    2727 /* 
    2728     if ( (is_single() || is_page()) && !is_front_page() && !is_category() && !is_home() ) { 
    2729          $attr .=' xmlns:fb="http://ogp.me/ns/fb#" xmlns:article="http://ogp.me/ns/article#"';} 
    2730     else { 
    2731          $attr .= ' xmlns:fb="http://ogp.me/ns#  xmlns:website="http://ogp.me/ns/website#"';} 
    2732 */ 
    2733  
    27342743  if (preg_match('/(prefix\s*=\s*[\"|\'])/i', $attr)) { 
    27352744    $attr = preg_replace('/(prefix\s*=\s*[\"|\'])/i', '${1}" og: http://ogp.me/ns#"', $attr); 
     
    27412750 
    27422751function wordbooker_get_avatar($avatar, $comment, $size="50"){ 
     2752    if (is_null($comment)) {return $avatar;} 
    27432753    $author_url = $comment->comment_author_url; 
    2744     #if(strlen($author_url) < 7) {return $avatar;} 
    2745     #var_dump($author_url); 
    27462754    $fb_id=get_comment_meta($comment->comment_ID,'fb_uid',true); 
    27472755    if (strlen($fb_id)<11) { 
    2748         if(strlen($author_url) < 10) {return $avatar;} 
    2749         $parse_author_url = (parse_url($author_url)); 
    2750         $fb_id_array = explode('/',$parse_author_url['path']); 
    2751         $sizer = count($fb_id_array) -1; 
    2752         $fb_id =  $fb_id_array[$sizer]; 
    2753     } 
    2754     if (strlen($fb_id)>1) { 
    2755         $grav_url= "https://graph.facebook.com/".$fb_id."/picture?type=square"; 
    2756         $avatar = "<img src='".$grav_url."'  height='".$size."' width='".$size."' class='avatar avatar-40 photo' /> "; 
    2757     } 
     2756      if(strlen($author_url) < 11) {return $avatar;} 
     2757      $parse_author_url = (parse_url($author_url)); 
     2758      $fb_id_array = explode('/',$parse_author_url['path']); 
     2759      $sizer = count($fb_id_array) -1; 
     2760      $fb_id =  $fb_id_array[$sizer]; 
     2761      if ($parse_author_url['host']=='plus.google.com') { 
     2762          $grav_url= "https://profiles.google.com/s2/photos/profile/".$fb_id; 
     2763      }  
     2764      if ($parse_author_url['host']=='www.facebook.com') { 
     2765          $grav_url= "https://graph.facebook.com/".$fb_id."/picture?type=square"; 
     2766      } 
     2767    } else 
     2768     { 
     2769    $grav_url= "https://graph.facebook.com/".$fb_id."/picture?type=square"; 
     2770    } 
     2771    $avatar = "<img src='".$grav_url."'  height='".$size."' width='".$size."' class='avatar avatar-40 photo' /> "; 
    27582772    return $avatar; 
    27592773} 
  • wordbooker/trunk/includes/wordbooker_facebook_curl.php

    r555357 r590242  
    129129    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    130130    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
     131    curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    131132        $response = curl_exec($ch); 
    132133    $err_no=curl_errno($ch); 
     
    149150    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    150151    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
     152    curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    151153        $response = curl_exec($ch); 
    152154    $err_no=curl_errno($ch); 
     
    170172    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    171173    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
     174    curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    172175     curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
    173176        $response = curl_exec($ch); 
  • wordbooker/trunk/includes/wordbooker_options.php

    r548667 r590242  
    8989    $wpdb->query($sql); 
    9090    if ( ($wordbooker_settings['wordbooker_comment_cron']=='Never') || ($wordbooker_settings['wordbooker_comment_cron']=='Manual')){} else { 
    91     $dummy=wp_schedule_event(time(), $wordbooker_settings['wordbooker_comment_cron'], 'wb_comment_job');} 
     91    $dummy=wp_schedule_event(current_time( 'timestamp' ), $wordbooker_settings['wordbooker_comment_cron'], 'wb_comment_job');} 
    9292    }  
    9393    //Set some defaults: 
     
    173173        # If the user saved their config after setting permissions or chose to refresh the cache then lets refresh the cache 
    174174        if ( isset ($_POST["perm_save"])) { wordbooker_cache_refresh($user_ID,$fbclient); } 
     175         
     176                 
     177    // Lets poll if they want to - we only poll for this user 
     178        if ( isset($wordbooker_settings["wordbooker_comment_poll"])  && ADVANCED_DEBUG ){ 
     179            $dummy=wordbooker_poll_facebook($user_ID); 
     180        } 
     181        wordbooker_blog_level_options(); 
     182        wordbooker_user_level_options(); 
     183        wordbooker_render_errorlogs(); 
     184        wordbooker_status($user_ID); 
     185        wordbooker_option_status($wbuser); 
     186 
     187        echo "<br /><hr><h3>"; 
     188    _e("Donate", 'wordbooker'); 
     189        echo "</h3>"; 
     190 
     191    if (defined('WORDBOOKER_PREMIUM')) { _e("You're using the Premium options in Wordbooker. You really should contribute something to the support and development of this plugin.  Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a>  list on the web site", 'wordbooker'); 
     192}        
     193    _e("If you've found this extension useful then please feel free to donate to its support and future development. Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a> page on the Website", 'wordbooker');  
     194      ?><br /><br /> 
     195    <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
     196<input type="hidden" name="cmd" value="_s-xclick"> 
     197<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBDfKX9AcMfN/MIo3zwRXAv9YPG2539XZThjHzv6atBFA8tCg7Lz/Lnuvs5/hVySOAOFxad62FClcLQ2djlDshPz8YfbOPiLyf0e9jzWz5v6EhhtOtNBNa//LNurRAJqLkMFob/WZcjL9d3j1ynDCiyN7vGPeCwtul8qb/UtCgBNDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI2KuRoR4yQWGAgaDJlB5NqrXl2gpsFS/XjY3dpkKWUmqSx8Oboax+pJTq3lDgU/uocJDI+DR4N7gzHihxCurN1ndiYyMLpBQOAxA+lykMo4/sxt+JOCFS2/Lu1Jr10zlpJOoH+wu7IOXdSZ8aOx/9zoOfd3pWzFr0+5Qd2jvbBmYZ67nQzUzvvKJ2i0VSPCoyMfs2oCmsq/uGRjjGsQeMAXblD/XMenKG7S6JoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIE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w/ 
     199cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTIwNzMwMjEwNzE1WjAjBgkqhkiG9w0BCQQxFgQUjyiZdenJodpl4JJXZ4/zxjq0MskwDQYJKoZIhvcNAQEBBQAEgYCOoGEs8qymGmzF4DxxsqxFwVlAuATUHuEBG1o1J2Ydy6xDmPtdh4YLmKUpsqcRfCD+riyBi/Aecua2bZLymcQfxuoGS7NxnNQBaqXpYIbSIqTxvrT+chFmzMD/G4iXfrrWdgRpvnVpDn4A/wvPL0f0FHjkjtM3VTkRp/anX0bkjw==-----END PKCS7----- 
     200"> 
     201<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal — The safer, easier way to pay online."> 
     202<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"> 
     203</form> 
     204<br /><br /><hr><h3> 
     205        <?php 
     206 
     207        wordbooker_option_support(); 
     208?> 
     209    <script type="text/javascript"> 
     210        //<![CDATA[ 
     211        jQuery(document).ready( function($) { 
     212            // close postboxes that should be closed 
     213            $('.if-js-closed').removeClass('if-js-closed').addClass('closed'); 
     214            // postboxes setup 
     215            //save_postboxes_state('<?php echo $wordbooker_hook; ?>'); 
     216            postboxes.add_postbox_toggles('<?php echo $wordbooker_hook; ?>'); 
     217        }); 
     218        //]]> 
     219    </script> 
     220         
     221        <?php 
     222 
     223        } 
     224     else { 
     225        wordbooker_option_setup($wbuser); 
     226        wordbooker_render_errorlogs(); 
     227        wordbooker_option_support(); 
     228    }    
     229 
     230}    
     231 
    175232 
    176233function wordbooker_blog_level_options() { 
     
    740797 
    741798} 
    742          
    743     // Lets poll if they want to - we only poll for this user 
    744         if ( isset($wordbooker_settings["wordbooker_comment_poll"])  && ADVANCED_DEBUG ){ 
    745             $dummy=wordbooker_poll_facebook($user_ID); 
    746         } 
    747         wordbooker_blog_level_options(); 
    748         wordbooker_user_level_options(); 
    749         wordbooker_render_errorlogs(); 
    750         wordbooker_status($user_ID); 
    751         wordbooker_option_status($wbuser); 
    752  
    753         echo "<br /><hr><h3>"; 
    754     _e("Donate", 'wordbooker'); 
    755         echo "</h3>"; 
    756  
    757     if (defined('WORDBOOKER_PREMIUM')) { _e("You're using the Premium options in Wordbooker. You really should contribute something to the support and development of this plugin.  Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a>  list on the web site", 'wordbooker'); 
    758 }        
    759     _e("If you've found this extension useful then please feel free to donate to its support and future development. Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a> page on the Website", 'wordbooker');  
    760       ?><br /><br /> 
    761         <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
    762         <input type="hidden" name="cmd" value="_s-xclick"> 
    763         <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBS1CS6j8gSPzUcHkKZ5UYKF2n97UX8EhSB+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oPR0zxL/X/Hfj6c+uF7BxW8xTSBqw=-----END PKCS7-----"> 
    764         <input type="image" src="https://www.paypal.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online."> 
    765         <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1"> 
    766         </form><br /><br /><hr><h3> 
    767         <?php 
    768  
    769         wordbooker_option_support(); 
    770 ?> 
    771     <script type="text/javascript"> 
    772         //<![CDATA[ 
    773         jQuery(document).ready( function($) { 
    774             // close postboxes that should be closed 
    775             $('.if-js-closed').removeClass('if-js-closed').addClass('closed'); 
    776             // postboxes setup 
    777             //save_postboxes_state('<?php echo $wordbooker_hook; ?>'); 
    778             postboxes.add_postbox_toggles('<?php echo $wordbooker_hook; ?>'); 
    779         }); 
    780         //]]> 
    781     </script> 
    782          
    783         <?php 
    784  
    785         } 
    786      else { 
    787         wordbooker_option_setup($wbuser); 
    788         wordbooker_render_errorlogs(); 
    789         wordbooker_option_support(); 
    790     }    
    791  
    792     }    
    793799 
    794800 
  • wordbooker/trunk/readme.txt

    r579402 r590242  
    55Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=8XNJMQCYDJT6U&lc=GB&currency_code=GBP&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted 
    66Requires at least: 2.9 
    7 Tested up to: 3.4 
    8 Stable tag: 2.1.14 
     7Tested up to: 3.4.1 
     8Stable tag: 2.1.15 
    99 
    1010This plugin allows you to cross-post your blog posts to your Facebook Wall and to any Facebook Fan Page / Group that you are an administrator for.  
     
    115115 
    116116== Changelog == 
     117 
     118= Version 2.1.15 25/08/2012 = 
     119- Changes to the PayPal code to use different servers which should speed up load times. 
     120- Added response timing code to the Curl checker to help diagnose performance problems. 
     121- Added a Curl Version diagnostic line 
     122- Added option to Curl initialisation to hopefully make IPv6 enabled servers run faster. 
     123- Changed the way the comment and cache refresh jobs are scheduled to fix potential problems. 
     124- Changed the Avatar handling code to handle Google+ Comments. 
     125- Removed stray debug command which was confusing. 
     126 
    117127 
    118128= Version 2.1.14 30/07/2012 = 
     
    358368 
    359369 
     370== Upgrade Notice == 
     371 
     372= 2.1.15 = 
     373Adds some extra Curl diagnostics and also fixes a problem with Curl running in combined IP6 and IP4 environments. Plus fixed up some other minor bugs. 
  • wordbooker/trunk/wordbooker.php

    r579402 r590242  
    66Author: Steve Atty  
    77Author URI: http://wordbooker.tty.org.uk 
    8 Version: 2.1.14 
     8Version: 2.1.15 
    99*/ 
    1010 
     
    3939define('WORDBOOKER_DEBUG', false); 
    4040define('WORDBOOKER_TESTING', false); 
    41 define('WORDBOOKER_CODE_RELEASE',"2.1.14 R00 - One Foot Before The Other"); 
     41define('WORDBOOKER_CODE_RELEASE',"2.1.15 R00 - A Decent Cup of Tea"); 
    4242 
    4343# For Troubleshooting  
     
    488488    } 
    489489    $dummy=wp_clear_scheduled_hook('wb_cron_job'); 
    490     $dummy=wp_schedule_event(time(), 'hourly', 'wb_cron_job'); 
     490    $dummy=wp_schedule_event(current_time( 'timestamp' ), 'hourly', 'wb_cron_job'); 
    491491    #wordbooker_set_option('schema_vers', WORDBOOKER_SCHEMA_VERSION ); 
    492492    wp_cache_flush(); 
     
    827827 
    828828function wordbooker_render_errorlogs() { 
    829     wordbooker_renew_access_token(); 
     829//  wordbooker_renew_access_token(); 
    830830    global $user_ID, $wpdb,$blog_id; 
    831831    $diaglevel=wordbooker_get_option('wordbooker_advanced_diagnostics_level'); 
     
    11101110     else  { 
    11111111        wordbooker_debugger("Everything looks good so lets ask them to refresh "," ",0,99) ; 
     1112        wordbooker_renew_access_token(); 
    11121113            echo __("Wordbooker should now be authorised. Please click on the Reload Page Button",'wordbooker').'<br> <form action="options-general.php?page=wordbooker" method="post">'; 
    11131114        echo '<p style="text-align: center;"><input type="submit" name="perm_save" class="button-primary" value="'. __('Reload Page', 'wordbooker').'" /></p>'; 
     
    12451246    <li><?php _e('Check the Wordbooker ', 'wordbooker'); ?><a href="http://wordbooker.tty.org.uk/faqs/">Wordbooker</a> <?php _e('FAQs', 'wordbooker'); ?></li> 
    12461247    </ul> 
    1247     <br /> 
    1248     <?php _e('Please provide the following information about your installation:', 'wordbooker'); ?> 
    1249     <ul> 
    12501248<?php 
    12511249    $active_plugins = get_option('active_plugins'); 
     
    12711269        $mb_language=mb_language(); 
    12721270    } 
    1273     $curlcontent=__("Curl is not installed",'wordbooker'); 
     1271    $curlstatus=__("Curl is not installed",'wordbooker'); 
    12741272    if (function_exists('curl_init')) { 
    12751273      $ch = curl_init(); 
     
    12801278       curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/includes/fb_ca_chain_bundle.crt'); 
    12811279       curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0'); 
     1280       curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     1281       $mtime = microtime();  
     1282       $mtime = explode(' ', $mtime);  
     1283       $mtime = $mtime[1] + $mtime[0];  
     1284       $starttime = $mtime;  
    12821285       $curlcontent = @curl_exec($ch); 
     1286       $mtime = microtime();  
     1287       $mtime = explode(" ", $mtime);  
     1288       $mtime = $mtime[1] + $mtime[0];  
     1289       $endtime = $mtime;  
     1290       $totaltime = ($endtime - $starttime); 
    12831291       $x=json_decode($curlcontent); 
    12841292       $curlstatus=__("Curl is available but cannot access Facebook - This is a problem (",'wordbooker').curl_errno($ch)." - ". curl_error($ch) ." )"; 
    1285        if ($x->name=="Wordbooker") {$curlstatus=__("Curl is available and can access Facebook - All is OK",'wordbooker');} 
     1293       if ($x->name=="Wordbooker") {$curlstatus=__("Curl is available and can access Facebook - All is OK ( <i> Response Time was :  
     1294        ".$totaltime." seconds </i> )",'wordbooker');} 
     1295     //   print_r(curl_getinfo($ch)); 
     1296    //    echo "<br />"; 
    12861297     curl_close($ch); 
    1287     } 
    1288  
     1298       $curlv2=curl_version(); 
     1299     $curlv=$curlv2['version']; 
     1300    } 
    12891301    $new_wb_table_prefix=$wpdb->base_prefix; 
    12901302    if (isset ($db_prefix) ) { $new_wb_table_prefix=$db_prefix;} 
    12911303    $info = array(   
    12921304        'Wordbooker' => $plug_info['wordbooker/wordbooker.php']['Version'], 
     1305        'Wordbooker Code Base' => WORDBOOKER_CODE_RELEASE, 
    12931306        'Wordbooker ID'=>WORDBOOKER_FB_ID, 
    12941307        'Wordbooker Schema' => $wordbooker_settings['schema_vers'], 
     
    13011314        'JSON Decode' => WORDBOOKER_JSON_DECODE, 
    13021315        'Curl Status' => $curlstatus, 
     1316        'Curl Version' => $curlv, 
    13031317#       'Fopen Status' => $fopenstat2.$fopenstat, 
    13041318        'JSON Version' => $jsonvers, 
     
    13171331        $version_errors['MySQL'] = $mysqlminvers; 
    13181332    } 
    1319  
     1333    echo "<br />"; 
     1334    _e('Please provide the following information about your installation:', 'wordbooker');  
     1335    echo "<ul>"; 
    13201336    foreach ($info as $key => $value) { 
    13211337        $suffix = ''; 
     
    14161432              $og_image=$junk[0]; 
    14171433              if(!isset($og_image)) {$og_image=wp_get_attachment_url($attachment->ID);} 
    1418               wordbooker_debugger("Adding image",$og_image,$postidD,80) ; 
     1434            //  wordbooker_debugger("Adding image",$og_image,$postidD,80) ; 
    14191435     
    14201436        #   $post_content2 .= ' <img src="' . wp_get_attachment_url($attachment->ID) . '"> ';} 
     
    19591975function display_wordbooker_fb_comment() { 
    19601976    global $post; 
    1961     if(!is_single()){return;} 
     1977    if(!is_single || is_front_page() && !is_category() && !is_archive() && !is_home()){return;} 
    19621978    $wordbooker_settings = wordbooker_options();  
    19631979    if (!isset($wordbooker_settings['wordbooker_use_fb_comments'])) { return;} 
     
    27252741function wordbooker_schema($attr) { 
    27262742       # $attr .= " xmlns:fb=\"http://www.facebook.com/2008/fbml\" xmlns:og=\"http://ogp.me/ns#\" "; 
    2727 /* 
    2728     if ( (is_single() || is_page()) && !is_front_page() && !is_category() && !is_home() ) { 
    2729          $attr .=' xmlns:fb="http://ogp.me/ns/fb#" xmlns:article="http://ogp.me/ns/article#"';} 
    2730     else { 
    2731          $attr .= ' xmlns:fb="http://ogp.me/ns#  xmlns:website="http://ogp.me/ns/website#"';} 
    2732 */ 
    2733  
    27342743  if (preg_match('/(prefix\s*=\s*[\"|\'])/i', $attr)) { 
    27352744    $attr = preg_replace('/(prefix\s*=\s*[\"|\'])/i', '${1}" og: http://ogp.me/ns#"', $attr); 
     
    27412750 
    27422751function wordbooker_get_avatar($avatar, $comment, $size="50"){ 
     2752    if (is_null($comment)) {return $avatar;} 
    27432753    $author_url = $comment->comment_author_url; 
    2744     #if(strlen($author_url) < 7) {return $avatar;} 
    2745     #var_dump($author_url); 
    27462754    $fb_id=get_comment_meta($comment->comment_ID,'fb_uid',true); 
    27472755    if (strlen($fb_id)<11) { 
    2748         if(strlen($author_url) < 10) {return $avatar;} 
    2749         $parse_author_url = (parse_url($author_url)); 
    2750         $fb_id_array = explode('/',$parse_author_url['path']); 
    2751         $sizer = count($fb_id_array) -1; 
    2752         $fb_id =  $fb_id_array[$sizer]; 
    2753     } 
    2754     if (strlen($fb_id)>1) { 
    2755         $grav_url= "https://graph.facebook.com/".$fb_id."/picture?type=square"; 
    2756         $avatar = "<img src='".$grav_url."'  height='".$size."' width='".$size."' class='avatar avatar-40 photo' /> "; 
    2757     } 
     2756      if(strlen($author_url) < 11) {return $avatar;} 
     2757      $parse_author_url = (parse_url($author_url)); 
     2758      $fb_id_array = explode('/',$parse_author_url['path']); 
     2759      $sizer = count($fb_id_array) -1; 
     2760      $fb_id =  $fb_id_array[$sizer]; 
     2761      if ($parse_author_url['host']=='plus.google.com') { 
     2762          $grav_url= "https://profiles.google.com/s2/photos/profile/".$fb_id; 
     2763      }  
     2764      if ($parse_author_url['host']=='www.facebook.com') { 
     2765          $grav_url= "https://graph.facebook.com/".$fb_id."/picture?type=square"; 
     2766      } 
     2767    } else 
     2768     { 
     2769    $grav_url= "https://graph.facebook.com/".$fb_id."/picture?type=square"; 
     2770    } 
     2771    $avatar = "<img src='".$grav_url."'  height='".$size."' width='".$size."' class='avatar avatar-40 photo' /> "; 
    27582772    return $avatar; 
    27592773} 
Note: See TracChangeset for help on using the changeset viewer.