diff --git a/adult_smile.tgz b/adult_smile.tgz index 04ef72fb..67e2a31e 100644 Binary files a/adult_smile.tgz and b/adult_smile.tgz differ diff --git a/blockem.tgz b/blockem.tgz index c1842e52..dd092204 100755 Binary files a/blockem.tgz and b/blockem.tgz differ diff --git a/blockem/blockem.php b/blockem/blockem.php index 5ff87c58..9134bd0b 100755 --- a/blockem/blockem.php +++ b/blockem/blockem.php @@ -109,7 +109,7 @@ function blockem_prepare_body(&$a,&$b) { function blockem_display_item(&$a,&$b) { if(strstr($b['output']['body'],'id="blockem-wrap-')) - $b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg"; + $b['output']['thumb'] = $a->get_baseurl() . "/images/default-profile-sm.jpg"; } diff --git a/facebook.tgz b/facebook.tgz index 18392c78..b1db063b 100644 Binary files a/facebook.tgz and b/facebook.tgz differ diff --git a/facebook/facebook.php b/facebook/facebook.php index 24632240..9c8c8f08 100755 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -46,12 +46,6 @@ * authenticate to your site to establish identity. We will address this * in a future release. */ - - /** TODO - * - Implement a method for the administrator to delete all configuration data the plugin has created, - * e.g. the app_access_token - * - Implement a configuration option to set the polling interval system-wide - */ define('FACEBOOK_MAXPOSTLEN', 420); @@ -62,8 +56,9 @@ function facebook_install() { register_hook('jot_networks', 'addon/facebook/facebook.php', 'facebook_jot_nets'); register_hook('connector_settings', 'addon/facebook/facebook.php', 'facebook_plugin_settings'); register_hook('cron', 'addon/facebook/facebook.php', 'facebook_cron'); - register_hook('enotify', 'addon/facebook/facebook.php', 'facebook_enotify'); register_hook('queue_predeliver', 'addon/facebook/facebook.php', 'fb_queue_hook'); + + if (get_config('facebook', 'realtime_active') == 1) facebook_subscription_add_users(); // Restore settings, if the plugin was installed before } @@ -73,12 +68,13 @@ function facebook_uninstall() { unregister_hook('jot_networks', 'addon/facebook/facebook.php', 'facebook_jot_nets'); unregister_hook('connector_settings', 'addon/facebook/facebook.php', 'facebook_plugin_settings'); unregister_hook('cron', 'addon/facebook/facebook.php', 'facebook_cron'); - unregister_hook('enotify', 'addon/facebook/facebook.php', 'facebook_enotify'); unregister_hook('queue_predeliver', 'addon/facebook/facebook.php', 'fb_queue_hook'); // hook moved unregister_hook('post_local_end', 'addon/facebook/facebook.php', 'facebook_post_hook'); unregister_hook('plugin_settings', 'addon/facebook/facebook.php', 'facebook_plugin_settings'); + + if (get_config('facebook', 'realtime_active') == 1) facebook_subscription_del_users(); } @@ -154,12 +150,8 @@ function facebook_init(&$a) { $s = fetch_url('https://graph.facebook.com/me/feed?access_token=' . $access_token); if($s) { $j = json_decode($s); - if (isset($j->data)) { - logger('facebook_init: wall: ' . print_r($j,true), LOGGER_DATA); - fb_consume_stream($uid,$j,($private_wall) ? false : true); - } else { - logger('facebook_init: wall: got no data from Facebook: ' . print_r($j,true), LOGGER_NORMAL); - } + logger('facebook_init: wall: ' . print_r($j,true), LOGGER_DATA); + fb_consume_stream($uid,$j,($private_wall) ? false : true); } } @@ -597,7 +589,7 @@ function facebook_cron($a,$b) { if(strlen($a->config['admin_email']) && !get_config('facebook', 'realtime_err_mailsent')) { $res = mail($a->config['admin_email'], t('Problems with Facebook Real-Time Updates'), - "Hi!\n\nThere's a problem with the Facebook Real-Time Updates that cannot be solved automatically. Maybe an permission issue?\n\nThis e-mail will only be sent once.", + "Hi!\n\nThere's a problem with the Facebook Real-Time Updates that cannob be solved automatically. Maybe an permission issue?\n\nThis e-mail will only be sent once.", 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-transfer-encoding: 8bit' @@ -911,7 +903,6 @@ function facebook_post_hook(&$a,&$b) { dbesc('fb::' . $retj->id), intval($b['id']) ); - del_pconfig($b['uid'], 'facebook', 'session_expired_mailsent'); } else { if(! $likes) { @@ -920,25 +911,6 @@ function facebook_post_hook(&$a,&$b) { add_to_queue($a->contact,NETWORK_FACEBOOK,$s); notice( t('Facebook post failed. Queued for retry.') . EOL); } - - if (isset($retj->error) && $retj->error->type == "OAuthException" && $retj->error->code == 190) { - logger('Facebook session has expired due to changed password.', LOGGER_DEBUG); - if (!get_pconfig($b['uid'], 'facebook', 'session_expired_mailsent')) { - require_once('include/enotify.php'); - - $r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1", intval($b['uid']) ); - notification(array( - 'uid' => $b['uid'], - 'type' => NOTIFY_SYSTEM, - 'system_type' => 'facebook_connection_invalid', - 'language' => $r[0]['language'], - 'to_name' => $r[0]['username'], - 'to_email' => $r[0]['email'], - )); - - set_pconfig($b['uid'], 'facebook', 'session_expired_mailsent', '1'); - } - } } logger('Facebook post returns: ' . $x, LOGGER_DEBUG); @@ -948,13 +920,6 @@ function facebook_post_hook(&$a,&$b) { } } -function facebook_enotify(&$app, &$data) { - if (x($data, 'params') && $data['params']['type'] == NOTIFY_SYSTEM && x($data['params'], 'system_type') && $data['params']['system_type'] == 'facebook_connection_invalid') { - $data['itemlink'] = '/facebook'; - $data['epreamble'] = $data['preamble'] = t('Your Facebook connection became invalid. Please Re-authenticate.'); - $data['subject'] = t('Facebook connection became invalid'); - } -} function facebook_post_local(&$a,&$b) { @@ -1053,23 +1018,15 @@ function fb_consume_all($uid) { $s = fetch_url('https://graph.facebook.com/me/feed?access_token=' . $access_token); if($s) { $j = json_decode($s); - if (isset($j->data)) { - logger('fb_consume_stream: wall: ' . print_r($j,true), LOGGER_DATA); - fb_consume_stream($uid,$j,($private_wall) ? false : true); - } else { - logger('fb_consume_stream: wall: got no data from Facebook: ' . print_r($j,true), LOGGER_NORMAL); - } + logger('fb_consume_stream: wall: ' . print_r($j,true), LOGGER_DATA); + fb_consume_stream($uid,$j,($private_wall) ? false : true); } } $s = fetch_url('https://graph.facebook.com/me/home?access_token=' . $access_token); if($s) { $j = json_decode($s); - if (isset($j->data)) { - logger('fb_consume_stream: feed: ' . print_r($j,true), LOGGER_DATA); - fb_consume_stream($uid,$j,false); - } else { - logger('fb_consume_stream: feed: got no data from Facebook: ' . print_r($j,true), LOGGER_NORMAL); - } + logger('fb_consume_stream: feed: ' . print_r($j,true), LOGGER_DATA); + fb_consume_stream($uid,$j,false); } } diff --git a/frown.tgz b/frown.tgz deleted file mode 100644 index 6a2343f0..00000000 Binary files a/frown.tgz and /dev/null differ diff --git a/frown/frown.css b/frown/frown.css deleted file mode 100755 index 3690b62a..00000000 --- a/frown/frown.css +++ /dev/null @@ -1,14 +0,0 @@ - - - -#frown-enable-label { - float: left; - width: 200px; - margin-bottom: 25px; -} - -#frown-checkbox { - float: left; -} - - diff --git a/frown/frown.php b/frown/frown.php deleted file mode 100755 index 003039df..00000000 --- a/frown/frown.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * - */ - - -function frown_install() { - - register_hook('plugin_settings', 'addon/frown/frown.php', 'frown_settings'); - register_hook('plugin_settings_post', 'addon/frown/frown.php', 'frown_settings_post'); - - logger("installed frown"); -} - - -function frown_uninstall() { - - unregister_hook('plugin_settings', 'addon/frown/frown.php', 'frown_settings'); - unregister_hook('plugin_settings_post', 'addon/frown/frown.php', 'frown_settings_post'); - - - logger("removed frown"); -} - - - -/** - * - * Callback from the settings post function. - * $post contains the $_POST array. - * We will make sure we've got a valid user account - * and if so set our configuration setting for this person. - * - */ - -function frown_settings_post($a,$post) { - if(! local_user() || (! x($_POST,'frown-submit'))) - return; - set_pconfig(local_user(),'system','no_smilies',intval($_POST['frown'])); - - info( t('Frown settings updated.') . EOL); -} - - -/** - * - * Called from the Plugin Setting form. - * Add our own settings info to the page. - * - */ - - - -function frown_settings(&$a,&$s) { - - if(! local_user()) - return; - - /* Add our stylesheet to the page so we can make our settings look nice */ - - $a->page['htmlhead'] .= '' . "\r\n"; - - /* Get the current state of our config variable */ - - $enabled = get_pconfig(local_user(),'system','no_smilies'); - $checked = (($enabled) ? ' checked="checked" ' : ''); - - /* Add some HTML to the existing form */ - - $s .= '