WordPress.org

Plugin Directory

Changeset 509677


Ignore:
Timestamp:
02/24/12 07:04:43 (2 years ago)
Author:
SteveAtty
Message:

Post Facebook Debacle Fix

Location:
wordbooker
Files:
5 edited
7 copied

Legend:

Unmodified
Added
Removed
  • wordbooker/tags/2.1.8/includes/wordbooker_cron.php

    r505615 r509677  
    4848        if(strlen(serialize($ret))<20) {wordbooker_debugger("Permissions fetch failed - skipping ",'',-1,9) ;} else { 
    4949        $add_auths=0; 
    50         $permlist= array(WORDBOOKER_FB_PUBLISH_STREAM,'publish_actions',WORDBOOKER_FB_STATUS_UPDATE,WORDBOOKER_FB_READ_STREAM,WORDBOOKER_FB_CREATE_NOTE,WORDBOOKER_FB_PHOTO_UPLOAD,WORDBOOKER_FB_VIDEO_UPLOAD,WORDBOOKER_FB_MANAGE_PAGES,WORDBOOKER_FB_READ_FRIENDS); 
     50        $permlist= array(WORDBOOKER_FB_PUBLISH_STREAM,WORDBOOKER_FB_STATUS_UPDATE,WORDBOOKER_FB_READ_STREAM,WORDBOOKER_FB_CREATE_NOTE,WORDBOOKER_FB_PHOTO_UPLOAD,WORDBOOKER_FB_VIDEO_UPLOAD,WORDBOOKER_FB_MANAGE_PAGES,WORDBOOKER_FB_READ_FRIENDS); 
    5151        $key=0; 
    5252        foreach($permlist as $perm){ 
  • wordbooker/tags/2.1.8/includes/wordbooker_options.php

    r508979 r509677  
    732732        echo "</h3>"; 
    733733 
    734     if (defined('WORDBOOKER_PREMIUM')) { _e("You're using the Premium options in Wordbooker. You really should contribute something to the support and development of this plugin.  Please provide your FB Id number and your website when making payment so your details can be added to the 'thanks' list on the web site", 'wordbooker'); 
     734    if (defined('WORDBOOKER_PREMIUM')) { _e("You're using the Premium options in Wordbooker. You really should contribute something to the support and development of this plugin.  Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a> list on the web site", 'wordbooker'); 
    735735}        
    736     _e("If you've found this extension useful then please feel free to donate to its support and future development. Please provide your FB Id number and your website when making payment so your details can be added to the 'Thanks' page on the Website", 'wordbooker');  
     736    _e("If you've found this extension useful then please feel free to donate to its support and future development. Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a> page on the Website", 'wordbooker');  
    737737      ?><br /><br /> 
    738738        <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
  • wordbooker/tags/2.1.8/readme.txt

    r509266 r509677  
    33Contributors: SteveAtty 
    44Tags: facebook, minifeed, newsfeed, crosspost, WPMU, Facebook Share, Facebook Like, social media 
     5Donate 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 
    56Requires at least: 2.9 
    67Tested up to: 3.3.1 
    7 Stable tag: 2.1.7 
     8Stable tag: 2.1.8 
    89 
    910This 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.  
     
    115116== Changelog == 
    116117 
     118= Version 2.1.8 23/02/2012 = 
     119- Roll back the FB javascript to an earlier version which doesn't seem to have the problems that the current code does. 
     120- Recode the DB upgrade script to fix some odd problems. 
     121- Remove some redundant, for now, timeline action permissions. 
     122 
    117123= Version 2.1.7 23/02/2012 = 
    118124- Fix a typo in the FB javascript code which only seems to affect Safari. 
    119125 
    120126= Version 2.1.6 22/02/2012 = 
    121 - Total embarassment : I somehow rolled a version with a function call in it that shouldn't have been there! 
     127- Total embarassment : I somehow rolled a version with a function call in it that shouldn't have been there 
    122128 
    123129 
     
    176182- Checked for compatability with Wordpress 3.3 
    177183 
     184 
    178185= Version 2.0.8 19/11/2011 = 
    179186- Commented out a debug statement that got left behind. 
     
    203210- Fixed a typo in the "Disable Short Urls" option. 
    204211- Changed graph calls to use JSON_STRING parameter rather than just JSON (Undocumented Facebook API parameter). 
    205  
    206212 
    207213 
     
    274280- Major new release - too many changes to document here 
    275281 
    276  
    277 = Version 1.9.5 17/07/2011 = 
    278 - Minor changes to OG Tags to handle changes in the Facebook Share/Like button functionality 
    279 - Fixed problem with quotes being turned in to html entities. 
    280  
    281  
    282 = Version 1.9.4 20/06/2011 = 
    283 - Recoded the new page permissions dialogue due to problem requesting page permissions using OAUTH2 which makes it incompatible with the REST API 
    284 - Completely recoded the post handling code to fix issues with scheduled posts not working and external clients not publishing properly  
    285  
    286  
    287 = Version 1.9.3  02/06/2011 = 
    288 - Changed FB PHP SDK to supress session cache limiter error message 
    289 - Changed FB PHP SDK to fix class redeclaration error. 
    290 - Changed Post age time calculations to try to resolve issues with misbehaving Wordpress functions 
    291 - Revised post status transition checking code to identify new posts properly 
    292 - Fixed issue with user user settings being lost at publication time 
    293 - Added Verbose option to Curl checking to place diagnostic info into the server error log. 
    294 - Added some extra checks to imaging handling logic to discard null image strings. 
    295 - Removed exta OG tag code that slipped in sometime when I wasn't looking 
    296 - Fixed some bugs in the Like Widget which meant settings weren't stored properly and were ignored. 
    297 - Added ability to supress like/share on sticky posts. 
    298 - Removed some junk code that wasn't being used. 
    299 - Added strip_tags to remove html from comments pushed up to FB. 
    300  
    301  
    302 = Version 1.9.2  31/05/2011 = 
    303 - Remove Redundant code from base_facebook.php 
    304  
    305  
    306 = Version 1.9.1  31/05/2011 = 
    307 - Lost in SVN 
    308  
    309  
    310 = Version 1.9.0  31/05/2011 = 
    311 - Changed Authentication method again to OAUTH2 client side authentication. 
    312 - Added support for Authentication using SSL  
    313 - Made Auth returns use POST rather than query string to tighten up security 
    314 - Added hook so that like/share buttons appear when excerpts are used on category pages rather than only when the full post was used. 
    315 - Removed SEND from iframe code as it doesn't actually work 
    316 - Changed Options page to indicate SEND only works with FBXML 
    317 - Revisted the post age calculations to handle TZ offsets 
    318 - Added an option to allow Non Wordbooker users to chose if a post should be published or not. 
    319 - Changed priority of publish_post hook to try to fix refire logic issues introduced by sluggish server response. 
    320 - Changed Image handling logic to discard arrays caused by a problematic adverts plugin. 
    321 - Added additional OG Tags                   
    322  
    323  
    324 = Version 1.8.27  01/05/2011 = 
    325 - Added support for the Facebook SEND option 
    326 - Added a couple of extra custom meta field handlers 
    327 - Minor changes to the comment pulling code to fix a couple of glitches 
    328 - Changed timestamp handling so that comment_time and comment_time_gmt aren't the same and the Blog GMT offset is applied to comment_time when pulled from FB. 
    329 - Changed all the logic to do with handling previous published posts to remove dependency on the wordbooker postlogs table 
    330 - Added a couple of more exclusions to the strip_image routine 
    331 - Fixed a bug in the Curl checking code which meant that you got no message if curl wasn't even installed. 
    332 - Fixed a < /div> tag which broke Firefox 4! 
    333 - Added a fb-root div for the fan box in the widget - again FB changed things without telling people. 
    334 - Added DB change script to set UTF8 Collations on tables to fix non Western Characterset problems. 
    335  
    336 = Version 1.8.26  02/03/2011 = 
    337 - Changed the check in the comment handling routine as FB changed a url 
    338  
    339 = Version 1.8.25   02/03/2011 = 
    340 - Rehashed the og:tags to streamline their production 
    341 - Rolled back the comments round the og:tags put in to try to help W3C compliance as it causes too many problems and often the tags fail to be recognised 
    342 - Fixed a bug in the code that handles pulling the image back for the og:image tag 
    343  
    344  
    345 = Version 1.8.24   26/02/2011 = 
    346 - Change to comment handling code to trap both "approve" and "approved" as good comment status 
    347 - Changed Youtube URL parsing to handle the embed option 
    348 - Wrapped some of the Facebook tags in comments to keep W3C validators "happy" 
    349 - Added locale to the iframe tag for like/recommend button. Uses the Wordpress WP_LANG constant 
    350  
    351  
    352 = Version 1.8.23   21/02/2011 = 
    353 - Fixed Cat introduced error in comment handling check code. 
    354  
    355  
    356 = Version 1.8.22   19/02/2011 = 
    357 - Added code developed by Shi Chuan Guan which means comments are only pushed ot FB when they've been approved 
    358 - Added code to allow tighter intergration with Justin_K's WP-FB-AutoConnect with respect to comment avatars. 
    359 - Image[0] is now stored in the post meta and used for the og:image tag 
    360 - Post Excerpt is now stored in the post meta and used for the og:description. This only affects new posts so the old code has to stay in place for now. 
    361 - Minor tweaks to code base. 
    362  
    363  
    364 = Version 1.8.21   01/02/2011 = 
    365 - Minor changes to the comment handling process to stop things tripping up again 
    366 - Added thumb to the custom meta tag handling for images 
    367 - Changed the logic so that like/share buttons show when your front page for your blog is a page. 
    368 - Added some more diagnostic messages 
    369 - Fixed some minor bugs in the image handling which meant sometimes images that had been found were lost. 
    370  
    371  
    372 = Version 1.8.20   06/01/2011 = 
    373 - "Real Comment" check stopped comments from non-logged in users from being processed. Changed this to look for Facebook links 
    374 - "Auto approve comments" option now does a direct insert to the comments table : which should bypass some of the problems with Spam checkers eating comments. 
    375 - Duplicate post checking re-coded, now if a post has been handled within the last 60 seconds its deemed a re-fire and ignored 
    376 - Redundant code for handling posts made by XMLRPC clients commented out. 
    377 - Tweaked some of the debug code 
    378 - Minor changes to the Cache handling code to make it slightly more resilient. 
    379 - Changed the code for handling og:image tags 
    380 - Changed Curl/Fopen check code as it could mis-report 
    381 - Changed SimpleXML check code as it was mis-reporting. 
    382 - Checked compatability with Wordpress 3.1 
    383  
    384 = Version 1.8.19   06/01/2011 = 
    385 - Lost in SVN  
    386  
    387  
    388 = Version 1.8.18  24/11/2010 = 
    389 - Fixed the huge fatal bug in comment handling which affected some users 
    390 - Revised the Like / Share options to make them more flexible 
    391 - Added option to hide the FB Recent Activity on the Wordbooker Options Page 
    392 - Added option to change email address used when importing comments from FB 
    393 - Added an index to the error log table 
    394 - Changed the code that checks for bouncing comments 
    395 - Added a check for duplicate comment content coming from FB to stop Wordpress blowing up 
    396 - Hid / Deactivated the "Poll for comments when visiting this page" option 
    397 - Added more debugging to the comment handling code 
    398 - Added some .2 second pauses in the cron processes to stop the plugin exceeding the FB transaction per second limit 
    399  
    400  
    401 = Version 1.8.17  22/11/2010 = 
    402 - Fixed a bug with Like and Share logic and added missing options to pre 2.9 Options page 
    403 - Fixed a bug where the publish window check fired and stopped a post being made. 
    404 - Fixed a bug where urls were lost doing scheduled posts with URL shorteners enabled 
    405 - Fixed a bug where setting were sometimes getting lost for Scheduled posts. 
    406 - Fixed a bug which may have caused comments not to be processed 
    407 - Changed the email for imported comments so it now will use a Wordbooker Gravtar 
    408 - Settings were getting trashed when Autosave ran. Changed Wordbooker to basically do nothing when Autosave fires so changes to Wordbooker options are not lost. 
    409 - Null values for Update time from Facebook now handled. 
    410 - Changed some JSON calls to handle older versions of JSON which expect a different number of parameters. 
    411 - Changed extract trim length to handle multibyte characters (Thanks to Kensuke Akai for the fix) 
    412 - Changed the Page fetch code in the cron job to hopefully handle FB FQL failures. 
    413 - Added support for Like/Share on Category pages 
    414 - Added support for YAPB plugin 
    415 - Added a error/diagnostic log clear down call to the cron to keep the log file "tidy". 
    416 - Added a check for broken JSON installs where the function is there but PHP returns no version information. 
    417 - Added a check to the header function so that it only works on published posts (This fixes a problem with the "Share Drafts" plugin) 
    418 - Finally put some diagnostics in the comment handling code. 
    419  
    420  
    421 = Version 1.8.16   07/11/2010 = 
    422 - SVN mess up caused incorrect file versions to get released 
    423  
    424  
    425 = Version 1.8.15   07/11/2010 = 
    426 - Fixed a bug where the image links were broken 
    427 - Fixed a bug where the post links were broken 
    428 - Changed the debug process so that key process stages are always written to the diagnostic log 
    429 - Changed some more function/class names to try to avoid clashes with other FB related plugins. 
    430 - Changed some internal calls which were depreciated. 
    431  
    432  
    433  
    434 = Version 1.8.14   04/11/2010 = 
    435 - Added support for quicktranslate tags 
    436 - Fixed a bug where wpg2 tags were left in the excerpt. 
    437 - Fixed a bug where post level options were being ignored 
    438 - Fixed a bug where post level options were being lost on Draft save. 
    439 - Moved Graph API calls back to Curl - but have left fopen based library in archive 
    440 - Made Fopen calls silent to stop it barfing messages on screen on incorrectly configured webservers. 
    441 - Added wp-includes to the list of excluded image directories 
    442 - Changed name of a couple of internal functions to stop clashes with other plugins. 
    443 - Changed names of a couple of classes to avoid clashes with badly coded Facebook plugins 
    444 - Added support for URL shortener plugins : currently works with "YOURLS: WordPress to Twitter" and "url_shortener" plugins 
    445  
    446  
    447 = Version 1.8.13   30/09/2010 = 
    448 - Fixed a bug where images were not being published - was resetting an array by accident. 
    449  
    450  
    451 = Version 1.8.12 : 28/09/2010 = 
    452 - Fixed cron code which sometimes invalidated sessions  
    453 - Added facebook.com to the list of image sources to be stripped as FB dont support posting images from their own CDN in wall posts  
    454 - fb root div tag handling code fixed   
    455 - html stripping code for title text tightended up  
    456 - Minor tweaks to diagnostic code to add more details 
    457 - Changes to cron code to make it more robust when fetching information 
    458  
    459  
    460 = Version 1.8.11 : 25/07/2010 = 
    461 - Added option to allow users to change width of Facebook Like Box. 
    462 - User level setting of Yes for Default publish didn't work 
    463 - Fixed a bug where posts by email didn't get processed as they were missing a user id 
    464 - Changed Share button on multi post pages so it doesn't show the count. 
    465 - Added option to supress Meta description tag to keep SEO plugins happy. 
    466 - Support information moved so it shows during the authorisation process to help with completely failing installs. 
    467 - Removed a lot of old code as part of the pre V2.0 code rebuild. 
    468  
    469  
    470 = Version 1.8.10 : 30/06/2010 = 
    471 - Fixed a bug in the Oauth request URLs 
    472 - Fixed a warning about arrays to do with thumbnail handling 
    473 - Fixed a HTML bug which broke Fluency Admin 
    474 - Added an extra diagnostic message for posts within the "Dont republish window" 
    475  
    476  
    477 = Version 1.8.9 : 29/06/2010 = 
    478 - Trying to fix a serious SVN screwup which has broken lots of things. 
    479  
    480  
    481 = Version 1.8.8 : 29/06/2010 = 
    482 - Fix ANOTHER mistake caused by SVN problems -  
    483  
    484 = Version 1.8.7 : 29/06/2010 = 
    485 - Fix a mistake caused by SVN problems - 
    486  
    487 = Version 1.8.6 : 29/06/2010 = 
    488 - Added support for Iframe Like/Share buttons. 
    489 - Added Faceboox "Fan"/ Like Multi-widget. 
    490 - Fixed problem with Graph API classes clashing with other Facebook related plugins. 
    491 - Fixed a bug in the image handling functions. 
    492 - Fixed a bug where selecting "show FB like / Share" buttons but not selecting where to show them hid the post. 
    493 - Changed a couple of class definitions to fix clashes with other Facebook related plugins. 
    494  
    495  
    496  
    497 = Version 1.8.5 : 20/06/2010 = 
    498 - Changed the json_decode handling in the Facebook GRAPH API to remove dependencies on Json 1.2.1 
    499 - Added Language support for FB Like button (uses the WPLANG constant). 
    500 - Added support for sharing main blog url on multiple post pages. 
    501 - Changed Support information list. 
    502 - Added "fallback" code for PHP versions missing json_decode. 
    503 - Put in checks for multibyte support. 
    504 - Changed format of "Next Scheduled Poll" text to work round timezone casting issues. 
    505 - Supress og:/fb: tags and FB javascript when share/like options are turned off. 
    506 - Wrapped og: and fb: header tags in htmlspecialchars to fix text "escaping" into page. 
    507 - Changed tag stripping code for extracts. 
    508 - Fixed 404 page throwing a Database error. 
    509 - Changed callback URLs from blog_info('url') to blog_info('wpurl') to fix issues with non "home directory" WP installs. 
    510 - Added more error trapping round user cache handling. 
    511 - Wrapped all array_keys calls in is_array checks. 
    512 - Added options to allow Share and Like buttons to be located either above or below post. 
    513  
    514  
    515 = Version 1.8.4 : 10/06/2010 = 
    516 - Fixed problems with the auth process. 
    517 - Added more diagnostic checks. 
    518 - Changed Facebook core call from CURL to old method. 
    519 - Added support for Facebook Like Button. 
    520 - Added support for Facebook Share Button 
    521 - Added a "Recent Facebook Activity" section to the Wordbooker Options page. 
    522 - Added checks for CURL and json_decode and tidied up error reporting. 
    523 - Fixed bug with json_decode for PHP < 5.2 
    524 - Fixed bug in error logging. 
    525 - Fixed missing tag (sometimes broke login URL in IE) 
    526 - Added code to fix "signature" issues during authentication. 
    527  
    528  
    529 = Version 1.8.3 : 01/06/2010 (Limited release via Wordbooker Page) = 
    530 - Changes rolled up into 1.8.4 
    531  
    532 = Version 1.8.2  : 30/05/2010 (Limited release via Wordbooker Page) = 
    533 - Changes rolled up into 1.8.3 
    534  
    535  
    536 = Version 1.8.1 : 30/05/2010 =  
    537 - Fix issue with new API file directory. 
    538  
    539 = Version 1.8 : 30/05/2010 = 
    540 - Facebook authorisation migrated to OAUTH2 
    541 - Minor bug fixes 
    542 - Userguide updated to include new features and authorisation process. 
    543 - Recoded cron code to try to work round Facebook Database issues. 
    544  
    545  
    546  
    547 = Version 1.7.9 : 18/05/2010 = 
    548 - Several minor bug fixes and tweaks. 
    549 - Ability to use the User generated Post Excerpt to post to the wall. 
    550   
    551  
    552 = Version 1.7.8 :14/04/2010 = 
    553 - Fixed Scheduled post handling which was broken again. 
    554 - Recoded Advanced Diagnostics so they no longer slow down the posting process. 
    555 - Fixed bug concerning incorrect facebook IDs when posting comments. 
    556 - Recoded "non wordbook user" handing code 
    557 - Added more diagnostics 
    558  
    559  
    560  
    561 = Version 1.7.7 :05/04/2010 = 
    562 - Added support for WP thumbnails (needs WP/WPMU 2.9 or above). 
    563 - Added support for 'Quick Press' (i.e. post from Dashboard) 
    564 - Added support for use by non wordbooker users - posts from non wordbooker user inherit the blog level settings (and if the default user is set to a specific user they inherit those settings too) 
    565 - Added support for posts made by wp-o-matic. 
    566 - Added NextGen tags to the misbalanced tags list so they get stripped from the text of the excerpt. 
    567 - Added a lot more diagnostic messages. 
    568 - Fixed 'Press This' functionalilty 
    569 - Fixed loss of user settings on remote posts. 
    570 - Added more diagnostics 
    571 - Separated Errors and Diagnostics into two display blocks 
    572 - Advanced Diagnostics now a blog level option on the Options page rather than editing the PHP file 
    573  
    574  
    575  
    576 = Version 1.7.6 :  Limited release on Wordbooker Facebook page. = 
    577 - Changes for this release have been rolled up into 1.7.7. 
    578  
    579  
    580 = Version 1.7.5 : 13/03/2010 = 
    581 - Fixed a bug which stopped Scheduled Posts being pushed up to Facebook 
    582 - Added support for the "Excerpt" Box in the Add Post. If this is populated and the "Share" link option is enabled then the Excerpt text will be used to populate the Share Link. 
    583 - Added some addtional advanced debug coding. 
    584  
    585  
    586 = Version 1.7.4 : 12/03/2010 = 
    587 - Fix bug with option checking on new install which sometimes caused odd errors. 
    588  
    589  
    590 = Version 1.7.3 : 10/03/2010 = 
    591 -  Fix bitwise logic bug in permissions check code 
    592 -  Recode Status Cache update code to handle completely empty Facebook Statuses 
    593 -  Recode Missing Auths check to isolate it from Facebook Multi-query handling 
    594 -  Added more diagnostic messages to the advanced debugging process. 
    595  
    596 = Version 1.7.2 :  08/03/2010 = 
    597  - Added user data caching 
    598  - Multiple Facebook Status Widgets (Needs Wordpress 2.8 or above) 
    599  - Recoding of Blog Level settings form 
    600  - User level options added 
    601  - Fixed bug in layout of Fan Page selector 
    602  - Fan Page permission check/authorise added 
    603  - General Facebook permission checks/authorise tidied up 
    604  - Tidied up options page layout for various browsers. 
    605  - Videos and images inserted using Viper-Video Quicktags and Shashin now handled properly and tags stripped from output. 
    606  - Enhanced checks for conflicting (older) Facebook Platform files. 
    607  - Added active plugins list to Support Diagnostics list. 
    608  - Changed names of all wordbooker functions to avoid plugin conflicts. 
    609  - Options set for each post are stored and recalled when posts are edited 
    610  - Removed support for Facebook Profile Box posting (depreciated by Facebook) 
    611  - Added ability for user to hide their FB status on the Wordbooker Admin page. 
    612  - Widgets can display your profile or the pic/status from any of your Fan pages. 
    613  - Apostrophes in page names no longer break things. 
    614  - Added stripping of "extra" images inserted by plugins  
    615  - Publishing using the Press It book marklet picks up user preferences. 
    616  - Revised Security hash coding for option forms. 
    617  - Added User Guide and linked it from the Support section of the Plugin page. 
    618  - Modified security check which locked contributors/subscribers out of blog 
    619  - Blog Administrators are only people permitted to set blog level options 
    620  - Where "post as specific user" is selected at blog level the user level options for that user are loaded at post creation time. 
    621  - Added extended debug code to help troubleshoot problems. 
    622  
    623  
    624 = Version 1.6.1 :  29/01/2010 = 
    625  - Fixed a bug in the Attribute "tag" handling. 
    626  - Fixed the And/OR logic for publishing to Fan Page Walls 
    627  - Publish to Fan Page Walls now working correctly. 
    628  
    629  
    630 = Version 1.6 :  22/01/2010 = 
    631  - Added custom "tags" to Post Attribute and Status lines. 
    632  - Added "Current logged in user" as an option for the target FB account 
    633  - Added ability to choose to post to FB Wall, Fan Page Wall or both. 
    634  - Fixed bug relating to extract length. 
    635  - Added status_update permission check as this sometimes seems to fail. 
    636  - Tidied up the handling of the options page for users with no wordbooker configuration 
    637  
    638  
    639 = Version 1.5  :  10/01/2010 = 
    640  - Added check for "old" versions of the Facebook Client files which other plugins might be using.  
    641  - Further refinement of extract routine.  
    642  - User selectable "action link" for posts made to Facebook.  
    643  - Optional extended "description" meta tag creation for use with the "Share" action link.  
    644  - Fixes for issues with pluggable.php.  
    645  - Future posting now fully supported. 
    646  - Fixes to multiple account configuration 
    647  
    648 = Version 1.4 :  05/01/2010 = 
    649  - Modification of post extract routine to prevent incorrect truncation and character conversion. 
    650  
    651 = Version 1.3 :  03/01/2010 = 
    652  - Removal of stray debugging code. 
    653  - Tidy up and recoding of cron job. 
    654  
    655 = Version 1.2 :  02/01/2010 = 
    656  - URL fixes, code tweaks. 
    657  
    658 = Version 1.1 :  02/01/201 = 
    659  - Minor bug fix. 
    660282  
    661283= version 1.0 :  02/01/2010 = 
  • wordbooker/tags/2.1.8/wordbooker.php

    r509266 r509677  
    66Author: Steve Atty  
    77Author URI: http://wordbooker.tty.org.uk 
    8 Version: 2.1.7 
     8Version: 2.1.8 
    99*/ 
    1010 
     
    3939define('WORDBOOKER_DEBUG', false); 
    4040define('WORDBOOKER_TESTING', false); 
    41 define('WORDBOOKER_CODE_RELEASE',"2.1.7 - Crematorium Conspiracy"); 
     41define('WORDBOOKER_CODE_RELEASE',"2.1.8 - Call me Eugene"); 
    4242 
    4343# For Troubleshooting  
     
    7474define('WORDBOOKER_SETTINGS', 'wordbooker_settings'); 
    7575define('WORDBOOKER_OPTION_SCHEMAVERS', 'schema_vers'); 
    76 define('WORDBOOKER_SCHEMA_VERSION', '3'); 
     76define('WORDBOOKER_SCHEMA_VERSION', '4'); 
    7777 
    7878$new_wb_table_prefix=$wpdb->base_prefix; 
     
    431431    } 
    432432 
    433     if ($wordbooker_settings['schema_vers']!='3') { 
     433    if ($wordbooker_settings['schema_vers']=='3') { 
    434434        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' DROP PRIMARY KEY , DROP INDEX fb_comment_id, ADD PRIMARY KEY ( `blog_id` , `wp_post_id` , `fb_post_id` , `wp_comment_id` ) '); 
    435435        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' ADD `user_id` BIGINT( 20 ) NOT NULL  '); 
     
    446446        wordbooker_set_option('schema_vers', "3"); 
    447447    }    
     448 
     449    if ($wordbooker_settings['schema_vers']!='4') { 
     450        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' DROP PRIMARY KEY '); 
     451        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' DROP INDEX fb_comment_id,'); 
     452        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' ADD PRIMARY KEY ( `blog_id` , `wp_post_id` , `fb_post_id` , `wp_comment_id` ) '); 
     453        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' ADD `user_id` BIGINT( 20 ) NOT NULL  '); 
     454        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_ERRORLOGS. '  ADD `sequence_id` BIGINT( 20 ) NOT NULL AUTO_INCREMENT '); 
     455        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_ERRORLOGS. '  ADD PRIMARY KEY ( `sequence_id` ) '); 
     456        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '   ADD `fb_comment_id` VARCHAR( 40 ) NULL ');   
     457        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '  DROP PRIMARY KEY '); 
     458        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '  ADD INDEX `main_index` ( `blog_id` , `wp_post_id` , `fb_post_id` , `wp_comment_id` ) '); 
     459        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '  ADD `in_out` VARCHAR( 20 ) NULL ');   
     460        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '  ADD INDEX `in_out_idx` ( `in_out` ) '); 
     461        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '  ADD INDEX `fb_comment_id_idx` (`fb_comment_id`) ');  
     462        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_ERRORLOGS. ' ADD `diag_level` INT(4) NULL '); 
     463        wordbooker_set_option('schema_vers', "4"); 
     464    } 
    448465    $dummy=wp_clear_scheduled_hook('wb_cron_job'); 
    449466    $dummy=wp_schedule_event(time(), 'hourly', 'wb_cron_job'); 
     
    15841601    } 
    15851602    $wplang=wordbooker_get_language(); 
    1586 /* 
     1603 
    15871604$efb_script = <<< EOGS 
    15881605 <div id="fb-root"></div> 
     
    16081625    </script> 
    16091626EOGS; 
    1610 */ 
    1611  
    1612  
    1613 $efb_script = <<< EOGS 
    1614  <div id="fb-root"></div> 
    1615      <script type="text/javascript"> 
    1616       window.fbAsyncInit = function() { 
    1617     FB.init({ 
    1618      appId  : '254577506873', 
    1619       status : true, // check login status 
    1620       cookie : true, // enable cookies to allow the server to access the session 
    1621       xfbml  : true,  // parse XFBML 
    1622       oauth:true 
    1623     }); 
    1624       }; 
    1625  
    1626     (function(d){ 
    1627       var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} 
    1628       js = d.createElement('script'); js.id = id; js.async = true; 
    1629 EOGS; 
    1630 $efb_script.= "d.src = document.location.protocol + '//connect.facebook.net/".$wplang."/all.js';"; 
    1631 $efb_script.= <<< EOGS 
    1632       d.getElementsByTagName('head')[0].appendChild(js); 
    1633     }(document)); 
    1634   </script> 
    1635 EOGS; 
    1636      
    1637      
    16381627    $wordbooker_settings = wordbooker_options();  
    16391628    if  (isset($wordbooker_settings['wordbooker_like_button_show']) || isset($wordbooker_settings['wordbooker_like_share_too'] ) || isset($wordbooker_settings['wordbooker_use_fb_comments']))  
     
    16461635#   echo '\n<script type="text/javascript " defer="defer" > setTimeout("wordbooker_read()",3000); </script> \n'; 
    16471636    echo "\n<!-- Wordbooker code revision : ".WORDBOOKER_CODE_RELEASE." -->\n"; 
    1648     if ( is_single() ) { 
    1649         #if (isset($wordbooker_settings['wordbooker_time_button'])) { 
    1650             #echo '<fb:add-to-timeline></fb:add-to-timeline>  <fb:activity actions="wordbooker:write" app_id="111687885534181"></fb:activity>'; 
    1651             #$stuff=array('type'=>'client_cred','client_id'=>WORDBOOKER_FB_ID,'client_secret'=>WORDBOOKER_FB_SECRET); 
    1652             #$access_token=wordbooker_make_curl_call('https://graph.facebook.com/oauth/access_token',$stuff); 
    1653         #   $frictionless=array('article' => get_permalink(),'access_token'=>'AAAAAO0YAejkBAE3gGR2KjCr6WhUO1ZBNyXHP6vaQoQLbwvlDyKDK0BIMZBb6mVyk2ZAbvPEXyrZCLNd6Bb8TA0HJCKGkotUZD');# 
    1654             #$frictionless=array('article' => get_permalink(),'access_token'=>$access_token); 
    1655             #var_dump($frictionless); 
    1656             #try { 
    1657             #$x=wordbooker_make_curl_post_call('https://graph.facebook.com/me/news.reads',$frictionless); 
    1658             #$x=wordbooker_make_curl_post_call('https://graph.facebook.com/me/wordbooker:wordbooker_read',$frictionless); 
    1659             #var_dump($x); 
    1660         #   }    
    1661         #   catch  (Exception $e) { 
    1662         #           $error_msg = $e->getMessage(); 
    1663         #           var_dump($error_msg); 
    1664         #   } 
    1665         #} 
    1666     } 
    16671637return $blah; 
    16681638} 
     
    21482118    $perm_miss=wordbooker_get_cache($user_ID,'auths_needed',1); 
    21492119    if ($perm_miss->auths_needed==0) { return;} 
    2150     $perms_to_check= array(WORDBOOKER_FB_PUBLISH_STREAM,'publish_actions',WORDBOOKER_FB_STATUS_UPDATE,WORDBOOKER_FB_READ_STREAM,WORDBOOKER_FB_CREATE_NOTE,WORDBOOKER_FB_PHOTO_UPLOAD,WORDBOOKER_FB_VIDEO_UPLOAD,WORDBOOKER_FB_MANAGE_PAGES,WORDBOOKER_FB_READ_FRIENDS); 
    2151     $perm_messages= array( __('Publish content to your Wall/Fan pages', 'wordbooker'), __('Publish Actions to your Timeline','wordbooker'),__('Update your status', 'wordbooker'), __('Read your News Feed and Wall', 'wordbooker'),__('Create notes', 'wordbooker'),__('Upload photos', 'wordbooker'),__('Upload videos', 'wordbooker'),__('Manage_pages', 'wordbooker'),__('Read friend lists', 'wordbooker')); 
     2120    $perms_to_check= array(WORDBOOKER_FB_PUBLISH_STREAM,WORDBOOKER_FB_STATUS_UPDATE,WORDBOOKER_FB_READ_STREAM,WORDBOOKER_FB_CREATE_NOTE,WORDBOOKER_FB_PHOTO_UPLOAD,WORDBOOKER_FB_VIDEO_UPLOAD,WORDBOOKER_FB_MANAGE_PAGES,WORDBOOKER_FB_READ_FRIENDS); 
     2121    $perm_messages= array( __('Publish content to your Wall/Fan pages', 'wordbooker'),__('Update your status', 'wordbooker'), __('Read your News Feed and Wall', 'wordbooker'),__('Create notes', 'wordbooker'),__('Upload photos', 'wordbooker'),__('Upload videos', 'wordbooker'),__('Manage_pages', 'wordbooker'),__('Read friend lists', 'wordbooker')); 
    21522122    $preamble= __("but requires authorization to ", 'wordbooker'); 
    21532123    $postamble= __(" on Facebook. Click on the following link to grant permission", 'wordbooker'); 
  • wordbooker/trunk/includes/wordbooker_cron.php

    r505615 r509677  
    4848        if(strlen(serialize($ret))<20) {wordbooker_debugger("Permissions fetch failed - skipping ",'',-1,9) ;} else { 
    4949        $add_auths=0; 
    50         $permlist= array(WORDBOOKER_FB_PUBLISH_STREAM,'publish_actions',WORDBOOKER_FB_STATUS_UPDATE,WORDBOOKER_FB_READ_STREAM,WORDBOOKER_FB_CREATE_NOTE,WORDBOOKER_FB_PHOTO_UPLOAD,WORDBOOKER_FB_VIDEO_UPLOAD,WORDBOOKER_FB_MANAGE_PAGES,WORDBOOKER_FB_READ_FRIENDS); 
     50        $permlist= array(WORDBOOKER_FB_PUBLISH_STREAM,WORDBOOKER_FB_STATUS_UPDATE,WORDBOOKER_FB_READ_STREAM,WORDBOOKER_FB_CREATE_NOTE,WORDBOOKER_FB_PHOTO_UPLOAD,WORDBOOKER_FB_VIDEO_UPLOAD,WORDBOOKER_FB_MANAGE_PAGES,WORDBOOKER_FB_READ_FRIENDS); 
    5151        $key=0; 
    5252        foreach($permlist as $perm){ 
  • wordbooker/trunk/includes/wordbooker_options.php

    r508979 r509677  
    732732        echo "</h3>"; 
    733733 
    734     if (defined('WORDBOOKER_PREMIUM')) { _e("You're using the Premium options in Wordbooker. You really should contribute something to the support and development of this plugin.  Please provide your FB Id number and your website when making payment so your details can be added to the 'thanks' list on the web site", 'wordbooker'); 
     734    if (defined('WORDBOOKER_PREMIUM')) { _e("You're using the Premium options in Wordbooker. You really should contribute something to the support and development of this plugin.  Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a> list on the web site", 'wordbooker'); 
    735735}        
    736     _e("If you've found this extension useful then please feel free to donate to its support and future development. Please provide your FB Id number and your website when making payment so your details can be added to the 'Thanks' page on the Website", 'wordbooker');  
     736    _e("If you've found this extension useful then please feel free to donate to its support and future development. Please provide your FB Id number and your website when making payment so your details can be added to the <a href='http://wordbooker.tty.org.uk/thanks/'>'Thanks'</a> page on the Website", 'wordbooker');  
    737737      ?><br /><br /> 
    738738        <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
  • wordbooker/trunk/readme.txt

    r509266 r509677  
    33Contributors: SteveAtty 
    44Tags: facebook, minifeed, newsfeed, crosspost, WPMU, Facebook Share, Facebook Like, social media 
     5Donate 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 
    56Requires at least: 2.9 
    67Tested up to: 3.3.1 
    7 Stable tag: 2.1.7 
     8Stable tag: 2.1.8 
    89 
    910This 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.  
     
    115116== Changelog == 
    116117 
     118= Version 2.1.8 23/02/2012 = 
     119- Roll back the FB javascript to an earlier version which doesn't seem to have the problems that the current code does. 
     120- Recode the DB upgrade script to fix some odd problems. 
     121- Remove some redundant, for now, timeline action permissions. 
     122 
    117123= Version 2.1.7 23/02/2012 = 
    118124- Fix a typo in the FB javascript code which only seems to affect Safari. 
    119125 
    120126= Version 2.1.6 22/02/2012 = 
    121 - Total embarassment : I somehow rolled a version with a function call in it that shouldn't have been there! 
     127- Total embarassment : I somehow rolled a version with a function call in it that shouldn't have been there 
    122128 
    123129 
     
    176182- Checked for compatability with Wordpress 3.3 
    177183 
     184 
    178185= Version 2.0.8 19/11/2011 = 
    179186- Commented out a debug statement that got left behind. 
     
    203210- Fixed a typo in the "Disable Short Urls" option. 
    204211- Changed graph calls to use JSON_STRING parameter rather than just JSON (Undocumented Facebook API parameter). 
    205  
    206212 
    207213 
     
    274280- Major new release - too many changes to document here 
    275281 
    276  
    277 = Version 1.9.5 17/07/2011 = 
    278 - Minor changes to OG Tags to handle changes in the Facebook Share/Like button functionality 
    279 - Fixed problem with quotes being turned in to html entities. 
    280  
    281  
    282 = Version 1.9.4 20/06/2011 = 
    283 - Recoded the new page permissions dialogue due to problem requesting page permissions using OAUTH2 which makes it incompatible with the REST API 
    284 - Completely recoded the post handling code to fix issues with scheduled posts not working and external clients not publishing properly  
    285  
    286  
    287 = Version 1.9.3  02/06/2011 = 
    288 - Changed FB PHP SDK to supress session cache limiter error message 
    289 - Changed FB PHP SDK to fix class redeclaration error. 
    290 - Changed Post age time calculations to try to resolve issues with misbehaving Wordpress functions 
    291 - Revised post status transition checking code to identify new posts properly 
    292 - Fixed issue with user user settings being lost at publication time 
    293 - Added Verbose option to Curl checking to place diagnostic info into the server error log. 
    294 - Added some extra checks to imaging handling logic to discard null image strings. 
    295 - Removed exta OG tag code that slipped in sometime when I wasn't looking 
    296 - Fixed some bugs in the Like Widget which meant settings weren't stored properly and were ignored. 
    297 - Added ability to supress like/share on sticky posts. 
    298 - Removed some junk code that wasn't being used. 
    299 - Added strip_tags to remove html from comments pushed up to FB. 
    300  
    301  
    302 = Version 1.9.2  31/05/2011 = 
    303 - Remove Redundant code from base_facebook.php 
    304  
    305  
    306 = Version 1.9.1  31/05/2011 = 
    307 - Lost in SVN 
    308  
    309  
    310 = Version 1.9.0  31/05/2011 = 
    311 - Changed Authentication method again to OAUTH2 client side authentication. 
    312 - Added support for Authentication using SSL  
    313 - Made Auth returns use POST rather than query string to tighten up security 
    314 - Added hook so that like/share buttons appear when excerpts are used on category pages rather than only when the full post was used. 
    315 - Removed SEND from iframe code as it doesn't actually work 
    316 - Changed Options page to indicate SEND only works with FBXML 
    317 - Revisted the post age calculations to handle TZ offsets 
    318 - Added an option to allow Non Wordbooker users to chose if a post should be published or not. 
    319 - Changed priority of publish_post hook to try to fix refire logic issues introduced by sluggish server response. 
    320 - Changed Image handling logic to discard arrays caused by a problematic adverts plugin. 
    321 - Added additional OG Tags                   
    322  
    323  
    324 = Version 1.8.27  01/05/2011 = 
    325 - Added support for the Facebook SEND option 
    326 - Added a couple of extra custom meta field handlers 
    327 - Minor changes to the comment pulling code to fix a couple of glitches 
    328 - Changed timestamp handling so that comment_time and comment_time_gmt aren't the same and the Blog GMT offset is applied to comment_time when pulled from FB. 
    329 - Changed all the logic to do with handling previous published posts to remove dependency on the wordbooker postlogs table 
    330 - Added a couple of more exclusions to the strip_image routine 
    331 - Fixed a bug in the Curl checking code which meant that you got no message if curl wasn't even installed. 
    332 - Fixed a < /div> tag which broke Firefox 4! 
    333 - Added a fb-root div for the fan box in the widget - again FB changed things without telling people. 
    334 - Added DB change script to set UTF8 Collations on tables to fix non Western Characterset problems. 
    335  
    336 = Version 1.8.26  02/03/2011 = 
    337 - Changed the check in the comment handling routine as FB changed a url 
    338  
    339 = Version 1.8.25   02/03/2011 = 
    340 - Rehashed the og:tags to streamline their production 
    341 - Rolled back the comments round the og:tags put in to try to help W3C compliance as it causes too many problems and often the tags fail to be recognised 
    342 - Fixed a bug in the code that handles pulling the image back for the og:image tag 
    343  
    344  
    345 = Version 1.8.24   26/02/2011 = 
    346 - Change to comment handling code to trap both "approve" and "approved" as good comment status 
    347 - Changed Youtube URL parsing to handle the embed option 
    348 - Wrapped some of the Facebook tags in comments to keep W3C validators "happy" 
    349 - Added locale to the iframe tag for like/recommend button. Uses the Wordpress WP_LANG constant 
    350  
    351  
    352 = Version 1.8.23   21/02/2011 = 
    353 - Fixed Cat introduced error in comment handling check code. 
    354  
    355  
    356 = Version 1.8.22   19/02/2011 = 
    357 - Added code developed by Shi Chuan Guan which means comments are only pushed ot FB when they've been approved 
    358 - Added code to allow tighter intergration with Justin_K's WP-FB-AutoConnect with respect to comment avatars. 
    359 - Image[0] is now stored in the post meta and used for the og:image tag 
    360 - Post Excerpt is now stored in the post meta and used for the og:description. This only affects new posts so the old code has to stay in place for now. 
    361 - Minor tweaks to code base. 
    362  
    363  
    364 = Version 1.8.21   01/02/2011 = 
    365 - Minor changes to the comment handling process to stop things tripping up again 
    366 - Added thumb to the custom meta tag handling for images 
    367 - Changed the logic so that like/share buttons show when your front page for your blog is a page. 
    368 - Added some more diagnostic messages 
    369 - Fixed some minor bugs in the image handling which meant sometimes images that had been found were lost. 
    370  
    371  
    372 = Version 1.8.20   06/01/2011 = 
    373 - "Real Comment" check stopped comments from non-logged in users from being processed. Changed this to look for Facebook links 
    374 - "Auto approve comments" option now does a direct insert to the comments table : which should bypass some of the problems with Spam checkers eating comments. 
    375 - Duplicate post checking re-coded, now if a post has been handled within the last 60 seconds its deemed a re-fire and ignored 
    376 - Redundant code for handling posts made by XMLRPC clients commented out. 
    377 - Tweaked some of the debug code 
    378 - Minor changes to the Cache handling code to make it slightly more resilient. 
    379 - Changed the code for handling og:image tags 
    380 - Changed Curl/Fopen check code as it could mis-report 
    381 - Changed SimpleXML check code as it was mis-reporting. 
    382 - Checked compatability with Wordpress 3.1 
    383  
    384 = Version 1.8.19   06/01/2011 = 
    385 - Lost in SVN  
    386  
    387  
    388 = Version 1.8.18  24/11/2010 = 
    389 - Fixed the huge fatal bug in comment handling which affected some users 
    390 - Revised the Like / Share options to make them more flexible 
    391 - Added option to hide the FB Recent Activity on the Wordbooker Options Page 
    392 - Added option to change email address used when importing comments from FB 
    393 - Added an index to the error log table 
    394 - Changed the code that checks for bouncing comments 
    395 - Added a check for duplicate comment content coming from FB to stop Wordpress blowing up 
    396 - Hid / Deactivated the "Poll for comments when visiting this page" option 
    397 - Added more debugging to the comment handling code 
    398 - Added some .2 second pauses in the cron processes to stop the plugin exceeding the FB transaction per second limit 
    399  
    400  
    401 = Version 1.8.17  22/11/2010 = 
    402 - Fixed a bug with Like and Share logic and added missing options to pre 2.9 Options page 
    403 - Fixed a bug where the publish window check fired and stopped a post being made. 
    404 - Fixed a bug where urls were lost doing scheduled posts with URL shorteners enabled 
    405 - Fixed a bug where setting were sometimes getting lost for Scheduled posts. 
    406 - Fixed a bug which may have caused comments not to be processed 
    407 - Changed the email for imported comments so it now will use a Wordbooker Gravtar 
    408 - Settings were getting trashed when Autosave ran. Changed Wordbooker to basically do nothing when Autosave fires so changes to Wordbooker options are not lost. 
    409 - Null values for Update time from Facebook now handled. 
    410 - Changed some JSON calls to handle older versions of JSON which expect a different number of parameters. 
    411 - Changed extract trim length to handle multibyte characters (Thanks to Kensuke Akai for the fix) 
    412 - Changed the Page fetch code in the cron job to hopefully handle FB FQL failures. 
    413 - Added support for Like/Share on Category pages 
    414 - Added support for YAPB plugin 
    415 - Added a error/diagnostic log clear down call to the cron to keep the log file "tidy". 
    416 - Added a check for broken JSON installs where the function is there but PHP returns no version information. 
    417 - Added a check to the header function so that it only works on published posts (This fixes a problem with the "Share Drafts" plugin) 
    418 - Finally put some diagnostics in the comment handling code. 
    419  
    420  
    421 = Version 1.8.16   07/11/2010 = 
    422 - SVN mess up caused incorrect file versions to get released 
    423  
    424  
    425 = Version 1.8.15   07/11/2010 = 
    426 - Fixed a bug where the image links were broken 
    427 - Fixed a bug where the post links were broken 
    428 - Changed the debug process so that key process stages are always written to the diagnostic log 
    429 - Changed some more function/class names to try to avoid clashes with other FB related plugins. 
    430 - Changed some internal calls which were depreciated. 
    431  
    432  
    433  
    434 = Version 1.8.14   04/11/2010 = 
    435 - Added support for quicktranslate tags 
    436 - Fixed a bug where wpg2 tags were left in the excerpt. 
    437 - Fixed a bug where post level options were being ignored 
    438 - Fixed a bug where post level options were being lost on Draft save. 
    439 - Moved Graph API calls back to Curl - but have left fopen based library in archive 
    440 - Made Fopen calls silent to stop it barfing messages on screen on incorrectly configured webservers. 
    441 - Added wp-includes to the list of excluded image directories 
    442 - Changed name of a couple of internal functions to stop clashes with other plugins. 
    443 - Changed names of a couple of classes to avoid clashes with badly coded Facebook plugins 
    444 - Added support for URL shortener plugins : currently works with "YOURLS: WordPress to Twitter" and "url_shortener" plugins 
    445  
    446  
    447 = Version 1.8.13   30/09/2010 = 
    448 - Fixed a bug where images were not being published - was resetting an array by accident. 
    449  
    450  
    451 = Version 1.8.12 : 28/09/2010 = 
    452 - Fixed cron code which sometimes invalidated sessions  
    453 - Added facebook.com to the list of image sources to be stripped as FB dont support posting images from their own CDN in wall posts  
    454 - fb root div tag handling code fixed   
    455 - html stripping code for title text tightended up  
    456 - Minor tweaks to diagnostic code to add more details 
    457 - Changes to cron code to make it more robust when fetching information 
    458  
    459  
    460 = Version 1.8.11 : 25/07/2010 = 
    461 - Added option to allow users to change width of Facebook Like Box. 
    462 - User level setting of Yes for Default publish didn't work 
    463 - Fixed a bug where posts by email didn't get processed as they were missing a user id 
    464 - Changed Share button on multi post pages so it doesn't show the count. 
    465 - Added option to supress Meta description tag to keep SEO plugins happy. 
    466 - Support information moved so it shows during the authorisation process to help with completely failing installs. 
    467 - Removed a lot of old code as part of the pre V2.0 code rebuild. 
    468  
    469  
    470 = Version 1.8.10 : 30/06/2010 = 
    471 - Fixed a bug in the Oauth request URLs 
    472 - Fixed a warning about arrays to do with thumbnail handling 
    473 - Fixed a HTML bug which broke Fluency Admin 
    474 - Added an extra diagnostic message for posts within the "Dont republish window" 
    475  
    476  
    477 = Version 1.8.9 : 29/06/2010 = 
    478 - Trying to fix a serious SVN screwup which has broken lots of things. 
    479  
    480  
    481 = Version 1.8.8 : 29/06/2010 = 
    482 - Fix ANOTHER mistake caused by SVN problems -  
    483  
    484 = Version 1.8.7 : 29/06/2010 = 
    485 - Fix a mistake caused by SVN problems - 
    486  
    487 = Version 1.8.6 : 29/06/2010 = 
    488 - Added support for Iframe Like/Share buttons. 
    489 - Added Faceboox "Fan"/ Like Multi-widget. 
    490 - Fixed problem with Graph API classes clashing with other Facebook related plugins. 
    491 - Fixed a bug in the image handling functions. 
    492 - Fixed a bug where selecting "show FB like / Share" buttons but not selecting where to show them hid the post. 
    493 - Changed a couple of class definitions to fix clashes with other Facebook related plugins. 
    494  
    495  
    496  
    497 = Version 1.8.5 : 20/06/2010 = 
    498 - Changed the json_decode handling in the Facebook GRAPH API to remove dependencies on Json 1.2.1 
    499 - Added Language support for FB Like button (uses the WPLANG constant). 
    500 - Added support for sharing main blog url on multiple post pages. 
    501 - Changed Support information list. 
    502 - Added "fallback" code for PHP versions missing json_decode. 
    503 - Put in checks for multibyte support. 
    504 - Changed format of "Next Scheduled Poll" text to work round timezone casting issues. 
    505 - Supress og:/fb: tags and FB javascript when share/like options are turned off. 
    506 - Wrapped og: and fb: header tags in htmlspecialchars to fix text "escaping" into page. 
    507 - Changed tag stripping code for extracts. 
    508 - Fixed 404 page throwing a Database error. 
    509 - Changed callback URLs from blog_info('url') to blog_info('wpurl') to fix issues with non "home directory" WP installs. 
    510 - Added more error trapping round user cache handling. 
    511 - Wrapped all array_keys calls in is_array checks. 
    512 - Added options to allow Share and Like buttons to be located either above or below post. 
    513  
    514  
    515 = Version 1.8.4 : 10/06/2010 = 
    516 - Fixed problems with the auth process. 
    517 - Added more diagnostic checks. 
    518 - Changed Facebook core call from CURL to old method. 
    519 - Added support for Facebook Like Button. 
    520 - Added support for Facebook Share Button 
    521 - Added a "Recent Facebook Activity" section to the Wordbooker Options page. 
    522 - Added checks for CURL and json_decode and tidied up error reporting. 
    523 - Fixed bug with json_decode for PHP < 5.2 
    524 - Fixed bug in error logging. 
    525 - Fixed missing tag (sometimes broke login URL in IE) 
    526 - Added code to fix "signature" issues during authentication. 
    527  
    528  
    529 = Version 1.8.3 : 01/06/2010 (Limited release via Wordbooker Page) = 
    530 - Changes rolled up into 1.8.4 
    531  
    532 = Version 1.8.2  : 30/05/2010 (Limited release via Wordbooker Page) = 
    533 - Changes rolled up into 1.8.3 
    534  
    535  
    536 = Version 1.8.1 : 30/05/2010 =  
    537 - Fix issue with new API file directory. 
    538  
    539 = Version 1.8 : 30/05/2010 = 
    540 - Facebook authorisation migrated to OAUTH2 
    541 - Minor bug fixes 
    542 - Userguide updated to include new features and authorisation process. 
    543 - Recoded cron code to try to work round Facebook Database issues. 
    544  
    545  
    546  
    547 = Version 1.7.9 : 18/05/2010 = 
    548 - Several minor bug fixes and tweaks. 
    549 - Ability to use the User generated Post Excerpt to post to the wall. 
    550   
    551  
    552 = Version 1.7.8 :14/04/2010 = 
    553 - Fixed Scheduled post handling which was broken again. 
    554 - Recoded Advanced Diagnostics so they no longer slow down the posting process. 
    555 - Fixed bug concerning incorrect facebook IDs when posting comments. 
    556 - Recoded "non wordbook user" handing code 
    557 - Added more diagnostics 
    558  
    559  
    560  
    561 = Version 1.7.7 :05/04/2010 = 
    562 - Added support for WP thumbnails (needs WP/WPMU 2.9 or above). 
    563 - Added support for 'Quick Press' (i.e. post from Dashboard) 
    564 - Added support for use by non wordbooker users - posts from non wordbooker user inherit the blog level settings (and if the default user is set to a specific user they inherit those settings too) 
    565 - Added support for posts made by wp-o-matic. 
    566 - Added NextGen tags to the misbalanced tags list so they get stripped from the text of the excerpt. 
    567 - Added a lot more diagnostic messages. 
    568 - Fixed 'Press This' functionalilty 
    569 - Fixed loss of user settings on remote posts. 
    570 - Added more diagnostics 
    571 - Separated Errors and Diagnostics into two display blocks 
    572 - Advanced Diagnostics now a blog level option on the Options page rather than editing the PHP file 
    573  
    574  
    575  
    576 = Version 1.7.6 :  Limited release on Wordbooker Facebook page. = 
    577 - Changes for this release have been rolled up into 1.7.7. 
    578  
    579  
    580 = Version 1.7.5 : 13/03/2010 = 
    581 - Fixed a bug which stopped Scheduled Posts being pushed up to Facebook 
    582 - Added support for the "Excerpt" Box in the Add Post. If this is populated and the "Share" link option is enabled then the Excerpt text will be used to populate the Share Link. 
    583 - Added some addtional advanced debug coding. 
    584  
    585  
    586 = Version 1.7.4 : 12/03/2010 = 
    587 - Fix bug with option checking on new install which sometimes caused odd errors. 
    588  
    589  
    590 = Version 1.7.3 : 10/03/2010 = 
    591 -  Fix bitwise logic bug in permissions check code 
    592 -  Recode Status Cache update code to handle completely empty Facebook Statuses 
    593 -  Recode Missing Auths check to isolate it from Facebook Multi-query handling 
    594 -  Added more diagnostic messages to the advanced debugging process. 
    595  
    596 = Version 1.7.2 :  08/03/2010 = 
    597  - Added user data caching 
    598  - Multiple Facebook Status Widgets (Needs Wordpress 2.8 or above) 
    599  - Recoding of Blog Level settings form 
    600  - User level options added 
    601  - Fixed bug in layout of Fan Page selector 
    602  - Fan Page permission check/authorise added 
    603  - General Facebook permission checks/authorise tidied up 
    604  - Tidied up options page layout for various browsers. 
    605  - Videos and images inserted using Viper-Video Quicktags and Shashin now handled properly and tags stripped from output. 
    606  - Enhanced checks for conflicting (older) Facebook Platform files. 
    607  - Added active plugins list to Support Diagnostics list. 
    608  - Changed names of all wordbooker functions to avoid plugin conflicts. 
    609  - Options set for each post are stored and recalled when posts are edited 
    610  - Removed support for Facebook Profile Box posting (depreciated by Facebook) 
    611  - Added ability for user to hide their FB status on the Wordbooker Admin page. 
    612  - Widgets can display your profile or the pic/status from any of your Fan pages. 
    613  - Apostrophes in page names no longer break things. 
    614  - Added stripping of "extra" images inserted by plugins  
    615  - Publishing using the Press It book marklet picks up user preferences. 
    616  - Revised Security hash coding for option forms. 
    617  - Added User Guide and linked it from the Support section of the Plugin page. 
    618  - Modified security check which locked contributors/subscribers out of blog 
    619  - Blog Administrators are only people permitted to set blog level options 
    620  - Where "post as specific user" is selected at blog level the user level options for that user are loaded at post creation time. 
    621  - Added extended debug code to help troubleshoot problems. 
    622  
    623  
    624 = Version 1.6.1 :  29/01/2010 = 
    625  - Fixed a bug in the Attribute "tag" handling. 
    626  - Fixed the And/OR logic for publishing to Fan Page Walls 
    627  - Publish to Fan Page Walls now working correctly. 
    628  
    629  
    630 = Version 1.6 :  22/01/2010 = 
    631  - Added custom "tags" to Post Attribute and Status lines. 
    632  - Added "Current logged in user" as an option for the target FB account 
    633  - Added ability to choose to post to FB Wall, Fan Page Wall or both. 
    634  - Fixed bug relating to extract length. 
    635  - Added status_update permission check as this sometimes seems to fail. 
    636  - Tidied up the handling of the options page for users with no wordbooker configuration 
    637  
    638  
    639 = Version 1.5  :  10/01/2010 = 
    640  - Added check for "old" versions of the Facebook Client files which other plugins might be using.  
    641  - Further refinement of extract routine.  
    642  - User selectable "action link" for posts made to Facebook.  
    643  - Optional extended "description" meta tag creation for use with the "Share" action link.  
    644  - Fixes for issues with pluggable.php.  
    645  - Future posting now fully supported. 
    646  - Fixes to multiple account configuration 
    647  
    648 = Version 1.4 :  05/01/2010 = 
    649  - Modification of post extract routine to prevent incorrect truncation and character conversion. 
    650  
    651 = Version 1.3 :  03/01/2010 = 
    652  - Removal of stray debugging code. 
    653  - Tidy up and recoding of cron job. 
    654  
    655 = Version 1.2 :  02/01/2010 = 
    656  - URL fixes, code tweaks. 
    657  
    658 = Version 1.1 :  02/01/201 = 
    659  - Minor bug fix. 
    660282  
    661283= version 1.0 :  02/01/2010 = 
  • wordbooker/trunk/wordbooker.php

    r509266 r509677  
    66Author: Steve Atty  
    77Author URI: http://wordbooker.tty.org.uk 
    8 Version: 2.1.7 
     8Version: 2.1.8 
    99*/ 
    1010 
     
    3939define('WORDBOOKER_DEBUG', false); 
    4040define('WORDBOOKER_TESTING', false); 
    41 define('WORDBOOKER_CODE_RELEASE',"2.1.7 - Crematorium Conspiracy"); 
     41define('WORDBOOKER_CODE_RELEASE',"2.1.8 - Call me Eugene"); 
    4242 
    4343# For Troubleshooting  
     
    7474define('WORDBOOKER_SETTINGS', 'wordbooker_settings'); 
    7575define('WORDBOOKER_OPTION_SCHEMAVERS', 'schema_vers'); 
    76 define('WORDBOOKER_SCHEMA_VERSION', '3'); 
     76define('WORDBOOKER_SCHEMA_VERSION', '4'); 
    7777 
    7878$new_wb_table_prefix=$wpdb->base_prefix; 
     
    431431    } 
    432432 
    433     if ($wordbooker_settings['schema_vers']!='3') { 
     433    if ($wordbooker_settings['schema_vers']=='3') { 
    434434        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' DROP PRIMARY KEY , DROP INDEX fb_comment_id, ADD PRIMARY KEY ( `blog_id` , `wp_post_id` , `fb_post_id` , `wp_comment_id` ) '); 
    435435        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' ADD `user_id` BIGINT( 20 ) NOT NULL  '); 
     
    446446        wordbooker_set_option('schema_vers', "3"); 
    447447    }    
     448 
     449    if ($wordbooker_settings['schema_vers']!='4') { 
     450        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' DROP PRIMARY KEY '); 
     451        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' DROP INDEX fb_comment_id,'); 
     452        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' ADD PRIMARY KEY ( `blog_id` , `wp_post_id` , `fb_post_id` , `wp_comment_id` ) '); 
     453        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. ' ADD `user_id` BIGINT( 20 ) NOT NULL  '); 
     454        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_ERRORLOGS. '  ADD `sequence_id` BIGINT( 20 ) NOT NULL AUTO_INCREMENT '); 
     455        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_ERRORLOGS. '  ADD PRIMARY KEY ( `sequence_id` ) '); 
     456        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '   ADD `fb_comment_id` VARCHAR( 40 ) NULL ');   
     457        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '  DROP PRIMARY KEY '); 
     458        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '  ADD INDEX `main_index` ( `blog_id` , `wp_post_id` , `fb_post_id` , `wp_comment_id` ) '); 
     459        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '  ADD `in_out` VARCHAR( 20 ) NULL ');   
     460        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '  ADD INDEX `in_out_idx` ( `in_out` ) '); 
     461        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_POSTCOMMENTS. '  ADD INDEX `fb_comment_id_idx` (`fb_comment_id`) ');  
     462        $result = $wpdb->query('ALTER TABLE '. WORDBOOKER_ERRORLOGS. ' ADD `diag_level` INT(4) NULL '); 
     463        wordbooker_set_option('schema_vers', "4"); 
     464    } 
    448465    $dummy=wp_clear_scheduled_hook('wb_cron_job'); 
    449466    $dummy=wp_schedule_event(time(), 'hourly', 'wb_cron_job'); 
     
    15841601    } 
    15851602    $wplang=wordbooker_get_language(); 
    1586 /* 
     1603 
    15871604$efb_script = <<< EOGS 
    15881605 <div id="fb-root"></div> 
     
    16081625    </script> 
    16091626EOGS; 
    1610 */ 
    1611  
    1612  
    1613 $efb_script = <<< EOGS 
    1614  <div id="fb-root"></div> 
    1615      <script type="text/javascript"> 
    1616       window.fbAsyncInit = function() { 
    1617     FB.init({ 
    1618      appId  : '254577506873', 
    1619       status : true, // check login status 
    1620       cookie : true, // enable cookies to allow the server to access the session 
    1621       xfbml  : true,  // parse XFBML 
    1622       oauth:true 
    1623     }); 
    1624       }; 
    1625  
    1626     (function(d){ 
    1627       var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} 
    1628       js = d.createElement('script'); js.id = id; js.async = true; 
    1629 EOGS; 
    1630 $efb_script.= "d.src = document.location.protocol + '//connect.facebook.net/".$wplang."/all.js';"; 
    1631 $efb_script.= <<< EOGS 
    1632       d.getElementsByTagName('head')[0].appendChild(js); 
    1633     }(document)); 
    1634   </script> 
    1635 EOGS; 
    1636      
    1637      
    16381627    $wordbooker_settings = wordbooker_options();  
    16391628    if  (isset($wordbooker_settings['wordbooker_like_button_show']) || isset($wordbooker_settings['wordbooker_like_share_too'] ) || isset($wordbooker_settings['wordbooker_use_fb_comments']))  
     
    16461635#   echo '\n<script type="text/javascript " defer="defer" > setTimeout("wordbooker_read()",3000); </script> \n'; 
    16471636    echo "\n<!-- Wordbooker code revision : ".WORDBOOKER_CODE_RELEASE." -->\n"; 
    1648     if ( is_single() ) { 
    1649         #if (isset($wordbooker_settings['wordbooker_time_button'])) { 
    1650             #echo '<fb:add-to-timeline></fb:add-to-timeline>  <fb:activity actions="wordbooker:write" app_id="111687885534181"></fb:activity>'; 
    1651             #$stuff=array('type'=>'client_cred','client_id'=>WORDBOOKER_FB_ID,'client_secret'=>WORDBOOKER_FB_SECRET); 
    1652             #$access_token=wordbooker_make_curl_call('https://graph.facebook.com/oauth/access_token',$stuff); 
    1653         #   $frictionless=array('article' => get_permalink(),'access_token'=>'AAAAAO0YAejkBAE3gGR2KjCr6WhUO1ZBNyXHP6vaQoQLbwvlDyKDK0BIMZBb6mVyk2ZAbvPEXyrZCLNd6Bb8TA0HJCKGkotUZD');# 
    1654             #$frictionless=array('article' => get_permalink(),'access_token'=>$access_token); 
    1655             #var_dump($frictionless); 
    1656             #try { 
    1657             #$x=wordbooker_make_curl_post_call('https://graph.facebook.com/me/news.reads',$frictionless); 
    1658             #$x=wordbooker_make_curl_post_call('https://graph.facebook.com/me/wordbooker:wordbooker_read',$frictionless); 
    1659             #var_dump($x); 
    1660         #   }    
    1661         #   catch  (Exception $e) { 
    1662         #           $error_msg = $e->getMessage(); 
    1663         #           var_dump($error_msg); 
    1664         #   } 
    1665         #} 
    1666     } 
    16671637return $blah; 
    16681638} 
     
    21482118    $perm_miss=wordbooker_get_cache($user_ID,'auths_needed',1); 
    21492119    if ($perm_miss->auths_needed==0) { return;} 
    2150     $perms_to_check= array(WORDBOOKER_FB_PUBLISH_STREAM,'publish_actions',WORDBOOKER_FB_STATUS_UPDATE,WORDBOOKER_FB_READ_STREAM,WORDBOOKER_FB_CREATE_NOTE,WORDBOOKER_FB_PHOTO_UPLOAD,WORDBOOKER_FB_VIDEO_UPLOAD,WORDBOOKER_FB_MANAGE_PAGES,WORDBOOKER_FB_READ_FRIENDS); 
    2151     $perm_messages= array( __('Publish content to your Wall/Fan pages', 'wordbooker'), __('Publish Actions to your Timeline','wordbooker'),__('Update your status', 'wordbooker'), __('Read your News Feed and Wall', 'wordbooker'),__('Create notes', 'wordbooker'),__('Upload photos', 'wordbooker'),__('Upload videos', 'wordbooker'),__('Manage_pages', 'wordbooker'),__('Read friend lists', 'wordbooker')); 
     2120    $perms_to_check= array(WORDBOOKER_FB_PUBLISH_STREAM,WORDBOOKER_FB_STATUS_UPDATE,WORDBOOKER_FB_READ_STREAM,WORDBOOKER_FB_CREATE_NOTE,WORDBOOKER_FB_PHOTO_UPLOAD,WORDBOOKER_FB_VIDEO_UPLOAD,WORDBOOKER_FB_MANAGE_PAGES,WORDBOOKER_FB_READ_FRIENDS); 
     2121    $perm_messages= array( __('Publish content to your Wall/Fan pages', 'wordbooker'),__('Update your status', 'wordbooker'), __('Read your News Feed and Wall', 'wordbooker'),__('Create notes', 'wordbooker'),__('Upload photos', 'wordbooker'),__('Upload videos', 'wordbooker'),__('Manage_pages', 'wordbooker'),__('Read friend lists', 'wordbooker')); 
    21522122    $preamble= __("but requires authorization to ", 'wordbooker'); 
    21532123    $postamble= __(" on Facebook. Click on the following link to grant permission", 'wordbooker'); 
Note: See TracChangeset for help on using the changeset viewer.