WordPress.org

Plugin Directory

Changeset 539162


Ignore:
Timestamp:
05/02/12 20:10:50 (3 years ago)
Author:
SteveAtty
Message:

Version 2.1.9 - lots of little changes and new access token support

Location:
wordbooker
Files:
16 edited
8 copied

Legend:

Unmodified
Added
Removed
  • wordbooker/tags/2.1.9/includes/wordbooker_comments.php

    r508474 r539162  
    7373        continue ; 
    7474    } 
    75     $sql="select comment_ID from ".$wpdb->comments." where comment_post_id=".$row->wp_post_id." and comment_approved=1 and comment_id not in (select wp_comment_id from ".WORDBOOKER_POSTCOMMENTS." where  wp_post_id=".$row->wp_post_id." and fb_post_id='".$row->fb_post_id."' and user_id=".$user_id.") and comment_post_id in (select ID from ".$wpdb->posts." WHERE comment_status='open')"; 
     75    $sql="select comment_ID from ".$wpdb->comments." where comment_post_id=".$row->wp_post_id." and comment_approved=1 and comment_id not in (select wp_comment_id from ".WORDBOOKER_POSTCOMMENTS." where  wp_post_id=".$row->wp_post_id." and fb_post_id='".$row->fb_post_id."' and user_id=".$user_id." and comment_post_id in (select ID from ".$wpdb->posts." WHERE comment_status='open'))"; 
    7676    if ($close_comments==1) { $sql.="and comment_post_id in (select ID from ".$wpdb->posts." WHERE post_date > DATE_SUB( CURDATE( ) , INTERVAL ".$close_days_old."  
    7777DAY ))";} 
  • wordbooker/tags/2.1.9/includes/wordbooker_cron.php

    r509677 r539162  
    232232*/ 
    233233        $fb_status_info=wordbooker_status_feed($suid,$wbuser2->access_token); 
     234        #var_dump($fb_status_info); 
    234235        foreach($fb_status_info->data as $fbstat) { 
    235236            if(!is_null($fbstat->message)){ 
     
    246247        wordbooker_debugger("Setting Status Name as  : ",mysql_real_escape_string($fb_profile_info->name),-1,9) ; 
    247248        $sql="insert into ".WORDBOOKER_USERSTATUS." set name='".mysql_real_escape_string($fb_profile_info->name)."'"; 
    248             if (isset($status_time)) { 
    249                 if (stristr($status_message,"[[PV]]")) { 
    250                     wordbooker_debugger("Found [[PV]] - not updating status"," ",-1,9); 
    251                 }  
    252                 else { 
    253                     wordbooker_debugger("Setting status as  : ",mysql_real_escape_string($status_message),-1,9) ; 
    254                     $sql.=", status='".mysql_real_escape_string($status_message)."'"; 
    255                     $sql.=", updated=".mysql_real_escape_string(strtotime($status_time)); 
    256                 } 
    257         } else {wordbooker_debugger("Failed to get Status information from FB"," ",-1,9); } 
     249        if (isset($status_time)) { 
     250            if (stristr($status_message,"[[PV]]")) { 
     251                wordbooker_debugger("Found [[PV]] - not updating status"," ",-1,9); 
     252            }  
     253            else { 
     254                wordbooker_debugger("Setting status as  : ",mysql_real_escape_string($status_message),-1,9) ; 
     255                $sql.=", status='".mysql_real_escape_string($status_message)."'"; 
     256                $sql.=", updated=".mysql_real_escape_string(strtotime($status_time)); 
     257            } 
     258        } 
     259        else { 
     260            wordbooker_debugger("Failed to get Status information from FB"," ",-1,9);  
     261        } 
    258262 
    259263        wordbooker_debugger("Setting Status URL as  : ",mysql_real_escape_string($fb_profile_info->link),-1,9) ; 
  • wordbooker/tags/2.1.9/includes/wordbooker_facebook_curl.php

    r505615 r539162  
    7575function wordbooker_status_feed($fb_id,$access_token) { 
    7676    if (!isset($fb_id)){$fb_id='me';} 
    77         $url = 'https://graph.facebook.com/'.$fb_id.'/feed/?access_token='.$access_token.'&format=JSON'; 
     77        $url = 'https://graph.facebook.com/'.$fb_id.'/feed/?access_token='.$access_token.'&format=JSON&limit=20'; 
    7878    $x=wordbooker_make_curl_call($url); 
     79    #var_dump($x); 
    7980        return($x); 
    8081} 
  • wordbooker/tags/2.1.9/includes/wordbooker_fb_widget.php

    r505615 r539162  
    7676        $fanpages=unserialize(stripslashes($instance['fanpages'])); 
    7777        $url=$fanpages[$instance['pid']]; 
     78        echo "<!-- Wordbooker FB like box widget -->"; 
    7879        if ( (!isset($wordbooker_settings['wordbooker_like_button_show']) && !isset($wordbooker_settings['wordbooker_like_share_too'])) || isset($wordbooker_settings['wordbooker_iframe'])) { 
    79     echo'<iframe src="http://www.facebook.com/plugins/likebox.php?href='.urlencode($url).'&amp;width='.$width.'&amp;colorscheme='.$scheme.'&amp;show_faces='.$faces.'&amp;border_color=%23'.$border_colour.'&amp;stream='.$stream.'&amp;header='.$header.'&amp;height='.$height.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$width.'px; height:'.$height.'px;" allowTransparency="true"></iframe>'; 
     80    echo'<iframe src="http://www.facebook.com/plugins/likebox.php?href='.urlencode(strtolower($url)).'&amp;width='.$width.'&amp;colorscheme='.$scheme.'&amp;show_faces='.$faces.'&amp;border_color=%23'.$border_colour.'&amp;stream='.$stream.'&amp;header='.$header.'&amp;height='.$height.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$width.'px; height:'.$height.'px;" allowTransparency="true"></iframe>'; 
    8081        } 
    8182        else { 
    82         echo '<fb:like-box href="'.$url.'" width="'.$width.'" height="'.$height.'"  colorscheme="'.$scheme.'" show_faces="'.$faces.'" border_color="#'.$border_colour.'" stream="'.$stream.'" header="'.$header.'"></fb:like-box>'; 
     83        echo '<fb:like-box href="'.strtolower($url).'" width="'.$width.'" height="'.$height.'"  colorscheme="'.$scheme.'" show_faces="'.$faces.'" border_color="#'.$border_colour.'" stream="'.$stream.'" header="'.$header.'"></fb:like-box>'; 
    8384        }    
    8485    #   echo '<br /><div class="fb-add-to-timeline" data-show-faces="true" data-mode="button"></div>'; 
     
    113114        $result = wordbooker_get_cache($user_ID,'pages',1); 
    114115        $fanpages=unserialize($result->pages); 
    115         $xx=array('id'=>'FW:254577506873','name'=>'Wordbooker','url'=>'http://www.facebook.com/Wordbooker'); 
     116        $xx=array('id'=>'FW:254577506873','name'=>'Wordbooker','url'=>'http://www.facebook.com/wordbooker'); 
    116117        $fanpages[]=$xx; 
    117118        $default = array( 'title' => __('Fan Page','wordbooker'), 'snorl'=>$user_ID, 'dname'=>'', 'pid'=>'254577506873', 'stream'=>'false', 'connections'=>6, 'width'=>188, 'height'=>260, 'header'=>'false', 'scheme'=>'light' ); 
  • wordbooker/tags/2.1.9/includes/wordbooker_options.php

    r509677 r539162  
    178178 
    179179        add_meta_box('wb_opt1', __('General Posting Options','wordbooker'),  'wordbooker_blog_posting_options', $wordbooker_hook, 'normal', 'core'); 
    180         add_meta_box('wb_opt2', __('Facebook Like and Share Options','wordbooker'),   'wordbooker_blog_facebook_options', $wordbooker_hook, 'normal', 'core'); 
     180        add_meta_box('wb_opt2', __('Facebook Like and Send Options','wordbooker'),   'wordbooker_blog_facebook_options', $wordbooker_hook, 'normal', 'core'); 
    181181        add_meta_box('wb_opt3', __('Comment Handling Options', 'wordbooker'),  'wordbooker_blog_comment_options', $wordbooker_hook, 'normal', 'core'); 
    182182        add_meta_box('wb_opt4', __('Advanced Options','wordbooker'),   'wordbooker_blog_advanced_options', $wordbooker_hook, 'normal', 'core'); 
     
    245245 
    246246                echo '<label for="wb_extract_length">'.__('Length of Extract', 'wordbooker').' :</label> <select id="wordbooker_extract_length" name="wordbooker_settings[wordbooker_extract_length]"  >'; 
    247             $arr = array(10=> "10",20=> "20",50=> "50",100=> "100",120=> "120",150=> "150",175=> "175",200=> "200",  250=> "250", 256=>__("256 (Default) ", 'wordbooker'), 270=>"270", 300=>"300", 350 => "350",400 => "400",500 => "500",600 => "600",700 => "700",800 => "800",900 => "900"); 
     247            $arr = array(10=> "10",20=> "20",50=> "50",100=> "100",120=> "120",150=> "150",175=> "175",200=> "200",  250=> "250", 256=>__("256 (Default) ", 'wordbooker'), 270=>"270", 300=>"300", 350 => "350",400 => "400",500 => "500",600 => "600",700 => "700",800 => "800",900 => "900",1000 => "1000",2000 => "2000",4000 => "4000",8000 => "8000"); 
    248248                foreach ($arr as $i => $value) { 
    249249                        if ($i==$wordbooker_settings['wordbooker_extract_length']){ print '<option selected="yes" value="'.$i.'" >'.$arr[$i].'</option>';} 
     
    283283        $fblike_faces=array('false'=>__('No','wordbooker'),'true'=>__('Yes','wordbooker')); 
    284284        $fblike_location=array('top'=>__('Above Post ','wordbooker'),'bottom'=>__('Below Post','wordbooker'),'coded'=>__('Defined by theme template','wordbooker'),'tagged'=>__('Defined by Tag in post','wordbooker')); 
     285        $fblike_align=array('right'=>__('Right Side','wordbooker'),'left'=>__('Left Side','wordbooker'),'coded'=>__('Defined by theme template','wordbooker'),'tagged'=>__('Defined by Tag in post','wordbooker')); 
    285286        $checked_flag=array('on'=>'checked','off'=>''); 
    286287        $fblike_send=array('false'=>__('No','wordbooker'),'true'=>__('Yes','wordbooker')); 
     
    314315        echo "</select><br />"; 
    315316 
     317        echo '<label for="wb_fblike_align">&nbsp;'.__('Facebook Like - Align Button ', 'wordbooker').' :</label> <select id="wordbooker_fblike_align" name="wordbooker_settings[wordbooker_fblike_align]"  >'; 
     318        foreach ($fblike_align as $i => $value) { 
     319            if ($i==$wordbooker_settings['wordbooker_fblike_align']){ print '<option selected="yes" value="'.$i.'" >'.$fblike_align[$i].'</option>';} 
     320               else {print '<option value="'.$i.'" >'.$fblike_align[$i].'</option>';}} 
     321        echo "</select><br />"; 
     322 
     323 
    316324        echo '<label for="wb_fblike_action">&nbsp;'.__('Facebook Like - Verb to Display', 'wordbooker').' :</label> <select id="wordbooker_fblike_action" name="wordbooker_settings[wordbooker_fblike_action]"  >'; 
    317325        foreach ($fblike_action as $i => $value) { 
     
    357365        echo "</select><br /><hr><br />"; 
    358366 
    359      
     367/*   
    360368        echo '<label for="wb_facebook_like_share">'.__("Include a Facebook Share button in blog", 'wordbooker'). ' : </label>'; 
    361369        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_like_share_too]" '.$checked_flag[$wordbooker_settings["wordbooker_like_share_too"]].' ><br />'; 
     
    382390        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_no_share_stick]" '.$checked_flag[$wordbooker_settings["wordbooker_no_share_stick"]].' ><br />'; 
    383391        echo "<hr><br />"; 
     392 
     393*/ 
    384394        echo '<label for="wb_facebook_gravatars">'.__("Do not replace Gravtars with Facebook Photos", 'wordbooker'). ' : </label>'; 
    385395        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_no_facebook_gravatars]" '.$checked_flag[$wordbooker_settings["wordbooker_no_facebook_gravatars"]].' ><br />'; 
     
    535545        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_fb_disable_og]" '.$checked_flag[$wordbooker_settings["wordbooker_fb_disable_og"]].' ></P><p>'; 
    536546 
     547        echo '<label for="wb_wordbooker_disable_ogtags">'.__("Disable Facebook API initialisation", 'wordbooker'). ' : </label>'; 
     548        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_fb_disable_api]" '.$checked_flag[$wordbooker_settings["wordbooker_fb_disable_api"]].' ></P><p>'; 
     549 
    537550        echo '<label for="wb_fake_publish">'.__("Only Pretend to Publish on Facebook - TEST MODE", 'wordbooker'). ' : </label>'; 
    538551        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_fake_publish]" '.$checked_flag[$wordbooker_settings["wordbooker_fake_publish"]].' /></P><p>'; 
     
    552565        $wordbookeruser_settings=get_usermeta($user_ID,$wordbooker_user_settings_id); 
    553566        # Set a couple of options that we really need. 
     567        if( !isset($wordbookeruser_settings['wordbooker_primary_type'])) {$wordbookeruser_settings['wordbooker_primary_type']=1;} 
     568        if( !isset($wordbookeruser_settings['wordbooker_secondary_type'])) {$wordbookeruser_settings['wordbooker_secondary_type']=1;} 
    554569        if( !isset($wordbookeruser_settings['wordbooker_orandpage'])) {$wordbookeruser_settings['wordbooker_orandpage']=2;} 
    555570        if( !isset($wordbookeruser_settings['wordbooker_publish_default'])) {$wordbookeruser_settings['wordbooker_publish_default']=$wordbooker_settings['wordbooker_publish_default'];} 
     
    594609        $fanpages2=$fanpages; 
    595610        $fanpages[]=array( 'id'=>'PW:'.$wb_users[0]->facebook_id, 'name'=>"Personal Wall"); 
     611        $arr = array(1=> __("As a Wall Post", 'wordbooker'),  2=> __("As a Note", 'wordbooker'), 3=> __("As a Status Update" , 'wordbooker'), 4=> __("As a Link" , 'wordbooker')   ); 
    596612        if(!isset ($wordbookeruser_settings["wordbooker_primary_target"])) { $wordbookeruser_settings["wordbooker_primary_target"]='PW:'.$wb_users[0]->facebook_id;} 
    597613        $have_fan_pages=0; 
    598         if (count($fanpages)>1){ 
     614        if (count($fanpages)>=1){ 
    599615    echo '<p><label for="wb_primary_target">'.__('Post to the following Wall', 'wordbooker').' : </label>'; 
    600616        echo '<select id="wordbooker_primary_target" name="wordbooker_primary_target"  >'; 
     
    609625            echo $option; 
    610626            echo '</select> &nbsp;'; 
    611         $arr = array(1=> __("As a Wall Post", 'wordbooker'),  2=> __("As a Note", 'wordbooker'), 3=> __("As a Status Update" , 'wordbooker'), 4=> __("As a Link" , 'wordbooker')   ); 
    612627    echo '<select id="wordbooker_primary_type" name="wordbooker_primary_type"  >'; 
    613628    foreach ($arr as $i => $value) { 
  • wordbooker/tags/2.1.9/includes/wordbooker_posting.php

    r508474 r539162  
    2626 */ 
    2727 
    28 function wordbooker_wall_post($post_id,$access_token,$post_title,$post_data,$target_id,$dummy,$target_name){ 
     28function wordbooker_wall_post($post_id,$access_token,$post_title,$post_data,$target_id,$dummy,$target_name,$wpuserid){ 
    2929    if (isset($dummy)) {     
    3030        wordbooker_debugger("Wall Post to ".$target_name." Test Only",'No Post Made',$post_id,90) ; 
     
    3535try { 
    3636        $result = wordbooker_fb_stream_pubish($post_data,$target_id); 
    37         wordbooker_store_post_result($post_id,$result->id ); 
     37        wordbooker_store_post_result($post_id,$result->id,$wpuserid); 
    3838        wordbooker_debugger("Wall Post to ".$target_name." Succeeded - result : ",$result->id,$post_id,90) ; 
    3939        } 
     
    4646} 
    4747 
    48 function wordbooker_link_post($post_id,$access_token,$post_title,$post_data,$target_id,$dummy,$target_name){ 
     48function wordbooker_link_post($post_id,$access_token,$post_title,$post_data,$target_id,$dummy,$target_name,$wpuserid){ 
    4949    if (isset($dummy)) {     
    5050        wordbooker_debugger("Link Post to ".$target_name." Test Only",'No Post Made',$post_id,90) ; 
     
    5757try { 
    5858        $result = wordbooker_fb_link_publish($post_data2,$target_id); 
    59         wordbooker_store_post_result($post_id,$result->id ); 
     59        wordbooker_store_post_result($post_id,$result->id,$wpuserid); 
    6060        wordbooker_debugger("Link Post to ".$target_name." Succeeded - result : ",$result->id,$post_id,90) ; 
    6161        } 
     
    6767    } 
    6868} 
    69 function wordbooker_status_update($post_id,$access_token,$post_date,$target_id,$dummy,$target_name) { 
     69function wordbooker_status_update($post_id,$access_token,$post_date,$target_id,$dummy,$target_name,$wpuserid) { 
    7070    global $wordbooker_post_options,$user_ID; 
    7171    wordbooker_debugger("Setting status_text".$wordbooker_post_options['wordbooker_status_update_text']," ",$post_id) ;  
     
    8080    try { 
    8181        $result = wordbooker_fb_status_update($data,$target_id); 
    82         wordbooker_store_post_result($post_id,$result->id ); 
     82        wordbooker_store_post_result($post_id,$result->id,$wpuserid); 
    8383        wordbooker_debugger("Status update  to ".$target_name." suceeded result : ",$result->id,$post_id,90) ; 
    8484        } 
     
    9191} 
    9292 
    93 function wordbooker_notes_post($post_id,$access_token,$post_title,$target_id,$dummy,$target_name){ 
     93function wordbooker_notes_post($post_id,$access_token,$post_title,$target_id,$dummy,$target_name,$wpuserid){ 
    9494    if (isset($dummy)) {     
    9595        wordbooker_debugger("Notes publish  to ".$target_name." Test Only",'No Post Made',$post_id,90) ; 
     
    104104    try { 
    105105        $result = wordbooker_fb_note_publish($data,$target_id); 
    106         wordbooker_store_post_result($post_id,$result->id); 
     106        wordbooker_store_post_result($post_id,$result->id,$wpuserid); 
    107107        wordbooker_debugger("Note Publish to ".$target_name." result : ",$result->id,$post_id,90) ; 
    108108    }    
     
    116116 
    117117 
    118 function wordbooker_store_post_result($post_id,$fb_post_id) { 
     118function wordbooker_store_post_result($post_id,$fb_post_id,$wpuserid) { 
    119119    global $wpdb,$blog_id,$user_ID; 
    120120    $tstamp=time(); 
    121121    $wordbooker_settings = wordbooker_options(); 
    122     $sql=   ' INSERT INTO ' . WORDBOOKER_POSTCOMMENTS . ' (fb_post_id,comment_timestamp,wp_post_id,blog_id,user_id) VALUES ("'.$fb_post_id.'",'.$tstamp.','.$post_id.','.$blog_id.','.$user_ID.')'; 
     122    $sql=   ' INSERT INTO ' . WORDBOOKER_POSTCOMMENTS . ' (fb_post_id,comment_timestamp,wp_post_id,blog_id,user_id) VALUES ("'.$fb_post_id.'",'.$tstamp.','.$post_id.','.$blog_id.','.$wpuserid.')'; 
    123123    $result = $wpdb->query($sql); 
    124124    wordbooker_insert_into_postlogs($post_id,$blog_id); 
  • wordbooker/tags/2.1.9/includes/wordbooker_posting_options.php

    r505615 r539162  
    3939    if  ($wordbooker_settings["wordbooker_default_author"] == 0 ) {$wb_user_id=$user_ID;} else {$wb_user_id=$wordbooker_settings["wordbooker_default_author"];} 
    4040    $wordbooker_user_settings_id="wordbookuser".$blog_id; 
     41     
    4142    # We need to do some more checking here. If the user does not have an entry in the wordbooker user table then we should get the user options for the user set as the default user. 
    4243    $wordbookuser=get_usermeta($wb_user_id,$wordbooker_user_settings_id); 
     
    6162        $wordbooker_settings=$post_meta; 
    6263    } 
     64    if( !isset($wordbooker_settings['wordbooker_primary_type'])) {$wordbooker_settings['wordbooker_primary_type']=1;} 
     65    if( !isset($wordbooker_settings['wordbooker_secondary_type'])) {$wordbooker_settings['wordbooker_secondary_type']=1;} 
    6366    $post_pub_prompt=__("Publish this post to Facebook", 'wordbooker'); 
    6467    if($post->post_type=='page'){ 
     
    8992        $fanpages[]=array( 'id'=>'PW:'.$wb_users[0]->facebook_id, 'name'=>__("Personal Wall",'wordbooker')); 
    9093        $have_fan_pages=0; 
    91  
     94        $arr = array(1=> __("As a Wall Post", 'wordbooker'),  2=> __("As a Note", 'wordbooker'), 3=> __("As a Status Update" , 'wordbooker'), 4=> __("As a Link" , 'wordbooker')   ); 
    9295        # If the post has already been published then we uncheck the publish option  
    9396        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_publish_default" '.$checked_flag[$wordbooker_settings["wordbooker_publish_default"]].' > '.$post_pub_prompt.'<br />'; 
     
    105108            echo $option; 
    106109            echo '</select> &nbsp;'; 
    107     $arr = array(1=> __("As a Wall Post", 'wordbooker'),  2=> __("As a Note", 'wordbooker'), 3=> __("As a Status Update" , 'wordbooker'), 4=> __("As a Link" , 'wordbooker')   ); 
    108110    echo '<select id="wordbooker_primary_type" name="wordbooker_primary_type"  >'; 
    109111    foreach ($arr as $i => $value) { 
     
    118120    echo '<p><label for="wb_primary_target">'.__('Post to my Personal Wall', 'wordbooker').' : </label> '; 
    119121    echo '<input type="hidden" name="wordbooker_primary_target" value="PW:'.$wb_users[0]->facebook_id.'" />'; 
    120  
    121 $arr = array(1=> __("As a Wall Post", 'wordbooker'),  2=> __("As a Note", 'wordbooker'), 3=> __("As a Status Update" , 'wordbooker'),4=> __("As a Link" , 'wordbooker')   ); 
    122122    echo '<select id="wordbooker_primary_type" name="wordbooker_primary_type"  >'; 
    123123    foreach ($arr as $i => $value) { 
     
    152152 
    153153        echo __('Length of Extract', 'wordbooker').' : <select id="wordbooker_extract_length" name="wordbooker_extract_length"  >'; 
    154             $arr = array(10=> "10",20=> "20",50=> "50",100=> "100",120=> "120",150=> "150",175=> "175",200=> "200",  250=> "250", 256=>__("256 (Default) ", 'wordbooker'), 270=>"270", 300=>"300", 350 => "350",400 => "400",500 => "500",600 => "600",700 => "700",800 => "800",900 => "900"); 
     154            $arr = array(10=> "10",20=> "20",50=> "50",100=> "100",120=> "120",150=> "150",175=> "175",200=> "200",  250=> "250", 256=>__("256 (Default) ", 'wordbooker'), 270=>"270", 300=>"300", 350 => "350",400 => "400",500 => "500",600 => "600",700 => "700",800 => "800",900 => "900",1000 => "1000",2000 => "2000",4000 => "4000",8000 => "8000"); 
    155155            foreach ($arr as $i => $value) { 
    156156                    if ($i==$wordbooker_settings['wordbooker_extract_length']){ print '<option selected="yes" value="'.$i.'" >'.$arr[$i].'</option>';} 
     
    187187                } 
    188188                echo "</select><br />"; 
    189          
     189/*       
    190190echo __('Show Facebook Share for this Page', 'wordbooker').' : <select id="wordbooker_share_button_page" name="wordbooker_share_button_page"  >'; 
    191191$arr = array(1=> __("Yes", 'wordbooker'),  2=> __("No", 'wordbooker') ); 
     
    195195        } 
    196196            echo "</select><br />"; 
     197*/ 
    197198        } 
    198199        else { 
     
    207208                } 
    208209                echo "</select><br />"; 
    209          
     210/*       
    210211            echo __('Show Facebook Share for this Post', 'wordbooker').' : <select id="wordbooker_share_button_post" name="wordbooker_share_button_post"  >'; 
    211212            $arr = array(1=> __("Yes", 'wordbooker'),  2=> __("No", 'wordbooker') ); 
     
    215216                } 
    216217                echo "</select><br />"; 
     218*/ 
    217219        } 
    218220 
  • wordbooker/tags/2.1.9/includes/wordbooker_wb_widget.php

    r505615 r539162  
    4343        $result = wordbooker_get_cache($userid); 
    4444        echo $before_widget; 
     45        echo "<!-- Wordbooker FB Status Widget -->";  
    4546        $name=$result->name; 
    4647            if (strlen($instance['dname']) >0 ) $name=$instance['dname']; 
  • wordbooker/tags/2.1.9/languages/wordbooker.pot

    r505615 r539162  
    33msgid "" 
    44msgstr "" 
    5 "Project-Id-Version: Wordbooker 2.0.9\n" 
     5"Project-Id-Version: Wordbooker 2.1.8\n" 
    66"Report-Msgid-Bugs-To: http://wordpress.org/tag/wordbooker\n" 
    7 "POT-Creation-Date: 2012-02-09 11:34:31+00:00\n" 
     7"POT-Creation-Date: 2012-04-01 06:56:34+00:00\n" 
    88"MIME-Version: 1.0\n" 
    99"Content-Type: text/plain; charset=UTF-8\n" 
     
    2222msgstr "" 
    2323 
    24 #: wordbooker.php:676 
     24#: wordbooker.php:693 
    2525msgid "Failed to clear error logs." 
    2626msgstr "" 
    2727 
    28 #: wordbooker.php:689 
     28#: wordbooker.php:706 
    2929msgid "Failed to clear Diagnostic logs." 
    3030msgstr "" 
    3131 
    32 #: wordbooker.php:727 
     32#: wordbooker.php:744 
    3333msgid "Diagnostic Messages" 
    3434msgstr "" 
    3535 
    36 #: wordbooker.php:728 
     36#: wordbooker.php:745 
    3737msgid "(Showing %1$s from a total of %2$s rows)" 
    3838msgstr "" 
    3939 
    40 #: wordbooker.php:770 
     40#: wordbooker.php:787 
    4141msgid "Clear Diagnostic Messages" 
    4242msgstr "" 
    4343 
    44 #: wordbooker.php:865 
     44#: wordbooker.php:880 
    4545msgid "" 
    4646"Wordbooker needs the CURL PHP extension to work. Please install / enable it " 
     
    4848msgstr "" 
    4949 
    50 #: wordbooker.php:868 
     50#: wordbooker.php:883 
    5151msgid "" 
    5252"Wordbooker needs the JSON PHP extension.  Please install / enable it and try " 
     
    5454msgstr "" 
    5555 
    56 #: wordbooker.php:872 
     56#: wordbooker.php:887 
    5757msgid "Your PHP install is missing <code>simplexml_load_string()</code> " 
    5858msgstr "" 
    5959 
    60 #: wordbooker.php:876 
     60#: wordbooker.php:891 
    6161msgid "Wordbooker needs to be set up" 
    6262msgstr "" 
    6363 
    64 #: wordbooker.php:885 
     64#: wordbooker.php:900 
    6565msgid "for" 
    6666msgstr "" 
    6767 
    68 #: wordbooker.php:894 
     68#: wordbooker.php:909 
    6969msgid "Notices" 
    7070msgstr "" 
    7171 
    72 #: wordbooker.php:974 
     72#: wordbooker.php:998 
    7373msgid "Setup" 
    7474msgstr "" 
    7575 
    76 #: wordbooker.php:982 
     76#: wordbooker.php:1006 
    7777msgid "" 
    7878"Secure link ( may require you to add a new certificate for wordbooker.tty." 
     
    8181msgstr "" 
    8282 
    83 #: wordbooker.php:986 
     83#: wordbooker.php:1010 
    8484msgid "" 
    8585"Wordbooker should now be authorised. Please click on the Reload Page Button" 
    8686msgstr "" 
    8787 
    88 #: wordbooker.php:987 
     88#: wordbooker.php:1011 
    8989msgid "Reload Page" 
    9090msgstr "" 
    9191 
    92 #: wordbooker.php:995 
     92#: wordbooker.php:1019 
    9393msgid "Status" 
    9494msgstr "" 
    9595 
    96 #: wordbooker.php:1030 
     96#: wordbooker.php:1054 
    9797msgid "Wordbooker appears to be configured and working just fine" 
    9898msgstr "" 
    9999 
    100 #: wordbooker.php:1032 
     100#: wordbooker.php:1056 
    101101msgid "" 
    102102"If you like, you can start over from the beginning (this does not delete " 
     
    104104msgstr "" 
    105105 
    106 #: wordbooker.php:1036 
     106#: wordbooker.php:1060 
    107107msgid "Wordbooker is able to connect to Facebook" 
    108108msgstr "" 
    109109 
    110 #: wordbooker.php:1040 
     110#: wordbooker.php:1064 
    111111msgid "Reset User Session" 
    112112msgstr "" 
    113113 
    114 #: wordbooker.php:1041 
     114#: wordbooker.php:1065 
    115115msgid "Refresh Status" 
    116116msgstr "" 
    117117 
    118 #: wordbooker.php:1045 
     118#: wordbooker.php:1069 
    119119msgid "Recent Facebook Activity for this site" 
    120120msgstr "" 
    121121 
    122 #: wordbooker.php:1072 
     122#: wordbooker.php:1096 
    123123msgid "Support" 
    124124msgstr "" 
    125125 
    126 #: wordbooker.php:1074 
     126#: wordbooker.php:1098 
    127127msgid "For feature requests, bug reports, and general support :" 
    128128msgstr "" 
    129129 
    130 #: wordbooker.php:1076 wordbooker.php:1077 
     130#: wordbooker.php:1100 wordbooker.php:1101 
    131131msgid "Check the " 
    132132msgstr "" 
    133133 
    134 #: wordbooker.php:1076 
     134#: wordbooker.php:1100 
    135135msgid "User Guide" 
    136136msgstr "" 
    137137 
    138 #: wordbooker.php:1077 
     138#: wordbooker.php:1101 
    139139msgid "WordPress.org Notes" 
    140140msgstr "" 
    141141 
    142 #: wordbooker.php:1078 
     142#: wordbooker.php:1102 
    143143msgid "Try the " 
    144144msgstr "" 
    145145 
    146 #: wordbooker.php:1078 
     146#: wordbooker.php:1102 
    147147msgid "Wordbooker Support Forums" 
    148148msgstr "" 
    149149 
    150 #: wordbooker.php:1079 
     150#: wordbooker.php:1103 
    151151msgid "Enhancement requests can be made at the " 
    152152msgstr "" 
    153153 
    154 #: wordbooker.php:1079 
     154#: wordbooker.php:1103 
    155155msgid "Wordbooker Project on Google Code" 
    156156msgstr "" 
    157157 
    158 #: wordbooker.php:1080 
     158#: wordbooker.php:1104 
    159159msgid "Consider upgrading to the " 
    160160msgstr "" 
    161161 
    162 #: wordbooker.php:1080 
     162#: wordbooker.php:1104 
    163163msgid "latest stable release" 
    164164msgstr "" 
    165165 
    166 #: wordbooker.php:1080 
     166#: wordbooker.php:1104 
    167167msgid " of WordPress. " 
    168168msgstr "" 
    169169 
    170 #: wordbooker.php:1081 
     170#: wordbooker.php:1105 
    171171msgid "Read the release notes for Wordbooker on the " 
    172172msgstr "" 
    173173 
    174 #: wordbooker.php:1081 
     174#: wordbooker.php:1105 
    175175msgid "blog." 
    176176msgstr "" 
    177177 
    178 #: wordbooker.php:1082 
     178#: wordbooker.php:1106 
    179179msgid "Check the Wordbooker " 
    180180msgstr "" 
    181181 
    182 #: wordbooker.php:1082 
     182#: wordbooker.php:1106 
    183183msgid "FAQs" 
    184184msgstr "" 
    185185 
    186 #: wordbooker.php:1085 
     186#: wordbooker.php:1109 
    187187msgid "Please provide the following information about your installation:" 
    188188msgstr "" 
    189189 
    190 #: wordbooker.php:1110 
     190#: wordbooker.php:1134 
    191191msgid "Curl is not installed" 
    192192msgstr "" 
    193193 
    194 #: wordbooker.php:1121 
     194#: wordbooker.php:1145 
    195195msgid "Curl is available but cannot access Facebook - This is a problem (" 
    196196msgstr "" 
    197197 
    198 #: wordbooker.php:1122 
     198#: wordbooker.php:1146 
    199199msgid "Curl is available and can access Facebook - All is OK" 
    200200msgstr "" 
    201201 
    202 #: wordbooker.php:1165 
     202#: wordbooker.php:1189 
    203203msgid "<li>XML: your PHP is missing <code>simplexml_load_string()</code></li>" 
    204204msgstr "" 
    205205 
    206 #: wordbooker.php:1177 
     206#: wordbooker.php:1201 
    207207msgid "<li> Active Plugins : <b></li>" 
    208208msgstr "" 
    209209 
    210 #: wordbooker.php:1207 
     210#: wordbooker.php:1295 
    211211msgid "Your system does not meet the" 
    212212msgstr "" 
    213213 
    214 #: wordbooker.php:1207 wordbooker.php:1215 
     214#: wordbooker.php:1295 wordbooker.php:1303 
    215215msgid "WordPress minimum requirements" 
    216216msgstr "" 
    217217 
    218 #: wordbooker.php:1207 
     218#: wordbooker.php:1295 
    219219msgid "Things are unlikely to work." 
    220220msgstr "" 
    221221 
    222 #: wordbooker.php:1215 
     222#: wordbooker.php:1303 
    223223msgid "Please ensure that your system meets the" 
    224224msgstr "" 
    225225 
    226 #: wordbooker.php:1429 
     226#: wordbooker.php:1554 
    227227msgid "Share" 
    228228msgstr "" 
    229229 
    230 #: wordbooker.php:1435 
     230#: wordbooker.php:1560 
    231231msgid "Read entire article" 
    232232msgstr "" 
    233233 
    234 #: wordbooker.php:1439 
     234#: wordbooker.php:1564 
    235235msgid "Primary" 
    236236msgstr "" 
    237237 
    238 #: wordbooker.php:1443 
     238#: wordbooker.php:1568 
    239239msgid "Secondary" 
    240240msgstr "" 
    241241 
    242 #: wordbooker.php:1447 
     242#: wordbooker.php:1572 
    243243msgid "Fan Wall" 
    244244msgstr "" 
    245245 
    246 #: wordbooker.php:1447 
     246#: wordbooker.php:1572 
    247247msgid "Group wall" 
    248248msgstr "" 
    249249 
    250 #: wordbooker.php:2126 
     250#: wordbooker.php:2258 
    251251msgid "Publish content to your Wall/Fan pages" 
    252252msgstr "" 
    253253 
    254 #: wordbooker.php:2126 
    255 msgid "Publish Actions to your Timeline" 
    256 msgstr "" 
    257  
    258 #: wordbooker.php:2126 
     254#: wordbooker.php:2258 
    259255msgid "Update your status" 
    260256msgstr "" 
    261257 
    262 #: wordbooker.php:2126 
     258#: wordbooker.php:2258 
    263259msgid "Read your News Feed and Wall" 
    264260msgstr "" 
    265261 
    266 #: wordbooker.php:2126 
     262#: wordbooker.php:2258 
    267263msgid "Create notes" 
    268264msgstr "" 
    269265 
    270 #: wordbooker.php:2126 
     266#: wordbooker.php:2258 
    271267msgid "Upload photos" 
    272268msgstr "" 
    273269 
    274 #: wordbooker.php:2126 
     270#: wordbooker.php:2258 
    275271msgid "Upload videos" 
    276272msgstr "" 
    277273 
    278 #: wordbooker.php:2126 
     274#: wordbooker.php:2258 
    279275msgid "Manage_pages" 
    280276msgstr "" 
    281277 
    282 #: wordbooker.php:2126 
     278#: wordbooker.php:2258 
    283279msgid "Read friend lists" 
    284280msgstr "" 
    285281 
    286 #: wordbooker.php:2127 
     282#: wordbooker.php:2259 
    287283msgid "but requires authorization to " 
    288284msgstr "" 
    289285 
    290 #: wordbooker.php:2128 
     286#: wordbooker.php:2260 
    291287msgid " on Facebook. Click on the following link to grant permission" 
    292288msgstr "" 
    293289 
    294 #: wordbooker.php:2145 
     290#: wordbooker.php:2277 
    295291msgid "Save Configuration" 
    296292msgstr "" 
    297293 
    298 #: wordbooker.php:2557 
     294#: wordbooker.php:2641 
    299295msgid "Every 10 Minutes" 
    300296msgstr "" 
    301297 
    302 #: wordbooker.php:2562 
     298#: wordbooker.php:2646 
    303299msgid "Every 15 Minutes" 
    304300msgstr "" 
    305301 
    306 #: wordbooker.php:2567 
     302#: wordbooker.php:2651 
    307303msgid "Every 20 Minutes" 
    308304msgstr "" 
    309305 
    310 #: wordbooker.php:2572 
     306#: wordbooker.php:2656 
    311307msgid "Every 30 Minutes" 
    312308msgstr "" 
    313309 
    314 #: wordbooker.php:2577 
     310#: wordbooker.php:2661 
    315311msgid "Every 45 Minutes" 
    316312msgstr "" 
    317313 
    318 #: wordbooker.php:2582 
     314#: wordbooker.php:2666 
    319315msgid "Every 2 Hours" 
    320316msgstr "" 
     
    326322msgstr "" 
    327323 
    328 #: includes/wordbooker_wb_widget.php:80 
     324#: includes/wordbooker_wb_widget.php:81 
    329325msgid "Facebook Status" 
    330326msgstr "" 
    331327 
    332 #: includes/wordbooker_wb_widget.php:90 includes/wordbooker_fb_widget.php:162 
     328#: includes/wordbooker_wb_widget.php:91 includes/wordbooker_fb_widget.php:163 
    333329msgid "Title of Widget" 
    334330msgstr "" 
    335331 
    336 #: includes/wordbooker_wb_widget.php:91 
     332#: includes/wordbooker_wb_widget.php:92 
    337333msgid "Display this name" 
    338334msgstr "" 
    339335 
    340 #: includes/wordbooker_wb_widget.php:93 
     336#: includes/wordbooker_wb_widget.php:94 
    341337msgid "Date Format" 
    342338msgstr "" 
    343339 
    344 #: includes/wordbooker_wb_widget.php:100 
     340#: includes/wordbooker_wb_widget.php:101 
    345341msgid "Facebook Text style" 
    346342msgstr "" 
    347343 
    348 #: includes/wordbooker_wb_widget.php:122 
     344#: includes/wordbooker_wb_widget.php:123 
    349345msgid "second" 
    350346msgstr "" 
    351347 
    352 #: includes/wordbooker_wb_widget.php:122 
     348#: includes/wordbooker_wb_widget.php:123 
    353349msgid "minute" 
    354350msgstr "" 
    355351 
    356 #: includes/wordbooker_wb_widget.php:122 
     352#: includes/wordbooker_wb_widget.php:123 
    357353msgid "hour" 
    358354msgstr "" 
    359355 
    360 #: includes/wordbooker_wb_widget.php:122 
     356#: includes/wordbooker_wb_widget.php:123 
    361357msgid "day" 
    362358msgstr "" 
    363359 
    364 #: includes/wordbooker_wb_widget.php:122 
     360#: includes/wordbooker_wb_widget.php:123 
    365361msgid "week" 
    366362msgstr "" 
    367363 
    368 #: includes/wordbooker_wb_widget.php:122 
     364#: includes/wordbooker_wb_widget.php:123 
    369365msgid "month" 
    370366msgstr "" 
    371367 
    372 #: includes/wordbooker_wb_widget.php:122 
     368#: includes/wordbooker_wb_widget.php:123 
    373369msgid "year" 
    374370msgstr "" 
    375371 
    376 #: includes/wordbooker_wb_widget.php:122 
     372#: includes/wordbooker_wb_widget.php:123 
    377373msgid "decade" 
    378374msgstr "" 
    379375 
    380 #: includes/wordbooker_wb_widget.php:136 
     376#: includes/wordbooker_wb_widget.php:137 
    381377msgid "ago" 
    382378msgstr "" 
    383379 
    384 #: includes/wordbooker_wb_widget.php:140 
     380#: includes/wordbooker_wb_widget.php:141 
    385381msgid "from now" 
    386382msgstr "" 
    387383 
    388 #: includes/wordbooker_wb_widget.php:151 
     384#: includes/wordbooker_wb_widget.php:152 
    389385msgid "an" 
    390386msgstr "" 
    391387 
    392 #: includes/wordbooker_wb_widget.php:153 
     388#: includes/wordbooker_wb_widget.php:154 
    393389msgid "about" 
    394390msgstr "" 
     
    401397msgstr "" 
    402398 
    403 #: includes/wordbooker_fb_widget.php:117 includes/wordbooker_fb_widget.php:164 
     399#: includes/wordbooker_fb_widget.php:118 includes/wordbooker_fb_widget.php:165 
    404400msgid "Fan Page" 
    405401msgstr "" 
    406402 
    407 #: includes/wordbooker_fb_widget.php:176 
     403#: includes/wordbooker_fb_widget.php:177 
    408404msgid "Include Stream " 
    409405msgstr "" 
    410406 
    411 #: includes/wordbooker_fb_widget.php:179 
     407#: includes/wordbooker_fb_widget.php:180 
    412408msgid "Include Header " 
    413409msgstr "" 
    414410 
    415 #: includes/wordbooker_fb_widget.php:182 
     411#: includes/wordbooker_fb_widget.php:183 
    416412msgid "Colour Scheme" 
    417413msgstr "" 
    418414 
    419 #: includes/wordbooker_fb_widget.php:188 
     415#: includes/wordbooker_fb_widget.php:189 
    420416msgid "Show Faces " 
    421417msgstr "" 
    422418 
    423 #: includes/wordbooker_fb_widget.php:191 
     419#: includes/wordbooker_fb_widget.php:192 
    424420msgid "Widget Width" 
    425421msgstr "" 
    426422 
    427 #: includes/wordbooker_fb_widget.php:193 
     423#: includes/wordbooker_fb_widget.php:194 
    428424msgid "Widget Height" 
    429425msgstr "" 
    430426 
    431 #: includes/wordbooker_fb_widget.php:195 
     427#: includes/wordbooker_fb_widget.php:196 
    432428msgid "Widget Border Colour" 
    433429msgstr "" 
     
    450446 
    451447#: includes/wordbooker_options.php:84 
    452 #: includes/wordbooker_posting_options.php:76 
     448#: includes/wordbooker_posting_options.php:79 
    453449msgid "WARNING : Wordbooker is DISABLED" 
    454450msgstr "" 
    455451 
    456452#: includes/wordbooker_options.php:85 
    457 #: includes/wordbooker_posting_options.php:77 
     453#: includes/wordbooker_posting_options.php:80 
    458454msgid "" 
    459455"WARNING : Wordbooker is in TEST mode - NO Posts will be made to Facebook" 
     
    477473 
    478474#: includes/wordbooker_options.php:180 
    479 msgid "Facebook Like and Share Options" 
     475msgid "Facebook Like and Send Options" 
    480476msgstr "" 
    481477 
     
    500496msgstr "" 
    501497 
    502 #: includes/wordbooker_options.php:220 includes/wordbooker_options.php:565 
     498#: includes/wordbooker_options.php:220 includes/wordbooker_options.php:582 
    503499msgid "Default Publish Post to Facebook" 
    504500msgstr "" 
    505501 
    506 #: includes/wordbooker_options.php:223 includes/wordbooker_options.php:574 
     502#: includes/wordbooker_options.php:223 includes/wordbooker_options.php:591 
    507503msgid "Default Publish Page to Facebook" 
    508504msgstr "" 
     
    524520msgstr "" 
    525521 
    526 #: includes/wordbooker_options.php:246 includes/wordbooker_options.php:657 
     522#: includes/wordbooker_options.php:246 includes/wordbooker_options.php:674 
    527523#: includes/wordbooker_posting_options.php:153 
    528524msgid "Length of Extract" 
    529525msgstr "" 
    530526 
    531 #: includes/wordbooker_options.php:247 includes/wordbooker_options.php:658 
     527#: includes/wordbooker_options.php:247 includes/wordbooker_options.php:675 
    532528#: includes/wordbooker_posting_options.php:154 
    533529msgid "256 (Default) " 
    534530msgstr "" 
    535531 
    536 #: includes/wordbooker_options.php:253 includes/wordbooker_options.php:669 
     532#: includes/wordbooker_options.php:253 includes/wordbooker_options.php:686 
    537533msgid "Post Attribute" 
    538534msgstr "" 
     
    550546msgstr "" 
    551547 
    552 #: includes/wordbooker_options.php:259 includes/wordbooker_options.php:673 
     548#: includes/wordbooker_options.php:259 includes/wordbooker_options.php:690 
    553549#: includes/wordbooker_posting_options.php:162 
    554550msgid "Read Full Article" 
    555551msgstr "" 
    556552 
    557 #: includes/wordbooker_options.php:265 includes/wordbooker_options.php:680 
     553#: includes/wordbooker_options.php:265 includes/wordbooker_options.php:697 
    558554msgid "Enable Extended description for Share Link" 
    559555msgstr "" 
     
    563559msgstr "" 
    564560 
    565 #: includes/wordbooker_options.php:283 includes/wordbooker_options.php:286 
    566 #: includes/wordbooker_options.php:567 includes/wordbooker_options.php:576 
    567 #: includes/wordbooker_options.php:682 
     561#: includes/wordbooker_options.php:283 includes/wordbooker_options.php:287 
     562#: includes/wordbooker_options.php:584 includes/wordbooker_options.php:593 
     563#: includes/wordbooker_options.php:699 
    568564#: includes/wordbooker_posting_options.php:183 
    569 #: includes/wordbooker_posting_options.php:191 
    570 #: includes/wordbooker_posting_options.php:203 
    571 #: includes/wordbooker_posting_options.php:211 
     565#: includes/wordbooker_posting_options.php:204 
    572566msgid "No" 
    573567msgstr "" 
    574568 
    575 #: includes/wordbooker_options.php:283 includes/wordbooker_options.php:286 
    576 #: includes/wordbooker_options.php:682 
     569#: includes/wordbooker_options.php:283 includes/wordbooker_options.php:287 
     570#: includes/wordbooker_options.php:699 
    577571#: includes/wordbooker_posting_options.php:183 
    578 #: includes/wordbooker_posting_options.php:191 
    579 #: includes/wordbooker_posting_options.php:203 
    580 #: includes/wordbooker_posting_options.php:211 
     572#: includes/wordbooker_posting_options.php:204 
    581573msgid "Yes" 
    582574msgstr "" 
     
    590582msgstr "" 
    591583 
    592 #: includes/wordbooker_options.php:284 includes/wordbooker_options.php:447 
     584#: includes/wordbooker_options.php:284 includes/wordbooker_options.php:285 
     585#: includes/wordbooker_options.php:457 
    593586msgid "Defined by theme template" 
    594587msgstr "" 
    595588 
    596 #: includes/wordbooker_options.php:284 includes/wordbooker_options.php:447 
     589#: includes/wordbooker_options.php:284 includes/wordbooker_options.php:285 
     590#: includes/wordbooker_options.php:457 
    597591msgid "Defined by Tag in post" 
    598592msgstr "" 
    599593 
    600 #: includes/wordbooker_options.php:287 
     594#: includes/wordbooker_options.php:285 
     595msgid "Right Side" 
     596msgstr "" 
     597 
     598#: includes/wordbooker_options.php:285 
     599msgid "Left Side" 
     600msgstr "" 
     601 
     602#: includes/wordbooker_options.php:288 
    601603msgid "No - use Send instead of Like" 
    602604msgstr "" 
    603605 
    604 #: includes/wordbooker_options.php:287 
     606#: includes/wordbooker_options.php:288 
    605607msgid "Yes - use both Like and Send" 
    606608msgstr "" 
    607609 
    608 #: includes/wordbooker_options.php:288 
     610#: includes/wordbooker_options.php:289 
    609611msgid "Include a Facebook Like button in blog" 
    610612msgstr "" 
    611613 
    612 #: includes/wordbooker_options.php:290 
     614#: includes/wordbooker_options.php:291 
    613615msgid "Show Facebook Like button on front page" 
    614616msgstr "" 
    615617 
    616 #: includes/wordbooker_options.php:293 
     618#: includes/wordbooker_options.php:294 
    617619msgid "Show Facebook Like button on Category pages" 
    618620msgstr "" 
    619621 
    620 #: includes/wordbooker_options.php:296 
     622#: includes/wordbooker_options.php:297 
    621623msgid "Show Facebook Like button on Pages" 
    622624msgstr "" 
    623625 
    624 #: includes/wordbooker_options.php:299 
     626#: includes/wordbooker_options.php:300 
    625627msgid "Show Facebook Like button in each post" 
    626628msgstr "" 
    627629 
    628 #: includes/wordbooker_options.php:302 
     630#: includes/wordbooker_options.php:303 
    629631msgid "Don't show Facebook Like / Send Button on Sticky Posts" 
    630632msgstr "" 
    631633 
    632 #: includes/wordbooker_options.php:307 
     634#: includes/wordbooker_options.php:308 
    633635msgid "Width of Facebook Like box" 
    634636msgstr "" 
    635637 
    636 #: includes/wordbooker_options.php:310 
     638#: includes/wordbooker_options.php:311 
    637639msgid "Facebook Like - Display Button " 
    638640msgstr "" 
    639641 
    640 #: includes/wordbooker_options.php:316 
     642#: includes/wordbooker_options.php:317 
     643msgid "Facebook Like - Align Button " 
     644msgstr "" 
     645 
     646#: includes/wordbooker_options.php:324 
    641647msgid "Facebook Like - Verb to Display" 
    642648msgstr "" 
    643649 
    644 #: includes/wordbooker_options.php:322 
     650#: includes/wordbooker_options.php:330 
    645651msgid "Facebook Like - Colour Scheme" 
    646652msgstr "" 
    647653 
    648 #: includes/wordbooker_options.php:328 
     654#: includes/wordbooker_options.php:336 
    649655msgid "Facebook Like - Display Font" 
    650656msgstr "" 
    651657 
    652 #: includes/wordbooker_options.php:334 
     658#: includes/wordbooker_options.php:342 
    653659msgid "Facebook Like - Layout Style" 
    654660msgstr "" 
    655661 
    656 #: includes/wordbooker_options.php:340 
     662#: includes/wordbooker_options.php:348 
    657663msgid "Facebook Like - Display Faces (Standard layout only)" 
    658664msgstr "" 
    659665 
    660 #: includes/wordbooker_options.php:347 
     666#: includes/wordbooker_options.php:355 
    661667msgid "Combine Send with Like" 
    662668msgstr "" 
    663669 
    664 #: includes/wordbooker_options.php:353 
     670#: includes/wordbooker_options.php:361 
    665671msgid "Facebook Send - Display Button" 
    666672msgstr "" 
    667673 
    668 #: includes/wordbooker_options.php:360 
    669 msgid "Include a Facebook Share button in blog" 
    670 msgstr "" 
    671  
    672 #: includes/wordbooker_options.php:364 
    673 msgid "Facebook Share - Display Button " 
    674 msgstr "" 
    675  
    676 #: includes/wordbooker_options.php:370 
    677 msgid "Show Facebook Share button on front page" 
    678 msgstr "" 
    679  
    680 #: includes/wordbooker_options.php:373 
    681 msgid "Show Facebook Share button on Category pages" 
    682 msgstr "" 
    683  
    684 #: includes/wordbooker_options.php:376 
    685 msgid "Show Facebook Share button on Pages" 
    686 msgstr "" 
    687  
    688 #: includes/wordbooker_options.php:379 
    689 msgid "Show Facebook Share button in each post" 
    690 msgstr "" 
    691  
    692 #: includes/wordbooker_options.php:381 
    693 msgid "Don't show Facebook Share button on Sticky Posts" 
    694 msgstr "" 
    695  
    696 #: includes/wordbooker_options.php:384 
     674#: includes/wordbooker_options.php:394 
    697675msgid "Do not replace Gravtars with Facebook Photos" 
    698676msgstr "" 
    699677 
    700 #: includes/wordbooker_options.php:388 
    701 msgid "Use Frictionless sharing/ Timeline instead of Share" 
    702 msgstr "" 
    703  
    704 #: includes/wordbooker_options.php:406 
     678#: includes/wordbooker_options.php:416 
    705679msgid "Wordpress Comment handling Options" 
    706680msgstr "" 
    707681 
    708 #: includes/wordbooker_options.php:407 
     682#: includes/wordbooker_options.php:417 
    709683msgid "Never " 
    710684msgstr "" 
    711685 
    712 #: includes/wordbooker_options.php:408 
     686#: includes/wordbooker_options.php:418 
    713687msgid "Manual Polling " 
    714688msgstr "" 
    715689 
    716 #: includes/wordbooker_options.php:412 
     690#: includes/wordbooker_options.php:422 
    717691msgid "Process Comments  " 
    718692msgstr "" 
    719693 
    720 #: includes/wordbooker_options.php:417 
     694#: includes/wordbooker_options.php:427 
    721695msgid "Next Scheduled fetch is in" 
    722696msgstr "" 
    723697 
    724 #: includes/wordbooker_options.php:418 
     698#: includes/wordbooker_options.php:428 
    725699msgid "Enable Comment processing" 
    726700msgstr "" 
    727701 
    728 #: includes/wordbooker_options.php:420 
     702#: includes/wordbooker_options.php:430 
    729703msgid "Disable Comment Importing" 
    730704msgstr "" 
    731705 
    732 #: includes/wordbooker_options.php:422 
     706#: includes/wordbooker_options.php:432 
    733707msgid "Disable Comment Exporting" 
    734708msgstr "" 
    735709 
    736 #: includes/wordbooker_options.php:425 
     710#: includes/wordbooker_options.php:435 
    737711msgid "[Comment imported from blog]" 
    738712msgstr "" 
    739713 
    740 #: includes/wordbooker_options.php:427 
     714#: includes/wordbooker_options.php:437 
    741715msgid "Comment Tag" 
    742716msgstr "" 
    743717 
    744 #: includes/wordbooker_options.php:430 
     718#: includes/wordbooker_options.php:440 
    745719msgid "Facebook Comment Structure" 
    746720msgstr "" 
    747721 
    748 #: includes/wordbooker_options.php:432 
     722#: includes/wordbooker_options.php:442 
    749723msgid "Assign this email address to comments" 
    750724msgstr "" 
    751725 
    752 #: includes/wordbooker_options.php:434 
     726#: includes/wordbooker_options.php:444 
    753727msgid "Import Comments from Facebook for new Wordbooker Posts" 
    754728msgstr "" 
    755729 
    756 #: includes/wordbooker_options.php:436 
     730#: includes/wordbooker_options.php:446 
    757731msgid "Push Comments up to Facebook for new posts" 
    758732msgstr "" 
    759733 
    760 #: includes/wordbooker_options.php:438 
     734#: includes/wordbooker_options.php:448 
    761735msgid "Auto Approve imported comments" 
    762736msgstr "" 
    763737 
    764 #: includes/wordbooker_options.php:441 
     738#: includes/wordbooker_options.php:451 
    765739msgid "Run Comment Handling Now" 
    766740msgstr "" 
    767741 
    768 #: includes/wordbooker_options.php:444 
     742#: includes/wordbooker_options.php:454 
    769743msgid "Facebook Comment Box Options" 
    770744msgstr "" 
    771745 
    772 #: includes/wordbooker_options.php:445 
     746#: includes/wordbooker_options.php:455 
    773747msgid "Enable Facebook Comment handling  " 
    774748msgstr "" 
    775749 
    776 #: includes/wordbooker_options.php:447 
     750#: includes/wordbooker_options.php:457 
    777751msgid "Created in line below post" 
    778752msgstr "" 
    779753 
    780 #: includes/wordbooker_options.php:449 
     754#: includes/wordbooker_options.php:459 
    781755msgid "Comment placing " 
    782756msgstr "" 
    783757 
    784 #: includes/wordbooker_options.php:455 
     758#: includes/wordbooker_options.php:465 
    785759msgid "Comment Box - Colour Scheme" 
    786760msgstr "" 
    787761 
    788 #: includes/wordbooker_options.php:461 
     762#: includes/wordbooker_options.php:471 
    789763msgid "All Wordbooker users can moderate comments  " 
    790764msgstr "" 
    791765 
    792 #: includes/wordbooker_options.php:466 
     766#: includes/wordbooker_options.php:476 
    793767msgid "Use this Facebook Application ID for comment moderation" 
    794768msgstr "" 
    795769 
    796 #: includes/wordbooker_options.php:470 
     770#: includes/wordbooker_options.php:480 
    797771msgid "Width of comment box" 
    798772msgstr "" 
    799773 
    800 #: includes/wordbooker_options.php:475 
     774#: includes/wordbooker_options.php:485 
    801775msgid "Number of comments to display" 
    802776msgstr "" 
    803777 
    804 #: includes/wordbooker_options.php:480 
     778#: includes/wordbooker_options.php:490 
    805779msgid "Enable notification of new comments" 
    806780msgstr "" 
    807781 
    808 #: includes/wordbooker_options.php:483 
     782#: includes/wordbooker_options.php:493 
    809783msgid "Facebook comment handling should be enabled on new posts" 
    810784msgstr "" 
    811785 
    812 #: includes/wordbooker_options.php:493 
     786#: includes/wordbooker_options.php:504 
    813787msgid "User who should get Admin level diagnostics" 
    814788msgstr "" 
    815789 
    816 #: includes/wordbooker_options.php:499 
     790#: includes/wordbooker_options.php:511 
    817791msgid "Show Everything and I mean everything" 
    818792msgstr "" 
    819793 
    820 #: includes/wordbooker_options.php:499 
     794#: includes/wordbooker_options.php:511 
    821795msgid "Show everything but Cache Diagnostics" 
    822796msgstr "" 
    823797 
    824 #: includes/wordbooker_options.php:499 
     798#: includes/wordbooker_options.php:511 
    825799msgid "Show result of major actions" 
    826800msgstr "" 
    827801 
    828 #: includes/wordbooker_options.php:499 
     802#: includes/wordbooker_options.php:511 
    829803msgid "Don't show anything apart from Fatal errors" 
    830804msgstr "" 
    831805 
    832 #: includes/wordbooker_options.php:499 
     806#: includes/wordbooker_options.php:511 
    833807msgid "Disabled (Show nothing at all)" 
    834808msgstr "" 
    835809 
    836 #: includes/wordbooker_options.php:500 
     810#: includes/wordbooker_options.php:512 
    837811msgid "Post Diagnostics display level" 
    838812msgstr "" 
    839813 
    840 #: includes/wordbooker_options.php:506 
     814#: includes/wordbooker_options.php:518 
    841815msgid "Clear detailed diagnostics on successful post" 
    842816msgstr "" 
    843817 
    844 #: includes/wordbooker_options.php:508 
     818#: includes/wordbooker_options.php:520 
    845819msgid "Disable the use of short URLs in links posted to Facebook" 
    846820msgstr "" 
    847821 
    848 #: includes/wordbooker_options.php:511 
     822#: includes/wordbooker_options.php:523 
    849823msgid "Include FB Recent activity on Wordbooker Options page" 
    850824msgstr "" 
    851825 
    852 #: includes/wordbooker_options.php:514 
     826#: includes/wordbooker_options.php:526 
    853827msgid "Use Iframes instead of FBXML to render FB features" 
    854828msgstr "" 
    855829 
    856 #: includes/wordbooker_options.php:517 
     830#: includes/wordbooker_options.php:529 
    857831msgid "Use Site URL not Blog Description in Wall Posts" 
    858832msgstr "" 
    859833 
    860 #: includes/wordbooker_options.php:520 
     834#: includes/wordbooker_options.php:532 
    861835msgid "Check the following Custom Post Meta tags for images" 
    862836msgstr "" 
    863837 
    864 #: includes/wordbooker_options.php:523 
     838#: includes/wordbooker_options.php:535 
    865839msgid "" 
    866840"Use Image from Custom Meta instead of Featured Image for Open Graph image" 
    867841msgstr "" 
    868842 
    869 #: includes/wordbooker_options.php:526 
     843#: includes/wordbooker_options.php:538 
    870844msgid "Default Open Graph image to use for posts" 
    871845msgstr "" 
    872846 
    873 #: includes/wordbooker_options.php:529 
     847#: includes/wordbooker_options.php:541 
    874848msgid "Use the above image instead of a blank for posts with no image" 
    875849msgstr "" 
    876850 
    877 #: includes/wordbooker_options.php:532 
     851#: includes/wordbooker_options.php:544 
    878852msgid "Disable in-line production of OpenGraph Tags" 
    879853msgstr "" 
    880854 
    881 #: includes/wordbooker_options.php:535 
     855#: includes/wordbooker_options.php:547 
     856msgid "Disable Facebook API initialisation" 
     857msgstr "" 
     858 
     859#: includes/wordbooker_options.php:550 
    882860msgid "Only Pretend to Publish on Facebook - TEST MODE" 
    883861msgstr "" 
    884862 
    885 #: includes/wordbooker_options.php:537 
     863#: includes/wordbooker_options.php:552 
    886864msgid "Disable ALL Wordbooker functionality" 
    887865msgstr "" 
    888866 
    889 #: includes/wordbooker_options.php:556 
     867#: includes/wordbooker_options.php:573 
    890868msgid "User Level Settings" 
    891869msgstr "" 
    892870 
    893 #: includes/wordbooker_options.php:557 
     871#: includes/wordbooker_options.php:574 
    894872msgid "" 
    895873"If set, these options will override the Blog Level options for this user" 
    896874msgstr "" 
    897875 
    898 #: includes/wordbooker_options.php:567 includes/wordbooker_options.php:576 
    899 #: includes/wordbooker_options.php:673 includes/wordbooker_options.php:682 
     876#: includes/wordbooker_options.php:584 includes/wordbooker_options.php:593 
     877#: includes/wordbooker_options.php:690 includes/wordbooker_options.php:699 
    900878msgid "Same as Blog" 
    901879msgstr "" 
    902880 
    903 #: includes/wordbooker_options.php:597 includes/wordbooker_options.php:634 
    904 #: includes/wordbooker_posting_options.php:95 
     881#: includes/wordbooker_options.php:611 
     882#: includes/wordbooker_posting_options.php:94 
     883msgid "As a Wall Post" 
     884msgstr "" 
     885 
     886#: includes/wordbooker_options.php:611 
     887#: includes/wordbooker_posting_options.php:94 
     888msgid "As a Note" 
     889msgstr "" 
     890 
     891#: includes/wordbooker_options.php:611 
     892#: includes/wordbooker_posting_options.php:94 
     893msgid "As a Status Update" 
     894msgstr "" 
     895 
     896#: includes/wordbooker_options.php:611 
     897#: includes/wordbooker_posting_options.php:94 
     898msgid "As a Link" 
     899msgstr "" 
     900 
     901#: includes/wordbooker_options.php:615 includes/wordbooker_options.php:651 
     902#: includes/wordbooker_posting_options.php:98 
    905903#: includes/wordbooker_posting_options.php:131 
    906904msgid "Post to the following Wall" 
    907905msgstr "" 
    908906 
    909 #: includes/wordbooker_options.php:609 
    910 #: includes/wordbooker_posting_options.php:107 
    911 #: includes/wordbooker_posting_options.php:121 
    912 msgid "As a Wall Post" 
    913 msgstr "" 
    914  
    915 #: includes/wordbooker_options.php:609 
    916 #: includes/wordbooker_posting_options.php:107 
    917 #: includes/wordbooker_posting_options.php:121 
    918 msgid "As a Note" 
    919 msgstr "" 
    920  
    921 #: includes/wordbooker_options.php:609 
    922 #: includes/wordbooker_posting_options.php:107 
    923 #: includes/wordbooker_posting_options.php:121 
    924 msgid "As a Status Update" 
    925 msgstr "" 
    926  
    927 #: includes/wordbooker_options.php:609 
    928 #: includes/wordbooker_posting_options.php:107 
    929 #: includes/wordbooker_posting_options.php:121 
    930 msgid "As a Link" 
    931 msgstr "" 
    932  
    933 #: includes/wordbooker_options.php:620 
    934 #: includes/wordbooker_posting_options.php:118 
     907#: includes/wordbooker_options.php:637 
     908#: includes/wordbooker_posting_options.php:120 
    935909msgid "Post to my Personal Wall" 
    936910msgstr "" 
    937911 
    938 #: includes/wordbooker_options.php:665 
     912#: includes/wordbooker_options.php:682 
    939913msgid "Facebook Status Text" 
    940914msgstr "" 
    941915 
    942 #: includes/wordbooker_options.php:672 
     916#: includes/wordbooker_options.php:689 
    943917#: includes/wordbooker_posting_options.php:161 
    944918msgid "Action Link Option" 
    945919msgstr "" 
    946920 
    947 #: includes/wordbooker_options.php:673 
     921#: includes/wordbooker_options.php:690 
    948922msgid "None" 
    949923msgstr "" 
    950924 
    951 #: includes/wordbooker_options.php:673 
     925#: includes/wordbooker_options.php:690 
    952926#: includes/wordbooker_posting_options.php:162 
    953927msgid "Share Link" 
    954928msgstr "" 
    955929 
    956 #: includes/wordbooker_options.php:691 
     930#: includes/wordbooker_options.php:708 
    957931msgid "Use Post Thumbnail only" 
    958932msgstr "" 
    959933 
    960 #: includes/wordbooker_options.php:695 
     934#: includes/wordbooker_options.php:712 
    961935msgid "Use Post Excerpt" 
    962936msgstr "" 
    963937 
    964 #: includes/wordbooker_options.php:699 
     938#: includes/wordbooker_options.php:716 
    965939msgid "Show Status for" 
    966940msgstr "" 
    967941 
    968 #: includes/wordbooker_options.php:699 
     942#: includes/wordbooker_options.php:716 
    969943msgid "My Own Profile" 
    970944msgstr "" 
    971945 
    972 #: includes/wordbooker_options.php:711 
     946#: includes/wordbooker_options.php:728 
    973947msgid "Disable Facebook User information in Status" 
    974948msgstr "" 
    975949 
    976 #: includes/wordbooker_options.php:714 
     950#: includes/wordbooker_options.php:731 
    977951msgid "Save User Options" 
    978952msgstr "" 
    979953 
    980 #: includes/wordbooker_options.php:714 
     954#: includes/wordbooker_options.php:731 
    981955msgid "Reset to Blog Defaults" 
    982956msgstr "" 
    983957 
    984 #: includes/wordbooker_options.php:729 
     958#: includes/wordbooker_options.php:746 
    985959msgid "Donate" 
    986960msgstr "" 
    987961 
    988 #: includes/wordbooker_options.php:733 
    989 msgid "" 
    990 "Thank you for contributing towards the support and development of this " 
    991 "extension." 
    992 msgstr "" 
    993  
    994 #: includes/wordbooker_options.php:737 
     962#: includes/wordbooker_options.php:749 
    995963msgid "" 
    996964"You're using the Premium options in Wordbooker. You really should contribute " 
    997965"something to the support and development of this plugin.  Please provide " 
    998966"your FB Id number and your website when making payment so your details can " 
    999 "be added to the 'thanks' list" 
    1000 msgstr "" 
    1001  
    1002 #: includes/wordbooker_options.php:739 
     967"be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a>  " 
     968"list on the web site" 
     969msgstr "" 
     970 
     971#: includes/wordbooker_options.php:751 
    1003972msgid "" 
    1004973"If you've found this extension useful then please feel free to donate to its " 
    1005974"support and future development. Please provide your FB Id number and your " 
    1006 "website when making payment so your details can be added to the 'thanks' list" 
    1007 msgstr "" 
    1008  
    1009 #: includes/wordbooker_options.php:748 
    1010 msgid "Thanks" 
    1011 msgstr "" 
    1012  
    1013 #: includes/wordbooker_options.php:750 
    1014 msgid "" 
    1015 "The following people and blogs have contributed to the ongoing development " 
    1016 "of this plugin : " 
    1017 msgstr "" 
    1018  
    1019 #: includes/wordbooker_options.php:755 
    1020 msgid "" 
    1021 "The following people have contributed language files to allow Wordbooker to " 
    1022 "be used in different languages : " 
    1023 msgstr "" 
    1024  
    1025 #: includes/wordbooker_options.php:757 
    1026 msgid "German" 
    1027 msgstr "" 
    1028  
    1029 #: includes/wordbooker_options.php:758 
    1030 msgid "French" 
    1031 msgstr "" 
    1032  
    1033 #: includes/wordbooker_options.php:759 
    1034 msgid "Russian" 
     975"website when making payment so your details can be added to the <a " 
     976"href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a> page on the Website" 
    1035977msgstr "" 
    1036978 
     
    1040982msgstr "" 
    1041983 
    1042 #: includes/wordbooker_posting_options.php:63 
    1043 #: includes/wordbooker_posting_options.php:70 
     984#: includes/wordbooker_posting_options.php:66 
     985#: includes/wordbooker_posting_options.php:73 
    1044986msgid "Publish this post to Facebook" 
    1045987msgstr "" 
    1046988 
    1047 #: includes/wordbooker_posting_options.php:66 
     989#: includes/wordbooker_posting_options.php:69 
    1048990msgid "Publish this page to Facebook" 
    1049991msgstr "" 
    1050992 
    1051 #: includes/wordbooker_posting_options.php:81 
     993#: includes/wordbooker_posting_options.php:84 
    1052994msgid "The following options override the defaults set on the options page" 
    1053995msgstr "" 
    1054996 
    1055 #: includes/wordbooker_posting_options.php:89 
     997#: includes/wordbooker_posting_options.php:92 
    1056998msgid "Personal Wall" 
    1057999msgstr "" 
     
    10691011msgstr "" 
    10701012 
    1071 #: includes/wordbooker_posting_options.php:190 
    1072 msgid "Show Facebook Share for this Page" 
    1073 msgstr "" 
    1074  
    1075 #: includes/wordbooker_posting_options.php:202 
     1013#: includes/wordbooker_posting_options.php:203 
    10761014msgid "Show Facebook Like/Send for this Post" 
    10771015msgstr "" 
    10781016 
    1079 #: includes/wordbooker_posting_options.php:210 
    1080 msgid "Show Facebook Share for this Post" 
    1081 msgstr "" 
    1082  
    1083 #: includes/wordbooker_posting_options.php:220 
     1017#: includes/wordbooker_posting_options.php:222 
    10841018msgid "Push Comments from this post to Facebook" 
    10851019msgstr "" 
    10861020 
    1087 #: includes/wordbooker_posting_options.php:221 
     1021#: includes/wordbooker_posting_options.php:223 
    10881022msgid "Pull Comments from Facebook for this post" 
    10891023msgstr "" 
    10901024 
    1091 #: includes/wordbooker_posting_options.php:222 
     1025#: includes/wordbooker_posting_options.php:224 
    10921026msgid "Enable Facebook Comments for this post" 
    10931027msgstr "" 
    10941028 
    1095 #: includes/wordbooker_posting_options.php:224 
     1029#: includes/wordbooker_posting_options.php:226 
    10961030msgid "Wordbooker Blog level settings are in force" 
    10971031msgstr "" 
    10981032 
    1099 #: includes/wordbooker_posting_options.php:228 
     1033#: includes/wordbooker_posting_options.php:230 
    11001034msgid "Publish This Post to Facebook" 
    11011035msgstr "" 
     
    11051039msgstr "" 
    11061040 
    1107 #. #-#-#-#-#  wordbooker.pot (Wordbooker 2.0.9)  #-#-#-#-# 
     1041#. #-#-#-#-#  wordbooker.pot (Wordbooker 2.1.8)  #-#-#-#-# 
    11081042#. Plugin URI of the plugin/theme 
    1109 #. #-#-#-#-#  wordbooker.pot (Wordbooker 2.0.9)  #-#-#-#-# 
     1043#. #-#-#-#-#  wordbooker.pot (Wordbooker 2.1.8)  #-#-#-#-# 
    11101044#. Author URI of the plugin/theme 
    11111045msgid "http://wordbooker.tty.org.uk" 
  • wordbooker/tags/2.1.9/readme.txt

    r509677 r539162  
    22 
    33Contributors: SteveAtty 
    4 Tags: facebook, minifeed, newsfeed, crosspost, WPMU, Facebook Share, Facebook Like, social media 
     4Tags: facebook, news feed, wall, fan page wall, group wall, crosspost, Facebook Send, Facebook Like, social media, open graph. 
    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 
     
    1313 
    1414This plugin allows you to cross-post your blog posts to your Facebook Wall / Fan Page Wall / Group Wall. You can Post as an Extract, A Status Update or even as a Note.  
     15 
     16Wordbooker populates all the Open Graph tags needed to integrate your blog post with Facebook's Social Graph. 
    1517 
    1618NOTE : You MUST have the PHP Curl module enabled and configured in such a way that it can connect to the Facebook Servers on a secure HTTP connection. If you do not have curl OR if your hosting company block curl access to externals sites you cannot use this plugin. 
     
    115117 
    116118== Changelog == 
     119 
     120= Version 2.1.9 02/05/2012 = 
     121- Fixed a bug where posts made via Postie didn't pick up the right user ID. This might affect quite a few things. 
     122- Added a schema cross check utility. 
     123- Added a Disabled FB API initialization option to stop clashes with other FB related plugins 
     124- Added code so that simple facebook connect will pick up the locale variable from Wordbooker 
     125- Removed Facebook Share as the functionality is depreciated 
     126- Added an align Left/Right for Like/Send 
     127- Removed some parameters and tweaked others to make the fb like iframes more W3C compliant. 
     128- Added some code to try to work out why token swapping isn't always working. 
     129- Put a check for missing access tokens before calling the publish functions - should speed things up and reduce the number of errors being bounced back from Facebook. 
     130- Changed the code so that blog urls are set rather than just letting Facebook work it out. 
     131- Added code to pull images from post attachments as well as parsing the post 
     132- Added code so that og tags for image and content which are static values and not parsed at post view are parsed when the post is saved, even if its not published. This means that they can be changed. 
     133- Added some checks to make sure that primary and secondary target types are set even if the user fails to set them. 
     134- Added some very large values to the extract length to allow people to post long posts on their wall without using Facebook Notes. 
     135- Changed the og schema insertion code to try to resolve W3C compliance issues. 
     136 
    117137 
    118138= Version 2.1.8 23/02/2012 = 
  • wordbooker/tags/2.1.9/wordbooker.php

    r509677 r539162  
    66Author: Steve Atty  
    77Author URI: http://wordbooker.tty.org.uk 
    8 Version: 2.1.8 
     8Version: 2.1.9 
    99*/ 
    1010 
     
    3939define('WORDBOOKER_DEBUG', false); 
    4040define('WORDBOOKER_TESTING', false); 
    41 define('WORDBOOKER_CODE_RELEASE',"2.1.8 - Call me Eugene"); 
     41define('WORDBOOKER_CODE_RELEASE',"2.1.9 - Now Your Ships are Burned"); 
    4242 
    4343# For Troubleshooting  
     
    383383    $wordbooker_settings=wordbooker_options(); 
    384384    if (! isset($wordbooker_settings['schema_vers'])) {wordbooker_activate(); return;} 
    385     if ($wordbooker_settings['schema_vers']< (float) WORDBOOKER_SCHEMA_VERSION ) {  
     385    if ($wordbooker_settings['schema_vers'] != WORDBOOKER_SCHEMA_VERSION ) {  
    386386         _e("Database changes being applied", 'wordbooker'); 
    387387    } else { 
     
    918918 
    919919function wordbooker_renew_access_token ($userid=null) { 
    920     global $wpdb,$user_ID; 
     920    global $wpdb,$user_ID,$wbooker_user_id; 
    921921    if(is_null($userid)){$userid=$user_ID;} 
     922    $wbooker_user_id=$userid; 
    922923    $sql="select user_ID,access_token,updated from ".WORDBOOKER_USERDATA." where user_ID=".$userid; 
    923924    $result = $wpdb->get_results($sql); 
     
    925926    foreach($result as $user_row){ 
    926927        if ($user_row->updated==$today) { 
    927     #   wordbooker_debugger("Access token already updated today"," ",-1,99) ;  
     928        wordbooker_debugger("Access token already updated today"," ",-1,99) ;  
    928929        } else { 
    929         $ret_code=wordbooker_get_access_token(unserialize($user_row->access_token)); 
     930        try { 
     931            $ret_code=wordbooker_get_access_token(unserialize($user_row->access_token)); 
     932        }    
     933        catch (Exception $e) { 
     934            $error_code = $e->getCode(); 
     935            $error_msg = $e->getMessage(); 
     936            wordbooker_debugger("Access token refresh failed   ".$error_msg,$error_code,$post_id,-1,99) ; 
     937        } 
    930938        $x=split('&',$ret_code); 
    931939        $x=split('=',$x[0]); 
    932940        $access_token=$x[1]; 
    933941        $sql= "Update " . WORDBOOKER_USERDATA . " set access_token = '" . serialize($access_token) . "', updated=".$today." where user_id=".$userid; 
    934         var_dump($sql); 
    935942        $result = $wpdb->query($sql); 
    936         #wordbooker_debugger("Access token updated"," ",-1,99) ; 
     943        wordbooker_debugger("Access token was ",unserialize($user_row->access_token),-1,99) ; 
     944        wordbooker_debugger("Access token is now ",$access_token,-1,99) ; 
     945        wordbooker_debugger("Access token updated"," ",-1,99) ; 
    937946        } 
    938947    } 
     
    10571066    echo '</form> </div>'; 
    10581067 
    1059     #wordbooker_renew_access_token(); 
     1068    wordbooker_renew_access_token(); 
    10601069    $description=__("Recent Facebook Activity for this site", 'wordbooker'); 
    10611070 
    1062     $iframe='<iframe src="http://www.facebook.com/plugins/activity.php?site='.get_bloginfo('url').'&amp;width=600&amp;height=400&amp;header=true&amp;colorscheme=light&amp;font&amp;border_color&amp;recommendations=true"  scrolling="no" frameborder="no" style="border:none; overflow:hidden; width:600px; height:400px"></iframe>'; 
     1071    $iframe='<iframe src="http://www.facebook.com/plugins/activity.php?site='.get_bloginfo('url').'&amp;width=600&amp;height=400&amp;header=true&amp;colorscheme=light&amp;font&amp;border_color&amp;recommendations=true" style="border:none; overflow:hidden; width:600px; height:400px"></iframe>'; 
    10631072    $activity="<hr><h3>".$description.'</h3><p>'.$iframe."</p></div>"; 
    10641073    $options = wordbooker_options(); 
     
    12111220    } 
    12121221    echo "</b>"; 
     1222 
     1223$wordbooker_columns[WORDBOOKER_ERRORLOGS]=array('timestamp','user_ID','method','error_code','error_msg','post_id','blog_id','sequence_id','diag_level'); 
     1224 
     1225$wordbooker_columns[WORDBOOKER_POSTLOGS]=array('post_id','blog_id','timestamp'); 
     1226 
     1227$wordbooker_columns[WORDBOOKER_USERDATA]=array('user_ID','uid','expires','access_token','sig','use_facebook','onetime_data','facebook_error','secret','session_key','facebook_id','name','status','updated','url','pic','pages','auths_needed','blog_id'); 
     1228 
     1229$wordbooker_columns[WORDBOOKER_USERSTATUS]=array('user_ID','name','status','updated','url','pic','blog_id','facebook_id'); 
     1230 
     1231$wordbooker_columns[WORDBOOKER_POSTCOMMENTS]=array('fb_post_id','user_id','comment_timestamp','wp_post_id','blog_id','wp_comment_id','fb_comment_id','in_out'); 
     1232 
     1233$wordbooker_columns[WORDBOOKER_PROCESS_QUEUE]=array('entry_type','blog_id','post_id','priority','status'); 
     1234 
     1235$wordbooker_columns[WORDBOOKER_FB_FRIENDS]=array('user_id','blog_id','facebook_id','name'); 
     1236 
     1237$wordbooker_columns[WORDBOOKER_FB_FRIEND_LISTS]=array('user_id','flid','owner','name'); 
     1238 
     1239 
     1240$wordbooker_column_def[WORDBOOKER_ERRORLOGS]=array ('timestamp'=>'timestamp','user_ID'=>'bigint(20) unsigned','method'=>'longtext','error_code'=>'int(11)','error_msg'=>'longtext','post_id'=>'bigint(20)','blog_id'=>'bigint(20)','sequence_id'=>'bigint(20)','diag_level'=>'int(4)'); 
     1241 
     1242$wordbooker_column_def[WORDBOOKER_POSTLOGS]=array ('post_id'=>'bigint(20)','blog_id'=>'bigint(20)','timestamp'=>'timestamp'); 
     1243 
     1244$wordbooker_column_def[WORDBOOKER_USERDATA]=array ('user_ID'=>'bigint(20) unsigned','uid'=>'varchar(80)','expires'=>'varchar(80)','access_token'=>'varchar(255)','sig'=>'varchar(80)','use_facebook'=>'tinyint(1)','onetime_data'=>'longtext','facebook_error'=>'longtext','secret'=>'varchar(80)','session_key'=>'varchar(80)','facebook_id'=>'varchar(40)','name'=>'varchar(250)','status'=>'varchar(2048)','updated'=>'int(20)','url'=>'varchar(250)','pic'=>'varchar(250)','pages'=>'longtext','auths_needed'=>'int(1)','blog_id'=>'bigint(20)'); 
     1245 
     1246$wordbooker_column_def[WORDBOOKER_USERSTATUS]=array ('user_ID'=>'bigint(20) unsigned','name'=>'varchar(250)','status'=>'varchar(2048)','updated'=>'int(20)','url'=>'varchar(250)','pic'=>'varchar(250)','blog_id'=>'bigint(20)','facebook_id'=>'varchar(40)'); 
     1247 
     1248$wordbooker_column_def[WORDBOOKER_POSTCOMMENTS]=array ('fb_post_id'=>'varchar(40)','user_id'=>'bigint(20)','comment_timestamp'=>'int(20)','wp_post_id'=>'int(11)','blog_id'=>'bigint(20)','wp_comment_id'=>'int(20)','fb_comment_id'=>'varchar(40)','in_out'=>'varchar(20)'); 
     1249 
     1250$wordbooker_column_def[WORDBOOKER_PROCESS_QUEUE]=array ('entry_type'=>'varchar(20)','blog_id'=>'int(11)','post_id'=>'int(11)','priority'=>'int(11)','status'=>'varchar(20)'); 
     1251 
     1252$wordbooker_column_def[WORDBOOKER_FB_FRIENDS]=array ('user_id'=>'int(11)','blog_id'=>'bigint(20)','facebook_id'=>'varchar(20)','name'=>'varchar(200)'); 
     1253 
     1254$wordbooker_column_def[WORDBOOKER_FB_FRIEND_LISTS]=array ('user_id'=>'int(11)','flid'=>'varchar(80)','owner'=>'varchar(80)','name'=>'varchar(240)'); 
     1255    foreach ($table_array as $table) { 
     1256        $working_table=$wordbooker_columns[$table]; 
     1257        $working_table_def=$wordbooker_column_def[$table]; 
     1258        foreach ($working_table as $chardata){ 
     1259            $sql="SELECT column_name,column_type FROM information_schema.COLUMNS WHERE table_name='".$table."' and table_schema='".DB_NAME."' and column_name='".$chardata."'"; 
     1260    $rows =  $wpdb->get_row($sql,ARRAY_N); 
     1261    #var_dump($rows); 
     1262        if ($chardata==$rows[0]) { 
     1263            $col_status=" present";$correct_sql='zed';       
     1264            if ($working_table_def[$chardata]==$rows[1]) {$col_def_status=" matches";$correct_def_sql='zed';}  
     1265            else {$col_def_status=" mismatches"; $correct_def_sql="alter table ".$table." change ".$chardata." ".$chardata." ".$working_table_def[$chardata];} 
     1266        } else { 
     1267            $col_status=" missing"; $correct_sql="alter table ".$table." add ".$chardata." ".$working_table_def[$chardata]; 
     1268        } 
     1269    #   echo "<li>". $chardata ." is ".$col_status." - ".$correct_sql."</li>"; 
     1270    #   echo "<li>". $chardata ." type ".$col_def_status." - ".$correct_def_sql."</li>"; 
     1271    #       echo "'".$chardata->column_name."',"; 
     1272        #echo "'".$chardata->column_name."'=>'".$chardata->column_type."',"; 
     1273        if ($correct_sql!='zed') {$sql_run[]=$correct_sql;} 
     1274        if ($correct_def_sql!='zed') {$sql_run[]=$correct_def_sql;} 
     1275    } 
     1276} 
     1277    #var_dump($sql_run); 
     1278    if (is_array($sql_run)) { 
     1279        echo "Schema differences found - fixing up <br />"; 
     1280        foreach($sql_run as $sql_fix) { 
     1281            echo "Executing : ".$sql_fix."<br />"; 
     1282            $result=@mysql_query($sql_fix); 
     1283        } 
     1284        echo "<br />"; 
     1285    } 
    12131286    if (ADVANCED_DEBUG) { phpinfo(INFO_MODULES);} 
    12141287?> 
     
    12441317 */ 
    12451318 
    1246  
    1247 function wordbooker_fbclient_publishaction($wbuser,$post_id)  
    1248 {    
    1249     global $wordbooker_post_options,$wpdb; 
     1319function wordbooker_return_images($post_content,$flag) { 
     1320    global $wordbooker_post_options,$wpdb,$post; 
    12501321    $wordbooker_settings =wordbooker_options();  
    1251     $post = get_post($post_id); 
    1252     $post_link_share = get_permalink($post_id); 
    1253     $post_link=wordbooker_short_url($post_id); 
    1254     $post_title=$post->post_title; 
    1255     $post_content = $post->post_content; 
    12561322    # Grab the content of the post once its been filtered for display - this converts app tags into HTML so we can grab gallery images etc. 
    1257     $processed_content ="!!!  ".apply_filters('the_content', $post_content)."    !!!"; 
     1323    $args = array( 
     1324    'post_type' => 'attachment', 
     1325    'numberposts' => -1, 
     1326    'post_status' => null, 
     1327    'post_parent' => $post->ID 
     1328    ); 
     1329    $postcontent2=""; 
     1330    $attachments = get_posts( $args ); 
     1331    if ( $attachments ) { 
     1332        foreach ( $attachments as $attachment ) { 
     1333            if ($flag==1) {wordbooker_debugger("Adding image",wp_get_attachment_url($attachment->ID),$post->ID,80) ;} 
     1334            $post_content2 .= ' <img src="' . wp_get_attachment_url($attachment->ID) . '"> '; 
     1335        } 
     1336    } 
     1337    $processed_content ="!!!!  ".$post_content2."  ".apply_filters('the_content', $post_content)."    !!!"; 
    12581338    $yturls  = array(); 
    12591339    $matches_tn=array(); 
     
    12691349 
    12701350    if ( function_exists( 'get_the_post_thumbnail' ) ) {  
    1271         wordbooker_debugger("Getting the thumnail image"," ",$post->ID,80) ; 
     1351        if ($flag==1) {wordbooker_debugger("Getting the thumnail image"," ",$post->ID,80) ;} 
    12721352        preg_match_all('/<img \s+ ([^>]*\s+)? src \s* = \s* [\'"](.*?)[\'"]/ix',get_the_post_thumbnail($post_id), $matches_tn);  
    12731353    } 
     
    12751355    $meta_tag_scan=explode(',',$wordbooker_settings['wordbooker_meta_tag_scan']); 
    12761356    foreach($meta_tag_scan as $meta_tag) { 
    1277         wordbooker_debugger("Getting image from custom meta : ",$meta_tag,$post->ID,80) ; 
     1357        if ($flag==1) {wordbooker_debugger("Getting image from custom meta : ",$meta_tag,$post->ID,80) ;} 
    12781358        $matches_ct[]=get_post_meta($post->ID, $meta_tag, TRUE); 
    12791359    } 
     
    12851365    # If the user only wants the thumbnail then we can simply not do the skim over the processed images 
    12861366    if (! isset($wordbooker_post_options["wordbooker_thumb_only"]) ) { 
    1287         wordbooker_debugger("Getting the rest of the images "," ",$post->ID) ; 
     1367        if ($flag==1) {wordbooker_debugger("Getting the rest of the images "," ",$post->ID) ;} 
    12881368        preg_match_all('/<img \s+ ([^>]*\s+)? src \s* = \s* ["](.*?)["]/ix',$processed_content, $matched); 
    12891369        $x=strip_shortcodes($post_content); 
     
    13001380        if (!isset($wordbooker_settings["wordbooker_meta_tag_thumb"])) { 
    13011381            if (! isset($wordbooker_post_options["wordbooker_thumb_only"]) ) { 
    1302                 wordbooker_debugger("Setting image array to be both thumb and the post images "," ",$post->ID,80) ; 
     1382                if ($flag==1) {wordbooker_debugger("Setting image array to be both thumb and the post images "," ",$post->ID,80) ;} 
    13031383                $pulled_images=@array_merge($matches[2],$matched[2],$yturls,$matches); 
    13041384            } 
    13051385            else { 
    1306                 wordbooker_debugger("Setting image array to be just thumb "," ",$post->ID,80) ; 
     1386                if ($flag==1) {wordbooker_debugger("Setting image array to be just thumb "," ",$post->ID,80) ;} 
    13071387                $pulled_images[]=$matches[2]; 
    13081388            }  
     
    13111391 
    13121392    if (isset($wordbooker_settings["wordbooker_meta_tag_thumb"]) && isset($wordbooker_post_options["wordbooker_thumb_only"]) ) { 
    1313     wordbooker_debugger("Setting image array to be just thumb from meta. "," ",$post->ID,80) ; 
     1393    if ($flag==1) {wordbooker_debugger("Setting image array to be just thumb from meta. "," ",$post->ID,80) ;} 
    13141394    $pulled_images[]=$matches_ct[2];} 
    13151395 
    13161396    else { 
    1317         wordbooker_debugger("Setting image array to be post and thumb images. "," ",$post->ID,80) ; 
     1397        if ($flag==1) {wordbooker_debugger("Setting image array to be post and thumb images. "," ",$post->ID,80) ;} 
    13181398        if (is_array($matched[2])) {$pulled_images[]=array_merge($matches,$matched[2]);} 
    13191399        if (is_array($matched[2]) && is_array($yturls)) {$pulled_images=array_merge($matches,$matched[2],$yturls);} 
     
    13631443        if (isset($wordbooker_settings['wordbooker_use_this_image']))  { 
    13641444            $images[]=$wordbooker_settings['wb_wordbooker_default_image']; 
    1365             wordbooker_debugger("No Post images found so using open graph default to keep Facebook happy ",'',$post->ID,90) ; 
     1445            if ($flag==1) {wordbooker_debugger("No Post images found so using open graph default to keep Facebook happy ",'',$post->ID,90) ;} 
    13661446            }  
    13671447        else { 
    13681448            $x=get_bloginfo('wpurl').'/wp-content/plugins/wordbooker/includes/wordbooker_blank.jpg'; 
    13691449            $images[]=$x; 
    1370             wordbooker_debugger("No Post images found so loading blank to keep Facebook happy ",'',$post->ID,90) ;   
     1450            if ($flag==1) {wordbooker_debugger("No Post images found so loading blank to keep Facebook happy ",'',$post->ID,90) ;} 
    13711451            } 
    13721452        } 
     
    13821462                ); 
    13831463    } 
    1384     $images=$images_array; 
    1385         foreach ($images as $key){ 
     1464        return $images_array; 
     1465} 
     1466 
     1467function wordbooker_fbclient_publishaction($wbuser,$post_id,$wpuserid)  
     1468{    
     1469    global $wordbooker_post_options,$wpdb; 
     1470    $wordbooker_settings =wordbooker_options();  
     1471    $post = get_post($post_id); 
     1472    $post_link_share = get_permalink($post_id); 
     1473    $post_link=wordbooker_short_url($post_id); 
     1474    $post_title=$post->post_title; 
     1475    $post_content = $post->post_content; 
     1476    // Get the associated images 
     1477    $args = array( 
     1478        'post_type' => 'attachment', 
     1479        'numberposts' => -1, 
     1480        'post_status' => null, 
     1481        'post_parent' => $post->ID 
     1482    ); 
     1483    $attachments = get_posts( $args ); 
     1484    if ( $attachments ) { 
     1485        foreach ( $attachments as $attachment ) { 
     1486        #   $post_content .=  ID) . '"> '; 
     1487        } 
     1488    } 
     1489    $images=wordbooker_return_images($post_content,1) ; 
     1490    foreach ($images as $key){ 
    13861491        wordbooker_debugger("Post Images : ".$key['src'],'',$post->ID) ; 
    13871492    } 
     
    14311536    #  'media' => json_encode($images) 
    14321537    ); 
    1433     if (isset($wordbooker_settings['wordbooker_use_url_not_slug'])) { unset($wordbooker_fb_post['caption']);} 
     1538#   if (isset($wordbooker_settings['wordbooker_use_url_not_slug'])) { unset($wordbooker_fb_post['caption']);} 
     1539 
     1540    if (isset($wordbooker_settings['wordbooker_use_url_not_slug'])) 
     1541    { 
     1542        $wordbooker_fb_post['caption'] = get_bloginfo(‘url’); 
     1543    } 
    14341544    wordbooker_debugger("Post Titled : ",$post_data['post_title'],$post_id,90) ; 
    14351545    wordbooker_debugger("Post URL : ",$post_data['post_link'],$post_id,90) ; 
     
    14781588            wordbooker_debugger("Posting to ".$target_types[$target_type]." ".$target_name." (".$posting_target['target_id'].") as a ".$posting_type[$posting_target['target_type']],"",$post_id,90) ;  
    14791589            if ($access_token=='dummy access token') {$access_token=$wbuser->access_token;} 
    1480             $target=substr($posting_target['target'],3); 
    1481             $is_dummy=$wordbooker_settings['wordbooker_fake_publish']; 
    1482             switch($posting_target['target_type']) { 
    1483                 # Wall Post 
    1484                 case 1 :  
    1485                 wordbooker_wall_post($post_id,$access_token,$post_title,$wordbooker_fb_post ,$target,$is_dummy,$target_name); 
    1486                 break; 
    1487                 # Note 
    1488                 case 2 : 
    1489                 wordbooker_notes_post($post_id,$access_token,$post_title,$target,$is_dummy,$target_name); 
    1490                 break; 
    1491                 # Status Update 
    1492                 case 3 :  
    1493                 wordbooker_status_update($post_id,$access_token,$post_data['post_date'],$target,$is_dummy,$target_name); 
    1494                 break ; 
    1495                 # Link Post 
    1496                 case 4 :  
    1497                 wordbooker_link_post($post_id,$access_token,$post_title,$wordbooker_fb_post ,$target,$is_dummy,$target_name); 
    1498                 break ; 
     1590            if (is_null($access_token)) { 
     1591                wordbooker_debugger("Posting to ".$target_name." (".$posting_target['target_id'].") failed as there is no access token","",$post_id,90) ;  
     1592            }  
     1593            else { 
     1594                $target=substr($posting_target['target'],3);  
     1595                $is_dummy=$wordbooker_settings['wordbooker_fake_publish']; 
     1596                switch($posting_target['target_type']) { 
     1597                    # Wall Post 
     1598                    case 1 :  
     1599                    wordbooker_wall_post($post_id,$access_token,$post_title,$wordbooker_fb_post ,$target,$is_dummy,$target_name,$wpuserid); 
     1600                    break; 
     1601                    # Note 
     1602                    case 2 : 
     1603                    wordbooker_notes_post($post_id,$access_token,$post_title,$target,$is_dummy,$target_name,$wpuserid); 
     1604                    break; 
     1605                    # Status Update 
     1606                    case 3 :  
     1607                    wordbooker_status_update($post_id,$access_token,$post_data['post_date'],$target,$is_dummy,$target_name,$wpuserid); 
     1608                    break ; 
     1609                    # Link Post 
     1610                    case 4 :  
     1611                    wordbooker_link_post($post_id,$access_token,$post_title,$wordbooker_fb_post ,$target,$is_dummy,$target_name,$wpuserid); 
     1612                    break ; 
     1613                } 
    14991614            } 
    15001615 
     
    15111626    $strip_array= array ('addthis.com','gravatar.com','zemanta.com','wp-includes','plugins','favicon.ico','facebook.com','themes','mu-plugins','fbcdn.net'); 
    15121627    foreach($images as $single){ 
    1513         $file_extension = strtolower(substr($single , strrpos($single , '.') +1));  
     1628        $file_extension = trim(strtolower(substr($single , strrpos($single , '.') +1)));  
    15141629        if (in_array($file_extension,$image_types)){ 
    15151630        foreach ($strip_array as $strip_domain) { 
    15161631            wordbooker_debugger("Looking for ".$strip_domain." in ".$single," ",$post->ID,80) ; 
    15171632            if (stripos($single,$strip_domain)) {wordbooker_debugger("Found a match so dump the image",$single,$post->ID,80) ;} else { if (!in_array($single,$newimages)){$newimages[]=$single;}} 
    1518         }} else {wordbooker_debugger("Image URL ".$single." not valid "," ",$post->ID,90) ;} 
     1633        }} else {wordbooker_debugger("Image URL ".$single." ( ".$file_extension." ) not valid "," ",$post->ID,90) ;} 
    15191634    } 
    15201635    return $newimages; 
     
    16011716    } 
    16021717    $wplang=wordbooker_get_language(); 
    1603  
     1718    $wordbooker_settings = wordbooker_options();  
     1719    $fb_id=$wordbooker_settings["fb_comment_app_id"]; 
     1720    if (strlen($fb_id)<6) { 
     1721    $fb_id=WORDBOOKER_FB_ID; 
     1722    } 
     1723    if (defined('WORDBOOKER_PREMIUM')) { 
     1724        $fb_id=WORDBOOKER_FB_ID; 
     1725    } 
    16041726$efb_script = <<< EOGS 
    16051727 <div id="fb-root"></div> 
     
    16071729      window.fbAsyncInit = function() { 
    16081730    FB.init({ 
    1609      appId  : '254577506873', 
     1731     appId  : ' 
     1732EOGS; 
     1733$efb_script.=$fb_id; 
     1734$efb_script .= <<< EOGS 
     1735', 
    16101736      status : true, // check login status 
    16111737      cookie : true, // enable cookies to allow the server to access the session 
     
    16251751    </script> 
    16261752EOGS; 
    1627     $wordbooker_settings = wordbooker_options();  
    1628     if  (isset($wordbooker_settings['wordbooker_like_button_show']) || isset($wordbooker_settings['wordbooker_like_share_too'] ) || isset($wordbooker_settings['wordbooker_use_fb_comments']))  
     1753    if  (isset($wordbooker_settings['wordbooker_like_button_show']) || isset($wordbooker_settings['wordbooker_use_fb_comments']))  
    16291754        { 
     1755    if (!isset($wordbooker_settings['wordbooker_fb_disable_api'])) { 
    16301756        echo $efb_script; 
     1757    } 
     1758/* 
    16311759         if ( isset($wordbooker_settings['wordbooker_iframe'])) { 
    16321760            echo '<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>'; 
    16331761        } 
     1762*/ 
    16341763    } 
    16351764#   echo '\n<script type="text/javascript " defer="defer" > setTimeout("wordbooker_read()",3000); </script> \n'; 
     
    16421771    $bname=get_bloginfo('name'); 
    16431772    $bdesc=get_bloginfo('description'); 
     1773    $meta_string=""; 
    16441774    $wplang=wordbooker_get_language(); 
    16451775    $wordbooker_settings = wordbooker_options();     
     
    16531783    $blog_name=get_bloginfo('name'); 
    16541784    echo '<!-- Wordbooker generated tags -->'; 
    1655     echo '<meta property="og:locale" content="'.$wplang.'"/> '; 
    1656     echo '<meta property="og:site_name" content="'.$bname.' - '.$bdesc.'"/> '; 
     1785    echo '<meta property="og:locale" content="'.$wplang.'" /> '; 
     1786    echo '<meta property="og:site_name" content="'.$bname.' - '.$bdesc.'" /> '; 
    16571787    if (strlen($wordbooker_settings["fb_comment_app_id"])<6) { 
    16581788    if ($wordbooker_settings['wordbooker_fb_comments_admin']) { 
    16591789        $xxx=wordbooker_get_cache(-99,facebook_id,1); 
    16601790            if (!is_null($xxx)) { 
    1661             echo '<meta property="fb:admins" content="'.$xxx.'"/> '; 
     1791            echo '<meta property="fb:admins" content="'.$xxx.'" /> '; 
    16621792        } 
    16631793    } else { 
    16641794         $xxx=wordbooker_get_cache( $wpuserid,facebook_id,1); 
    16651795        if (!is_null($xxx->facebook_id)) { 
    1666             echo '<meta property="fb:admins" content="'.$xxx->facebook_id.'"/> '; 
     1796            echo '<meta property="fb:admins" content="'.$xxx->facebook_id.'" /> '; 
    16671797        } 
    16681798     } 
     
    16771807        $post_link = get_permalink($post->ID); 
    16781808        $post_title=$post->post_title; 
     1809        echo '<meta property="og:type" content="article" /> '; 
    16791810        echo '<meta property="og:title" content="'.htmlspecialchars(strip_tags($post_title),ENT_QUOTES).'"/> '; 
    1680         echo '<meta property="og:url" content="'.$post_link.'"/> '; 
    1681         echo '<meta property="og:type" content="article"/> '; 
     1811        echo '<meta property="og:url" content="'.$post_link.'" /> '; 
     1812 
    16821813         
    16831814        $ogimage=get_post_meta($post->ID, '_wordbooker_thumb', TRUE); 
    1684         if (strlen($ogimage)<4 && strlen($wordbooker_settings['wb_wordbooker_default_image'])>4) { 
    1685             $ogimage=$wordbooker_settings['wb_wordbooker_default_image']; 
     1815        if (strlen($ogimage)<6 ) { 
     1816            $images=wordbooker_return_images($post->post_content,0); 
     1817            $ogimage=$images[0]['src']; 
     1818            update_post_meta($post->ID, '_wordbooker_thumb', $ogimage); 
    16861819        } 
    16871820        if (strlen($ogimage)<4) {$ogimage=get_bloginfo('wpurl').'/wp-content/plugins/wordbooker/includes/wordbooker_blank.jpg';} 
    16881821        if (strlen($ogimage)>4) { 
    1689             echo '<meta property="og:image" content="'.$ogimage.'"/> '; 
     1822            echo '<meta property="og:image" content="'.$ogimage.'" /> '; 
    16901823             
    16911824        } 
     
    16931826    else 
    16941827    { # Not a single post so we only need the og:type tag 
    1695         echo '<meta property="og:type" content="blog"/> '; 
    1696         echo '<meta property="og:type" content="'.get_bloginfo('description').'"/> '; 
     1828        echo '<meta property="og:type" content="blog" /> '; 
     1829        #echo '<meta property="og:description" content="'.$bdesc.'" /> '; 
    16971830    } 
    16981831    if ($meta_length = wordbooker_get_option('wordbooker_description_meta_length')) { 
     
    17001833            $excerpt=get_post_meta($post->ID, '_wordbooker_extract', TRUE); 
    17011834            if(strlen($excerpt) < 5 ) { 
    1702                 $excerpt=wordbooker_post_excerpt($post->post_content,$wordbooker_settings['wordbooker_extract_length']); 
     1835                $excerpt=wordbooker_post_excerpt($post->post_content,250); 
    17031836                update_post_meta($post->ID, '_wordbooker_extract', $excerpt); 
    17041837            } 
     
    17071840                $excerpt=$post->post_excerpt;  
    17081841                $description = str_replace('"','&quot;',$post->post_content); 
    1709                 $excerpt = wordbooker_post_excerpt($description,$meta_length); 
     1842                $excerpt = wordbooker_post_excerpt($description,1000); 
    17101843                $excerpt = preg_replace('/(\r|\n)+/',' ',$excerpt); 
    17111844                $excerpt = preg_replace('/\s\s+/',' ',$excerpt); 
     
    17151848            # Now if we've got something put the meta tag out. 
    17161849            if (isset($excerpt)){  
    1717                 $meta_string = sprintf("<meta name=\"description\" content=\"%s\"/> ", htmlspecialchars($excerpt,ENT_QUOTES)); 
    1718                 $meta_string .= sprintf("<meta property=\"og:description\" content=\"%s\"/> ", htmlspecialchars($excerpt,ENT_QUOTES)); 
     1850                if ($meta_length > 0 ) {$meta_string .= sprintf("<meta name=\"description\" content=\"%s\" /> ", htmlspecialchars($excerpt,ENT_QUOTES));} 
     1851                $meta_string .= sprintf("<meta property=\"og:description\" content=\"%s\" /> ", htmlspecialchars($excerpt,ENT_QUOTES)); 
    17191852                echo $meta_string; 
    17201853            } 
     
    17221855    else 
    17231856        {        
    1724             $meta_string = sprintf("<meta name=\"description\" content=\"%s\"/> ", get_bloginfo('description')); 
    1725             $meta_string .= sprintf("<meta property=\"og:description\" content=\"%s\"/> ", htmlspecialchars($excerpt,ENT_QUOTES)); 
     1857            if ($meta_length > 0 ) {$meta_string .= sprintf("<meta name=\"description\" content=\"%s\" /> ", $bdesc); } 
     1858            $meta_string .= sprintf("<meta property=\"og:description\" content=\"%s\" /> ", $bdesc); 
    17261859            echo $meta_string; 
    17271860        } 
     
    18021935    if (isset($wordbooker_settings['wordbooker_time_button'])) { 
    18031936        if (isset($wordbooker_settings['wordbooker_iframe'])) { 
    1804              $share_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/add_to_timeline.php?show-faces=true&amp;mode=button&amp;appId=277399175632726" scrolling="no" frameborder="0" style="border:none; overflow:hidden;" allowTransparency="true"></iframe>'; 
     1937             $share_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/add_to_timeline.php?show-faces=true&amp;mode=button&amp;appId=277399175632726" style="border:none; overflow:hidden;"></iframe>'; 
    18051938        } 
    18061939        else { 
     
    18461979    if (isset($wordbooker_settings['wordbooker_time_button'])) { 
    18471980        if (isset($wordbooker_settings['wordbooker_iframe'])) { 
    1848              $share_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/add_to_timeline.php?show-faces=true&amp;mode=button&amp;appId=277399175632726" scrolling="no" frameborder="0" style="border:none; overflow:hidden;" allowTransparency="true"></iframe>'; 
     1981             $share_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/add_to_timeline.php?show-faces=true&amp;mode=button&amp;appId=277399175632726" frameborder="0" style="border:none; overflow:hidden;" ></iframe>'; 
    18491982        } 
    18501983        else { 
     
    18832016            $wplang=wordbooker_get_language(); 
    18842017            if ($wordbooker_settings['wordbooker_fblike_faces']=='true') {$px=80;} 
    1885             $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/send.php?locale='.$wplang.'&href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" scrolling="no" frameborder="no" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" allowTransparency="true"></iframe>'; 
     2018            $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/send.php?locale='.$wplang.'&amp;href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" ></iframe>'; 
    18862019 
    18872020        } 
     
    19132046      ) 
    19142047    { 
     2048    if ($wordbooker_settings['wordbooker_fblike_align']=='right') {$wordbooker_settings["wordbooker_like_width"]=1;} 
    19152049        if (isset($wordbooker_settings['wordbooker_iframe'])) {  
    19162050            $px=35; 
    19172051            $wplang=wordbooker_get_language(); 
    19182052            if ($wordbooker_settings['wordbooker_fblike_faces']=='true') {$px=80;} 
    1919             $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/send.php?locale='.$wplang.'&href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" scrolling="no" frameborder="no" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" allowTransparency="true"></iframe>'; 
     2053            $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/send.php?locale='.$wplang.'&amp;href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" ></iframe>'; 
    19202054 
    19212055        } 
     
    19522086            $wplang=wordbooker_get_language(); 
    19532087            if ($wordbooker_settings['wordbooker_fblike_faces']=='true') {$px=95;} 
    1954             $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/like.php?locale='.$wplang.'&href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" scrolling="no" frameborder="no" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" allowTransparency="true"></iframe>'; 
     2088            $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/like.php?locale='.$wplang.'&amp;href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" ></iframe>'; 
    19552089 
    19562090        } 
     
    19852119      ) 
    19862120    { 
     2121    if ($wordbooker_settings['wordbooker_fblike_align']=='right') {$wordbooker_settings["wordbooker_like_width"]=1;} 
    19872122        if (isset($wordbooker_settings['wordbooker_iframe'])) {  
    19882123            $px=35; 
     
    19922127            if ($wplang=="WPLANG" ) {$wplang="en_US";} 
    19932128            if ($wordbooker_settings['wordbooker_fblike_faces']=='true') {$px=95;} 
    1994             $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/like.php?locale='.$wplang.'&href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" scrolling="no" frameborder="no" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" allowTransparency="true"></iframe>'; 
     2129            $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/like.php?locale='.$wplang.'&amp;href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" ></iframe>'; 
    19952130 
    19962131        } 
     
    20352170    $post_cont2=$post_cont; 
    20362171    $post_link = get_permalink($post->ID); 
    2037     $share_code=wordbooker_fb_share_inline(); 
     2172    #$share_code=wordbooker_fb_share_inline(); 
    20382173    $like_code=wordbooker_fb_like_inline(); 
    20392174    $send_code=wordbooker_fb_send_inline(); 
    20402175    $comment_code=wordbooker_fb_comment_inline(); 
    20412176    $read_code=wordbooker_fb_read_inline(); 
     2177/* 
    20422178    if ($wordbooker_settings['wordbooker_fblike_location']!=$wordbooker_settings['wordbooker_fbshare_location']){ 
    20432179        if ($wordbooker_settings['wordbooker_fbshare_location']=='top'){ 
     
    20482184        } 
    20492185 
    2050  
     2186*/ 
    20512187        if ($wordbooker_settings['wordbooker_fblike_send_combi']=='true'){ 
    20522188            if ($wordbooker_settings['wordbooker_fblike_location']=='bottom'){ 
    2053                 $post_cont2= $post_cont2."<div class='wp_fbl_bottom'>".$like_code.'</div>';  
     2189                $post_cont2= $post_cont2."<div class='wp_fbl_bottom' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$like_code.'</div>';  
    20542190            }  
    20552191            if ($wordbooker_settings['wordbooker_fblike_location']=='top') { 
    2056                 $post_cont2= "<div class='wp_fbl_top'>".$like_code.'</div>'.$post_cont2; 
     2192                $post_cont2= "<div class='wp_fbl_top' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$like_code.'</div>'.$post_cont2; 
    20572193            } 
    20582194        } 
    2059     }   else { 
    2060                 if ($wordbooker_settings['wordbooker_fblike_location']=='bottom'){ 
    2061                     $post_cont2=$post_cont2."<div class='wb_fb_bottom'>".$like_code.'<div style="float:right;">'.$share_code.'</div></div>';  
    2062                 }  
    2063                 if ($wordbooker_settings['wordbooker_fblike_location']=='top'){ 
    2064                     $post_cont2= "<div class='wb_fb_top'>".$like_code.'<div style="float:right;">'.$share_code.'</div></div>'.$post_cont2;  
    2065                 } 
    2066     } 
     2195/* 
     2196        else { 
     2197            if ($wordbooker_settings['wordbooker_fblike_location']=='bottom'){ 
     2198                $post_cont2=$post_cont2."<div class='wb_fb_bottom'>".$like_code.'</div>';  
     2199            }  
     2200            if ($wordbooker_settings['wordbooker_fblike_location']=='top'){ 
     2201                $post_cont2= "<div class='wb_fb_top'>".$like_code.'</div>'.$post_cont2;  
     2202            } 
     2203    } 
     2204*/ 
    20672205    if ($wordbooker_settings['wordbooker_fblike_send_combi']=='false' && $wordbooker_settings['wordbooker_fblike_send']=='true' ){ 
    20682206        if ($wordbooker_settings['wordbooker_fblike_location']==$wordbooker_settings['wordbooker_fbshare_location']){ 
    20692207            if ($wordbooker_settings['wordbooker_fblike_location']=='bottom'){ 
    2070                 $post_cont2=$post_cont2."<div class='wb_fb_bottom'>".$send_code.'<div style="float:right;">'.$share_code.'</div></div>';  
     2208                $post_cont2=$post_cont2."<div class='wb_fb_bottom' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$send_code.'</div>';  
    20712209            }  
    20722210            if ($wordbooker_settings['wordbooker_fblike_location']=='top'){ 
    2073                 $post_cont2= "<div class='wb_fb_top'>".$send_code.'<div style="float:right;">'.$share_code.'</div></div>'.$post_cont;  
     2211                $post_cont2= "<div class='wb_fb_top' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$send_code.'</div>'.$post_cont;  
    20742212            } 
    20752213        } else { 
    20762214        if ($wordbooker_settings['wordbooker_fblike_location']=='bottom'){ 
    2077             $post_cont2= $post_cont2."<div class='wp_fbl_bottom'>".$send_code.'</div>';  
     2215            $post_cont2= $post_cont2."<div class='wp_fbl_bottom' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$send_code.'</div>';  
    20782216        }  
    20792217        if ($wordbooker_settings['wordbooker_fblike_location']=='top') { 
    2080             $post_cont2= "<div class='wp_fbl_top'>".$send_code.'</div>'.$post_cont2; 
     2218            $post_cont2= "<div class='wp_fbl_top' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$send_code.'</div>'.$post_cont2; 
    20812219        } 
    20822220    } 
     
    20872225    }  
    20882226    if ($wordbooker_settings['wordbooker_fbread_location']=='bottom') { 
    2089         $post_cont2=$post_cont2."<div class='wp_fbr_bottom'>".$read_code.'</div>'; 
     2227        $post_cont2=$post_cont2."<div class='wp_fbr_bottom' >".$read_code.'</div>'; 
    20902228    } 
    20912229    if ($wordbooker_settings['wordbooker_comment_location']=='bottom') { $post_cont2=$post_cont2."<div class='wb_fb_comment'><br/>".$comment_code."</div>"; } 
     
    20952233function wordbooker_get_cache($user_id,$field=null,$table=0) { 
    20962234    global $wpdb,$blog_id; 
    2097     #$blog_id=1; 
    20982235    if (!isset($user_id)) {return;} 
    20992236    $tname=WORDBOOKER_USERSTATUS; 
     
    21252262    if(is_array($perms_to_check)) { 
    21262263        foreach(array_keys($perms_to_check) as $key){ 
    2127             # Bit map check to put out the right text for the missing permissions. 
    21282264            if (pow(2,$key) & $perm_miss->auths_needed ) { 
    21292265                $midamble.=$perm_messages[$key].", "; 
    21302266                } 
    21312267        } 
    2132             $midamble=rtrim($midamble,","); 
    2133             $midamble=trim(preg_replace("/(.*?)((,|\s)*)$/m", "$1", $midamble)); 
    2134             $midamble=substr_replace($midamble, " and ", strrpos($midamble, ","), strlen(","));  
    2135                    echo " ".$preamble.$midamble.$postamble.'</p><div style="text-align: center;"><a href="'.$loginUrl2.'" > <img src="http://static.ak.facebook.com/images/devsite/facebook_login.gif"  alt="Facebook Login Button" /></a><br /></div>'; 
    2136              
     2268        $midamble=rtrim($midamble,","); 
     2269        $midamble=trim(preg_replace("/(.*?)((,|\s)*)$/m", "$1", $midamble)); 
     2270        $midamble=substr_replace($midamble, " and ", strrpos($midamble, ","), strlen(","));  
     2271        echo " ".$preamble.$midamble.$postamble.'</p><div style="text-align: center;"><a href="'.$loginUrl2.'" > <img src="http://static.ak.facebook.com/images/devsite/facebook_login.gif"  alt="Facebook Login Button" /></a><br /></div>';        
    21372272    } 
    21382273    echo "and then save your settings<br />"; 
     
    22002335        foreach (array_keys($x) as $key ) { 
    22012336            if (substr($key,0,8)=='wordbook') { 
    2202             #   wordbooker_debugger("Replacing : ".$wordbooker_post_options[$key],$x[$key],$post->ID) ; 
    22032337                $wordbooker_post_options[$key]=str_replace( array('&amp;','&quot;','&#039;','&lt;','&gt;','&nbsp;&nbsp;'),array('&','"','\'','<','>',"\t"),$x[$key]); 
    22042338            } 
     
    22062340    } 
    22072341     
    2208         if (is_array($wordbooker_post_options)){ 
     2342    if (is_array($wordbooker_post_options)){ 
    22092343        foreach (array_keys($wordbooker_post_options) as $key){ 
    22102344            wordbooker_debugger("Post option : ".$key,$wordbooker_post_options[$key],$post->ID,80) ; 
     
    22192353    # If the default user is set to 0 then we use the current user (or the author of the post if that isn't set - i.e. if this is a scheduled post) 
    22202354    if  ($wordbooker_post_options["wordbooker_default_author"] == 0 ) {$wpuserid=$whichuser;} else {$wpuserid=$wordbooker_post_options["wordbooker_default_author"];} 
     2355    $images=wordbooker_return_images($post->post_content,0); 
     2356    $ogimage=$images[0]['src']; 
     2357    update_post_meta($post->ID, '_wordbooker_thumb', $ogimage); 
     2358    $excerpt=wordbooker_post_excerpt($post->post_content,$wordbooker_settings['wordbooker_extract_length']); 
     2359    update_post_meta($post->ID, '_wordbooker_extract', $excerpt); 
    22212360     
    2222         if ($wordbooker_post_options["wordbooker_publish_default"]!="on") { 
     2361    if ($wordbooker_post_options["wordbooker_publish_default"]!="on") { 
    22232362        wordbooker_debugger("Publish Default is not Set, Giving up ",$wpuserid,$post->ID) ; 
    22242363        return; 
    22252364    } 
     2365 
    22262366    wordbooker_debugger("User has been set to : ",$wpuserid,$post->ID,80) ; 
    22272367    if (!$wbuser = wordbooker_get_userdata($wpuserid) ) { 
     
    22322372 
    22332373    wordbooker_debugger("Calling wordbooker_fbclient_publishaction"," ",$post->ID,99) ; 
    2234     wordbooker_fbclient_publishaction($wbuser, $post->ID); 
     2374    wordbooker_fbclient_publishaction($wbuser, $post->ID,$wpuserid); 
    22352375    unset($doing_post); 
    22362376    return 30; 
    22372377} 
    22382378 
     2379function wordbooker_update_post_meta($post) { 
     2380    $images=wordbooker_return_images($post->post_content,0); 
     2381    $ogimage=$images[0]['src']; 
     2382    update_post_meta($post->ID, '_wordbooker_thumb', $ogimage); 
     2383    $excerpt=wordbooker_post_excerpt($post->post_content,$wordbooker_settings['wordbooker_extract_length']); 
     2384    update_post_meta($post->ID, '_wordbooker_extract', $excerpt); 
     2385} 
    22392386 
    22402387function wordbooker_delete_post($post_id) {  
     
    22592406    if ($post->post_type=='reply') {return;} 
    22602407    if ($_POST['action']=='autosave') { return;} 
     2408    wordbooker_update_post_meta($post); 
    22612409    if ($_POST['action']=='editpost') {  
    22622410        foreach (array_keys($_POST) as $key ) { 
     
    22712419    if ($post->post_password != '') {return;} 
    22722420    # Check for non public custom post types. 
    2273     if ( $post->post_status == 'publish' && $post->post_type != 'post' ) { 
     2421    #var_dump($post->post_type); 
     2422    if ( $post->post_status == 'publish' ) { 
    22742423        $post_type_info = get_post_type_object( $post->post_type ); 
    22752424        if ( $post_type_info && !$post_type_info->public ) { return; } 
     
    22772426    # Has this been fired by a post revision rather than a proper publish 
    22782427    if (wp_is_post_revision($post->ID)) {return;} 
    2279  
    22802428    $wordbooker_settings=wordbooker_options(); 
    22812429    $wb_params = get_post_meta($post->ID, '_wordbooker_options', true);  
     
    23582506     
    23592507    update_post_meta($post->ID, '_wordbooker_options', $wb_params);  
    2360  
    23612508    if ($newstatus=="publish") { 
    23622509        wordbooker_debugger("Calling Wordbooker publishing function",' ',$post->ID,90) ; 
     
    23972544    $usid=1; 
    23982545    $usid=$user_ID; 
     2546    #var_dump($wbooker_user_id); 
    23992547    if (isset($user_ID)) {$usid=$user_ID;} 
    24002548    if (isset($post_id) && ($post_id>=1)){ 
     
    24522600     
    24532601} 
    2454 /****************************************************************************** 
    2455  * Register hooks with WordPress. 
    2456  */ 
    2457  
    2458 /* Plugin maintenance. */ 
     2602 
     2603 
    24592604register_activation_hook(__FILE__, 'wordbooker_activate'); 
     2605add_action ('init', 'wordbooker_init'); 
     2606  
    24602607# When a user is deleted from the blog we should clear down everything they've done in Wordbooker. 
    24612608add_action('delete_user', 'wordbooker_remove_user'); 
    2462 add_action ('init', 'wordbooker_init'); 
    2463   
     2609 
    24642610function wordbooker_init () { 
    24652611    load_plugin_textdomain ('wordbooker',false,basename(dirname(__FILE__)).'/languages'); 
     
    24672613 
    24682614function wordbooker_schema($attr) { 
    2469         $attr .= " xmlns:fb=\"http://www.facebook.com/2008/fbml\" xmlns:og=\"http://ogp.me/ns/fb#\"  "; 
    2470         return $attr; 
     2615       # $attr .= " xmlns:fb=\"http://www.facebook.com/2008/fbml\" xmlns:og=\"http://ogp.me/ns#\" "; 
     2616/* 
     2617    if ( (is_single() || is_page()) && !is_front_page() && !is_category() && !is_home() ) { 
     2618         $attr .=' xmlns:fb="http://ogp.me/ns/fb#" xmlns:article="http://ogp.me/ns/article#"';} 
     2619    else { 
     2620         $attr .= ' xmlns:fb="http://ogp.me/ns#  xmlns:website="http://ogp.me/ns/website#"';} 
     2621*/ 
     2622 
     2623  if (preg_match('/(prefix\s*=\s*[\"|\'])/i', $attr)) { 
     2624    $attr = preg_replace('/(prefix\s*=\s*[\"|\'])/i', '${1}"og: http://ogp.me/ns#" ', $attr); 
     2625  } else { 
     2626    $attr .= ' prefix="og: http://ogp.me/ns#"'; 
     2627  } 
     2628  return $attr; 
    24712629} 
    24722630 
    24732631function wordbooker_get_avatar($avatar, $comment, $size="50"){ 
    2474       $author_url = get_comment_author_url(); 
     2632    $author_url = $comment->comment_author_url; 
    24752633    $fb_id=get_comment_meta($comment->comment_ID,'fb_uid',true); 
    24762634    if (strlen($fb_id)<1) { 
    2477      $parse_author_url = (parse_url($author_url)); 
    2478              $fb_id_array = explode('/',$parse_author_url['path']); 
    2479           $sizer = count($fb_id_array) -1; 
    2480           $fb_id =  $fb_id_array[$sizer]; 
     2635        $parse_author_url = (parse_url($author_url)); 
     2636        $fb_id_array = explode('/',$parse_author_url['path']); 
     2637        $sizer = count($fb_id_array) -1; 
     2638        $fb_id =  $fb_id_array[$sizer]; 
    24812639    } 
    24822640    if (strlen($fb_id)>1) { 
    2483     $grav_url= "http://graph.facebook.com/".$fb_id."/picture?type=square"; 
    2484     $avatar = "<img src='".$grav_url."'  height='".$size."' width='".$size."' class='avatar avatar-40 photo' /> ";} 
    2485     return $avatar; 
     2641        $grav_url= "http://graph.facebook.com/".$fb_id."/picture?type=square"; 
     2642        $avatar = "<img src='".$grav_url."'  height='".$size."' width='".$size."' class='avatar avatar-40 photo' /> "; 
     2643    } 
     2644    return $avatar; 
    24862645} 
    24872646 
     
    24912650    'display'   => __('Every 10 Minutes', 'wordbooker'), 
    24922651    ); 
    2493  
    24942652    $schedules['15mins'] = array( 
    24952653    'interval'   => 900, 
    24962654    'display'   => __('Every 15 Minutes', 'wordbooker'), 
    24972655    ); 
    2498  
    24992656    $schedules['20mins'] = array( 
    25002657    'interval'   => 1200, 
    25012658    'display'   => __('Every 20 Minutes', 'wordbooker'), 
    25022659    ); 
    2503  
    25042660    $schedules['30mins'] = array( 
    25052661    'interval'   => 1800, 
    25062662    'display'   => __('Every 30 Minutes', 'wordbooker'), 
    25072663    ); 
    2508  
    25092664    $schedules['45mins'] = array( 
    25102665    'interval'   => 2700, 
    25112666    'display'   => __('Every 45 Minutes', 'wordbooker'), 
    25122667    ); 
    2513  
    25142668    $schedules['2hours'] = array( 
    25152669    'interval'   => 7200, 
    25162670    'display'   => __('Every 2 Hours', 'wordbooker'), 
    25172671    ); 
    2518  
    25192672    return array_merge($schedules); 
    25202673} 
     
    25342687    #include("includes/wordbooker_get_friend.php"); 
    25352688    #include("includes/custom_quick_edit.php"); 
    2536 } 
    2537 # If they've disabled Wordbooker then we don't need any of these 
    2538 if (!isset($wordbooker_disabled)){ 
    2539     $wordbooker_fb_gravatars=wordbooker_get_option('wordbooker_no_facebook_gravatars'); 
     2689 
    25402690    add_action('transition_post_status', 'wordbooker_process_post_data',10,3); 
    25412691    add_action('delete_post', 'wordbooker_delete_post'); 
     
    25452695    add_action('wp_footer', 'wordbooker_footer'); 
    25462696    add_filter('language_attributes', 'wordbooker_schema'); 
     2697    $wordbooker_fb_gravatars=wordbooker_get_option('wordbooker_no_facebook_gravatars'); 
    25472698    if (!isset($wordbooker_fb_gravatars)){ 
    25482699        add_filter('get_avatar','wordbooker_get_avatar',1, 3 ); 
     
    25532704    add_shortcode('wb_fb_like', 'wordbooker_fb_like_inline'); 
    25542705    add_shortcode('wb_fb_send', 'wordbooker_fb_send_inline'); 
    2555     add_shortcode('wb_fb_share', 'wordbooker_fb_share_inline'); 
     2706//  add_shortcode('wb_fb_share', 'wordbooker_fb_share_inline'); 
    25562707    add_shortcode('wb_fb_comment', 'wordbooker_fb_comment_inline'); 
    25572708    add_shortcode('wb_fb_read','wordbooker_fb_read_inline'); 
     2709    // If simple facebook connect is installed and enabled then we can pass the WB locale onto its own FB API launcher. 
     2710    if (function_exists('jfb_output_facebook_init')) { 
     2711        add_filter('wpfb_output_facebook_locale', 'wordbooker_get_language'); 
     2712    } 
    25582713 
    25592714} 
  • wordbooker/trunk/includes/wordbooker_comments.php

    r508474 r539162  
    7373        continue ; 
    7474    } 
    75     $sql="select comment_ID from ".$wpdb->comments." where comment_post_id=".$row->wp_post_id." and comment_approved=1 and comment_id not in (select wp_comment_id from ".WORDBOOKER_POSTCOMMENTS." where  wp_post_id=".$row->wp_post_id." and fb_post_id='".$row->fb_post_id."' and user_id=".$user_id.") and comment_post_id in (select ID from ".$wpdb->posts." WHERE comment_status='open')"; 
     75    $sql="select comment_ID from ".$wpdb->comments." where comment_post_id=".$row->wp_post_id." and comment_approved=1 and comment_id not in (select wp_comment_id from ".WORDBOOKER_POSTCOMMENTS." where  wp_post_id=".$row->wp_post_id." and fb_post_id='".$row->fb_post_id."' and user_id=".$user_id." and comment_post_id in (select ID from ".$wpdb->posts." WHERE comment_status='open'))"; 
    7676    if ($close_comments==1) { $sql.="and comment_post_id in (select ID from ".$wpdb->posts." WHERE post_date > DATE_SUB( CURDATE( ) , INTERVAL ".$close_days_old."  
    7777DAY ))";} 
  • wordbooker/trunk/includes/wordbooker_cron.php

    r509677 r539162  
    232232*/ 
    233233        $fb_status_info=wordbooker_status_feed($suid,$wbuser2->access_token); 
     234        #var_dump($fb_status_info); 
    234235        foreach($fb_status_info->data as $fbstat) { 
    235236            if(!is_null($fbstat->message)){ 
     
    246247        wordbooker_debugger("Setting Status Name as  : ",mysql_real_escape_string($fb_profile_info->name),-1,9) ; 
    247248        $sql="insert into ".WORDBOOKER_USERSTATUS." set name='".mysql_real_escape_string($fb_profile_info->name)."'"; 
    248             if (isset($status_time)) { 
    249                 if (stristr($status_message,"[[PV]]")) { 
    250                     wordbooker_debugger("Found [[PV]] - not updating status"," ",-1,9); 
    251                 }  
    252                 else { 
    253                     wordbooker_debugger("Setting status as  : ",mysql_real_escape_string($status_message),-1,9) ; 
    254                     $sql.=", status='".mysql_real_escape_string($status_message)."'"; 
    255                     $sql.=", updated=".mysql_real_escape_string(strtotime($status_time)); 
    256                 } 
    257         } else {wordbooker_debugger("Failed to get Status information from FB"," ",-1,9); } 
     249        if (isset($status_time)) { 
     250            if (stristr($status_message,"[[PV]]")) { 
     251                wordbooker_debugger("Found [[PV]] - not updating status"," ",-1,9); 
     252            }  
     253            else { 
     254                wordbooker_debugger("Setting status as  : ",mysql_real_escape_string($status_message),-1,9) ; 
     255                $sql.=", status='".mysql_real_escape_string($status_message)."'"; 
     256                $sql.=", updated=".mysql_real_escape_string(strtotime($status_time)); 
     257            } 
     258        } 
     259        else { 
     260            wordbooker_debugger("Failed to get Status information from FB"," ",-1,9);  
     261        } 
    258262 
    259263        wordbooker_debugger("Setting Status URL as  : ",mysql_real_escape_string($fb_profile_info->link),-1,9) ; 
  • wordbooker/trunk/includes/wordbooker_facebook_curl.php

    r505615 r539162  
    7575function wordbooker_status_feed($fb_id,$access_token) { 
    7676    if (!isset($fb_id)){$fb_id='me';} 
    77         $url = 'https://graph.facebook.com/'.$fb_id.'/feed/?access_token='.$access_token.'&format=JSON'; 
     77        $url = 'https://graph.facebook.com/'.$fb_id.'/feed/?access_token='.$access_token.'&format=JSON&limit=20'; 
    7878    $x=wordbooker_make_curl_call($url); 
     79    #var_dump($x); 
    7980        return($x); 
    8081} 
  • wordbooker/trunk/includes/wordbooker_fb_widget.php

    r505615 r539162  
    7676        $fanpages=unserialize(stripslashes($instance['fanpages'])); 
    7777        $url=$fanpages[$instance['pid']]; 
     78        echo "<!-- Wordbooker FB like box widget -->"; 
    7879        if ( (!isset($wordbooker_settings['wordbooker_like_button_show']) && !isset($wordbooker_settings['wordbooker_like_share_too'])) || isset($wordbooker_settings['wordbooker_iframe'])) { 
    79     echo'<iframe src="http://www.facebook.com/plugins/likebox.php?href='.urlencode($url).'&amp;width='.$width.'&amp;colorscheme='.$scheme.'&amp;show_faces='.$faces.'&amp;border_color=%23'.$border_colour.'&amp;stream='.$stream.'&amp;header='.$header.'&amp;height='.$height.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$width.'px; height:'.$height.'px;" allowTransparency="true"></iframe>'; 
     80    echo'<iframe src="http://www.facebook.com/plugins/likebox.php?href='.urlencode(strtolower($url)).'&amp;width='.$width.'&amp;colorscheme='.$scheme.'&amp;show_faces='.$faces.'&amp;border_color=%23'.$border_colour.'&amp;stream='.$stream.'&amp;header='.$header.'&amp;height='.$height.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$width.'px; height:'.$height.'px;" allowTransparency="true"></iframe>'; 
    8081        } 
    8182        else { 
    82         echo '<fb:like-box href="'.$url.'" width="'.$width.'" height="'.$height.'"  colorscheme="'.$scheme.'" show_faces="'.$faces.'" border_color="#'.$border_colour.'" stream="'.$stream.'" header="'.$header.'"></fb:like-box>'; 
     83        echo '<fb:like-box href="'.strtolower($url).'" width="'.$width.'" height="'.$height.'"  colorscheme="'.$scheme.'" show_faces="'.$faces.'" border_color="#'.$border_colour.'" stream="'.$stream.'" header="'.$header.'"></fb:like-box>'; 
    8384        }    
    8485    #   echo '<br /><div class="fb-add-to-timeline" data-show-faces="true" data-mode="button"></div>'; 
     
    113114        $result = wordbooker_get_cache($user_ID,'pages',1); 
    114115        $fanpages=unserialize($result->pages); 
    115         $xx=array('id'=>'FW:254577506873','name'=>'Wordbooker','url'=>'http://www.facebook.com/Wordbooker'); 
     116        $xx=array('id'=>'FW:254577506873','name'=>'Wordbooker','url'=>'http://www.facebook.com/wordbooker'); 
    116117        $fanpages[]=$xx; 
    117118        $default = array( 'title' => __('Fan Page','wordbooker'), 'snorl'=>$user_ID, 'dname'=>'', 'pid'=>'254577506873', 'stream'=>'false', 'connections'=>6, 'width'=>188, 'height'=>260, 'header'=>'false', 'scheme'=>'light' ); 
  • wordbooker/trunk/includes/wordbooker_options.php

    r509677 r539162  
    178178 
    179179        add_meta_box('wb_opt1', __('General Posting Options','wordbooker'),  'wordbooker_blog_posting_options', $wordbooker_hook, 'normal', 'core'); 
    180         add_meta_box('wb_opt2', __('Facebook Like and Share Options','wordbooker'),   'wordbooker_blog_facebook_options', $wordbooker_hook, 'normal', 'core'); 
     180        add_meta_box('wb_opt2', __('Facebook Like and Send Options','wordbooker'),   'wordbooker_blog_facebook_options', $wordbooker_hook, 'normal', 'core'); 
    181181        add_meta_box('wb_opt3', __('Comment Handling Options', 'wordbooker'),  'wordbooker_blog_comment_options', $wordbooker_hook, 'normal', 'core'); 
    182182        add_meta_box('wb_opt4', __('Advanced Options','wordbooker'),   'wordbooker_blog_advanced_options', $wordbooker_hook, 'normal', 'core'); 
     
    245245 
    246246                echo '<label for="wb_extract_length">'.__('Length of Extract', 'wordbooker').' :</label> <select id="wordbooker_extract_length" name="wordbooker_settings[wordbooker_extract_length]"  >'; 
    247             $arr = array(10=> "10",20=> "20",50=> "50",100=> "100",120=> "120",150=> "150",175=> "175",200=> "200",  250=> "250", 256=>__("256 (Default) ", 'wordbooker'), 270=>"270", 300=>"300", 350 => "350",400 => "400",500 => "500",600 => "600",700 => "700",800 => "800",900 => "900"); 
     247            $arr = array(10=> "10",20=> "20",50=> "50",100=> "100",120=> "120",150=> "150",175=> "175",200=> "200",  250=> "250", 256=>__("256 (Default) ", 'wordbooker'), 270=>"270", 300=>"300", 350 => "350",400 => "400",500 => "500",600 => "600",700 => "700",800 => "800",900 => "900",1000 => "1000",2000 => "2000",4000 => "4000",8000 => "8000"); 
    248248                foreach ($arr as $i => $value) { 
    249249                        if ($i==$wordbooker_settings['wordbooker_extract_length']){ print '<option selected="yes" value="'.$i.'" >'.$arr[$i].'</option>';} 
     
    283283        $fblike_faces=array('false'=>__('No','wordbooker'),'true'=>__('Yes','wordbooker')); 
    284284        $fblike_location=array('top'=>__('Above Post ','wordbooker'),'bottom'=>__('Below Post','wordbooker'),'coded'=>__('Defined by theme template','wordbooker'),'tagged'=>__('Defined by Tag in post','wordbooker')); 
     285        $fblike_align=array('right'=>__('Right Side','wordbooker'),'left'=>__('Left Side','wordbooker'),'coded'=>__('Defined by theme template','wordbooker'),'tagged'=>__('Defined by Tag in post','wordbooker')); 
    285286        $checked_flag=array('on'=>'checked','off'=>''); 
    286287        $fblike_send=array('false'=>__('No','wordbooker'),'true'=>__('Yes','wordbooker')); 
     
    314315        echo "</select><br />"; 
    315316 
     317        echo '<label for="wb_fblike_align">&nbsp;'.__('Facebook Like - Align Button ', 'wordbooker').' :</label> <select id="wordbooker_fblike_align" name="wordbooker_settings[wordbooker_fblike_align]"  >'; 
     318        foreach ($fblike_align as $i => $value) { 
     319            if ($i==$wordbooker_settings['wordbooker_fblike_align']){ print '<option selected="yes" value="'.$i.'" >'.$fblike_align[$i].'</option>';} 
     320               else {print '<option value="'.$i.'" >'.$fblike_align[$i].'</option>';}} 
     321        echo "</select><br />"; 
     322 
     323 
    316324        echo '<label for="wb_fblike_action">&nbsp;'.__('Facebook Like - Verb to Display', 'wordbooker').' :</label> <select id="wordbooker_fblike_action" name="wordbooker_settings[wordbooker_fblike_action]"  >'; 
    317325        foreach ($fblike_action as $i => $value) { 
     
    357365        echo "</select><br /><hr><br />"; 
    358366 
    359      
     367/*   
    360368        echo '<label for="wb_facebook_like_share">'.__("Include a Facebook Share button in blog", 'wordbooker'). ' : </label>'; 
    361369        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_like_share_too]" '.$checked_flag[$wordbooker_settings["wordbooker_like_share_too"]].' ><br />'; 
     
    382390        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_no_share_stick]" '.$checked_flag[$wordbooker_settings["wordbooker_no_share_stick"]].' ><br />'; 
    383391        echo "<hr><br />"; 
     392 
     393*/ 
    384394        echo '<label for="wb_facebook_gravatars">'.__("Do not replace Gravtars with Facebook Photos", 'wordbooker'). ' : </label>'; 
    385395        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_no_facebook_gravatars]" '.$checked_flag[$wordbooker_settings["wordbooker_no_facebook_gravatars"]].' ><br />'; 
     
    535545        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_fb_disable_og]" '.$checked_flag[$wordbooker_settings["wordbooker_fb_disable_og"]].' ></P><p>'; 
    536546 
     547        echo '<label for="wb_wordbooker_disable_ogtags">'.__("Disable Facebook API initialisation", 'wordbooker'). ' : </label>'; 
     548        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_fb_disable_api]" '.$checked_flag[$wordbooker_settings["wordbooker_fb_disable_api"]].' ></P><p>'; 
     549 
    537550        echo '<label for="wb_fake_publish">'.__("Only Pretend to Publish on Facebook - TEST MODE", 'wordbooker'). ' : </label>'; 
    538551        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_fake_publish]" '.$checked_flag[$wordbooker_settings["wordbooker_fake_publish"]].' /></P><p>'; 
     
    552565        $wordbookeruser_settings=get_usermeta($user_ID,$wordbooker_user_settings_id); 
    553566        # Set a couple of options that we really need. 
     567        if( !isset($wordbookeruser_settings['wordbooker_primary_type'])) {$wordbookeruser_settings['wordbooker_primary_type']=1;} 
     568        if( !isset($wordbookeruser_settings['wordbooker_secondary_type'])) {$wordbookeruser_settings['wordbooker_secondary_type']=1;} 
    554569        if( !isset($wordbookeruser_settings['wordbooker_orandpage'])) {$wordbookeruser_settings['wordbooker_orandpage']=2;} 
    555570        if( !isset($wordbookeruser_settings['wordbooker_publish_default'])) {$wordbookeruser_settings['wordbooker_publish_default']=$wordbooker_settings['wordbooker_publish_default'];} 
     
    594609        $fanpages2=$fanpages; 
    595610        $fanpages[]=array( 'id'=>'PW:'.$wb_users[0]->facebook_id, 'name'=>"Personal Wall"); 
     611        $arr = array(1=> __("As a Wall Post", 'wordbooker'),  2=> __("As a Note", 'wordbooker'), 3=> __("As a Status Update" , 'wordbooker'), 4=> __("As a Link" , 'wordbooker')   ); 
    596612        if(!isset ($wordbookeruser_settings["wordbooker_primary_target"])) { $wordbookeruser_settings["wordbooker_primary_target"]='PW:'.$wb_users[0]->facebook_id;} 
    597613        $have_fan_pages=0; 
    598         if (count($fanpages)>1){ 
     614        if (count($fanpages)>=1){ 
    599615    echo '<p><label for="wb_primary_target">'.__('Post to the following Wall', 'wordbooker').' : </label>'; 
    600616        echo '<select id="wordbooker_primary_target" name="wordbooker_primary_target"  >'; 
     
    609625            echo $option; 
    610626            echo '</select> &nbsp;'; 
    611         $arr = array(1=> __("As a Wall Post", 'wordbooker'),  2=> __("As a Note", 'wordbooker'), 3=> __("As a Status Update" , 'wordbooker'), 4=> __("As a Link" , 'wordbooker')   ); 
    612627    echo '<select id="wordbooker_primary_type" name="wordbooker_primary_type"  >'; 
    613628    foreach ($arr as $i => $value) { 
  • wordbooker/trunk/includes/wordbooker_posting.php

    r508474 r539162  
    2626 */ 
    2727 
    28 function wordbooker_wall_post($post_id,$access_token,$post_title,$post_data,$target_id,$dummy,$target_name){ 
     28function wordbooker_wall_post($post_id,$access_token,$post_title,$post_data,$target_id,$dummy,$target_name,$wpuserid){ 
    2929    if (isset($dummy)) {     
    3030        wordbooker_debugger("Wall Post to ".$target_name." Test Only",'No Post Made',$post_id,90) ; 
     
    3535try { 
    3636        $result = wordbooker_fb_stream_pubish($post_data,$target_id); 
    37         wordbooker_store_post_result($post_id,$result->id ); 
     37        wordbooker_store_post_result($post_id,$result->id,$wpuserid); 
    3838        wordbooker_debugger("Wall Post to ".$target_name." Succeeded - result : ",$result->id,$post_id,90) ; 
    3939        } 
     
    4646} 
    4747 
    48 function wordbooker_link_post($post_id,$access_token,$post_title,$post_data,$target_id,$dummy,$target_name){ 
     48function wordbooker_link_post($post_id,$access_token,$post_title,$post_data,$target_id,$dummy,$target_name,$wpuserid){ 
    4949    if (isset($dummy)) {     
    5050        wordbooker_debugger("Link Post to ".$target_name." Test Only",'No Post Made',$post_id,90) ; 
     
    5757try { 
    5858        $result = wordbooker_fb_link_publish($post_data2,$target_id); 
    59         wordbooker_store_post_result($post_id,$result->id ); 
     59        wordbooker_store_post_result($post_id,$result->id,$wpuserid); 
    6060        wordbooker_debugger("Link Post to ".$target_name." Succeeded - result : ",$result->id,$post_id,90) ; 
    6161        } 
     
    6767    } 
    6868} 
    69 function wordbooker_status_update($post_id,$access_token,$post_date,$target_id,$dummy,$target_name) { 
     69function wordbooker_status_update($post_id,$access_token,$post_date,$target_id,$dummy,$target_name,$wpuserid) { 
    7070    global $wordbooker_post_options,$user_ID; 
    7171    wordbooker_debugger("Setting status_text".$wordbooker_post_options['wordbooker_status_update_text']," ",$post_id) ;  
     
    8080    try { 
    8181        $result = wordbooker_fb_status_update($data,$target_id); 
    82         wordbooker_store_post_result($post_id,$result->id ); 
     82        wordbooker_store_post_result($post_id,$result->id,$wpuserid); 
    8383        wordbooker_debugger("Status update  to ".$target_name." suceeded result : ",$result->id,$post_id,90) ; 
    8484        } 
     
    9191} 
    9292 
    93 function wordbooker_notes_post($post_id,$access_token,$post_title,$target_id,$dummy,$target_name){ 
     93function wordbooker_notes_post($post_id,$access_token,$post_title,$target_id,$dummy,$target_name,$wpuserid){ 
    9494    if (isset($dummy)) {     
    9595        wordbooker_debugger("Notes publish  to ".$target_name." Test Only",'No Post Made',$post_id,90) ; 
     
    104104    try { 
    105105        $result = wordbooker_fb_note_publish($data,$target_id); 
    106         wordbooker_store_post_result($post_id,$result->id); 
     106        wordbooker_store_post_result($post_id,$result->id,$wpuserid); 
    107107        wordbooker_debugger("Note Publish to ".$target_name." result : ",$result->id,$post_id,90) ; 
    108108    }    
     
    116116 
    117117 
    118 function wordbooker_store_post_result($post_id,$fb_post_id) { 
     118function wordbooker_store_post_result($post_id,$fb_post_id,$wpuserid) { 
    119119    global $wpdb,$blog_id,$user_ID; 
    120120    $tstamp=time(); 
    121121    $wordbooker_settings = wordbooker_options(); 
    122     $sql=   ' INSERT INTO ' . WORDBOOKER_POSTCOMMENTS . ' (fb_post_id,comment_timestamp,wp_post_id,blog_id,user_id) VALUES ("'.$fb_post_id.'",'.$tstamp.','.$post_id.','.$blog_id.','.$user_ID.')'; 
     122    $sql=   ' INSERT INTO ' . WORDBOOKER_POSTCOMMENTS . ' (fb_post_id,comment_timestamp,wp_post_id,blog_id,user_id) VALUES ("'.$fb_post_id.'",'.$tstamp.','.$post_id.','.$blog_id.','.$wpuserid.')'; 
    123123    $result = $wpdb->query($sql); 
    124124    wordbooker_insert_into_postlogs($post_id,$blog_id); 
  • wordbooker/trunk/includes/wordbooker_posting_options.php

    r505615 r539162  
    3939    if  ($wordbooker_settings["wordbooker_default_author"] == 0 ) {$wb_user_id=$user_ID;} else {$wb_user_id=$wordbooker_settings["wordbooker_default_author"];} 
    4040    $wordbooker_user_settings_id="wordbookuser".$blog_id; 
     41     
    4142    # We need to do some more checking here. If the user does not have an entry in the wordbooker user table then we should get the user options for the user set as the default user. 
    4243    $wordbookuser=get_usermeta($wb_user_id,$wordbooker_user_settings_id); 
     
    6162        $wordbooker_settings=$post_meta; 
    6263    } 
     64    if( !isset($wordbooker_settings['wordbooker_primary_type'])) {$wordbooker_settings['wordbooker_primary_type']=1;} 
     65    if( !isset($wordbooker_settings['wordbooker_secondary_type'])) {$wordbooker_settings['wordbooker_secondary_type']=1;} 
    6366    $post_pub_prompt=__("Publish this post to Facebook", 'wordbooker'); 
    6467    if($post->post_type=='page'){ 
     
    8992        $fanpages[]=array( 'id'=>'PW:'.$wb_users[0]->facebook_id, 'name'=>__("Personal Wall",'wordbooker')); 
    9093        $have_fan_pages=0; 
    91  
     94        $arr = array(1=> __("As a Wall Post", 'wordbooker'),  2=> __("As a Note", 'wordbooker'), 3=> __("As a Status Update" , 'wordbooker'), 4=> __("As a Link" , 'wordbooker')   ); 
    9295        # If the post has already been published then we uncheck the publish option  
    9396        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_publish_default" '.$checked_flag[$wordbooker_settings["wordbooker_publish_default"]].' > '.$post_pub_prompt.'<br />'; 
     
    105108            echo $option; 
    106109            echo '</select> &nbsp;'; 
    107     $arr = array(1=> __("As a Wall Post", 'wordbooker'),  2=> __("As a Note", 'wordbooker'), 3=> __("As a Status Update" , 'wordbooker'), 4=> __("As a Link" , 'wordbooker')   ); 
    108110    echo '<select id="wordbooker_primary_type" name="wordbooker_primary_type"  >'; 
    109111    foreach ($arr as $i => $value) { 
     
    118120    echo '<p><label for="wb_primary_target">'.__('Post to my Personal Wall', 'wordbooker').' : </label> '; 
    119121    echo '<input type="hidden" name="wordbooker_primary_target" value="PW:'.$wb_users[0]->facebook_id.'" />'; 
    120  
    121 $arr = array(1=> __("As a Wall Post", 'wordbooker'),  2=> __("As a Note", 'wordbooker'), 3=> __("As a Status Update" , 'wordbooker'),4=> __("As a Link" , 'wordbooker')   ); 
    122122    echo '<select id="wordbooker_primary_type" name="wordbooker_primary_type"  >'; 
    123123    foreach ($arr as $i => $value) { 
     
    152152 
    153153        echo __('Length of Extract', 'wordbooker').' : <select id="wordbooker_extract_length" name="wordbooker_extract_length"  >'; 
    154             $arr = array(10=> "10",20=> "20",50=> "50",100=> "100",120=> "120",150=> "150",175=> "175",200=> "200",  250=> "250", 256=>__("256 (Default) ", 'wordbooker'), 270=>"270", 300=>"300", 350 => "350",400 => "400",500 => "500",600 => "600",700 => "700",800 => "800",900 => "900"); 
     154            $arr = array(10=> "10",20=> "20",50=> "50",100=> "100",120=> "120",150=> "150",175=> "175",200=> "200",  250=> "250", 256=>__("256 (Default) ", 'wordbooker'), 270=>"270", 300=>"300", 350 => "350",400 => "400",500 => "500",600 => "600",700 => "700",800 => "800",900 => "900",1000 => "1000",2000 => "2000",4000 => "4000",8000 => "8000"); 
    155155            foreach ($arr as $i => $value) { 
    156156                    if ($i==$wordbooker_settings['wordbooker_extract_length']){ print '<option selected="yes" value="'.$i.'" >'.$arr[$i].'</option>';} 
     
    187187                } 
    188188                echo "</select><br />"; 
    189          
     189/*       
    190190echo __('Show Facebook Share for this Page', 'wordbooker').' : <select id="wordbooker_share_button_page" name="wordbooker_share_button_page"  >'; 
    191191$arr = array(1=> __("Yes", 'wordbooker'),  2=> __("No", 'wordbooker') ); 
     
    195195        } 
    196196            echo "</select><br />"; 
     197*/ 
    197198        } 
    198199        else { 
     
    207208                } 
    208209                echo "</select><br />"; 
    209          
     210/*       
    210211            echo __('Show Facebook Share for this Post', 'wordbooker').' : <select id="wordbooker_share_button_post" name="wordbooker_share_button_post"  >'; 
    211212            $arr = array(1=> __("Yes", 'wordbooker'),  2=> __("No", 'wordbooker') ); 
     
    215216                } 
    216217                echo "</select><br />"; 
     218*/ 
    217219        } 
    218220 
  • wordbooker/trunk/includes/wordbooker_wb_widget.php

    r505615 r539162  
    4343        $result = wordbooker_get_cache($userid); 
    4444        echo $before_widget; 
     45        echo "<!-- Wordbooker FB Status Widget -->";  
    4546        $name=$result->name; 
    4647            if (strlen($instance['dname']) >0 ) $name=$instance['dname']; 
  • wordbooker/trunk/languages/wordbooker.pot

    r505615 r539162  
    33msgid "" 
    44msgstr "" 
    5 "Project-Id-Version: Wordbooker 2.0.9\n" 
     5"Project-Id-Version: Wordbooker 2.1.8\n" 
    66"Report-Msgid-Bugs-To: http://wordpress.org/tag/wordbooker\n" 
    7 "POT-Creation-Date: 2012-02-09 11:34:31+00:00\n" 
     7"POT-Creation-Date: 2012-04-01 06:56:34+00:00\n" 
    88"MIME-Version: 1.0\n" 
    99"Content-Type: text/plain; charset=UTF-8\n" 
     
    2222msgstr "" 
    2323 
    24 #: wordbooker.php:676 
     24#: wordbooker.php:693 
    2525msgid "Failed to clear error logs." 
    2626msgstr "" 
    2727 
    28 #: wordbooker.php:689 
     28#: wordbooker.php:706 
    2929msgid "Failed to clear Diagnostic logs." 
    3030msgstr "" 
    3131 
    32 #: wordbooker.php:727 
     32#: wordbooker.php:744 
    3333msgid "Diagnostic Messages" 
    3434msgstr "" 
    3535 
    36 #: wordbooker.php:728 
     36#: wordbooker.php:745 
    3737msgid "(Showing %1$s from a total of %2$s rows)" 
    3838msgstr "" 
    3939 
    40 #: wordbooker.php:770 
     40#: wordbooker.php:787 
    4141msgid "Clear Diagnostic Messages" 
    4242msgstr "" 
    4343 
    44 #: wordbooker.php:865 
     44#: wordbooker.php:880 
    4545msgid "" 
    4646"Wordbooker needs the CURL PHP extension to work. Please install / enable it " 
     
    4848msgstr "" 
    4949 
    50 #: wordbooker.php:868 
     50#: wordbooker.php:883 
    5151msgid "" 
    5252"Wordbooker needs the JSON PHP extension.  Please install / enable it and try " 
     
    5454msgstr "" 
    5555 
    56 #: wordbooker.php:872 
     56#: wordbooker.php:887 
    5757msgid "Your PHP install is missing <code>simplexml_load_string()</code> " 
    5858msgstr "" 
    5959 
    60 #: wordbooker.php:876 
     60#: wordbooker.php:891 
    6161msgid "Wordbooker needs to be set up" 
    6262msgstr "" 
    6363 
    64 #: wordbooker.php:885 
     64#: wordbooker.php:900 
    6565msgid "for" 
    6666msgstr "" 
    6767 
    68 #: wordbooker.php:894 
     68#: wordbooker.php:909 
    6969msgid "Notices" 
    7070msgstr "" 
    7171 
    72 #: wordbooker.php:974 
     72#: wordbooker.php:998 
    7373msgid "Setup" 
    7474msgstr "" 
    7575 
    76 #: wordbooker.php:982 
     76#: wordbooker.php:1006 
    7777msgid "" 
    7878"Secure link ( may require you to add a new certificate for wordbooker.tty." 
     
    8181msgstr "" 
    8282 
    83 #: wordbooker.php:986 
     83#: wordbooker.php:1010 
    8484msgid "" 
    8585"Wordbooker should now be authorised. Please click on the Reload Page Button" 
    8686msgstr "" 
    8787 
    88 #: wordbooker.php:987 
     88#: wordbooker.php:1011 
    8989msgid "Reload Page" 
    9090msgstr "" 
    9191 
    92 #: wordbooker.php:995 
     92#: wordbooker.php:1019 
    9393msgid "Status" 
    9494msgstr "" 
    9595 
    96 #: wordbooker.php:1030 
     96#: wordbooker.php:1054 
    9797msgid "Wordbooker appears to be configured and working just fine" 
    9898msgstr "" 
    9999 
    100 #: wordbooker.php:1032 
     100#: wordbooker.php:1056 
    101101msgid "" 
    102102"If you like, you can start over from the beginning (this does not delete " 
     
    104104msgstr "" 
    105105 
    106 #: wordbooker.php:1036 
     106#: wordbooker.php:1060 
    107107msgid "Wordbooker is able to connect to Facebook" 
    108108msgstr "" 
    109109 
    110 #: wordbooker.php:1040 
     110#: wordbooker.php:1064 
    111111msgid "Reset User Session" 
    112112msgstr "" 
    113113 
    114 #: wordbooker.php:1041 
     114#: wordbooker.php:1065 
    115115msgid "Refresh Status" 
    116116msgstr "" 
    117117 
    118 #: wordbooker.php:1045 
     118#: wordbooker.php:1069 
    119119msgid "Recent Facebook Activity for this site" 
    120120msgstr "" 
    121121 
    122 #: wordbooker.php:1072 
     122#: wordbooker.php:1096 
    123123msgid "Support" 
    124124msgstr "" 
    125125 
    126 #: wordbooker.php:1074 
     126#: wordbooker.php:1098 
    127127msgid "For feature requests, bug reports, and general support :" 
    128128msgstr "" 
    129129 
    130 #: wordbooker.php:1076 wordbooker.php:1077 
     130#: wordbooker.php:1100 wordbooker.php:1101 
    131131msgid "Check the " 
    132132msgstr "" 
    133133 
    134 #: wordbooker.php:1076 
     134#: wordbooker.php:1100 
    135135msgid "User Guide" 
    136136msgstr "" 
    137137 
    138 #: wordbooker.php:1077 
     138#: wordbooker.php:1101 
    139139msgid "WordPress.org Notes" 
    140140msgstr "" 
    141141 
    142 #: wordbooker.php:1078 
     142#: wordbooker.php:1102 
    143143msgid "Try the " 
    144144msgstr "" 
    145145 
    146 #: wordbooker.php:1078 
     146#: wordbooker.php:1102 
    147147msgid "Wordbooker Support Forums" 
    148148msgstr "" 
    149149 
    150 #: wordbooker.php:1079 
     150#: wordbooker.php:1103 
    151151msgid "Enhancement requests can be made at the " 
    152152msgstr "" 
    153153 
    154 #: wordbooker.php:1079 
     154#: wordbooker.php:1103 
    155155msgid "Wordbooker Project on Google Code" 
    156156msgstr "" 
    157157 
    158 #: wordbooker.php:1080 
     158#: wordbooker.php:1104 
    159159msgid "Consider upgrading to the " 
    160160msgstr "" 
    161161 
    162 #: wordbooker.php:1080 
     162#: wordbooker.php:1104 
    163163msgid "latest stable release" 
    164164msgstr "" 
    165165 
    166 #: wordbooker.php:1080 
     166#: wordbooker.php:1104 
    167167msgid " of WordPress. " 
    168168msgstr "" 
    169169 
    170 #: wordbooker.php:1081 
     170#: wordbooker.php:1105 
    171171msgid "Read the release notes for Wordbooker on the " 
    172172msgstr "" 
    173173 
    174 #: wordbooker.php:1081 
     174#: wordbooker.php:1105 
    175175msgid "blog." 
    176176msgstr "" 
    177177 
    178 #: wordbooker.php:1082 
     178#: wordbooker.php:1106 
    179179msgid "Check the Wordbooker " 
    180180msgstr "" 
    181181 
    182 #: wordbooker.php:1082 
     182#: wordbooker.php:1106 
    183183msgid "FAQs" 
    184184msgstr "" 
    185185 
    186 #: wordbooker.php:1085 
     186#: wordbooker.php:1109 
    187187msgid "Please provide the following information about your installation:" 
    188188msgstr "" 
    189189 
    190 #: wordbooker.php:1110 
     190#: wordbooker.php:1134 
    191191msgid "Curl is not installed" 
    192192msgstr "" 
    193193 
    194 #: wordbooker.php:1121 
     194#: wordbooker.php:1145 
    195195msgid "Curl is available but cannot access Facebook - This is a problem (" 
    196196msgstr "" 
    197197 
    198 #: wordbooker.php:1122 
     198#: wordbooker.php:1146 
    199199msgid "Curl is available and can access Facebook - All is OK" 
    200200msgstr "" 
    201201 
    202 #: wordbooker.php:1165 
     202#: wordbooker.php:1189 
    203203msgid "<li>XML: your PHP is missing <code>simplexml_load_string()</code></li>" 
    204204msgstr "" 
    205205 
    206 #: wordbooker.php:1177 
     206#: wordbooker.php:1201 
    207207msgid "<li> Active Plugins : <b></li>" 
    208208msgstr "" 
    209209 
    210 #: wordbooker.php:1207 
     210#: wordbooker.php:1295 
    211211msgid "Your system does not meet the" 
    212212msgstr "" 
    213213 
    214 #: wordbooker.php:1207 wordbooker.php:1215 
     214#: wordbooker.php:1295 wordbooker.php:1303 
    215215msgid "WordPress minimum requirements" 
    216216msgstr "" 
    217217 
    218 #: wordbooker.php:1207 
     218#: wordbooker.php:1295 
    219219msgid "Things are unlikely to work." 
    220220msgstr "" 
    221221 
    222 #: wordbooker.php:1215 
     222#: wordbooker.php:1303 
    223223msgid "Please ensure that your system meets the" 
    224224msgstr "" 
    225225 
    226 #: wordbooker.php:1429 
     226#: wordbooker.php:1554 
    227227msgid "Share" 
    228228msgstr "" 
    229229 
    230 #: wordbooker.php:1435 
     230#: wordbooker.php:1560 
    231231msgid "Read entire article" 
    232232msgstr "" 
    233233 
    234 #: wordbooker.php:1439 
     234#: wordbooker.php:1564 
    235235msgid "Primary" 
    236236msgstr "" 
    237237 
    238 #: wordbooker.php:1443 
     238#: wordbooker.php:1568 
    239239msgid "Secondary" 
    240240msgstr "" 
    241241 
    242 #: wordbooker.php:1447 
     242#: wordbooker.php:1572 
    243243msgid "Fan Wall" 
    244244msgstr "" 
    245245 
    246 #: wordbooker.php:1447 
     246#: wordbooker.php:1572 
    247247msgid "Group wall" 
    248248msgstr "" 
    249249 
    250 #: wordbooker.php:2126 
     250#: wordbooker.php:2258 
    251251msgid "Publish content to your Wall/Fan pages" 
    252252msgstr "" 
    253253 
    254 #: wordbooker.php:2126 
    255 msgid "Publish Actions to your Timeline" 
    256 msgstr "" 
    257  
    258 #: wordbooker.php:2126 
     254#: wordbooker.php:2258 
    259255msgid "Update your status" 
    260256msgstr "" 
    261257 
    262 #: wordbooker.php:2126 
     258#: wordbooker.php:2258 
    263259msgid "Read your News Feed and Wall" 
    264260msgstr "" 
    265261 
    266 #: wordbooker.php:2126 
     262#: wordbooker.php:2258 
    267263msgid "Create notes" 
    268264msgstr "" 
    269265 
    270 #: wordbooker.php:2126 
     266#: wordbooker.php:2258 
    271267msgid "Upload photos" 
    272268msgstr "" 
    273269 
    274 #: wordbooker.php:2126 
     270#: wordbooker.php:2258 
    275271msgid "Upload videos" 
    276272msgstr "" 
    277273 
    278 #: wordbooker.php:2126 
     274#: wordbooker.php:2258 
    279275msgid "Manage_pages" 
    280276msgstr "" 
    281277 
    282 #: wordbooker.php:2126 
     278#: wordbooker.php:2258 
    283279msgid "Read friend lists" 
    284280msgstr "" 
    285281 
    286 #: wordbooker.php:2127 
     282#: wordbooker.php:2259 
    287283msgid "but requires authorization to " 
    288284msgstr "" 
    289285 
    290 #: wordbooker.php:2128 
     286#: wordbooker.php:2260 
    291287msgid " on Facebook. Click on the following link to grant permission" 
    292288msgstr "" 
    293289 
    294 #: wordbooker.php:2145 
     290#: wordbooker.php:2277 
    295291msgid "Save Configuration" 
    296292msgstr "" 
    297293 
    298 #: wordbooker.php:2557 
     294#: wordbooker.php:2641 
    299295msgid "Every 10 Minutes" 
    300296msgstr "" 
    301297 
    302 #: wordbooker.php:2562 
     298#: wordbooker.php:2646 
    303299msgid "Every 15 Minutes" 
    304300msgstr "" 
    305301 
    306 #: wordbooker.php:2567 
     302#: wordbooker.php:2651 
    307303msgid "Every 20 Minutes" 
    308304msgstr "" 
    309305 
    310 #: wordbooker.php:2572 
     306#: wordbooker.php:2656 
    311307msgid "Every 30 Minutes" 
    312308msgstr "" 
    313309 
    314 #: wordbooker.php:2577 
     310#: wordbooker.php:2661 
    315311msgid "Every 45 Minutes" 
    316312msgstr "" 
    317313 
    318 #: wordbooker.php:2582 
     314#: wordbooker.php:2666 
    319315msgid "Every 2 Hours" 
    320316msgstr "" 
     
    326322msgstr "" 
    327323 
    328 #: includes/wordbooker_wb_widget.php:80 
     324#: includes/wordbooker_wb_widget.php:81 
    329325msgid "Facebook Status" 
    330326msgstr "" 
    331327 
    332 #: includes/wordbooker_wb_widget.php:90 includes/wordbooker_fb_widget.php:162 
     328#: includes/wordbooker_wb_widget.php:91 includes/wordbooker_fb_widget.php:163 
    333329msgid "Title of Widget" 
    334330msgstr "" 
    335331 
    336 #: includes/wordbooker_wb_widget.php:91 
     332#: includes/wordbooker_wb_widget.php:92 
    337333msgid "Display this name" 
    338334msgstr "" 
    339335 
    340 #: includes/wordbooker_wb_widget.php:93 
     336#: includes/wordbooker_wb_widget.php:94 
    341337msgid "Date Format" 
    342338msgstr "" 
    343339 
    344 #: includes/wordbooker_wb_widget.php:100 
     340#: includes/wordbooker_wb_widget.php:101 
    345341msgid "Facebook Text style" 
    346342msgstr "" 
    347343 
    348 #: includes/wordbooker_wb_widget.php:122 
     344#: includes/wordbooker_wb_widget.php:123 
    349345msgid "second" 
    350346msgstr "" 
    351347 
    352 #: includes/wordbooker_wb_widget.php:122 
     348#: includes/wordbooker_wb_widget.php:123 
    353349msgid "minute" 
    354350msgstr "" 
    355351 
    356 #: includes/wordbooker_wb_widget.php:122 
     352#: includes/wordbooker_wb_widget.php:123 
    357353msgid "hour" 
    358354msgstr "" 
    359355 
    360 #: includes/wordbooker_wb_widget.php:122 
     356#: includes/wordbooker_wb_widget.php:123 
    361357msgid "day" 
    362358msgstr "" 
    363359 
    364 #: includes/wordbooker_wb_widget.php:122 
     360#: includes/wordbooker_wb_widget.php:123 
    365361msgid "week" 
    366362msgstr "" 
    367363 
    368 #: includes/wordbooker_wb_widget.php:122 
     364#: includes/wordbooker_wb_widget.php:123 
    369365msgid "month" 
    370366msgstr "" 
    371367 
    372 #: includes/wordbooker_wb_widget.php:122 
     368#: includes/wordbooker_wb_widget.php:123 
    373369msgid "year" 
    374370msgstr "" 
    375371 
    376 #: includes/wordbooker_wb_widget.php:122 
     372#: includes/wordbooker_wb_widget.php:123 
    377373msgid "decade" 
    378374msgstr "" 
    379375 
    380 #: includes/wordbooker_wb_widget.php:136 
     376#: includes/wordbooker_wb_widget.php:137 
    381377msgid "ago" 
    382378msgstr "" 
    383379 
    384 #: includes/wordbooker_wb_widget.php:140 
     380#: includes/wordbooker_wb_widget.php:141 
    385381msgid "from now" 
    386382msgstr "" 
    387383 
    388 #: includes/wordbooker_wb_widget.php:151 
     384#: includes/wordbooker_wb_widget.php:152 
    389385msgid "an" 
    390386msgstr "" 
    391387 
    392 #: includes/wordbooker_wb_widget.php:153 
     388#: includes/wordbooker_wb_widget.php:154 
    393389msgid "about" 
    394390msgstr "" 
     
    401397msgstr "" 
    402398 
    403 #: includes/wordbooker_fb_widget.php:117 includes/wordbooker_fb_widget.php:164 
     399#: includes/wordbooker_fb_widget.php:118 includes/wordbooker_fb_widget.php:165 
    404400msgid "Fan Page" 
    405401msgstr "" 
    406402 
    407 #: includes/wordbooker_fb_widget.php:176 
     403#: includes/wordbooker_fb_widget.php:177 
    408404msgid "Include Stream " 
    409405msgstr "" 
    410406 
    411 #: includes/wordbooker_fb_widget.php:179 
     407#: includes/wordbooker_fb_widget.php:180 
    412408msgid "Include Header " 
    413409msgstr "" 
    414410 
    415 #: includes/wordbooker_fb_widget.php:182 
     411#: includes/wordbooker_fb_widget.php:183 
    416412msgid "Colour Scheme" 
    417413msgstr "" 
    418414 
    419 #: includes/wordbooker_fb_widget.php:188 
     415#: includes/wordbooker_fb_widget.php:189 
    420416msgid "Show Faces " 
    421417msgstr "" 
    422418 
    423 #: includes/wordbooker_fb_widget.php:191 
     419#: includes/wordbooker_fb_widget.php:192 
    424420msgid "Widget Width" 
    425421msgstr "" 
    426422 
    427 #: includes/wordbooker_fb_widget.php:193 
     423#: includes/wordbooker_fb_widget.php:194 
    428424msgid "Widget Height" 
    429425msgstr "" 
    430426 
    431 #: includes/wordbooker_fb_widget.php:195 
     427#: includes/wordbooker_fb_widget.php:196 
    432428msgid "Widget Border Colour" 
    433429msgstr "" 
     
    450446 
    451447#: includes/wordbooker_options.php:84 
    452 #: includes/wordbooker_posting_options.php:76 
     448#: includes/wordbooker_posting_options.php:79 
    453449msgid "WARNING : Wordbooker is DISABLED" 
    454450msgstr "" 
    455451 
    456452#: includes/wordbooker_options.php:85 
    457 #: includes/wordbooker_posting_options.php:77 
     453#: includes/wordbooker_posting_options.php:80 
    458454msgid "" 
    459455"WARNING : Wordbooker is in TEST mode - NO Posts will be made to Facebook" 
     
    477473 
    478474#: includes/wordbooker_options.php:180 
    479 msgid "Facebook Like and Share Options" 
     475msgid "Facebook Like and Send Options" 
    480476msgstr "" 
    481477 
     
    500496msgstr "" 
    501497 
    502 #: includes/wordbooker_options.php:220 includes/wordbooker_options.php:565 
     498#: includes/wordbooker_options.php:220 includes/wordbooker_options.php:582 
    503499msgid "Default Publish Post to Facebook" 
    504500msgstr "" 
    505501 
    506 #: includes/wordbooker_options.php:223 includes/wordbooker_options.php:574 
     502#: includes/wordbooker_options.php:223 includes/wordbooker_options.php:591 
    507503msgid "Default Publish Page to Facebook" 
    508504msgstr "" 
     
    524520msgstr "" 
    525521 
    526 #: includes/wordbooker_options.php:246 includes/wordbooker_options.php:657 
     522#: includes/wordbooker_options.php:246 includes/wordbooker_options.php:674 
    527523#: includes/wordbooker_posting_options.php:153 
    528524msgid "Length of Extract" 
    529525msgstr "" 
    530526 
    531 #: includes/wordbooker_options.php:247 includes/wordbooker_options.php:658 
     527#: includes/wordbooker_options.php:247 includes/wordbooker_options.php:675 
    532528#: includes/wordbooker_posting_options.php:154 
    533529msgid "256 (Default) " 
    534530msgstr "" 
    535531 
    536 #: includes/wordbooker_options.php:253 includes/wordbooker_options.php:669 
     532#: includes/wordbooker_options.php:253 includes/wordbooker_options.php:686 
    537533msgid "Post Attribute" 
    538534msgstr "" 
     
    550546msgstr "" 
    551547 
    552 #: includes/wordbooker_options.php:259 includes/wordbooker_options.php:673 
     548#: includes/wordbooker_options.php:259 includes/wordbooker_options.php:690 
    553549#: includes/wordbooker_posting_options.php:162 
    554550msgid "Read Full Article" 
    555551msgstr "" 
    556552 
    557 #: includes/wordbooker_options.php:265 includes/wordbooker_options.php:680 
     553#: includes/wordbooker_options.php:265 includes/wordbooker_options.php:697 
    558554msgid "Enable Extended description for Share Link" 
    559555msgstr "" 
     
    563559msgstr "" 
    564560 
    565 #: includes/wordbooker_options.php:283 includes/wordbooker_options.php:286 
    566 #: includes/wordbooker_options.php:567 includes/wordbooker_options.php:576 
    567 #: includes/wordbooker_options.php:682 
     561#: includes/wordbooker_options.php:283 includes/wordbooker_options.php:287 
     562#: includes/wordbooker_options.php:584 includes/wordbooker_options.php:593 
     563#: includes/wordbooker_options.php:699 
    568564#: includes/wordbooker_posting_options.php:183 
    569 #: includes/wordbooker_posting_options.php:191 
    570 #: includes/wordbooker_posting_options.php:203 
    571 #: includes/wordbooker_posting_options.php:211 
     565#: includes/wordbooker_posting_options.php:204 
    572566msgid "No" 
    573567msgstr "" 
    574568 
    575 #: includes/wordbooker_options.php:283 includes/wordbooker_options.php:286 
    576 #: includes/wordbooker_options.php:682 
     569#: includes/wordbooker_options.php:283 includes/wordbooker_options.php:287 
     570#: includes/wordbooker_options.php:699 
    577571#: includes/wordbooker_posting_options.php:183 
    578 #: includes/wordbooker_posting_options.php:191 
    579 #: includes/wordbooker_posting_options.php:203 
    580 #: includes/wordbooker_posting_options.php:211 
     572#: includes/wordbooker_posting_options.php:204 
    581573msgid "Yes" 
    582574msgstr "" 
     
    590582msgstr "" 
    591583 
    592 #: includes/wordbooker_options.php:284 includes/wordbooker_options.php:447 
     584#: includes/wordbooker_options.php:284 includes/wordbooker_options.php:285 
     585#: includes/wordbooker_options.php:457 
    593586msgid "Defined by theme template" 
    594587msgstr "" 
    595588 
    596 #: includes/wordbooker_options.php:284 includes/wordbooker_options.php:447 
     589#: includes/wordbooker_options.php:284 includes/wordbooker_options.php:285 
     590#: includes/wordbooker_options.php:457 
    597591msgid "Defined by Tag in post" 
    598592msgstr "" 
    599593 
    600 #: includes/wordbooker_options.php:287 
     594#: includes/wordbooker_options.php:285 
     595msgid "Right Side" 
     596msgstr "" 
     597 
     598#: includes/wordbooker_options.php:285 
     599msgid "Left Side" 
     600msgstr "" 
     601 
     602#: includes/wordbooker_options.php:288 
    601603msgid "No - use Send instead of Like" 
    602604msgstr "" 
    603605 
    604 #: includes/wordbooker_options.php:287 
     606#: includes/wordbooker_options.php:288 
    605607msgid "Yes - use both Like and Send" 
    606608msgstr "" 
    607609 
    608 #: includes/wordbooker_options.php:288 
     610#: includes/wordbooker_options.php:289 
    609611msgid "Include a Facebook Like button in blog" 
    610612msgstr "" 
    611613 
    612 #: includes/wordbooker_options.php:290 
     614#: includes/wordbooker_options.php:291 
    613615msgid "Show Facebook Like button on front page" 
    614616msgstr "" 
    615617 
    616 #: includes/wordbooker_options.php:293 
     618#: includes/wordbooker_options.php:294 
    617619msgid "Show Facebook Like button on Category pages" 
    618620msgstr "" 
    619621 
    620 #: includes/wordbooker_options.php:296 
     622#: includes/wordbooker_options.php:297 
    621623msgid "Show Facebook Like button on Pages" 
    622624msgstr "" 
    623625 
    624 #: includes/wordbooker_options.php:299 
     626#: includes/wordbooker_options.php:300 
    625627msgid "Show Facebook Like button in each post" 
    626628msgstr "" 
    627629 
    628 #: includes/wordbooker_options.php:302 
     630#: includes/wordbooker_options.php:303 
    629631msgid "Don't show Facebook Like / Send Button on Sticky Posts" 
    630632msgstr "" 
    631633 
    632 #: includes/wordbooker_options.php:307 
     634#: includes/wordbooker_options.php:308 
    633635msgid "Width of Facebook Like box" 
    634636msgstr "" 
    635637 
    636 #: includes/wordbooker_options.php:310 
     638#: includes/wordbooker_options.php:311 
    637639msgid "Facebook Like - Display Button " 
    638640msgstr "" 
    639641 
    640 #: includes/wordbooker_options.php:316 
     642#: includes/wordbooker_options.php:317 
     643msgid "Facebook Like - Align Button " 
     644msgstr "" 
     645 
     646#: includes/wordbooker_options.php:324 
    641647msgid "Facebook Like - Verb to Display" 
    642648msgstr "" 
    643649 
    644 #: includes/wordbooker_options.php:322 
     650#: includes/wordbooker_options.php:330 
    645651msgid "Facebook Like - Colour Scheme" 
    646652msgstr "" 
    647653 
    648 #: includes/wordbooker_options.php:328 
     654#: includes/wordbooker_options.php:336 
    649655msgid "Facebook Like - Display Font" 
    650656msgstr "" 
    651657 
    652 #: includes/wordbooker_options.php:334 
     658#: includes/wordbooker_options.php:342 
    653659msgid "Facebook Like - Layout Style" 
    654660msgstr "" 
    655661 
    656 #: includes/wordbooker_options.php:340 
     662#: includes/wordbooker_options.php:348 
    657663msgid "Facebook Like - Display Faces (Standard layout only)" 
    658664msgstr "" 
    659665 
    660 #: includes/wordbooker_options.php:347 
     666#: includes/wordbooker_options.php:355 
    661667msgid "Combine Send with Like" 
    662668msgstr "" 
    663669 
    664 #: includes/wordbooker_options.php:353 
     670#: includes/wordbooker_options.php:361 
    665671msgid "Facebook Send - Display Button" 
    666672msgstr "" 
    667673 
    668 #: includes/wordbooker_options.php:360 
    669 msgid "Include a Facebook Share button in blog" 
    670 msgstr "" 
    671  
    672 #: includes/wordbooker_options.php:364 
    673 msgid "Facebook Share - Display Button " 
    674 msgstr "" 
    675  
    676 #: includes/wordbooker_options.php:370 
    677 msgid "Show Facebook Share button on front page" 
    678 msgstr "" 
    679  
    680 #: includes/wordbooker_options.php:373 
    681 msgid "Show Facebook Share button on Category pages" 
    682 msgstr "" 
    683  
    684 #: includes/wordbooker_options.php:376 
    685 msgid "Show Facebook Share button on Pages" 
    686 msgstr "" 
    687  
    688 #: includes/wordbooker_options.php:379 
    689 msgid "Show Facebook Share button in each post" 
    690 msgstr "" 
    691  
    692 #: includes/wordbooker_options.php:381 
    693 msgid "Don't show Facebook Share button on Sticky Posts" 
    694 msgstr "" 
    695  
    696 #: includes/wordbooker_options.php:384 
     674#: includes/wordbooker_options.php:394 
    697675msgid "Do not replace Gravtars with Facebook Photos" 
    698676msgstr "" 
    699677 
    700 #: includes/wordbooker_options.php:388 
    701 msgid "Use Frictionless sharing/ Timeline instead of Share" 
    702 msgstr "" 
    703  
    704 #: includes/wordbooker_options.php:406 
     678#: includes/wordbooker_options.php:416 
    705679msgid "Wordpress Comment handling Options" 
    706680msgstr "" 
    707681 
    708 #: includes/wordbooker_options.php:407 
     682#: includes/wordbooker_options.php:417 
    709683msgid "Never " 
    710684msgstr "" 
    711685 
    712 #: includes/wordbooker_options.php:408 
     686#: includes/wordbooker_options.php:418 
    713687msgid "Manual Polling " 
    714688msgstr "" 
    715689 
    716 #: includes/wordbooker_options.php:412 
     690#: includes/wordbooker_options.php:422 
    717691msgid "Process Comments  " 
    718692msgstr "" 
    719693 
    720 #: includes/wordbooker_options.php:417 
     694#: includes/wordbooker_options.php:427 
    721695msgid "Next Scheduled fetch is in" 
    722696msgstr "" 
    723697 
    724 #: includes/wordbooker_options.php:418 
     698#: includes/wordbooker_options.php:428 
    725699msgid "Enable Comment processing" 
    726700msgstr "" 
    727701 
    728 #: includes/wordbooker_options.php:420 
     702#: includes/wordbooker_options.php:430 
    729703msgid "Disable Comment Importing" 
    730704msgstr "" 
    731705 
    732 #: includes/wordbooker_options.php:422 
     706#: includes/wordbooker_options.php:432 
    733707msgid "Disable Comment Exporting" 
    734708msgstr "" 
    735709 
    736 #: includes/wordbooker_options.php:425 
     710#: includes/wordbooker_options.php:435 
    737711msgid "[Comment imported from blog]" 
    738712msgstr "" 
    739713 
    740 #: includes/wordbooker_options.php:427 
     714#: includes/wordbooker_options.php:437 
    741715msgid "Comment Tag" 
    742716msgstr "" 
    743717 
    744 #: includes/wordbooker_options.php:430 
     718#: includes/wordbooker_options.php:440 
    745719msgid "Facebook Comment Structure" 
    746720msgstr "" 
    747721 
    748 #: includes/wordbooker_options.php:432 
     722#: includes/wordbooker_options.php:442 
    749723msgid "Assign this email address to comments" 
    750724msgstr "" 
    751725 
    752 #: includes/wordbooker_options.php:434 
     726#: includes/wordbooker_options.php:444 
    753727msgid "Import Comments from Facebook for new Wordbooker Posts" 
    754728msgstr "" 
    755729 
    756 #: includes/wordbooker_options.php:436 
     730#: includes/wordbooker_options.php:446 
    757731msgid "Push Comments up to Facebook for new posts" 
    758732msgstr "" 
    759733 
    760 #: includes/wordbooker_options.php:438 
     734#: includes/wordbooker_options.php:448 
    761735msgid "Auto Approve imported comments" 
    762736msgstr "" 
    763737 
    764 #: includes/wordbooker_options.php:441 
     738#: includes/wordbooker_options.php:451 
    765739msgid "Run Comment Handling Now" 
    766740msgstr "" 
    767741 
    768 #: includes/wordbooker_options.php:444 
     742#: includes/wordbooker_options.php:454 
    769743msgid "Facebook Comment Box Options" 
    770744msgstr "" 
    771745 
    772 #: includes/wordbooker_options.php:445 
     746#: includes/wordbooker_options.php:455 
    773747msgid "Enable Facebook Comment handling  " 
    774748msgstr "" 
    775749 
    776 #: includes/wordbooker_options.php:447 
     750#: includes/wordbooker_options.php:457 
    777751msgid "Created in line below post" 
    778752msgstr "" 
    779753 
    780 #: includes/wordbooker_options.php:449 
     754#: includes/wordbooker_options.php:459 
    781755msgid "Comment placing " 
    782756msgstr "" 
    783757 
    784 #: includes/wordbooker_options.php:455 
     758#: includes/wordbooker_options.php:465 
    785759msgid "Comment Box - Colour Scheme" 
    786760msgstr "" 
    787761 
    788 #: includes/wordbooker_options.php:461 
     762#: includes/wordbooker_options.php:471 
    789763msgid "All Wordbooker users can moderate comments  " 
    790764msgstr "" 
    791765 
    792 #: includes/wordbooker_options.php:466 
     766#: includes/wordbooker_options.php:476 
    793767msgid "Use this Facebook Application ID for comment moderation" 
    794768msgstr "" 
    795769 
    796 #: includes/wordbooker_options.php:470 
     770#: includes/wordbooker_options.php:480 
    797771msgid "Width of comment box" 
    798772msgstr "" 
    799773 
    800 #: includes/wordbooker_options.php:475 
     774#: includes/wordbooker_options.php:485 
    801775msgid "Number of comments to display" 
    802776msgstr "" 
    803777 
    804 #: includes/wordbooker_options.php:480 
     778#: includes/wordbooker_options.php:490 
    805779msgid "Enable notification of new comments" 
    806780msgstr "" 
    807781 
    808 #: includes/wordbooker_options.php:483 
     782#: includes/wordbooker_options.php:493 
    809783msgid "Facebook comment handling should be enabled on new posts" 
    810784msgstr "" 
    811785 
    812 #: includes/wordbooker_options.php:493 
     786#: includes/wordbooker_options.php:504 
    813787msgid "User who should get Admin level diagnostics" 
    814788msgstr "" 
    815789 
    816 #: includes/wordbooker_options.php:499 
     790#: includes/wordbooker_options.php:511 
    817791msgid "Show Everything and I mean everything" 
    818792msgstr "" 
    819793 
    820 #: includes/wordbooker_options.php:499 
     794#: includes/wordbooker_options.php:511 
    821795msgid "Show everything but Cache Diagnostics" 
    822796msgstr "" 
    823797 
    824 #: includes/wordbooker_options.php:499 
     798#: includes/wordbooker_options.php:511 
    825799msgid "Show result of major actions" 
    826800msgstr "" 
    827801 
    828 #: includes/wordbooker_options.php:499 
     802#: includes/wordbooker_options.php:511 
    829803msgid "Don't show anything apart from Fatal errors" 
    830804msgstr "" 
    831805 
    832 #: includes/wordbooker_options.php:499 
     806#: includes/wordbooker_options.php:511 
    833807msgid "Disabled (Show nothing at all)" 
    834808msgstr "" 
    835809 
    836 #: includes/wordbooker_options.php:500 
     810#: includes/wordbooker_options.php:512 
    837811msgid "Post Diagnostics display level" 
    838812msgstr "" 
    839813 
    840 #: includes/wordbooker_options.php:506 
     814#: includes/wordbooker_options.php:518 
    841815msgid "Clear detailed diagnostics on successful post" 
    842816msgstr "" 
    843817 
    844 #: includes/wordbooker_options.php:508 
     818#: includes/wordbooker_options.php:520 
    845819msgid "Disable the use of short URLs in links posted to Facebook" 
    846820msgstr "" 
    847821 
    848 #: includes/wordbooker_options.php:511 
     822#: includes/wordbooker_options.php:523 
    849823msgid "Include FB Recent activity on Wordbooker Options page" 
    850824msgstr "" 
    851825 
    852 #: includes/wordbooker_options.php:514 
     826#: includes/wordbooker_options.php:526 
    853827msgid "Use Iframes instead of FBXML to render FB features" 
    854828msgstr "" 
    855829 
    856 #: includes/wordbooker_options.php:517 
     830#: includes/wordbooker_options.php:529 
    857831msgid "Use Site URL not Blog Description in Wall Posts" 
    858832msgstr "" 
    859833 
    860 #: includes/wordbooker_options.php:520 
     834#: includes/wordbooker_options.php:532 
    861835msgid "Check the following Custom Post Meta tags for images" 
    862836msgstr "" 
    863837 
    864 #: includes/wordbooker_options.php:523 
     838#: includes/wordbooker_options.php:535 
    865839msgid "" 
    866840"Use Image from Custom Meta instead of Featured Image for Open Graph image" 
    867841msgstr "" 
    868842 
    869 #: includes/wordbooker_options.php:526 
     843#: includes/wordbooker_options.php:538 
    870844msgid "Default Open Graph image to use for posts" 
    871845msgstr "" 
    872846 
    873 #: includes/wordbooker_options.php:529 
     847#: includes/wordbooker_options.php:541 
    874848msgid "Use the above image instead of a blank for posts with no image" 
    875849msgstr "" 
    876850 
    877 #: includes/wordbooker_options.php:532 
     851#: includes/wordbooker_options.php:544 
    878852msgid "Disable in-line production of OpenGraph Tags" 
    879853msgstr "" 
    880854 
    881 #: includes/wordbooker_options.php:535 
     855#: includes/wordbooker_options.php:547 
     856msgid "Disable Facebook API initialisation" 
     857msgstr "" 
     858 
     859#: includes/wordbooker_options.php:550 
    882860msgid "Only Pretend to Publish on Facebook - TEST MODE" 
    883861msgstr "" 
    884862 
    885 #: includes/wordbooker_options.php:537 
     863#: includes/wordbooker_options.php:552 
    886864msgid "Disable ALL Wordbooker functionality" 
    887865msgstr "" 
    888866 
    889 #: includes/wordbooker_options.php:556 
     867#: includes/wordbooker_options.php:573 
    890868msgid "User Level Settings" 
    891869msgstr "" 
    892870 
    893 #: includes/wordbooker_options.php:557 
     871#: includes/wordbooker_options.php:574 
    894872msgid "" 
    895873"If set, these options will override the Blog Level options for this user" 
    896874msgstr "" 
    897875 
    898 #: includes/wordbooker_options.php:567 includes/wordbooker_options.php:576 
    899 #: includes/wordbooker_options.php:673 includes/wordbooker_options.php:682 
     876#: includes/wordbooker_options.php:584 includes/wordbooker_options.php:593 
     877#: includes/wordbooker_options.php:690 includes/wordbooker_options.php:699 
    900878msgid "Same as Blog" 
    901879msgstr "" 
    902880 
    903 #: includes/wordbooker_options.php:597 includes/wordbooker_options.php:634 
    904 #: includes/wordbooker_posting_options.php:95 
     881#: includes/wordbooker_options.php:611 
     882#: includes/wordbooker_posting_options.php:94 
     883msgid "As a Wall Post" 
     884msgstr "" 
     885 
     886#: includes/wordbooker_options.php:611 
     887#: includes/wordbooker_posting_options.php:94 
     888msgid "As a Note" 
     889msgstr "" 
     890 
     891#: includes/wordbooker_options.php:611 
     892#: includes/wordbooker_posting_options.php:94 
     893msgid "As a Status Update" 
     894msgstr "" 
     895 
     896#: includes/wordbooker_options.php:611 
     897#: includes/wordbooker_posting_options.php:94 
     898msgid "As a Link" 
     899msgstr "" 
     900 
     901#: includes/wordbooker_options.php:615 includes/wordbooker_options.php:651 
     902#: includes/wordbooker_posting_options.php:98 
    905903#: includes/wordbooker_posting_options.php:131 
    906904msgid "Post to the following Wall" 
    907905msgstr "" 
    908906 
    909 #: includes/wordbooker_options.php:609 
    910 #: includes/wordbooker_posting_options.php:107 
    911 #: includes/wordbooker_posting_options.php:121 
    912 msgid "As a Wall Post" 
    913 msgstr "" 
    914  
    915 #: includes/wordbooker_options.php:609 
    916 #: includes/wordbooker_posting_options.php:107 
    917 #: includes/wordbooker_posting_options.php:121 
    918 msgid "As a Note" 
    919 msgstr "" 
    920  
    921 #: includes/wordbooker_options.php:609 
    922 #: includes/wordbooker_posting_options.php:107 
    923 #: includes/wordbooker_posting_options.php:121 
    924 msgid "As a Status Update" 
    925 msgstr "" 
    926  
    927 #: includes/wordbooker_options.php:609 
    928 #: includes/wordbooker_posting_options.php:107 
    929 #: includes/wordbooker_posting_options.php:121 
    930 msgid "As a Link" 
    931 msgstr "" 
    932  
    933 #: includes/wordbooker_options.php:620 
    934 #: includes/wordbooker_posting_options.php:118 
     907#: includes/wordbooker_options.php:637 
     908#: includes/wordbooker_posting_options.php:120 
    935909msgid "Post to my Personal Wall" 
    936910msgstr "" 
    937911 
    938 #: includes/wordbooker_options.php:665 
     912#: includes/wordbooker_options.php:682 
    939913msgid "Facebook Status Text" 
    940914msgstr "" 
    941915 
    942 #: includes/wordbooker_options.php:672 
     916#: includes/wordbooker_options.php:689 
    943917#: includes/wordbooker_posting_options.php:161 
    944918msgid "Action Link Option" 
    945919msgstr "" 
    946920 
    947 #: includes/wordbooker_options.php:673 
     921#: includes/wordbooker_options.php:690 
    948922msgid "None" 
    949923msgstr "" 
    950924 
    951 #: includes/wordbooker_options.php:673 
     925#: includes/wordbooker_options.php:690 
    952926#: includes/wordbooker_posting_options.php:162 
    953927msgid "Share Link" 
    954928msgstr "" 
    955929 
    956 #: includes/wordbooker_options.php:691 
     930#: includes/wordbooker_options.php:708 
    957931msgid "Use Post Thumbnail only" 
    958932msgstr "" 
    959933 
    960 #: includes/wordbooker_options.php:695 
     934#: includes/wordbooker_options.php:712 
    961935msgid "Use Post Excerpt" 
    962936msgstr "" 
    963937 
    964 #: includes/wordbooker_options.php:699 
     938#: includes/wordbooker_options.php:716 
    965939msgid "Show Status for" 
    966940msgstr "" 
    967941 
    968 #: includes/wordbooker_options.php:699 
     942#: includes/wordbooker_options.php:716 
    969943msgid "My Own Profile" 
    970944msgstr "" 
    971945 
    972 #: includes/wordbooker_options.php:711 
     946#: includes/wordbooker_options.php:728 
    973947msgid "Disable Facebook User information in Status" 
    974948msgstr "" 
    975949 
    976 #: includes/wordbooker_options.php:714 
     950#: includes/wordbooker_options.php:731 
    977951msgid "Save User Options" 
    978952msgstr "" 
    979953 
    980 #: includes/wordbooker_options.php:714 
     954#: includes/wordbooker_options.php:731 
    981955msgid "Reset to Blog Defaults" 
    982956msgstr "" 
    983957 
    984 #: includes/wordbooker_options.php:729 
     958#: includes/wordbooker_options.php:746 
    985959msgid "Donate" 
    986960msgstr "" 
    987961 
    988 #: includes/wordbooker_options.php:733 
    989 msgid "" 
    990 "Thank you for contributing towards the support and development of this " 
    991 "extension." 
    992 msgstr "" 
    993  
    994 #: includes/wordbooker_options.php:737 
     962#: includes/wordbooker_options.php:749 
    995963msgid "" 
    996964"You're using the Premium options in Wordbooker. You really should contribute " 
    997965"something to the support and development of this plugin.  Please provide " 
    998966"your FB Id number and your website when making payment so your details can " 
    999 "be added to the 'thanks' list" 
    1000 msgstr "" 
    1001  
    1002 #: includes/wordbooker_options.php:739 
     967"be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a>  " 
     968"list on the web site" 
     969msgstr "" 
     970 
     971#: includes/wordbooker_options.php:751 
    1003972msgid "" 
    1004973"If you've found this extension useful then please feel free to donate to its " 
    1005974"support and future development. Please provide your FB Id number and your " 
    1006 "website when making payment so your details can be added to the 'thanks' list" 
    1007 msgstr "" 
    1008  
    1009 #: includes/wordbooker_options.php:748 
    1010 msgid "Thanks" 
    1011 msgstr "" 
    1012  
    1013 #: includes/wordbooker_options.php:750 
    1014 msgid "" 
    1015 "The following people and blogs have contributed to the ongoing development " 
    1016 "of this plugin : " 
    1017 msgstr "" 
    1018  
    1019 #: includes/wordbooker_options.php:755 
    1020 msgid "" 
    1021 "The following people have contributed language files to allow Wordbooker to " 
    1022 "be used in different languages : " 
    1023 msgstr "" 
    1024  
    1025 #: includes/wordbooker_options.php:757 
    1026 msgid "German" 
    1027 msgstr "" 
    1028  
    1029 #: includes/wordbooker_options.php:758 
    1030 msgid "French" 
    1031 msgstr "" 
    1032  
    1033 #: includes/wordbooker_options.php:759 
    1034 msgid "Russian" 
     975"website when making payment so your details can be added to the <a " 
     976"href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a> page on the Website" 
    1035977msgstr "" 
    1036978 
     
    1040982msgstr "" 
    1041983 
    1042 #: includes/wordbooker_posting_options.php:63 
    1043 #: includes/wordbooker_posting_options.php:70 
     984#: includes/wordbooker_posting_options.php:66 
     985#: includes/wordbooker_posting_options.php:73 
    1044986msgid "Publish this post to Facebook" 
    1045987msgstr "" 
    1046988 
    1047 #: includes/wordbooker_posting_options.php:66 
     989#: includes/wordbooker_posting_options.php:69 
    1048990msgid "Publish this page to Facebook" 
    1049991msgstr "" 
    1050992 
    1051 #: includes/wordbooker_posting_options.php:81 
     993#: includes/wordbooker_posting_options.php:84 
    1052994msgid "The following options override the defaults set on the options page" 
    1053995msgstr "" 
    1054996 
    1055 #: includes/wordbooker_posting_options.php:89 
     997#: includes/wordbooker_posting_options.php:92 
    1056998msgid "Personal Wall" 
    1057999msgstr "" 
     
    10691011msgstr "" 
    10701012 
    1071 #: includes/wordbooker_posting_options.php:190 
    1072 msgid "Show Facebook Share for this Page" 
    1073 msgstr "" 
    1074  
    1075 #: includes/wordbooker_posting_options.php:202 
     1013#: includes/wordbooker_posting_options.php:203 
    10761014msgid "Show Facebook Like/Send for this Post" 
    10771015msgstr "" 
    10781016 
    1079 #: includes/wordbooker_posting_options.php:210 
    1080 msgid "Show Facebook Share for this Post" 
    1081 msgstr "" 
    1082  
    1083 #: includes/wordbooker_posting_options.php:220 
     1017#: includes/wordbooker_posting_options.php:222 
    10841018msgid "Push Comments from this post to Facebook" 
    10851019msgstr "" 
    10861020 
    1087 #: includes/wordbooker_posting_options.php:221 
     1021#: includes/wordbooker_posting_options.php:223 
    10881022msgid "Pull Comments from Facebook for this post" 
    10891023msgstr "" 
    10901024 
    1091 #: includes/wordbooker_posting_options.php:222 
     1025#: includes/wordbooker_posting_options.php:224 
    10921026msgid "Enable Facebook Comments for this post" 
    10931027msgstr "" 
    10941028 
    1095 #: includes/wordbooker_posting_options.php:224 
     1029#: includes/wordbooker_posting_options.php:226 
    10961030msgid "Wordbooker Blog level settings are in force" 
    10971031msgstr "" 
    10981032 
    1099 #: includes/wordbooker_posting_options.php:228 
     1033#: includes/wordbooker_posting_options.php:230 
    11001034msgid "Publish This Post to Facebook" 
    11011035msgstr "" 
     
    11051039msgstr "" 
    11061040 
    1107 #. #-#-#-#-#  wordbooker.pot (Wordbooker 2.0.9)  #-#-#-#-# 
     1041#. #-#-#-#-#  wordbooker.pot (Wordbooker 2.1.8)  #-#-#-#-# 
    11081042#. Plugin URI of the plugin/theme 
    1109 #. #-#-#-#-#  wordbooker.pot (Wordbooker 2.0.9)  #-#-#-#-# 
     1043#. #-#-#-#-#  wordbooker.pot (Wordbooker 2.1.8)  #-#-#-#-# 
    11101044#. Author URI of the plugin/theme 
    11111045msgid "http://wordbooker.tty.org.uk" 
  • wordbooker/trunk/readme.txt

    r509677 r539162  
    22 
    33Contributors: SteveAtty 
    4 Tags: facebook, minifeed, newsfeed, crosspost, WPMU, Facebook Share, Facebook Like, social media 
     4Tags: facebook, news feed, wall, fan page wall, group wall, crosspost, Facebook Send, Facebook Like, social media, open graph. 
    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 
    77Tested up to: 3.3.1 
    8 Stable tag: 2.1.8 
     8Stable tag: 2.1.9 
    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.  
     
    1313 
    1414This plugin allows you to cross-post your blog posts to your Facebook Wall / Fan Page Wall / Group Wall. You can Post as an Extract, A Status Update or even as a Note.  
     15 
     16Wordbooker populates all the Open Graph tags needed to integrate your blog post with Facebook's Social Graph. 
    1517 
    1618NOTE : You MUST have the PHP Curl module enabled and configured in such a way that it can connect to the Facebook Servers on a secure HTTP connection. If you do not have curl OR if your hosting company block curl access to externals sites you cannot use this plugin. 
     
    115117 
    116118== Changelog == 
     119 
     120= Version 2.1.9 02/05/2012 = 
     121- Fixed a bug where posts made via Postie didn't pick up the right user ID. This might affect quite a few things. 
     122- Added a schema cross check utility. 
     123- Added a Disabled FB API initialization option to stop clashes with other FB related plugins 
     124- Added code so that simple facebook connect will pick up the locale variable from Wordbooker 
     125- Removed Facebook Share as the functionality is depreciated 
     126- Added an align Left/Right for Like/Send 
     127- Removed some parameters and tweaked others to make the fb like iframes more W3C compliant. 
     128- Added some code to try to work out why token swapping isn't always working. 
     129- Put a check for missing access tokens before calling the publish functions - should speed things up and reduce the number of errors being bounced back from Facebook. 
     130- Changed the code so that blog urls are set rather than just letting Facebook work it out. 
     131- Added code to pull images from post attachments as well as parsing the post 
     132- Added code so that og tags for image and content which are static values and not parsed at post view are parsed when the post is saved, even if its not published. This means that they can be changed. 
     133- Added some checks to make sure that primary and secondary target types are set even if the user fails to set them. 
     134- Added some very large values to the extract length to allow people to post long posts on their wall without using Facebook Notes. 
     135- Changed the og schema insertion code to try to resolve W3C compliance issues. 
     136 
    117137 
    118138= Version 2.1.8 23/02/2012 = 
  • wordbooker/trunk/wordbooker.php

    r509677 r539162  
    66Author: Steve Atty  
    77Author URI: http://wordbooker.tty.org.uk 
    8 Version: 2.1.8 
     8Version: 2.1.9 
    99*/ 
    1010 
     
    3939define('WORDBOOKER_DEBUG', false); 
    4040define('WORDBOOKER_TESTING', false); 
    41 define('WORDBOOKER_CODE_RELEASE',"2.1.8 - Call me Eugene"); 
     41define('WORDBOOKER_CODE_RELEASE',"2.1.9 - Now Your Ships are Burned"); 
    4242 
    4343# For Troubleshooting  
     
    383383    $wordbooker_settings=wordbooker_options(); 
    384384    if (! isset($wordbooker_settings['schema_vers'])) {wordbooker_activate(); return;} 
    385     if ($wordbooker_settings['schema_vers']< (float) WORDBOOKER_SCHEMA_VERSION ) {  
     385    if ($wordbooker_settings['schema_vers'] != WORDBOOKER_SCHEMA_VERSION ) {  
    386386         _e("Database changes being applied", 'wordbooker'); 
    387387    } else { 
     
    918918 
    919919function wordbooker_renew_access_token ($userid=null) { 
    920     global $wpdb,$user_ID; 
     920    global $wpdb,$user_ID,$wbooker_user_id; 
    921921    if(is_null($userid)){$userid=$user_ID;} 
     922    $wbooker_user_id=$userid; 
    922923    $sql="select user_ID,access_token,updated from ".WORDBOOKER_USERDATA." where user_ID=".$userid; 
    923924    $result = $wpdb->get_results($sql); 
     
    925926    foreach($result as $user_row){ 
    926927        if ($user_row->updated==$today) { 
    927     #   wordbooker_debugger("Access token already updated today"," ",-1,99) ;  
     928        wordbooker_debugger("Access token already updated today"," ",-1,99) ;  
    928929        } else { 
    929         $ret_code=wordbooker_get_access_token(unserialize($user_row->access_token)); 
     930        try { 
     931            $ret_code=wordbooker_get_access_token(unserialize($user_row->access_token)); 
     932        }    
     933        catch (Exception $e) { 
     934            $error_code = $e->getCode(); 
     935            $error_msg = $e->getMessage(); 
     936            wordbooker_debugger("Access token refresh failed   ".$error_msg,$error_code,$post_id,-1,99) ; 
     937        } 
    930938        $x=split('&',$ret_code); 
    931939        $x=split('=',$x[0]); 
    932940        $access_token=$x[1]; 
    933941        $sql= "Update " . WORDBOOKER_USERDATA . " set access_token = '" . serialize($access_token) . "', updated=".$today." where user_id=".$userid; 
    934         var_dump($sql); 
    935942        $result = $wpdb->query($sql); 
    936         #wordbooker_debugger("Access token updated"," ",-1,99) ; 
     943        wordbooker_debugger("Access token was ",unserialize($user_row->access_token),-1,99) ; 
     944        wordbooker_debugger("Access token is now ",$access_token,-1,99) ; 
     945        wordbooker_debugger("Access token updated"," ",-1,99) ; 
    937946        } 
    938947    } 
     
    10571066    echo '</form> </div>'; 
    10581067 
    1059     #wordbooker_renew_access_token(); 
     1068    wordbooker_renew_access_token(); 
    10601069    $description=__("Recent Facebook Activity for this site", 'wordbooker'); 
    10611070 
    1062     $iframe='<iframe src="http://www.facebook.com/plugins/activity.php?site='.get_bloginfo('url').'&amp;width=600&amp;height=400&amp;header=true&amp;colorscheme=light&amp;font&amp;border_color&amp;recommendations=true"  scrolling="no" frameborder="no" style="border:none; overflow:hidden; width:600px; height:400px"></iframe>'; 
     1071    $iframe='<iframe src="http://www.facebook.com/plugins/activity.php?site='.get_bloginfo('url').'&amp;width=600&amp;height=400&amp;header=true&amp;colorscheme=light&amp;font&amp;border_color&amp;recommendations=true" style="border:none; overflow:hidden; width:600px; height:400px"></iframe>'; 
    10631072    $activity="<hr><h3>".$description.'</h3><p>'.$iframe."</p></div>"; 
    10641073    $options = wordbooker_options(); 
     
    12111220    } 
    12121221    echo "</b>"; 
     1222 
     1223$wordbooker_columns[WORDBOOKER_ERRORLOGS]=array('timestamp','user_ID','method','error_code','error_msg','post_id','blog_id','sequence_id','diag_level'); 
     1224 
     1225$wordbooker_columns[WORDBOOKER_POSTLOGS]=array('post_id','blog_id','timestamp'); 
     1226 
     1227$wordbooker_columns[WORDBOOKER_USERDATA]=array('user_ID','uid','expires','access_token','sig','use_facebook','onetime_data','facebook_error','secret','session_key','facebook_id','name','status','updated','url','pic','pages','auths_needed','blog_id'); 
     1228 
     1229$wordbooker_columns[WORDBOOKER_USERSTATUS]=array('user_ID','name','status','updated','url','pic','blog_id','facebook_id'); 
     1230 
     1231$wordbooker_columns[WORDBOOKER_POSTCOMMENTS]=array('fb_post_id','user_id','comment_timestamp','wp_post_id','blog_id','wp_comment_id','fb_comment_id','in_out'); 
     1232 
     1233$wordbooker_columns[WORDBOOKER_PROCESS_QUEUE]=array('entry_type','blog_id','post_id','priority','status'); 
     1234 
     1235$wordbooker_columns[WORDBOOKER_FB_FRIENDS]=array('user_id','blog_id','facebook_id','name'); 
     1236 
     1237$wordbooker_columns[WORDBOOKER_FB_FRIEND_LISTS]=array('user_id','flid','owner','name'); 
     1238 
     1239 
     1240$wordbooker_column_def[WORDBOOKER_ERRORLOGS]=array ('timestamp'=>'timestamp','user_ID'=>'bigint(20) unsigned','method'=>'longtext','error_code'=>'int(11)','error_msg'=>'longtext','post_id'=>'bigint(20)','blog_id'=>'bigint(20)','sequence_id'=>'bigint(20)','diag_level'=>'int(4)'); 
     1241 
     1242$wordbooker_column_def[WORDBOOKER_POSTLOGS]=array ('post_id'=>'bigint(20)','blog_id'=>'bigint(20)','timestamp'=>'timestamp'); 
     1243 
     1244$wordbooker_column_def[WORDBOOKER_USERDATA]=array ('user_ID'=>'bigint(20) unsigned','uid'=>'varchar(80)','expires'=>'varchar(80)','access_token'=>'varchar(255)','sig'=>'varchar(80)','use_facebook'=>'tinyint(1)','onetime_data'=>'longtext','facebook_error'=>'longtext','secret'=>'varchar(80)','session_key'=>'varchar(80)','facebook_id'=>'varchar(40)','name'=>'varchar(250)','status'=>'varchar(2048)','updated'=>'int(20)','url'=>'varchar(250)','pic'=>'varchar(250)','pages'=>'longtext','auths_needed'=>'int(1)','blog_id'=>'bigint(20)'); 
     1245 
     1246$wordbooker_column_def[WORDBOOKER_USERSTATUS]=array ('user_ID'=>'bigint(20) unsigned','name'=>'varchar(250)','status'=>'varchar(2048)','updated'=>'int(20)','url'=>'varchar(250)','pic'=>'varchar(250)','blog_id'=>'bigint(20)','facebook_id'=>'varchar(40)'); 
     1247 
     1248$wordbooker_column_def[WORDBOOKER_POSTCOMMENTS]=array ('fb_post_id'=>'varchar(40)','user_id'=>'bigint(20)','comment_timestamp'=>'int(20)','wp_post_id'=>'int(11)','blog_id'=>'bigint(20)','wp_comment_id'=>'int(20)','fb_comment_id'=>'varchar(40)','in_out'=>'varchar(20)'); 
     1249 
     1250$wordbooker_column_def[WORDBOOKER_PROCESS_QUEUE]=array ('entry_type'=>'varchar(20)','blog_id'=>'int(11)','post_id'=>'int(11)','priority'=>'int(11)','status'=>'varchar(20)'); 
     1251 
     1252$wordbooker_column_def[WORDBOOKER_FB_FRIENDS]=array ('user_id'=>'int(11)','blog_id'=>'bigint(20)','facebook_id'=>'varchar(20)','name'=>'varchar(200)'); 
     1253 
     1254$wordbooker_column_def[WORDBOOKER_FB_FRIEND_LISTS]=array ('user_id'=>'int(11)','flid'=>'varchar(80)','owner'=>'varchar(80)','name'=>'varchar(240)'); 
     1255    foreach ($table_array as $table) { 
     1256        $working_table=$wordbooker_columns[$table]; 
     1257        $working_table_def=$wordbooker_column_def[$table]; 
     1258        foreach ($working_table as $chardata){ 
     1259            $sql="SELECT column_name,column_type FROM information_schema.COLUMNS WHERE table_name='".$table."' and table_schema='".DB_NAME."' and column_name='".$chardata."'"; 
     1260    $rows =  $wpdb->get_row($sql,ARRAY_N); 
     1261    #var_dump($rows); 
     1262        if ($chardata==$rows[0]) { 
     1263            $col_status=" present";$correct_sql='zed';       
     1264            if ($working_table_def[$chardata]==$rows[1]) {$col_def_status=" matches";$correct_def_sql='zed';}  
     1265            else {$col_def_status=" mismatches"; $correct_def_sql="alter table ".$table." change ".$chardata." ".$chardata." ".$working_table_def[$chardata];} 
     1266        } else { 
     1267            $col_status=" missing"; $correct_sql="alter table ".$table." add ".$chardata." ".$working_table_def[$chardata]; 
     1268        } 
     1269    #   echo "<li>". $chardata ." is ".$col_status." - ".$correct_sql."</li>"; 
     1270    #   echo "<li>". $chardata ." type ".$col_def_status." - ".$correct_def_sql."</li>"; 
     1271    #       echo "'".$chardata->column_name."',"; 
     1272        #echo "'".$chardata->column_name."'=>'".$chardata->column_type."',"; 
     1273        if ($correct_sql!='zed') {$sql_run[]=$correct_sql;} 
     1274        if ($correct_def_sql!='zed') {$sql_run[]=$correct_def_sql;} 
     1275    } 
     1276} 
     1277    #var_dump($sql_run); 
     1278    if (is_array($sql_run)) { 
     1279        echo "Schema differences found - fixing up <br />"; 
     1280        foreach($sql_run as $sql_fix) { 
     1281            echo "Executing : ".$sql_fix."<br />"; 
     1282            $result=@mysql_query($sql_fix); 
     1283        } 
     1284        echo "<br />"; 
     1285    } 
    12131286    if (ADVANCED_DEBUG) { phpinfo(INFO_MODULES);} 
    12141287?> 
     
    12441317 */ 
    12451318 
    1246  
    1247 function wordbooker_fbclient_publishaction($wbuser,$post_id)  
    1248 {    
    1249     global $wordbooker_post_options,$wpdb; 
     1319function wordbooker_return_images($post_content,$flag) { 
     1320    global $wordbooker_post_options,$wpdb,$post; 
    12501321    $wordbooker_settings =wordbooker_options();  
    1251     $post = get_post($post_id); 
    1252     $post_link_share = get_permalink($post_id); 
    1253     $post_link=wordbooker_short_url($post_id); 
    1254     $post_title=$post->post_title; 
    1255     $post_content = $post->post_content; 
    12561322    # Grab the content of the post once its been filtered for display - this converts app tags into HTML so we can grab gallery images etc. 
    1257     $processed_content ="!!!  ".apply_filters('the_content', $post_content)."    !!!"; 
     1323    $args = array( 
     1324    'post_type' => 'attachment', 
     1325    'numberposts' => -1, 
     1326    'post_status' => null, 
     1327    'post_parent' => $post->ID 
     1328    ); 
     1329    $postcontent2=""; 
     1330    $attachments = get_posts( $args ); 
     1331    if ( $attachments ) { 
     1332        foreach ( $attachments as $attachment ) { 
     1333            if ($flag==1) {wordbooker_debugger("Adding image",wp_get_attachment_url($attachment->ID),$post->ID,80) ;} 
     1334            $post_content2 .= ' <img src="' . wp_get_attachment_url($attachment->ID) . '"> '; 
     1335        } 
     1336    } 
     1337    $processed_content ="!!!!  ".$post_content2."  ".apply_filters('the_content', $post_content)."    !!!"; 
    12581338    $yturls  = array(); 
    12591339    $matches_tn=array(); 
     
    12691349 
    12701350    if ( function_exists( 'get_the_post_thumbnail' ) ) {  
    1271         wordbooker_debugger("Getting the thumnail image"," ",$post->ID,80) ; 
     1351        if ($flag==1) {wordbooker_debugger("Getting the thumnail image"," ",$post->ID,80) ;} 
    12721352        preg_match_all('/<img \s+ ([^>]*\s+)? src \s* = \s* [\'"](.*?)[\'"]/ix',get_the_post_thumbnail($post_id), $matches_tn);  
    12731353    } 
     
    12751355    $meta_tag_scan=explode(',',$wordbooker_settings['wordbooker_meta_tag_scan']); 
    12761356    foreach($meta_tag_scan as $meta_tag) { 
    1277         wordbooker_debugger("Getting image from custom meta : ",$meta_tag,$post->ID,80) ; 
     1357        if ($flag==1) {wordbooker_debugger("Getting image from custom meta : ",$meta_tag,$post->ID,80) ;} 
    12781358        $matches_ct[]=get_post_meta($post->ID, $meta_tag, TRUE); 
    12791359    } 
     
    12851365    # If the user only wants the thumbnail then we can simply not do the skim over the processed images 
    12861366    if (! isset($wordbooker_post_options["wordbooker_thumb_only"]) ) { 
    1287         wordbooker_debugger("Getting the rest of the images "," ",$post->ID) ; 
     1367        if ($flag==1) {wordbooker_debugger("Getting the rest of the images "," ",$post->ID) ;} 
    12881368        preg_match_all('/<img \s+ ([^>]*\s+)? src \s* = \s* ["](.*?)["]/ix',$processed_content, $matched); 
    12891369        $x=strip_shortcodes($post_content); 
     
    13001380        if (!isset($wordbooker_settings["wordbooker_meta_tag_thumb"])) { 
    13011381            if (! isset($wordbooker_post_options["wordbooker_thumb_only"]) ) { 
    1302                 wordbooker_debugger("Setting image array to be both thumb and the post images "," ",$post->ID,80) ; 
     1382                if ($flag==1) {wordbooker_debugger("Setting image array to be both thumb and the post images "," ",$post->ID,80) ;} 
    13031383                $pulled_images=@array_merge($matches[2],$matched[2],$yturls,$matches); 
    13041384            } 
    13051385            else { 
    1306                 wordbooker_debugger("Setting image array to be just thumb "," ",$post->ID,80) ; 
     1386                if ($flag==1) {wordbooker_debugger("Setting image array to be just thumb "," ",$post->ID,80) ;} 
    13071387                $pulled_images[]=$matches[2]; 
    13081388            }  
     
    13111391 
    13121392    if (isset($wordbooker_settings["wordbooker_meta_tag_thumb"]) && isset($wordbooker_post_options["wordbooker_thumb_only"]) ) { 
    1313     wordbooker_debugger("Setting image array to be just thumb from meta. "," ",$post->ID,80) ; 
     1393    if ($flag==1) {wordbooker_debugger("Setting image array to be just thumb from meta. "," ",$post->ID,80) ;} 
    13141394    $pulled_images[]=$matches_ct[2];} 
    13151395 
    13161396    else { 
    1317         wordbooker_debugger("Setting image array to be post and thumb images. "," ",$post->ID,80) ; 
     1397        if ($flag==1) {wordbooker_debugger("Setting image array to be post and thumb images. "," ",$post->ID,80) ;} 
    13181398        if (is_array($matched[2])) {$pulled_images[]=array_merge($matches,$matched[2]);} 
    13191399        if (is_array($matched[2]) && is_array($yturls)) {$pulled_images=array_merge($matches,$matched[2],$yturls);} 
     
    13631443        if (isset($wordbooker_settings['wordbooker_use_this_image']))  { 
    13641444            $images[]=$wordbooker_settings['wb_wordbooker_default_image']; 
    1365             wordbooker_debugger("No Post images found so using open graph default to keep Facebook happy ",'',$post->ID,90) ; 
     1445            if ($flag==1) {wordbooker_debugger("No Post images found so using open graph default to keep Facebook happy ",'',$post->ID,90) ;} 
    13661446            }  
    13671447        else { 
    13681448            $x=get_bloginfo('wpurl').'/wp-content/plugins/wordbooker/includes/wordbooker_blank.jpg'; 
    13691449            $images[]=$x; 
    1370             wordbooker_debugger("No Post images found so loading blank to keep Facebook happy ",'',$post->ID,90) ;   
     1450            if ($flag==1) {wordbooker_debugger("No Post images found so loading blank to keep Facebook happy ",'',$post->ID,90) ;} 
    13711451            } 
    13721452        } 
     
    13821462                ); 
    13831463    } 
    1384     $images=$images_array; 
    1385         foreach ($images as $key){ 
     1464        return $images_array; 
     1465} 
     1466 
     1467function wordbooker_fbclient_publishaction($wbuser,$post_id,$wpuserid)  
     1468{    
     1469    global $wordbooker_post_options,$wpdb; 
     1470    $wordbooker_settings =wordbooker_options();  
     1471    $post = get_post($post_id); 
     1472    $post_link_share = get_permalink($post_id); 
     1473    $post_link=wordbooker_short_url($post_id); 
     1474    $post_title=$post->post_title; 
     1475    $post_content = $post->post_content; 
     1476    // Get the associated images 
     1477    $args = array( 
     1478        'post_type' => 'attachment', 
     1479        'numberposts' => -1, 
     1480        'post_status' => null, 
     1481        'post_parent' => $post->ID 
     1482    ); 
     1483    $attachments = get_posts( $args ); 
     1484    if ( $attachments ) { 
     1485        foreach ( $attachments as $attachment ) { 
     1486        #   $post_content .=  ID) . '"> '; 
     1487        } 
     1488    } 
     1489    $images=wordbooker_return_images($post_content,1) ; 
     1490    foreach ($images as $key){ 
    13861491        wordbooker_debugger("Post Images : ".$key['src'],'',$post->ID) ; 
    13871492    } 
     
    14311536    #  'media' => json_encode($images) 
    14321537    ); 
    1433     if (isset($wordbooker_settings['wordbooker_use_url_not_slug'])) { unset($wordbooker_fb_post['caption']);} 
     1538#   if (isset($wordbooker_settings['wordbooker_use_url_not_slug'])) { unset($wordbooker_fb_post['caption']);} 
     1539 
     1540    if (isset($wordbooker_settings['wordbooker_use_url_not_slug'])) 
     1541    { 
     1542        $wordbooker_fb_post['caption'] = get_bloginfo(‘url’); 
     1543    } 
    14341544    wordbooker_debugger("Post Titled : ",$post_data['post_title'],$post_id,90) ; 
    14351545    wordbooker_debugger("Post URL : ",$post_data['post_link'],$post_id,90) ; 
     
    14781588            wordbooker_debugger("Posting to ".$target_types[$target_type]." ".$target_name." (".$posting_target['target_id'].") as a ".$posting_type[$posting_target['target_type']],"",$post_id,90) ;  
    14791589            if ($access_token=='dummy access token') {$access_token=$wbuser->access_token;} 
    1480             $target=substr($posting_target['target'],3); 
    1481             $is_dummy=$wordbooker_settings['wordbooker_fake_publish']; 
    1482             switch($posting_target['target_type']) { 
    1483                 # Wall Post 
    1484                 case 1 :  
    1485                 wordbooker_wall_post($post_id,$access_token,$post_title,$wordbooker_fb_post ,$target,$is_dummy,$target_name); 
    1486                 break; 
    1487                 # Note 
    1488                 case 2 : 
    1489                 wordbooker_notes_post($post_id,$access_token,$post_title,$target,$is_dummy,$target_name); 
    1490                 break; 
    1491                 # Status Update 
    1492                 case 3 :  
    1493                 wordbooker_status_update($post_id,$access_token,$post_data['post_date'],$target,$is_dummy,$target_name); 
    1494                 break ; 
    1495                 # Link Post 
    1496                 case 4 :  
    1497                 wordbooker_link_post($post_id,$access_token,$post_title,$wordbooker_fb_post ,$target,$is_dummy,$target_name); 
    1498                 break ; 
     1590            if (is_null($access_token)) { 
     1591                wordbooker_debugger("Posting to ".$target_name." (".$posting_target['target_id'].") failed as there is no access token","",$post_id,90) ;  
     1592            }  
     1593            else { 
     1594                $target=substr($posting_target['target'],3);  
     1595                $is_dummy=$wordbooker_settings['wordbooker_fake_publish']; 
     1596                switch($posting_target['target_type']) { 
     1597                    # Wall Post 
     1598                    case 1 :  
     1599                    wordbooker_wall_post($post_id,$access_token,$post_title,$wordbooker_fb_post ,$target,$is_dummy,$target_name,$wpuserid); 
     1600                    break; 
     1601                    # Note 
     1602                    case 2 : 
     1603                    wordbooker_notes_post($post_id,$access_token,$post_title,$target,$is_dummy,$target_name,$wpuserid); 
     1604                    break; 
     1605                    # Status Update 
     1606                    case 3 :  
     1607                    wordbooker_status_update($post_id,$access_token,$post_data['post_date'],$target,$is_dummy,$target_name,$wpuserid); 
     1608                    break ; 
     1609                    # Link Post 
     1610                    case 4 :  
     1611                    wordbooker_link_post($post_id,$access_token,$post_title,$wordbooker_fb_post ,$target,$is_dummy,$target_name,$wpuserid); 
     1612                    break ; 
     1613                } 
    14991614            } 
    15001615 
     
    15111626    $strip_array= array ('addthis.com','gravatar.com','zemanta.com','wp-includes','plugins','favicon.ico','facebook.com','themes','mu-plugins','fbcdn.net'); 
    15121627    foreach($images as $single){ 
    1513         $file_extension = strtolower(substr($single , strrpos($single , '.') +1));  
     1628        $file_extension = trim(strtolower(substr($single , strrpos($single , '.') +1)));  
    15141629        if (in_array($file_extension,$image_types)){ 
    15151630        foreach ($strip_array as $strip_domain) { 
    15161631            wordbooker_debugger("Looking for ".$strip_domain." in ".$single," ",$post->ID,80) ; 
    15171632            if (stripos($single,$strip_domain)) {wordbooker_debugger("Found a match so dump the image",$single,$post->ID,80) ;} else { if (!in_array($single,$newimages)){$newimages[]=$single;}} 
    1518         }} else {wordbooker_debugger("Image URL ".$single." not valid "," ",$post->ID,90) ;} 
     1633        }} else {wordbooker_debugger("Image URL ".$single." ( ".$file_extension." ) not valid "," ",$post->ID,90) ;} 
    15191634    } 
    15201635    return $newimages; 
     
    16011716    } 
    16021717    $wplang=wordbooker_get_language(); 
    1603  
     1718    $wordbooker_settings = wordbooker_options();  
     1719    $fb_id=$wordbooker_settings["fb_comment_app_id"]; 
     1720    if (strlen($fb_id)<6) { 
     1721    $fb_id=WORDBOOKER_FB_ID; 
     1722    } 
     1723    if (defined('WORDBOOKER_PREMIUM')) { 
     1724        $fb_id=WORDBOOKER_FB_ID; 
     1725    } 
    16041726$efb_script = <<< EOGS 
    16051727 <div id="fb-root"></div> 
     
    16071729      window.fbAsyncInit = function() { 
    16081730    FB.init({ 
    1609      appId  : '254577506873', 
     1731     appId  : ' 
     1732EOGS; 
     1733$efb_script.=$fb_id; 
     1734$efb_script .= <<< EOGS 
     1735', 
    16101736      status : true, // check login status 
    16111737      cookie : true, // enable cookies to allow the server to access the session 
     
    16251751    </script> 
    16261752EOGS; 
    1627     $wordbooker_settings = wordbooker_options();  
    1628     if  (isset($wordbooker_settings['wordbooker_like_button_show']) || isset($wordbooker_settings['wordbooker_like_share_too'] ) || isset($wordbooker_settings['wordbooker_use_fb_comments']))  
     1753    if  (isset($wordbooker_settings['wordbooker_like_button_show']) || isset($wordbooker_settings['wordbooker_use_fb_comments']))  
    16291754        { 
     1755    if (!isset($wordbooker_settings['wordbooker_fb_disable_api'])) { 
    16301756        echo $efb_script; 
     1757    } 
     1758/* 
    16311759         if ( isset($wordbooker_settings['wordbooker_iframe'])) { 
    16321760            echo '<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>'; 
    16331761        } 
     1762*/ 
    16341763    } 
    16351764#   echo '\n<script type="text/javascript " defer="defer" > setTimeout("wordbooker_read()",3000); </script> \n'; 
     
    16421771    $bname=get_bloginfo('name'); 
    16431772    $bdesc=get_bloginfo('description'); 
     1773    $meta_string=""; 
    16441774    $wplang=wordbooker_get_language(); 
    16451775    $wordbooker_settings = wordbooker_options();     
     
    16531783    $blog_name=get_bloginfo('name'); 
    16541784    echo '<!-- Wordbooker generated tags -->'; 
    1655     echo '<meta property="og:locale" content="'.$wplang.'"/> '; 
    1656     echo '<meta property="og:site_name" content="'.$bname.' - '.$bdesc.'"/> '; 
     1785    echo '<meta property="og:locale" content="'.$wplang.'" /> '; 
     1786    echo '<meta property="og:site_name" content="'.$bname.' - '.$bdesc.'" /> '; 
    16571787    if (strlen($wordbooker_settings["fb_comment_app_id"])<6) { 
    16581788    if ($wordbooker_settings['wordbooker_fb_comments_admin']) { 
    16591789        $xxx=wordbooker_get_cache(-99,facebook_id,1); 
    16601790            if (!is_null($xxx)) { 
    1661             echo '<meta property="fb:admins" content="'.$xxx.'"/> '; 
     1791            echo '<meta property="fb:admins" content="'.$xxx.'" /> '; 
    16621792        } 
    16631793    } else { 
    16641794         $xxx=wordbooker_get_cache( $wpuserid,facebook_id,1); 
    16651795        if (!is_null($xxx->facebook_id)) { 
    1666             echo '<meta property="fb:admins" content="'.$xxx->facebook_id.'"/> '; 
     1796            echo '<meta property="fb:admins" content="'.$xxx->facebook_id.'" /> '; 
    16671797        } 
    16681798     } 
     
    16771807        $post_link = get_permalink($post->ID); 
    16781808        $post_title=$post->post_title; 
     1809        echo '<meta property="og:type" content="article" /> '; 
    16791810        echo '<meta property="og:title" content="'.htmlspecialchars(strip_tags($post_title),ENT_QUOTES).'"/> '; 
    1680         echo '<meta property="og:url" content="'.$post_link.'"/> '; 
    1681         echo '<meta property="og:type" content="article"/> '; 
     1811        echo '<meta property="og:url" content="'.$post_link.'" /> '; 
     1812 
    16821813         
    16831814        $ogimage=get_post_meta($post->ID, '_wordbooker_thumb', TRUE); 
    1684         if (strlen($ogimage)<4 && strlen($wordbooker_settings['wb_wordbooker_default_image'])>4) { 
    1685             $ogimage=$wordbooker_settings['wb_wordbooker_default_image']; 
     1815        if (strlen($ogimage)<6 ) { 
     1816            $images=wordbooker_return_images($post->post_content,0); 
     1817            $ogimage=$images[0]['src']; 
     1818            update_post_meta($post->ID, '_wordbooker_thumb', $ogimage); 
    16861819        } 
    16871820        if (strlen($ogimage)<4) {$ogimage=get_bloginfo('wpurl').'/wp-content/plugins/wordbooker/includes/wordbooker_blank.jpg';} 
    16881821        if (strlen($ogimage)>4) { 
    1689             echo '<meta property="og:image" content="'.$ogimage.'"/> '; 
     1822            echo '<meta property="og:image" content="'.$ogimage.'" /> '; 
    16901823             
    16911824        } 
     
    16931826    else 
    16941827    { # Not a single post so we only need the og:type tag 
    1695         echo '<meta property="og:type" content="blog"/> '; 
    1696         echo '<meta property="og:type" content="'.get_bloginfo('description').'"/> '; 
     1828        echo '<meta property="og:type" content="blog" /> '; 
     1829        #echo '<meta property="og:description" content="'.$bdesc.'" /> '; 
    16971830    } 
    16981831    if ($meta_length = wordbooker_get_option('wordbooker_description_meta_length')) { 
     
    17001833            $excerpt=get_post_meta($post->ID, '_wordbooker_extract', TRUE); 
    17011834            if(strlen($excerpt) < 5 ) { 
    1702                 $excerpt=wordbooker_post_excerpt($post->post_content,$wordbooker_settings['wordbooker_extract_length']); 
     1835                $excerpt=wordbooker_post_excerpt($post->post_content,250); 
    17031836                update_post_meta($post->ID, '_wordbooker_extract', $excerpt); 
    17041837            } 
     
    17071840                $excerpt=$post->post_excerpt;  
    17081841                $description = str_replace('"','&quot;',$post->post_content); 
    1709                 $excerpt = wordbooker_post_excerpt($description,$meta_length); 
     1842                $excerpt = wordbooker_post_excerpt($description,1000); 
    17101843                $excerpt = preg_replace('/(\r|\n)+/',' ',$excerpt); 
    17111844                $excerpt = preg_replace('/\s\s+/',' ',$excerpt); 
     
    17151848            # Now if we've got something put the meta tag out. 
    17161849            if (isset($excerpt)){  
    1717                 $meta_string = sprintf("<meta name=\"description\" content=\"%s\"/> ", htmlspecialchars($excerpt,ENT_QUOTES)); 
    1718                 $meta_string .= sprintf("<meta property=\"og:description\" content=\"%s\"/> ", htmlspecialchars($excerpt,ENT_QUOTES)); 
     1850                if ($meta_length > 0 ) {$meta_string .= sprintf("<meta name=\"description\" content=\"%s\" /> ", htmlspecialchars($excerpt,ENT_QUOTES));} 
     1851                $meta_string .= sprintf("<meta property=\"og:description\" content=\"%s\" /> ", htmlspecialchars($excerpt,ENT_QUOTES)); 
    17191852                echo $meta_string; 
    17201853            } 
     
    17221855    else 
    17231856        {        
    1724             $meta_string = sprintf("<meta name=\"description\" content=\"%s\"/> ", get_bloginfo('description')); 
    1725             $meta_string .= sprintf("<meta property=\"og:description\" content=\"%s\"/> ", htmlspecialchars($excerpt,ENT_QUOTES)); 
     1857            if ($meta_length > 0 ) {$meta_string .= sprintf("<meta name=\"description\" content=\"%s\" /> ", $bdesc); } 
     1858            $meta_string .= sprintf("<meta property=\"og:description\" content=\"%s\" /> ", $bdesc); 
    17261859            echo $meta_string; 
    17271860        } 
     
    18021935    if (isset($wordbooker_settings['wordbooker_time_button'])) { 
    18031936        if (isset($wordbooker_settings['wordbooker_iframe'])) { 
    1804              $share_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/add_to_timeline.php?show-faces=true&amp;mode=button&amp;appId=277399175632726" scrolling="no" frameborder="0" style="border:none; overflow:hidden;" allowTransparency="true"></iframe>'; 
     1937             $share_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/add_to_timeline.php?show-faces=true&amp;mode=button&amp;appId=277399175632726" style="border:none; overflow:hidden;"></iframe>'; 
    18051938        } 
    18061939        else { 
     
    18461979    if (isset($wordbooker_settings['wordbooker_time_button'])) { 
    18471980        if (isset($wordbooker_settings['wordbooker_iframe'])) { 
    1848              $share_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/add_to_timeline.php?show-faces=true&amp;mode=button&amp;appId=277399175632726" scrolling="no" frameborder="0" style="border:none; overflow:hidden;" allowTransparency="true"></iframe>'; 
     1981             $share_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/add_to_timeline.php?show-faces=true&amp;mode=button&amp;appId=277399175632726" frameborder="0" style="border:none; overflow:hidden;" ></iframe>'; 
    18491982        } 
    18501983        else { 
     
    18832016            $wplang=wordbooker_get_language(); 
    18842017            if ($wordbooker_settings['wordbooker_fblike_faces']=='true') {$px=80;} 
    1885             $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/send.php?locale='.$wplang.'&href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" scrolling="no" frameborder="no" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" allowTransparency="true"></iframe>'; 
     2018            $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/send.php?locale='.$wplang.'&amp;href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" ></iframe>'; 
    18862019 
    18872020        } 
     
    19132046      ) 
    19142047    { 
     2048    if ($wordbooker_settings['wordbooker_fblike_align']=='right') {$wordbooker_settings["wordbooker_like_width"]=1;} 
    19152049        if (isset($wordbooker_settings['wordbooker_iframe'])) {  
    19162050            $px=35; 
    19172051            $wplang=wordbooker_get_language(); 
    19182052            if ($wordbooker_settings['wordbooker_fblike_faces']=='true') {$px=80;} 
    1919             $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/send.php?locale='.$wplang.'&href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" scrolling="no" frameborder="no" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" allowTransparency="true"></iframe>'; 
     2053            $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/send.php?locale='.$wplang.'&amp;href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" ></iframe>'; 
    19202054 
    19212055        } 
     
    19522086            $wplang=wordbooker_get_language(); 
    19532087            if ($wordbooker_settings['wordbooker_fblike_faces']=='true') {$px=95;} 
    1954             $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/like.php?locale='.$wplang.'&href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" scrolling="no" frameborder="no" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" allowTransparency="true"></iframe>'; 
     2088            $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/like.php?locale='.$wplang.'&amp;href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" ></iframe>'; 
    19552089 
    19562090        } 
     
    19852119      ) 
    19862120    { 
     2121    if ($wordbooker_settings['wordbooker_fblike_align']=='right') {$wordbooker_settings["wordbooker_like_width"]=1;} 
    19872122        if (isset($wordbooker_settings['wordbooker_iframe'])) {  
    19882123            $px=35; 
     
    19922127            if ($wplang=="WPLANG" ) {$wplang="en_US";} 
    19932128            if ($wordbooker_settings['wordbooker_fblike_faces']=='true') {$px=95;} 
    1994             $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/like.php?locale='.$wplang.'&href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" scrolling="no" frameborder="no" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" allowTransparency="true"></iframe>'; 
     2129            $like_code='<!-- Wordbooker created FB tags --> <iframe src="http://www.facebook.com/plugins/like.php?locale='.$wplang.'&amp;href='.$post_link.'&amp;layout='.$wordbooker_settings['wordbooker_fblike_button'].'&amp;show_faces='.$wordbooker_settings['wordbooker_fblike_faces'].'&amp;width='.$wordbooker_settings["wordbooker_like_width"].'&amp;action='.$wordbooker_settings['wordbooker_fblike_action'].'&amp;colorscheme='.$wordbooker_settings['wordbooker_fblike_colorscheme'].'&amp;font='.$wordbooker_settings['wordbooker_fblike_font'].'&amp;height='.$px.'px" style="border:none; overflow:hidden; width:'.$wordbooker_settings["wordbooker_like_width"].'px; height:'.$px.'px;" ></iframe>'; 
    19952130 
    19962131        } 
     
    20352170    $post_cont2=$post_cont; 
    20362171    $post_link = get_permalink($post->ID); 
    2037     $share_code=wordbooker_fb_share_inline(); 
     2172    #$share_code=wordbooker_fb_share_inline(); 
    20382173    $like_code=wordbooker_fb_like_inline(); 
    20392174    $send_code=wordbooker_fb_send_inline(); 
    20402175    $comment_code=wordbooker_fb_comment_inline(); 
    20412176    $read_code=wordbooker_fb_read_inline(); 
     2177/* 
    20422178    if ($wordbooker_settings['wordbooker_fblike_location']!=$wordbooker_settings['wordbooker_fbshare_location']){ 
    20432179        if ($wordbooker_settings['wordbooker_fbshare_location']=='top'){ 
     
    20482184        } 
    20492185 
    2050  
     2186*/ 
    20512187        if ($wordbooker_settings['wordbooker_fblike_send_combi']=='true'){ 
    20522188            if ($wordbooker_settings['wordbooker_fblike_location']=='bottom'){ 
    2053                 $post_cont2= $post_cont2."<div class='wp_fbl_bottom'>".$like_code.'</div>';  
     2189                $post_cont2= $post_cont2."<div class='wp_fbl_bottom' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$like_code.'</div>';  
    20542190            }  
    20552191            if ($wordbooker_settings['wordbooker_fblike_location']=='top') { 
    2056                 $post_cont2= "<div class='wp_fbl_top'>".$like_code.'</div>'.$post_cont2; 
     2192                $post_cont2= "<div class='wp_fbl_top' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$like_code.'</div>'.$post_cont2; 
    20572193            } 
    20582194        } 
    2059     }   else { 
    2060                 if ($wordbooker_settings['wordbooker_fblike_location']=='bottom'){ 
    2061                     $post_cont2=$post_cont2."<div class='wb_fb_bottom'>".$like_code.'<div style="float:right;">'.$share_code.'</div></div>';  
    2062                 }  
    2063                 if ($wordbooker_settings['wordbooker_fblike_location']=='top'){ 
    2064                     $post_cont2= "<div class='wb_fb_top'>".$like_code.'<div style="float:right;">'.$share_code.'</div></div>'.$post_cont2;  
    2065                 } 
    2066     } 
     2195/* 
     2196        else { 
     2197            if ($wordbooker_settings['wordbooker_fblike_location']=='bottom'){ 
     2198                $post_cont2=$post_cont2."<div class='wb_fb_bottom'>".$like_code.'</div>';  
     2199            }  
     2200            if ($wordbooker_settings['wordbooker_fblike_location']=='top'){ 
     2201                $post_cont2= "<div class='wb_fb_top'>".$like_code.'</div>'.$post_cont2;  
     2202            } 
     2203    } 
     2204*/ 
    20672205    if ($wordbooker_settings['wordbooker_fblike_send_combi']=='false' && $wordbooker_settings['wordbooker_fblike_send']=='true' ){ 
    20682206        if ($wordbooker_settings['wordbooker_fblike_location']==$wordbooker_settings['wordbooker_fbshare_location']){ 
    20692207            if ($wordbooker_settings['wordbooker_fblike_location']=='bottom'){ 
    2070                 $post_cont2=$post_cont2."<div class='wb_fb_bottom'>".$send_code.'<div style="float:right;">'.$share_code.'</div></div>';  
     2208                $post_cont2=$post_cont2."<div class='wb_fb_bottom' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$send_code.'</div>';  
    20712209            }  
    20722210            if ($wordbooker_settings['wordbooker_fblike_location']=='top'){ 
    2073                 $post_cont2= "<div class='wb_fb_top'>".$send_code.'<div style="float:right;">'.$share_code.'</div></div>'.$post_cont;  
     2211                $post_cont2= "<div class='wb_fb_top' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$send_code.'</div>'.$post_cont;  
    20742212            } 
    20752213        } else { 
    20762214        if ($wordbooker_settings['wordbooker_fblike_location']=='bottom'){ 
    2077             $post_cont2= $post_cont2."<div class='wp_fbl_bottom'>".$send_code.'</div>';  
     2215            $post_cont2= $post_cont2."<div class='wp_fbl_bottom' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$send_code.'</div>';  
    20782216        }  
    20792217        if ($wordbooker_settings['wordbooker_fblike_location']=='top') { 
    2080             $post_cont2= "<div class='wp_fbl_top'>".$send_code.'</div>'.$post_cont2; 
     2218            $post_cont2= "<div class='wp_fbl_top' style='text-align:".$wordbooker_settings['wordbooker_fblike_align']."'>".$send_code.'</div>'.$post_cont2; 
    20812219        } 
    20822220    } 
     
    20872225    }  
    20882226    if ($wordbooker_settings['wordbooker_fbread_location']=='bottom') { 
    2089         $post_cont2=$post_cont2."<div class='wp_fbr_bottom'>".$read_code.'</div>'; 
     2227        $post_cont2=$post_cont2."<div class='wp_fbr_bottom' >".$read_code.'</div>'; 
    20902228    } 
    20912229    if ($wordbooker_settings['wordbooker_comment_location']=='bottom') { $post_cont2=$post_cont2."<div class='wb_fb_comment'><br/>".$comment_code."</div>"; } 
     
    20952233function wordbooker_get_cache($user_id,$field=null,$table=0) { 
    20962234    global $wpdb,$blog_id; 
    2097     #$blog_id=1; 
    20982235    if (!isset($user_id)) {return;} 
    20992236    $tname=WORDBOOKER_USERSTATUS; 
     
    21252262    if(is_array($perms_to_check)) { 
    21262263        foreach(array_keys($perms_to_check) as $key){ 
    2127             # Bit map check to put out the right text for the missing permissions. 
    21282264            if (pow(2,$key) & $perm_miss->auths_needed ) { 
    21292265                $midamble.=$perm_messages[$key].", "; 
    21302266                } 
    21312267        } 
    2132             $midamble=rtrim($midamble,","); 
    2133             $midamble=trim(preg_replace("/(.*?)((,|\s)*)$/m", "$1", $midamble)); 
    2134             $midamble=substr_replace($midamble, " and ", strrpos($midamble, ","), strlen(","));  
    2135                    echo " ".$preamble.$midamble.$postamble.'</p><div style="text-align: center;"><a href="'.$loginUrl2.'" > <img src="http://static.ak.facebook.com/images/devsite/facebook_login.gif"  alt="Facebook Login Button" /></a><br /></div>'; 
    2136              
     2268        $midamble=rtrim($midamble,","); 
     2269        $midamble=trim(preg_replace("/(.*?)((,|\s)*)$/m", "$1", $midamble)); 
     2270        $midamble=substr_replace($midamble, " and ", strrpos($midamble, ","), strlen(","));  
     2271        echo " ".$preamble.$midamble.$postamble.'</p><div style="text-align: center;"><a href="'.$loginUrl2.'" > <img src="http://static.ak.facebook.com/images/devsite/facebook_login.gif"  alt="Facebook Login Button" /></a><br /></div>';        
    21372272    } 
    21382273    echo "and then save your settings<br />"; 
     
    22002335        foreach (array_keys($x) as $key ) { 
    22012336            if (substr($key,0,8)=='wordbook') { 
    2202             #   wordbooker_debugger("Replacing : ".$wordbooker_post_options[$key],$x[$key],$post->ID) ; 
    22032337                $wordbooker_post_options[$key]=str_replace( array('&amp;','&quot;','&#039;','&lt;','&gt;','&nbsp;&nbsp;'),array('&','"','\'','<','>',"\t"),$x[$key]); 
    22042338            } 
     
    22062340    } 
    22072341     
    2208         if (is_array($wordbooker_post_options)){ 
     2342    if (is_array($wordbooker_post_options)){ 
    22092343        foreach (array_keys($wordbooker_post_options) as $key){ 
    22102344            wordbooker_debugger("Post option : ".$key,$wordbooker_post_options[$key],$post->ID,80) ; 
     
    22192353    # If the default user is set to 0 then we use the current user (or the author of the post if that isn't set - i.e. if this is a scheduled post) 
    22202354    if  ($wordbooker_post_options["wordbooker_default_author"] == 0 ) {$wpuserid=$whichuser;} else {$wpuserid=$wordbooker_post_options["wordbooker_default_author"];} 
     2355    $images=wordbooker_return_images($post->post_content,0); 
     2356    $ogimage=$images[0]['src']; 
     2357    update_post_meta($post->ID, '_wordbooker_thumb', $ogimage); 
     2358    $excerpt=wordbooker_post_excerpt($post->post_content,$wordbooker_settings['wordbooker_extract_length']); 
     2359    update_post_meta($post->ID, '_wordbooker_extract', $excerpt); 
    22212360     
    2222         if ($wordbooker_post_options["wordbooker_publish_default"]!="on") { 
     2361    if ($wordbooker_post_options["wordbooker_publish_default"]!="on") { 
    22232362        wordbooker_debugger("Publish Default is not Set, Giving up ",$wpuserid,$post->ID) ; 
    22242363        return; 
    22252364    } 
     2365 
    22262366    wordbooker_debugger("User has been set to : ",$wpuserid,$post->ID,80) ; 
    22272367    if (!$wbuser = wordbooker_get_userdata($wpuserid) ) { 
     
    22322372 
    22332373    wordbooker_debugger("Calling wordbooker_fbclient_publishaction"," ",$post->ID,99) ; 
    2234     wordbooker_fbclient_publishaction($wbuser, $post->ID); 
     2374    wordbooker_fbclient_publishaction($wbuser, $post->ID,$wpuserid); 
    22352375    unset($doing_post); 
    22362376    return 30; 
    22372377} 
    22382378 
     2379function wordbooker_update_post_meta($post) { 
     2380    $images=wordbooker_return_images($post->post_content,0); 
     2381    $ogimage=$images[0]['src']; 
     2382    update_post_meta($post->ID, '_wordbooker_thumb', $ogimage); 
     2383    $excerpt=wordbooker_post_excerpt($post->post_content,$wordbooker_settings['wordbooker_extract_length']); 
     2384    update_post_meta($post->ID, '_wordbooker_extract', $excerpt); 
     2385} 
    22392386 
    22402387function wordbooker_delete_post($post_id) {  
     
    22592406    if ($post->post_type=='reply') {return;} 
    22602407    if ($_POST['action']=='autosave') { return;} 
     2408    wordbooker_update_post_meta($post); 
    22612409    if ($_POST['action']=='editpost') {  
    22622410        foreach (array_keys($_POST) as $key ) { 
     
    22712419    if ($post->post_password != '') {return;} 
    22722420    # Check for non public custom post types. 
    2273     if ( $post->post_status == 'publish' && $post->post_type != 'post' ) { 
     2421    #var_dump($post->post_type); 
     2422    if ( $post->post_status == 'publish' ) { 
    22742423        $post_type_info = get_post_type_object( $post->post_type ); 
    22752424        if ( $post_type_info && !$post_type_info->public ) { return; } 
     
    22772426    # Has this been fired by a post revision rather than a proper publish 
    22782427    if (wp_is_post_revision($post->ID)) {return;} 
    2279  
    22802428    $wordbooker_settings=wordbooker_options(); 
    22812429    $wb_params = get_post_meta($post->ID, '_wordbooker_options', true);  
     
    23582506     
    23592507    update_post_meta($post->ID, '_wordbooker_options', $wb_params);  
    2360  
    23612508    if ($newstatus=="publish") { 
    23622509        wordbooker_debugger("Calling Wordbooker publishing function",' ',$post->ID,90) ; 
     
    23972544    $usid=1; 
    23982545    $usid=$user_ID; 
     2546    #var_dump($wbooker_user_id); 
    23992547    if (isset($user_ID)) {$usid=$user_ID;} 
    24002548    if (isset($post_id) && ($post_id>=1)){ 
     
    24522600     
    24532601} 
    2454 /****************************************************************************** 
    2455  * Register hooks with WordPress. 
    2456  */ 
    2457  
    2458 /* Plugin maintenance. */ 
     2602 
     2603 
    24592604register_activation_hook(__FILE__, 'wordbooker_activate'); 
     2605add_action ('init', 'wordbooker_init'); 
     2606  
    24602607# When a user is deleted from the blog we should clear down everything they've done in Wordbooker. 
    24612608add_action('delete_user', 'wordbooker_remove_user'); 
    2462 add_action ('init', 'wordbooker_init'); 
    2463   
     2609 
    24642610function wordbooker_init () { 
    24652611    load_plugin_textdomain ('wordbooker',false,basename(dirname(__FILE__)).'/languages'); 
     
    24672613 
    24682614function wordbooker_schema($attr) { 
    2469         $attr .= " xmlns:fb=\"http://www.facebook.com/2008/fbml\" xmlns:og=\"http://ogp.me/ns/fb#\"  "; 
    2470         return $attr; 
     2615       # $attr .= " xmlns:fb=\"http://www.facebook.com/2008/fbml\" xmlns:og=\"http://ogp.me/ns#\" "; 
     2616/* 
     2617    if ( (is_single() || is_page()) && !is_front_page() && !is_category() && !is_home() ) { 
     2618         $attr .=' xmlns:fb="http://ogp.me/ns/fb#" xmlns:article="http://ogp.me/ns/article#"';} 
     2619    else { 
     2620         $attr .= ' xmlns:fb="http://ogp.me/ns#  xmlns:website="http://ogp.me/ns/website#"';} 
     2621*/ 
     2622 
     2623  if (preg_match('/(prefix\s*=\s*[\"|\'])/i', $attr)) { 
     2624    $attr = preg_replace('/(prefix\s*=\s*[\"|\'])/i', '${1}"og: http://ogp.me/ns#" ', $attr); 
     2625  } else { 
     2626    $attr .= ' prefix="og: http://ogp.me/ns#"'; 
     2627  } 
     2628  return $attr; 
    24712629} 
    24722630 
    24732631function wordbooker_get_avatar($avatar, $comment, $size="50"){ 
    2474       $author_url = get_comment_author_url(); 
     2632    $author_url = $comment->comment_author_url; 
    24752633    $fb_id=get_comment_meta($comment->comment_ID,'fb_uid',true); 
    24762634    if (strlen($fb_id)<1) { 
    2477      $parse_author_url = (parse_url($author_url)); 
    2478              $fb_id_array = explode('/',$parse_author_url['path']); 
    2479           $sizer = count($fb_id_array) -1; 
    2480           $fb_id =  $fb_id_array[$sizer]; 
     2635        $parse_author_url = (parse_url($author_url)); 
     2636        $fb_id_array = explode('/',$parse_author_url['path']); 
     2637        $sizer = count($fb_id_array) -1; 
     2638        $fb_id =  $fb_id_array[$sizer]; 
    24812639    } 
    24822640    if (strlen($fb_id)>1) { 
    2483     $grav_url= "http://graph.facebook.com/".$fb_id."/picture?type=square"; 
    2484     $avatar = "<img src='".$grav_url."'  height='".$size."' width='".$size."' class='avatar avatar-40 photo' /> ";} 
    2485     return $avatar; 
     2641        $grav_url= "http://graph.facebook.com/".$fb_id."/picture?type=square"; 
     2642        $avatar = "<img src='".$grav_url."'  height='".$size."' width='".$size."' class='avatar avatar-40 photo' /> "; 
     2643    } 
     2644    return $avatar; 
    24862645} 
    24872646 
     
    24912650    'display'   => __('Every 10 Minutes', 'wordbooker'), 
    24922651    ); 
    2493  
    24942652    $schedules['15mins'] = array( 
    24952653    'interval'   => 900, 
    24962654    'display'   => __('Every 15 Minutes', 'wordbooker'), 
    24972655    ); 
    2498  
    24992656    $schedules['20mins'] = array( 
    25002657    'interval'   => 1200, 
    25012658    'display'   => __('Every 20 Minutes', 'wordbooker'), 
    25022659    ); 
    2503  
    25042660    $schedules['30mins'] = array( 
    25052661    'interval'   => 1800, 
    25062662    'display'   => __('Every 30 Minutes', 'wordbooker'), 
    25072663    ); 
    2508  
    25092664    $schedules['45mins'] = array( 
    25102665    'interval'   => 2700, 
    25112666    'display'   => __('Every 45 Minutes', 'wordbooker'), 
    25122667    ); 
    2513  
    25142668    $schedules['2hours'] = array( 
    25152669    'interval'   => 7200, 
    25162670    'display'   => __('Every 2 Hours', 'wordbooker'), 
    25172671    ); 
    2518  
    25192672    return array_merge($schedules); 
    25202673} 
     
    25342687    #include("includes/wordbooker_get_friend.php"); 
    25352688    #include("includes/custom_quick_edit.php"); 
    2536 } 
    2537 # If they've disabled Wordbooker then we don't need any of these 
    2538 if (!isset($wordbooker_disabled)){ 
    2539     $wordbooker_fb_gravatars=wordbooker_get_option('wordbooker_no_facebook_gravatars'); 
     2689 
    25402690    add_action('transition_post_status', 'wordbooker_process_post_data',10,3); 
    25412691    add_action('delete_post', 'wordbooker_delete_post'); 
     
    25452695    add_action('wp_footer', 'wordbooker_footer'); 
    25462696    add_filter('language_attributes', 'wordbooker_schema'); 
     2697    $wordbooker_fb_gravatars=wordbooker_get_option('wordbooker_no_facebook_gravatars'); 
    25472698    if (!isset($wordbooker_fb_gravatars)){ 
    25482699        add_filter('get_avatar','wordbooker_get_avatar',1, 3 ); 
     
    25532704    add_shortcode('wb_fb_like', 'wordbooker_fb_like_inline'); 
    25542705    add_shortcode('wb_fb_send', 'wordbooker_fb_send_inline'); 
    2555     add_shortcode('wb_fb_share', 'wordbooker_fb_share_inline'); 
     2706//  add_shortcode('wb_fb_share', 'wordbooker_fb_share_inline'); 
    25562707    add_shortcode('wb_fb_comment', 'wordbooker_fb_comment_inline'); 
    25572708    add_shortcode('wb_fb_read','wordbooker_fb_read_inline'); 
     2709    // If simple facebook connect is installed and enabled then we can pass the WB locale onto its own FB API launcher. 
     2710    if (function_exists('jfb_output_facebook_init')) { 
     2711        add_filter('wpfb_output_facebook_locale', 'wordbooker_get_language'); 
     2712    } 
    25582713 
    25592714} 
Note: See TracChangeset for help on using the changeset viewer.