X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=fbsync%2Ffbsync.php;h=07f6dcf11254e98fa6be9dc2e25f54980ce9f5ef;hb=18784a484b04b5f74e6d4dca516b2dc20cffe953;hp=32f62a4a487903baceab9d45b9cf0ded7c84f269;hpb=6c9b4c598cf057e0c02533c5e375dd583efd58a8;p=friendica-addons.git diff --git a/fbsync/fbsync.php b/fbsync/fbsync.php index 32f62a4a..07f6dcf1 100644 --- a/fbsync/fbsync.php +++ b/fbsync/fbsync.php @@ -2,8 +2,9 @@ /** * Name: Facebook Sync * Description: Synchronizes the Facebook Newsfeed - * Version: 0.0.1 alpha + * Version: 1.0 * Author: Michael Vogel + * Status: Unsupported */ /* To-Do @@ -26,6 +27,7 @@ function fbsync_install() { register_hook('connector_settings_post', 'addon/fbsync/fbsync.php', 'fbsync_settings_post'); register_hook('cron', 'addon/fbsync/fbsync.php', 'fbsync_cron'); register_hook('follow', 'addon/fbsync/fbsync.php', 'fbsync_follow'); + register_hook('expire', 'addon/fbsync/fbsync.php', 'fbsync_expire'); } function fbsync_uninstall() { @@ -33,13 +35,14 @@ function fbsync_uninstall() { unregister_hook('connector_settings_post', 'addon/fbsync/fbsync.php', 'fbsync_settings_post'); unregister_hook('cron', 'addon/fbsync/fbsync.php', 'fbsync_cron'); unregister_hook('follow', 'addon/fbsync/fbsync.php', 'fbsync_follow'); + unregister_hook('expire', 'addon/fbsync/fbsync.php', 'fbsync_expire'); } function fbsync_follow($a, &$contact) { logger("fbsync_follow: Check if contact is facebook contact. ".$contact["url"], LOGGER_DEBUG); - if (!strstr($contact["url"], "://www.facebook.com") AND !strstr($contact["url"], "://facebook.com") AND !strstr($contact["url"], "@facebook.com")) + if (!strstr($contact["url"], "://www.facebook.com") && !strstr($contact["url"], "://facebook.com") && !strstr($contact["url"], "@facebook.com")) return; // contact seems to be a facebook contact, so continue @@ -100,6 +103,9 @@ function fbsync_follow($a, &$contact) { function fbsync_settings(&$a,&$s) { + // Settings are done inside the fbpost addon + return; + if(! local_user()) return; @@ -120,11 +126,11 @@ function fbsync_settings(&$a,&$s) { /* Add some HTML to the existing form */ $s .= ''; - $s .= '

' . t('Facebook Import Settings') . '

'; + $s .= '

'. t('Facebook Import').'

'; $s .= '
'; $s .= '