From 936afb42c4240a9288252ddc272fa78a9baf4caa Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 19 Oct 2017 06:40:00 +0000 Subject: [PATCH] Removed deprecated addons --- appnet/AppDotNet.php | 1647 ----------------- appnet/DigiCertHighAssuranceEVRootCA.pem | 23 - appnet/README.md | 15 - appnet/appnet.css | 29 - appnet/appnet.php | 1358 -------------- appnet/lang/C/messages.po | 116 -- appnet/lang/cs/messages.po | 118 -- appnet/lang/cs/strings.php | 29 - appnet/lang/de/messages.po | 118 -- appnet/lang/de/strings.php | 29 - appnet/lang/es/messages.po | 118 -- appnet/lang/es/strings.php | 29 - appnet/lang/fr/messages.po | 119 -- appnet/lang/fr/strings.php | 29 - appnet/lang/it/messages.po | 118 -- appnet/lang/it/strings.php | 29 - appnet/lang/nl/messages.po | 118 -- appnet/lang/nl/strings.php | 29 - appnet/lang/pt-br/messages.po | 119 -- appnet/lang/pt-br/strings.php | 29 - appnet/lang/ro/messages.po | 117 -- appnet/lang/ro/strings.php | 29 - appnet/lang/ru/messages.po | 118 -- appnet/lang/ru/strings.php | 29 - appnet/templates/admin.tpl | 3 - cal/LICENSE | 19 - cal/README.md | 29 - cal/cal.php | 200 -- cal/lang/C/messages.po | 54 - cal/lang/C/strings.php | 12 - cal/lang/cs/messages.po | 56 - cal/lang/cs/strings.php | 16 - cal/lang/de/messages.po | 56 - cal/lang/de/strings.php | 16 - cal/lang/es/messages.po | 55 - cal/lang/es/strings.php | 16 - cal/lang/fr/messages.po | 56 - cal/lang/fr/strings.php | 16 - cal/lang/it/messages.po | 56 - cal/lang/it/strings.php | 16 - cal/lang/pt-br/messages.po | 57 - cal/lang/pt-br/strings.php | 16 - cal/lang/ro/messages.po | 56 - cal/lang/ro/strings.php | 16 - cal/lang/ru/messages.po | 56 - cal/lang/ru/strings.php | 16 - cal/lang/zh-cn/messages.po | 56 - cal/lang/zh-cn/strings.php | 16 - convpath/README | 7 - convpath/convpath.php | 102 -- convpath/lang/C/messages.po | 0 defaultfeatures/README | 7 - defaultfeatures/defaultfeatures.php | 60 - defaultfeatures/lang/C/messages.po | 34 - defaultfeatures/templates/admin.tpl | 14 - editplain/editplain.css | 14 - editplain/editplain.php | 86 - editplain/lang/C/messages.po | 34 - editplain/lang/ca/strings.php | 6 - editplain/lang/cs/messages.po | 36 - editplain/lang/cs/strings.php | 11 - editplain/lang/de/messages.po | 37 - editplain/lang/de/strings.php | 11 - editplain/lang/eo/strings.php | 6 - editplain/lang/es/messages.po | 36 - editplain/lang/es/strings.php | 11 - editplain/lang/fr/messages.po | 36 - editplain/lang/fr/strings.php | 11 - editplain/lang/is/strings.php | 6 - editplain/lang/it/messages.po | 36 - editplain/lang/it/strings.php | 11 - editplain/lang/nb-no/strings.php | 6 - editplain/lang/pl/strings.php | 6 - editplain/lang/pt-br/strings.php | 6 - editplain/lang/ro/messages.po | 36 - editplain/lang/ro/strings.php | 11 - editplain/lang/ru/messages.po | 36 - editplain/lang/ru/strings.php | 11 - editplain/lang/sv/strings.php | 3 - editplain/lang/zh-cn/strings.php | 6 - extcron/extcron.php | 29 - extcron/lang/C/messages.po | 0 facebook/README.md | 19 - facebook/facebook.css | 13 - facebook/facebook.php | 2140 ---------------------- facebook/lang/C/messages.po | 253 --- facebook/lang/ca/strings.php | 49 - facebook/lang/cs/strings.php | 49 - facebook/lang/de/strings.php | 49 - facebook/lang/eo/strings.php | 49 - facebook/lang/es/strings.php | 49 - facebook/lang/fr/strings.php | 49 - facebook/lang/is/strings.php | 49 - facebook/lang/it/strings.php | 49 - facebook/lang/nb-no/strings.php | 49 - facebook/lang/pl/strings.php | 49 - facebook/lang/pt-br/strings.php | 49 - facebook/lang/ru/strings.php | 49 - facebook/lang/sv/strings.php | 14 - facebook/lang/zh-cn/strings.php | 49 - facebook_restrict/facebook_restrict.php | 19 - facebook_restrict/lang/C/messages.po | 0 fbpost/README.md | 14 - fbpost/fbpost.css | 13 - fbpost/fbpost.php | 1240 ------------- fbpost/lang/C/messages.po | 156 -- fbpost/lang/ca/strings.php | 32 - fbpost/lang/cs/strings.php | 31 - fbpost/lang/de/strings.php | 32 - fbpost/lang/eo/strings.php | 28 - fbpost/lang/es/strings.php | 28 - fbpost/lang/fr/strings.php | 28 - fbpost/lang/is/strings.php | 28 - fbpost/lang/it/strings.php | 32 - fbpost/lang/nb-no/strings.php | 28 - fbpost/lang/pl/strings.php | 32 - fbpost/lang/pt-br/strings.php | 28 - fbpost/lang/ru/strings.php | 28 - fbpost/lang/sv/strings.php | 10 - fbpost/lang/zh-cn/strings.php | 32 - fbsync/README.md | 5 - fbsync/fbsync.css | 15 - fbsync/fbsync.php | 1146 ------------ fbsync/lang/C/messages.po | 43 - forumlist/forumlist.css | 22 - forumlist/forumlist.php | 188 -- forumlist/lang/C/messages.po | 58 - forumlist/lang/ca/strings.php | 12 - forumlist/lang/cs/messages.po | 60 - forumlist/lang/cs/strings.php | 17 - forumlist/lang/de/messages.po | 61 - forumlist/lang/de/strings.php | 17 - forumlist/lang/eo/strings.php | 9 - forumlist/lang/es/messages.po | 60 - forumlist/lang/es/strings.php | 17 - forumlist/lang/fr/strings.php | 12 - forumlist/lang/is/strings.php | 9 - forumlist/lang/it/messages.po | 60 - forumlist/lang/it/strings.php | 17 - forumlist/lang/nb-no/strings.php | 12 - forumlist/lang/pl/strings.php | 12 - forumlist/lang/pt-br/strings.php | 12 - forumlist/lang/ro/messages.po | 60 - forumlist/lang/ro/strings.php | 17 - forumlist/lang/ru/messages.po | 60 - forumlist/lang/ru/strings.php | 17 - forumlist/lang/sv/messages.po | 60 - forumlist/lang/sv/strings.php | 17 - forumlist/lang/zh-cn/strings.php | 12 - gpluspost/.gitignore | 2 - gpluspost/gpluspost.css | 19 - gpluspost/gpluspost.php | 576 ------ gpluspost/lang/C/messages.po | 66 - gpluspost/lang/cs/messages.po | 68 - gpluspost/lang/cs/strings.php | 19 - gpluspost/lang/de/messages.po | 68 - gpluspost/lang/de/strings.php | 19 - gpluspost/lang/es/messages.po | 68 - gpluspost/lang/es/strings.php | 19 - gpluspost/lang/it/messages.po | 68 - gpluspost/lang/it/strings.php | 19 - gpluspost/lang/pt-br/messages.po | 68 - gpluspost/lang/pt-br/strings.php | 19 - gpluspost/lang/ro/messages.po | 67 - gpluspost/lang/ro/strings.php | 19 - gpluspost/lang/ru/messages.po | 68 - gpluspost/lang/ru/strings.php | 19 - poormancron/lang/C/messages.po | 0 poormancron/poormancron.php | 69 - posterous/lang/C/messages.po | 58 - posterous/lang/ca/strings.php | 12 - posterous/lang/cs/strings.php | 12 - posterous/lang/de/strings.php | 12 - posterous/lang/eo/strings.php | 12 - posterous/lang/es/strings.php | 12 - posterous/lang/fr/strings.php | 12 - posterous/lang/is/strings.php | 12 - posterous/lang/it/strings.php | 12 - posterous/lang/nb-no/strings.php | 12 - posterous/lang/pl/strings.php | 12 - posterous/lang/pt-br/strings.php | 12 - posterous/lang/ru/strings.php | 12 - posterous/lang/sv/strings.php | 3 - posterous/lang/zh-cn/strings.php | 12 - posterous/posterous.css | 16 - posterous/posterous.php | 215 --- procrunner/lang/C/messages.po | 0 procrunner/procrunner.php | 55 - retriever/README | 5 - retriever/database.sql | 36 - retriever/lang/C/messages.po | 102 -- retriever/retriever.php | 839 --------- retriever/templates/extract.tpl | 31 - retriever/templates/fix-urls.tpl | 26 - retriever/templates/help.tpl | 148 -- retriever/templates/rule-config.tpl | 112 -- retriever/templates/settings.tpl | 9 - snautofollow/lang/C/messages.po | 34 - snautofollow/lang/ca/strings.php | 6 - snautofollow/lang/cs/messages.po | 36 - snautofollow/lang/cs/strings.php | 11 - snautofollow/lang/de/messages.po | 36 - snautofollow/lang/de/strings.php | 11 - snautofollow/lang/eo/strings.php | 6 - snautofollow/lang/es/messages.po | 36 - snautofollow/lang/es/strings.php | 11 - snautofollow/lang/fr/strings.php | 6 - snautofollow/lang/is/strings.php | 6 - snautofollow/lang/it/messages.po | 36 - snautofollow/lang/it/strings.php | 11 - snautofollow/lang/nb-no/strings.php | 6 - snautofollow/lang/pl/strings.php | 6 - snautofollow/lang/pt-br/strings.php | 6 - snautofollow/lang/ro/messages.po | 35 - snautofollow/lang/ro/strings.php | 11 - snautofollow/lang/ru/strings.php | 6 - snautofollow/lang/sv/strings.php | 3 - snautofollow/lang/zh-cn/strings.php | 6 - snautofollow/snautofollow.css | 14 - snautofollow/snautofollow.php | 71 - statistics_json/README.md | 14 - statistics_json/lang/C/messages.po | 0 statistics_json/statistics_json.php | 148 -- twitter/twitter.php | 14 +- uhremotestorage/lang/C/messages.po | 42 - uhremotestorage/lang/ca/strings.php | 7 - uhremotestorage/lang/cs/messages.po | 45 - uhremotestorage/lang/cs/strings.php | 12 - uhremotestorage/lang/de/messages.po | 45 - uhremotestorage/lang/de/strings.php | 12 - uhremotestorage/lang/eo/strings.php | 7 - uhremotestorage/lang/es/messages.po | 45 - uhremotestorage/lang/es/strings.php | 12 - uhremotestorage/lang/fr/strings.php | 7 - uhremotestorage/lang/is/strings.php | 7 - uhremotestorage/lang/it/messages.po | 45 - uhremotestorage/lang/it/strings.php | 12 - uhremotestorage/lang/nb-no/strings.php | 7 - uhremotestorage/lang/pl/strings.php | 7 - uhremotestorage/lang/pt-br/strings.php | 7 - uhremotestorage/lang/ro/messages.po | 44 - uhremotestorage/lang/ro/strings.php | 12 - uhremotestorage/lang/ru/strings.php | 7 - uhremotestorage/lang/sv/strings.php | 3 - uhremotestorage/lang/zh-cn/strings.php | 7 - uhremotestorage/templates/settings.tpl | 9 - uhremotestorage/uhremotestorage.php | 93 - 247 files changed, 13 insertions(+), 17479 deletions(-) delete mode 100644 appnet/AppDotNet.php delete mode 100644 appnet/DigiCertHighAssuranceEVRootCA.pem delete mode 100644 appnet/README.md delete mode 100755 appnet/appnet.css delete mode 100644 appnet/appnet.php delete mode 100644 appnet/lang/C/messages.po delete mode 100644 appnet/lang/cs/messages.po delete mode 100644 appnet/lang/cs/strings.php delete mode 100644 appnet/lang/de/messages.po delete mode 100644 appnet/lang/de/strings.php delete mode 100644 appnet/lang/es/messages.po delete mode 100644 appnet/lang/es/strings.php delete mode 100644 appnet/lang/fr/messages.po delete mode 100644 appnet/lang/fr/strings.php delete mode 100644 appnet/lang/it/messages.po delete mode 100644 appnet/lang/it/strings.php delete mode 100644 appnet/lang/nl/messages.po delete mode 100644 appnet/lang/nl/strings.php delete mode 100644 appnet/lang/pt-br/messages.po delete mode 100644 appnet/lang/pt-br/strings.php delete mode 100644 appnet/lang/ro/messages.po delete mode 100644 appnet/lang/ro/strings.php delete mode 100644 appnet/lang/ru/messages.po delete mode 100644 appnet/lang/ru/strings.php delete mode 100644 appnet/templates/admin.tpl delete mode 100644 cal/LICENSE delete mode 100644 cal/README.md delete mode 100644 cal/cal.php delete mode 100644 cal/lang/C/messages.po delete mode 100644 cal/lang/C/strings.php delete mode 100644 cal/lang/cs/messages.po delete mode 100644 cal/lang/cs/strings.php delete mode 100644 cal/lang/de/messages.po delete mode 100644 cal/lang/de/strings.php delete mode 100644 cal/lang/es/messages.po delete mode 100644 cal/lang/es/strings.php delete mode 100644 cal/lang/fr/messages.po delete mode 100644 cal/lang/fr/strings.php delete mode 100644 cal/lang/it/messages.po delete mode 100644 cal/lang/it/strings.php delete mode 100644 cal/lang/pt-br/messages.po delete mode 100644 cal/lang/pt-br/strings.php delete mode 100644 cal/lang/ro/messages.po delete mode 100644 cal/lang/ro/strings.php delete mode 100644 cal/lang/ru/messages.po delete mode 100644 cal/lang/ru/strings.php delete mode 100644 cal/lang/zh-cn/messages.po delete mode 100644 cal/lang/zh-cn/strings.php delete mode 100755 convpath/README delete mode 100644 convpath/convpath.php delete mode 100644 convpath/lang/C/messages.po delete mode 100644 defaultfeatures/README delete mode 100755 defaultfeatures/defaultfeatures.php delete mode 100644 defaultfeatures/lang/C/messages.po delete mode 100644 defaultfeatures/templates/admin.tpl delete mode 100755 editplain/editplain.css delete mode 100755 editplain/editplain.php delete mode 100644 editplain/lang/C/messages.po delete mode 100644 editplain/lang/ca/strings.php delete mode 100644 editplain/lang/cs/messages.po delete mode 100644 editplain/lang/cs/strings.php delete mode 100644 editplain/lang/de/messages.po delete mode 100644 editplain/lang/de/strings.php delete mode 100644 editplain/lang/eo/strings.php delete mode 100644 editplain/lang/es/messages.po delete mode 100644 editplain/lang/es/strings.php delete mode 100644 editplain/lang/fr/messages.po delete mode 100644 editplain/lang/fr/strings.php delete mode 100644 editplain/lang/is/strings.php delete mode 100644 editplain/lang/it/messages.po delete mode 100644 editplain/lang/it/strings.php delete mode 100644 editplain/lang/nb-no/strings.php delete mode 100644 editplain/lang/pl/strings.php delete mode 100644 editplain/lang/pt-br/strings.php delete mode 100644 editplain/lang/ro/messages.po delete mode 100644 editplain/lang/ro/strings.php delete mode 100644 editplain/lang/ru/messages.po delete mode 100644 editplain/lang/ru/strings.php delete mode 100644 editplain/lang/sv/strings.php delete mode 100644 editplain/lang/zh-cn/strings.php delete mode 100755 extcron/extcron.php delete mode 100644 extcron/lang/C/messages.po delete mode 100755 facebook/README.md delete mode 100755 facebook/facebook.css delete mode 100644 facebook/facebook.php delete mode 100644 facebook/lang/C/messages.po delete mode 100644 facebook/lang/ca/strings.php delete mode 100644 facebook/lang/cs/strings.php delete mode 100644 facebook/lang/de/strings.php delete mode 100644 facebook/lang/eo/strings.php delete mode 100644 facebook/lang/es/strings.php delete mode 100644 facebook/lang/fr/strings.php delete mode 100644 facebook/lang/is/strings.php delete mode 100644 facebook/lang/it/strings.php delete mode 100644 facebook/lang/nb-no/strings.php delete mode 100644 facebook/lang/pl/strings.php delete mode 100644 facebook/lang/pt-br/strings.php delete mode 100644 facebook/lang/ru/strings.php delete mode 100644 facebook/lang/sv/strings.php delete mode 100644 facebook/lang/zh-cn/strings.php delete mode 100644 facebook_restrict/facebook_restrict.php delete mode 100644 facebook_restrict/lang/C/messages.po delete mode 100644 fbpost/README.md delete mode 100644 fbpost/fbpost.css delete mode 100644 fbpost/fbpost.php delete mode 100644 fbpost/lang/C/messages.po delete mode 100644 fbpost/lang/ca/strings.php delete mode 100644 fbpost/lang/cs/strings.php delete mode 100644 fbpost/lang/de/strings.php delete mode 100644 fbpost/lang/eo/strings.php delete mode 100644 fbpost/lang/es/strings.php delete mode 100644 fbpost/lang/fr/strings.php delete mode 100644 fbpost/lang/is/strings.php delete mode 100644 fbpost/lang/it/strings.php delete mode 100644 fbpost/lang/nb-no/strings.php delete mode 100644 fbpost/lang/pl/strings.php delete mode 100644 fbpost/lang/pt-br/strings.php delete mode 100644 fbpost/lang/ru/strings.php delete mode 100644 fbpost/lang/sv/strings.php delete mode 100644 fbpost/lang/zh-cn/strings.php delete mode 100644 fbsync/README.md delete mode 100755 fbsync/fbsync.css delete mode 100644 fbsync/fbsync.php delete mode 100644 fbsync/lang/C/messages.po delete mode 100644 forumlist/forumlist.css delete mode 100644 forumlist/forumlist.php delete mode 100644 forumlist/lang/C/messages.po delete mode 100644 forumlist/lang/ca/strings.php delete mode 100644 forumlist/lang/cs/messages.po delete mode 100644 forumlist/lang/cs/strings.php delete mode 100644 forumlist/lang/de/messages.po delete mode 100644 forumlist/lang/de/strings.php delete mode 100644 forumlist/lang/eo/strings.php delete mode 100644 forumlist/lang/es/messages.po delete mode 100644 forumlist/lang/es/strings.php delete mode 100644 forumlist/lang/fr/strings.php delete mode 100644 forumlist/lang/is/strings.php delete mode 100644 forumlist/lang/it/messages.po delete mode 100644 forumlist/lang/it/strings.php delete mode 100644 forumlist/lang/nb-no/strings.php delete mode 100644 forumlist/lang/pl/strings.php delete mode 100644 forumlist/lang/pt-br/strings.php delete mode 100644 forumlist/lang/ro/messages.po delete mode 100644 forumlist/lang/ro/strings.php delete mode 100644 forumlist/lang/ru/messages.po delete mode 100644 forumlist/lang/ru/strings.php delete mode 100644 forumlist/lang/sv/messages.po delete mode 100644 forumlist/lang/sv/strings.php delete mode 100644 forumlist/lang/zh-cn/strings.php delete mode 100644 gpluspost/.gitignore delete mode 100755 gpluspost/gpluspost.css delete mode 100644 gpluspost/gpluspost.php delete mode 100644 gpluspost/lang/C/messages.po delete mode 100644 gpluspost/lang/cs/messages.po delete mode 100644 gpluspost/lang/cs/strings.php delete mode 100644 gpluspost/lang/de/messages.po delete mode 100644 gpluspost/lang/de/strings.php delete mode 100644 gpluspost/lang/es/messages.po delete mode 100644 gpluspost/lang/es/strings.php delete mode 100644 gpluspost/lang/it/messages.po delete mode 100644 gpluspost/lang/it/strings.php delete mode 100644 gpluspost/lang/pt-br/messages.po delete mode 100644 gpluspost/lang/pt-br/strings.php delete mode 100644 gpluspost/lang/ro/messages.po delete mode 100644 gpluspost/lang/ro/strings.php delete mode 100644 gpluspost/lang/ru/messages.po delete mode 100644 gpluspost/lang/ru/strings.php delete mode 100644 poormancron/lang/C/messages.po delete mode 100755 poormancron/poormancron.php delete mode 100644 posterous/lang/C/messages.po delete mode 100644 posterous/lang/ca/strings.php delete mode 100644 posterous/lang/cs/strings.php delete mode 100644 posterous/lang/de/strings.php delete mode 100644 posterous/lang/eo/strings.php delete mode 100644 posterous/lang/es/strings.php delete mode 100644 posterous/lang/fr/strings.php delete mode 100644 posterous/lang/is/strings.php delete mode 100644 posterous/lang/it/strings.php delete mode 100644 posterous/lang/nb-no/strings.php delete mode 100644 posterous/lang/pl/strings.php delete mode 100644 posterous/lang/pt-br/strings.php delete mode 100644 posterous/lang/ru/strings.php delete mode 100644 posterous/lang/sv/strings.php delete mode 100644 posterous/lang/zh-cn/strings.php delete mode 100755 posterous/posterous.css delete mode 100755 posterous/posterous.php delete mode 100644 procrunner/lang/C/messages.po delete mode 100755 procrunner/procrunner.php delete mode 100644 retriever/README delete mode 100644 retriever/database.sql delete mode 100644 retriever/lang/C/messages.po delete mode 100644 retriever/retriever.php delete mode 100644 retriever/templates/extract.tpl delete mode 100644 retriever/templates/fix-urls.tpl delete mode 100644 retriever/templates/help.tpl delete mode 100644 retriever/templates/rule-config.tpl delete mode 100644 retriever/templates/settings.tpl delete mode 100644 snautofollow/lang/C/messages.po delete mode 100644 snautofollow/lang/ca/strings.php delete mode 100644 snautofollow/lang/cs/messages.po delete mode 100644 snautofollow/lang/cs/strings.php delete mode 100644 snautofollow/lang/de/messages.po delete mode 100644 snautofollow/lang/de/strings.php delete mode 100644 snautofollow/lang/eo/strings.php delete mode 100644 snautofollow/lang/es/messages.po delete mode 100644 snautofollow/lang/es/strings.php delete mode 100644 snautofollow/lang/fr/strings.php delete mode 100644 snautofollow/lang/is/strings.php delete mode 100644 snautofollow/lang/it/messages.po delete mode 100644 snautofollow/lang/it/strings.php delete mode 100644 snautofollow/lang/nb-no/strings.php delete mode 100644 snautofollow/lang/pl/strings.php delete mode 100644 snautofollow/lang/pt-br/strings.php delete mode 100644 snautofollow/lang/ro/messages.po delete mode 100644 snautofollow/lang/ro/strings.php delete mode 100644 snautofollow/lang/ru/strings.php delete mode 100644 snautofollow/lang/sv/strings.php delete mode 100644 snautofollow/lang/zh-cn/strings.php delete mode 100644 snautofollow/snautofollow.css delete mode 100644 snautofollow/snautofollow.php delete mode 100644 statistics_json/README.md delete mode 100644 statistics_json/lang/C/messages.po delete mode 100644 statistics_json/statistics_json.php delete mode 100644 uhremotestorage/lang/C/messages.po delete mode 100644 uhremotestorage/lang/ca/strings.php delete mode 100644 uhremotestorage/lang/cs/messages.po delete mode 100644 uhremotestorage/lang/cs/strings.php delete mode 100644 uhremotestorage/lang/de/messages.po delete mode 100644 uhremotestorage/lang/de/strings.php delete mode 100644 uhremotestorage/lang/eo/strings.php delete mode 100644 uhremotestorage/lang/es/messages.po delete mode 100644 uhremotestorage/lang/es/strings.php delete mode 100644 uhremotestorage/lang/fr/strings.php delete mode 100644 uhremotestorage/lang/is/strings.php delete mode 100644 uhremotestorage/lang/it/messages.po delete mode 100644 uhremotestorage/lang/it/strings.php delete mode 100644 uhremotestorage/lang/nb-no/strings.php delete mode 100644 uhremotestorage/lang/pl/strings.php delete mode 100644 uhremotestorage/lang/pt-br/strings.php delete mode 100644 uhremotestorage/lang/ro/messages.po delete mode 100644 uhremotestorage/lang/ro/strings.php delete mode 100644 uhremotestorage/lang/ru/strings.php delete mode 100644 uhremotestorage/lang/sv/strings.php delete mode 100644 uhremotestorage/lang/zh-cn/strings.php delete mode 100644 uhremotestorage/templates/settings.tpl delete mode 100755 uhremotestorage/uhremotestorage.php diff --git a/appnet/AppDotNet.php b/appnet/AppDotNet.php deleted file mode 100644 index 32361314..00000000 --- a/appnet/AppDotNet.php +++ /dev/null @@ -1,1647 +0,0 @@ -_clientId = $client_id; - $this->_clientSecret = $client_secret; - - // if the digicert certificate exists in the same folder as this file, - // remember that fact for later - if (file_exists(dirname(__FILE__).'/DigiCertHighAssuranceEVRootCA.pem')) { - $this->_sslCA = dirname(__FILE__).'/DigiCertHighAssuranceEVRootCA.pem'; - } - } - - /** - * Set whether or not to strip Envelope Response (meta) information - * This option will be deprecated in the future. Is it to allow - * a stepped migration path between code expecting the old behavior - * and new behavior. When not stripped, you still can use the proper - * method to pull the meta information. Please start converting your code ASAP - */ - public function includeResponseEnvelope() { - $this->_stripResponseEnvelope=false; - } - - /** - * Construct the proper Auth URL for the user to visit and either grant - * or not access to your app. Usually you would place this as a link for - * the user to client, or a redirect to send them to the auth URL. - * Also can be called after authentication for additional scopes - * @param string $callbackUri Where you want the user to be directed - * after authenticating with App.net. This must be one of the URIs - * allowed by your App.net application settings. - * @param array $scope An array of scopes (permissions) you wish to obtain - * from the user. Currently options are stream, email, write_post, follow, - * messages, and export. If you don't specify anything, you'll only receive - * access to the user's basic profile (the default). - */ - public function getAuthUrl($callback_uri,$scope=null) { - - // construct an authorization url based on our client id and other data - $data = array( - 'client_id'=>$this->_clientId, - 'response_type'=>'code', - 'redirect_uri'=>$callback_uri, - ); - - $url = $this->_authUrl; - if ($this->_accessToken) { - $url .= 'authorize?'; - } else { - $url .= 'authenticate?'; - } - $url .= $this->buildQueryString($data); - - if ($scope) { - $url .= '&scope='.implode('+',$scope); - } - - // return the constructed url - return $url; - } - - /** - * Call this after they return from the auth page, or anytime you need the - * token. For example, you could store it in a database and use - * setAccessToken() later on to return on behalf of the user. - */ - public function getAccessToken($callback_uri) { - // if there's no access token set, and they're returning from - // the auth page with a code, use the code to get a token - if (!$this->_accessToken && isset($_GET['code']) && $_GET['code']) { - - // construct the necessary elements to get a token - $data = array( - 'client_id'=>$this->_clientId, - 'client_secret'=>$this->_clientSecret, - 'grant_type'=>'authorization_code', - 'redirect_uri'=>$callback_uri, - 'code'=>$_GET['code'] - ); - - // try and fetch the token with the above data - $res = $this->httpReq('post',$this->_authUrl.'access_token', $data); - - // store it for later - $this->_accessToken = $res['access_token']; - $this->_username = $res['username']; - $this->_user_id = $res['user_id']; - } - - // return what we have (this may be a token, or it may be nothing) - return $this->_accessToken; - } - - /** - * Check the scope of current token to see if it has required scopes - * has to be done after a check - */ - public function checkScopes($app_scopes) { - if (!count($this->_scopes)) { - return -1; // _scope is empty - } - $missing=array(); - foreach($app_scopes as $scope) { - if (!in_array($scope,$this->_scopes)) { - if ($scope=='public_messages') { - // messages works for public_messages - if (in_array('messages',$this->_scopes)) { - // if we have messages in our scopes - continue; - } - } - $missing[]=$scope; - } - } - // identify the ones missing - if (count($missing)) { - // do something - return $missing; - } - return 0; // 0 missing - } - - /** - * Set the access token (eg: after retrieving it from offline storage) - * @param string $token A valid access token you're previously received - * from calling getAccessToken(). - */ - public function setAccessToken($token) { - $this->_accessToken = $token; - } - - /** - * Deauthorize the current token (delete your authorization from the API) - * Generally this is useful for logging users out from a web app, so they - * don't get automatically logged back in the next time you redirect them - * to the authorization URL. - */ - public function deauthorizeToken() { - return $this->httpReq('delete',$this->_baseUrl.'token'); - } - - /** - * Retrieve an app access token from the app.net API. This allows you - * to access the API without going through the user access flow if you - * just want to (eg) consume global. App access tokens are required for - * some actions (like streaming global). DO NOT share the return value - * of this function with any user (or save it in a cookie, etc). This - * is considered secret info for your app only. - * @return string The app access token - */ - public function getAppAccessToken() { - - // construct the necessary elements to get a token - $data = array( - 'client_id'=>$this->_clientId, - 'client_secret'=>$this->_clientSecret, - 'grant_type'=>'client_credentials', - ); - - // try and fetch the token with the above data - $res = $this->httpReq('post',$this->_authUrl.'access_token', $data); - - // store it for later - $this->_appAccessToken = $res['access_token']; - $this->_accessToken = $res['access_token']; - $this->_username = null; - $this->_user_id = null; - - return $this->_accessToken; - } - - /** - * Returns the total number of requests you're allowed within the - * alloted time period. - * @see getRateLimitReset() - */ - public function getRateLimit() { - return $this->_rateLimit; - } - - /** - * The number of requests you have remaining within the alloted time period - * @see getRateLimitReset() - */ - public function getRateLimitRemaining() { - return $this->_rateLimitRemaining; - } - - /** - * The number of seconds remaining in the alloted time period. - * When this time is up you'll have getRateLimit() available again. - */ - public function getRateLimitReset() { - return $this->_rateLimitReset; - } - - /** - * The scope the user has - */ - public function getScope() { - return $this->_scope; - } - - /** - * Internal function, parses out important information App.net adds - * to the headers. - */ - protected function parseHeaders($response) { - // take out the headers - // set internal variables - // return the body/content - $this->_rateLimit = null; - $this->_rateLimitRemaining = null; - $this->_rateLimitReset = null; - $this->_scope = null; - - $response = explode("\r\n\r\n",$response,2); - $headers = $response[0]; - - if($headers == 'HTTP/1.1 100 Continue') { - $response = explode("\r\n\r\n",$response[1],2); - $headers = $response[0]; - } - - if (isset($response[1])) { - $content = $response[1]; - } - else { - $content = null; - } - - // this is not a good way to parse http headers - // it will not (for example) take into account multiline headers - // but what we're looking for is pretty basic, so we can ignore those shortcomings - $headers = explode("\r\n",$headers); - foreach ($headers as $header) { - $header = explode(': ',$header,2); - if (count($header)<2) { - continue; - } - list($k,$v) = $header; - switch ($k) { - case 'X-RateLimit-Remaining': - $this->_rateLimitRemaining = $v; - break; - case 'X-RateLimit-Limit': - $this->_rateLimit = $v; - break; - case 'X-RateLimit-Reset': - $this->_rateLimitReset = $v; - break; - case 'X-OAuth-Scopes': - $this->_scope = $v; - $this->_scopes=explode(',',$v); - break; - } - } - return $content; - } - - /** - * Internal function. Used to turn things like TRUE into 1, and then - * calls http_build_query. - */ - protected function buildQueryString($array) { - foreach ($array as $k=>&$v) { - if ($v===true) { - $v = '1'; - } - elseif ($v===false) { - $v = '0'; - } - unset($v); - } - return http_build_query($array); - } - - - /** - * Internal function to handle all - * HTTP requests (POST,PUT,GET,DELETE) - */ - protected function httpReq($act, $req, $params=array(),$contentType='application/x-www-form-urlencoded') { - $ch = curl_init($req); - $headers = array(); - if($act != 'get') { - curl_setopt($ch, CURLOPT_POST, true); - // if they passed an array, build a list of parameters from it - if (is_array($params) && $act != 'post-raw') { - $params = $this->buildQueryString($params); - } - curl_setopt($ch, CURLOPT_POSTFIELDS, $params); - $headers[] = "Content-Type: ".$contentType; - } - if($act != 'post' && $act != 'post-raw') { - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($act)); - } - if($act == 'get' && isset($params['access_token'])) { - $headers[] = 'Authorization: Bearer '.$params['access_token']; - } - else if ($this->_accessToken) { - $headers[] = 'Authorization: Bearer '.$this->_accessToken; - } - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLINFO_HEADER_OUT, true); - curl_setopt($ch, CURLOPT_HEADER, true); - if ($this->_sslCA) { - curl_setopt($ch, CURLOPT_CAINFO, $this->_sslCA); - } - $this->_last_response = curl_exec($ch); - $this->_last_request = curl_getinfo($ch,CURLINFO_HEADER_OUT); - $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE); - curl_close($ch); - if ($http_status==0) { - throw new AppDotNetException('Unable to connect to '.$req); - } - if ($http_status<200 || $http_status>=300) { - throw new AppDotNetException('HTTP error '.$this->_last_response); - } - if ($this->_last_request===false) { - if (!curl_getinfo($ch,CURLINFO_SSL_VERIFYRESULT)) { - throw new AppDotNetException('SSL verification failed, connection terminated.'); - } - } - $response = $this->parseHeaders($this->_last_response); - $response = json_decode($response,true); - - if (isset($response['meta'])) { - if (isset($response['meta']['max_id'])) { - $this->_maxid=$response['meta']['max_id']; - $this->_minid=$response['meta']['min_id']; - } - if (isset($response['meta']['more'])) { - $this->_more=$response['meta']['more']; - } - if (isset($response['meta']['marker'])) { - $this->_last_marker=$response['meta']['marker']; - } - } - - // look for errors - if (isset($response['error'])) { - if (is_array($response['error'])) { - throw new AppDotNetException($response['error']['message'], - $response['error']['code']); - } - else { - throw new AppDotNetException($response['error']); - } - } - - // look for response migration errors - elseif (isset($response['meta']) && isset($response['meta']['error_message'])) { - throw new AppDotNetException($response['meta']['error_message'],$response['meta']['code']); - } - - // if we've received a migration response, handle it and return data only - elseif ($this->_stripResponseEnvelope && isset($response['meta']) && isset($response['data'])) { - return $response['data']; - } - - // else non response migration response, just return it - else { - return $response; - } - } - - - /** - * Get max_id from last meta response data envelope - */ - public function getResponseMaxID() { - return $this->_maxid; - } - - /** - * Get min_id from last meta response data envelope - */ - public function getResponseMinID() { - return $this->_minid; - } - - /** - * Get more from last meta response data envelope - */ - public function getResponseMore() { - return $this->_more; - } - - /** - * Get marker from last meta response data envelope - */ - public function getResponseMarker() { - return $this->_last_marker; - } - - /** - * Fetch API configuration object - */ - public function getConfig() { - return $this->httpReq('get',$this->_baseUrl.'config'); - } - - /** - * Return the Filters for the current user. - */ - public function getAllFilters() { - return $this->httpReq('get',$this->_baseUrl.'filters'); - } - - /** - * Create a Filter for the current user. - * @param string $name The name of the new filter - * @param array $filters An associative array of filters to be applied. - * This may change as the API evolves, as of this writing possible - * values are: user_ids, hashtags, link_domains, and mention_user_ids. - * You will need to provide at least one filter name=>value pair. - */ - public function createFilter($name='New filter', $filters=array()) { - $filters['name'] = $name; - return $this->httpReq('post',$this->_baseUrl.'filters',$filters); - } - - /** - * Returns a specific Filter object. - * @param integer $filter_id The ID of the filter you wish to retrieve. - */ - public function getFilter($filter_id=null) { - return $this->httpReq('get',$this->_baseUrl.'filters/'.urlencode($filter_id)); - } - - /** - * Delete a Filter. The Filter must belong to the current User. - * @return object Returns the deleted Filter on success. - */ - public function deleteFilter($filter_id=null) { - return $this->httpReq('delete',$this->_baseUrl.'filters/'.urlencode($filter_id)); - } - - /** - * Process user description, message or post text. - * Mentions and hashtags will be parsed out of the - * text, as will bare URLs. To create a link in the text without using a - * bare URL, include the anchor text in the object text and include a link - * entity in the function call. - * @param string $text The text of the description/message/post - * @param array $data An associative array of optional post data. This - * will likely change as the API evolves, as of this writing allowed keys are: - * reply_to, and annotations. "annotations" may be a complex object represented - * by an associative array. - * @param array $params An associative array of optional data to be included - * in the URL (such as 'include_annotations' and 'include_machine') - * @return array An associative array representing the post. - */ - public function processText($text=null, $data = array(), $params = array()) { - $data['text'] = $text; - $json = json_encode($data); - $qs = ''; - if (!empty($params)) { - $qs = '?'.$this->buildQueryString($params); - } - return $this->httpReq('post',$this->_baseUrl.'text/process'.$qs, $json, 'application/json'); - } - - /** - * Create a new Post object. Mentions and hashtags will be parsed out of the - * post text, as will bare URLs. To create a link in a post without using a - * bare URL, include the anchor text in the post's text and include a link - * entity in the post creation call. - * @param string $text The text of the post - * @param array $data An associative array of optional post data. This - * will likely change as the API evolves, as of this writing allowed keys are: - * reply_to, and annotations. "annotations" may be a complex object represented - * by an associative array. - * @param array $params An associative array of optional data to be included - * in the URL (such as 'include_annotations' and 'include_machine') - * @return array An associative array representing the post. - */ - public function createPost($text=null, $data = array(), $params = array()) { - $data['text'] = $text; - - $json = json_encode($data); - $qs = ''; - if (!empty($params)) { - $qs = '?'.$this->buildQueryString($params); - } - return $this->httpReq('post',$this->_baseUrl.'posts'.$qs, $json, 'application/json'); - } - - /** - * Returns a specific Post. - * @param integer $post_id The ID of the post to retrieve - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_annotations. - * @return array An associative array representing the post - */ - public function getPost($post_id=null,$params = array()) { - return $this->httpReq('get',$this->_baseUrl.'posts/'.urlencode($post_id) - .'?'.$this->buildQueryString($params)); - } - - /** - * Delete a Post. The current user must be the same user who created the Post. - * It returns the deleted Post on success. - * @param integer $post_id The ID of the post to delete - * @param array An associative array representing the post that was deleted - */ - public function deletePost($post_id=null) { - return $this->httpReq('delete',$this->_baseUrl.'posts/'.urlencode($post_id)); - } - - /** - * Retrieve the Posts that are 'in reply to' a specific Post. - * @param integer $post_id The ID of the post you want to retrieve replies for. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_annotations. - * @return An array of associative arrays, each representing a single post. - */ - public function getPostReplies($post_id=null,$params = array()) { - return $this->httpReq('get',$this->_baseUrl.'posts/'.urlencode($post_id) - .'/replies?'.$this->buildQueryString($params)); - } - - /** - * Get the most recent Posts created by a specific User in reverse - * chronological order (most recent first). - * @param mixed $user_id Either the ID of the user you wish to retrieve posts by, - * or the string "me", which will retrieve posts for the user you're authenticated - * as. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_annotations. - * @return An array of associative arrays, each representing a single post. - */ - public function getUserPosts($user_id='me', $params = array()) { - return $this->httpReq('get',$this->_baseUrl.'users/'.urlencode($user_id) - .'/posts?'.$this->buildQueryString($params)); - } - - /** - * Get the most recent Posts mentioning by a specific User in reverse - * chronological order (newest first). - * @param mixed $user_id Either the ID of the user who is being mentioned, or - * the string "me", which will retrieve posts for the user you're authenticated - * as. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_annotations. - * @return An array of associative arrays, each representing a single post. - */ - public function getUserMentions($user_id='me',$params = array()) { - return $this->httpReq('get',$this->_baseUrl.'users/' - .urlencode($user_id).'/mentions?'.$this->buildQueryString($params)); - } - - /** - * Return the 20 most recent posts from the current User and - * the Users they follow. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_annotations. - * @return An array of associative arrays, each representing a single post. - */ - public function getUserStream($params = array()) { - return $this->httpReq('get',$this->_baseUrl.'posts/stream?'.$this->buildQueryString($params)); - } - - /** - * Returns a specific user object. - * @param mixed $user_id The ID of the user you want to retrieve, or the string - * "me" to retrieve data for the users you're currently authenticated as. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_annotations|include_user_annotations. - * @return array An associative array representing the user data. - */ - public function getUser($user_id='me', $params = array()) { - return $this->httpReq('get',$this->_baseUrl.'users/'.urlencode($user_id) - .'?'.$this->buildQueryString($params)); - } - - /** - * Returns multiple users request by an array of user ids - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_annotations|include_user_annotations. - * @return array An associative array representing the users data. - */ - public function getUsers($user_arr, $params = array()) { - return $this->httpReq('get',$this->_baseUrl.'users?ids='.join(',',$user_arr) - .'&'.$this->buildQueryString($params)); - } - - /** - * Add the specified user ID to the list of users followed. - * Returns the User object of the user being followed. - * @param integer $user_id The user ID of the user to follow. - * @return array An associative array representing the user you just followed. - */ - public function followUser($user_id=null) { - return $this->httpReq('post',$this->_baseUrl.'users/'.urlencode($user_id).'/follow'); - } - - /** - * Removes the specified user ID to the list of users followed. - * Returns the User object of the user being unfollowed. - * @param integer $user_id The user ID of the user to unfollow. - * @return array An associative array representing the user you just unfollowed. - */ - public function unfollowUser($user_id=null) { - return $this->httpReq('delete',$this->_baseUrl.'users/'.urlencode($user_id).'/follow'); - } - - /** - * Returns an array of User objects the specified user is following. - * @param mixed $user_id Either the ID of the user being followed, or - * the string "me", which will retrieve posts for the user you're authenticated - * as. - * @return array An array of associative arrays, each representing a single - * user following $user_id - */ - public function getFollowing($user_id='me') { - return $this->httpReq('get',$this->_baseUrl.'users/'.$user_id.'/following'); - } - - /** - * Returns an array of User objects for users following the specified user. - * @param mixed $user_id Either the ID of the user being followed, or - * the string "me", which will retrieve posts for the user you're authenticated - * as. - * @return array An array of associative arrays, each representing a single - * user following $user_id - */ - public function getFollowers($user_id='me') { - return $this->httpReq('get',$this->_baseUrl.'users/'.$user_id.'/followers'); - } - - /** - * Return Posts matching a specific #hashtag. - * @param string $hashtag The hashtag you're looking for. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_annotations. - * @return An array of associative arrays, each representing a single post. - */ - public function searchHashtags($hashtag=null, $params = array()) { - return $this->httpReq('get',$this->_baseUrl.'posts/tag/' - .urlencode($hashtag).'?'.$this->buildQueryString($params)); - } - - /** - * Retrieve a list of all public Posts on App.net, often referred to as the - * global stream. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_annotations. - * @return An array of associative arrays, each representing a single post. - */ - public function getPublicPosts($params = array()) { - return $this->httpReq('get',$this->_baseUrl.'posts/stream/global?'.$this->buildQueryString($params)); - } - - /** - * List User interactions - */ - public function getMyInteractions($params = array()) { - return $this->httpReq('get',$this->_baseUrl.'users/me/interactions?'.$this->buildQueryString($params)); - } - - /** - * Retrieve a user's user ID by specifying their username. - * Now supported by the API. We use the API if we have a token - * Otherwise we scrape the alpha.app.net site for the info. - * @param string $username The username of the user you want the ID of, without - * an @ symbol at the beginning. - * @return integer The user's user ID - */ - public function getIdByUsername($username=null) { - if ($this->_accessToken) { - $res=$this->httpReq('get',$this->_baseUrl.'users/@'.$username); - $user_id=$res['data']['id']; - } else { - $ch = curl_init('https://alpha.app.net/'.urlencode(strtolower($username))); - curl_setopt($ch, CURLOPT_POST, false); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch,CURLOPT_USERAGENT, - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20100101 Firefox/7.0.1'); - $response = curl_exec($ch); - curl_close($ch); - $temp = explode('title="User Id ',$response); - $temp2 = explode('"',$temp[1]); - $user_id = $temp2[0]; - } - return $user_id; - } - - /** - * Mute a user - * @param integer $user_id The user ID to mute - */ - public function muteUser($user_id=null) { - return $this->httpReq('post',$this->_baseUrl.'users/'.urlencode($user_id).'/mute'); - } - - /** - * Unmute a user - * @param integer $user_id The user ID to unmute - */ - public function unmuteUser($user_id=null) { - return $this->httpReq('delete',$this->_baseUrl.'users/'.urlencode($user_id).'/mute'); - } - - /** - * List the users muted by the current user - * @return array An array of associative arrays, each representing one muted user. - */ - public function getMuted() { - return $this->httpReq('get',$this->_baseUrl.'users/me/muted'); - } - - /** - * Star a post - * @param integer $post_id The post ID to star - */ - public function starPost($post_id=null) { - return $this->httpReq('post',$this->_baseUrl.'posts/'.urlencode($post_id).'/star'); - } - - /** - * Unstar a post - * @param integer $post_id The post ID to unstar - */ - public function unstarPost($post_id=null) { - return $this->httpReq('delete',$this->_baseUrl.'posts/'.urlencode($post_id).'/star'); - } - - /** - * List the posts starred by the current user - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_annotations. - * See https://github.com/appdotnet/api-spec/blob/master/resources/posts.md#general-parameters - * @return array An array of associative arrays, each representing a single - * user who has starred a post - */ - public function getStarred($user_id='me', $params = array()) { - return $this->httpReq('get',$this->_baseUrl.'users/'.urlencode($user_id).'/stars' - .'?'.$this->buildQueryString($params)); - } - - /** - * List the users who have starred a post - * @param integer $post_id the post ID to get stars from - * @return array An array of associative arrays, each representing one user. - */ - public function getStars($post_id=null) { - return $this->httpReq('get',$this->_baseUrl.'posts/'.urlencode($post_id).'/stars'); - } - - /** - * Returns an array of User objects of users who reposted the specified post. - * @param integer $post_id the post ID to - * @return array An array of associative arrays, each representing a single - * user who reposted $post_id - */ - public function getReposters($post_id){ - return $this->httpReq('get',$this->_baseUrl.'posts/'.urlencode($post_id).'/reposters'); - } - - /** - * Repost an existing Post object. - * @param integer $post_id The id of the post - * @return not a clue - */ - public function repost($post_id){ - return $this->httpReq('post',$this->_baseUrl.'posts/'.urlencode($post_id).'/repost'); - } - - /** - * Delete a post that the user has reposted. - * @param integer $post_id The id of the post - * @return not a clue - */ - public function deleteRepost($post_id){ - return $this->httpReq('delete',$this->_baseUrl.'posts/'.urlencode($post_id).'/repost'); - } - - /** - * List the posts who match a specific search term - * @param array $params a list of filter, search query, and general Post parameters - * see: https://developers.app.net/reference/resources/post/search/ - * @param string $query The search query. Supports - * normal search terms. Searches post text. - * @return array An array of associative arrays, each representing one post. - * or false on error - */ - public function searchPosts($params = array(), $query='', $order='default') { - if (!is_array($params)) { - return false; - } - if (!empty($query)) { - $params['query']=$query; - } - if ($order=='default') { - if (!empty($query)) { - $params['order']='score'; - } else { - $params['order']='id'; - } - } - return $this->httpReq('get',$this->_baseUrl.'posts/search?'.$this->buildQueryString($params)); - } - - - /** - * List the users who match a specific search term - * @param string $search The search query. Supports @username or #tag searches as - * well as normal search terms. Searches username, display name, bio information. - * Does not search posts. - * @return array An array of associative arrays, each representing one user. - */ - public function searchUsers($search="") { - return $this->httpReq('get',$this->_baseUrl.'users/search?q='.urlencode($search)); - } - - /** - * Return the 20 most recent posts for a stream using a valid Token - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_annotations. - * @return An array of associative arrays, each representing a single post. - */ - public function getTokenStream($params = array()) { - if ($params['access_token']) { - return $this->httpReq('get',$this->_baseUrl.'posts/stream?'.$this->buildQueryString($params),$params); - } else { - return $this->httpReq('get',$this->_baseUrl.'posts/stream?'.$this->buildQueryString($params)); - } - } - - /** - * Get a user object by username - * @param string $name the @name to get - * @return array representing one user - */ - public function getUserByName($name=null) { - return $this->httpReq('get',$this->_baseUrl.'users/@'.$name); - } - - /** - * Return the 20 most recent Posts from the current User's personalized stream - * and mentions stream merged into one stream. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_annotations. - * @return An array of associative arrays, each representing a single post. - */ - public function getUserUnifiedStream($params = array()) { - return $this->httpReq('get',$this->_baseUrl.'posts/stream/unified?'.$this->buildQueryString($params)); - } - - /** - * Update Profile Data via JSON - * @data array containing user descriptors - */ - public function updateUserData($data = array(), $params = array()) { - $json = json_encode($data); - return $this->httpReq('put',$this->_baseUrl.'users/me'.'?'. - $this->buildQueryString($params), $json, 'application/json'); - } - - /** - * Update a user image - * @which avatar|cover - * @image path reference to image - */ - protected function updateUserImage($which = 'avatar', $image = null) { - $data = array($which=>"@$image"); - return $this->httpReq('post-raw',$this->_baseUrl.'users/me/'.$which, $data, 'multipart/form-data'); - } - - public function updateUserAvatar($avatar = null) { - if($avatar != null) - return $this->updateUserImage('avatar', $avatar); - } - - public function updateUserCover($cover = null) { - if($cover != null) - return $this->updateUserImage('cover', $cover); - } - - /** - * update stream marker - */ - public function updateStreamMarker($data = array()) { - $json = json_encode($data); - return $this->httpReq('post',$this->_baseUrl.'posts/marker', $json, 'application/json'); - } - - /** - * get a page of current user subscribed channels - */ - public function getUserSubscriptions($params = array()) { - return $this->httpReq('get',$this->_baseUrl.'channels?'.$this->buildQueryString($params)); - } - - /** - * get user channels - */ - public function getMyChannels($params = array()) { - return $this->httpReq('get',$this->_baseUrl.'channels/me?'.$this->buildQueryString($params)); - } - - /** - * create a channel - * note: you cannot create a channel with type=net.app.core.pm (see createMessage) - */ - public function createChannel($data = array()) { - $json = json_encode($data); - return $this->httpReq('post',$this->_baseUrl.'channels'.($pm?'/pm/messsages':''), $json, 'application/json'); - } - - /** - * get channelid info - */ - public function getChannel($channelid, $params = array()) { - return $this->httpReq('get',$this->_baseUrl.'channels/'.$channelid.'?'.$this->buildQueryString($params)); - } - - /** - * get multiple channels' info by an array of channelids - */ - public function getChannels($channels, $params = array()) { - return $this->httpReq('get',$this->_baseUrl.'channels?ids='.join(',',$channels).'&'.$this->buildQueryString($params)); - } - - /** - * update channelid - */ - public function updateChannel($channelid, $data = array()) { - $json = json_encode($data); - return $this->httpReq('put',$this->_baseUrl.'channels/'.$channelid, $json, 'application/json'); - } - - /** - * subscribe from channelid - */ - public function channelSubscribe($channelid) { - return $this->httpReq('post',$this->_baseUrl.'channels/'.$channelid.'/subscribe'); - } - - /** - * unsubscribe from channelid - */ - public function channelUnsubscribe($channelid) { - return $this->httpReq('delete',$this->_baseUrl.'channels/'.$channelid.'/subscribe'); - } - - /** - * get all user objects subscribed to channelid - */ - public function getChannelSubscriptions($channelid, $params = array()) { - return $this->httpReq('get',$this->_baseUrl.'channel/'.$channelid.'/subscribers?'.$this->buildQueryString($params)); - } - - /** - * get all user IDs subscribed to channelid - */ - public function getChannelSubscriptionsById($channelid) { - return $this->httpReq('get',$this->_baseUrl.'channel/'.$channelid.'/subscribers/ids'); - } - - - /** - * get a page of messages in channelid - */ - public function getMessages($channelid, $params = array()) { - return $this->httpReq('get',$this->_baseUrl.'channels/'.$channelid.'/messages?'.$this->buildQueryString($params)); - } - - /** - * create message - * @param $channelid numeric or "pm" for auto-chanenl (type=net.app.core.pm) - * @param $data array('text'=>'YOUR_MESSAGE') If a type=net.app.core.pm, then "destinations" key can be set to address as an array of people to send this PM too - */ - public function createMessage($channelid,$data) { - $json = json_encode($data); - return $this->httpReq('post',$this->_baseUrl.'channels/'.$channelid.'/messages', $json, 'application/json'); - } - - /** - * get message - */ - public function getMessage($channelid,$messageid) { - return $this->httpReq('get',$this->_baseUrl.'channels/'.$channelid.'/messages/'.$messageid); - } - - /** - * delete messsage - */ - public function deleteMessage($channelid,$messageid) { - return $this->httpReq('delete',$this->_baseUrl.'channels/'.$channelid.'/messages/'.$messageid); - } - - - /** - * Get Application Information - */ - public function getAppTokenInfo() { - // requires appAccessToken - if (!$this->_appAccessToken) { - $this->getAppAccessToken(); - } - // ensure request is made with our appAccessToken - $params['access_token']=$this->_appAccessToken; - return $this->httpReq('get',$this->_baseUrl.'token',$params); - } - - /** - * Get User Information - */ - public function getUserTokenInfo() { - return $this->httpReq('get',$this->_baseUrl.'token'); - } - - /** - * Get Application Authorized User IDs - */ - public function getAppUserIDs() { - // requires appAccessToken - if (!$this->_appAccessToken) { - $this->getAppAccessToken(); - } - // ensure request is made with our appAccessToken - $params['access_token']=$this->_appAccessToken; - return $this->httpReq('get',$this->_baseUrl.'apps/me/tokens/user_ids',$params); - } - - /** - * Get Application Authorized User Tokens - */ - public function getAppUserTokens() { - // requires appAccessToken - if (!$this->_appAccessToken) { - $this->getAppAccessToken(); - } - // ensure request is made with our appAccessToken - $params['access_token']=$this->_appAccessToken; - return $this->httpReq('get',$this->_baseUrl.'apps/me/tokens',$params); - } - - public function getLastRequest() { - return $this->_last_request; - } - public function getLastResponse() { - return $this->_last_response; - } - - /** - * Registers your function (or an array of object and method) to be called - * whenever an event is received via an open app.net stream. Your function - * will receive a single parameter, which is the object wrapper containing - * the meta and data. - * @param mixed A PHP callback (either a string containing the function name, - * or an array where the first element is the class/object and the second - * is the method). - */ - public function registerStreamFunction($function) { - $this->_streamCallback = $function; - } - - /** - * Opens a stream that's been created for this user/app and starts sending - * events/objects to your defined callback functions. You must define at - * least one callback function before opening a stream. - * @param mixed $stream Either a stream ID or the endpoint of a stream - * you've already created. This stream must exist and must be valid for - * your current access token. If you pass a stream ID, the library will - * make an API call to get the endpoint. - * - * This function will return immediately, but your callback functions - * will continue to receive events until you call closeStream() or until - * App.net terminates the stream from their end with an error. - * - * If you're disconnected due to a network error, the library will - * automatically attempt to reconnect you to the same stream, no action - * on your part is necessary for this. However if the app.net API returns - * an error, a reconnection attempt will not be made. - * - * Note there is no closeStream, because once you open a stream you - * can't stop it (unless you exit() or die() or throw an uncaught - * exception, or something else that terminates the script). - * @return boolean True - * @see createStream() - */ - public function openStream($stream) { - // if there's already a stream running, don't allow another - if ($this->_currentStream) { - throw new AppDotNetException('There is already a stream being consumed, only one stream can be consumed per AppDotNetStream instance'); - } - // must register a callback (or the exercise is pointless) - if (!$this->_streamCallback) { - throw new AppDotNetException('You must define your callback function using registerStreamFunction() before calling openStream'); - } - // if the stream is a numeric value, get the stream info from the api - if (is_numeric($stream)) { - $stream = $this->getStream($stream); - $this->_streamUrl = $stream['endpoint']; - } - else { - $this->_streamUrl = $stream; - } - // continue doing this until we get an error back or something...? - $this->httpStream('get',$this->_streamUrl); - - return true; - } - - /** - * Close the currently open stream. - * @return true; - */ - public function closeStream() { - if (!$this->_lastStreamActivity) { - // never opened - return; - } - if (!$this->_multiStream) { - throw new AppDotNetException('You must open a stream before calling closeStream()'); - } - curl_close($this->_currentStream); - curl_multi_remove_handle($this->_multiStream,$this->_currentStream); - curl_multi_close($this->_multiStream); - $this->_currentStream = null; - $this->_multiStream = null; - } - - /** - * Retrieve all streams for the current access token. - * @return array An array of stream definitions. - */ - public function getAllStreams() { - return $this->httpReq('get',$this->_baseUrl.'streams'); - } - - /** - * Returns a single stream specified by a stream ID. The stream must have been - * created with the current access token. - * @return array A stream definition - */ - public function getStream($streamId) { - return $this->httpReq('get',$this->_baseUrl.'streams/'.urlencode($streamId)); - } - - /** - * Creates a stream for the current app access token. - * - * @param array $objectTypes The objects you want to retrieve data for from the - * stream. At time of writing these can be 'post', 'star', and/or 'user_follow'. - * If you don't specify, all events will be retrieved. - */ - public function createStream($objectTypes=null) { - // default object types to everything - if (is_null($objectTypes)) { - $objectTypes = array('post','star','user_follow'); - } - $data = array( - 'object_types'=>$objectTypes, - 'type'=>'long_poll', - ); - $data = json_encode($data); - $response = $this->httpReq('post',$this->_baseUrl.'streams',$data,'application/json'); - return $response; - } - - /** - * Update stream for the current app access token - * - * @param integer $streamId The stream ID to update. This stream must have been - * created by the current access token. - * @param array $data allows object_types, type, filter_id and key to be updated. filter_id/key can be omitted - */ - public function updateStream($streamId,$data) { - // objectTypes is likely required - if (is_null($data['object_types'])) { - $data['object_types'] = array('post','star','user_follow'); - } - // type can still only be long_poll - if (is_null($data['type'])) { - $data['type']='long_poll'; - } - $data = json_encode($data); - $response = $this->httpReq('put',$this->_baseUrl.'streams/'.urlencode($streamId),$data,'application/json'); - return $response; - } - - /** - * Deletes a stream if you no longer need it. - * - * @param integer $streamId The stream ID to delete. This stream must have been - * created by the current access token. - */ - public function deleteStream($streamId) { - return $this->httpReq('delete',$this->_baseUrl.'streams/'.urlencode($streamId)); - } - - /** - * Deletes all streams created by the current access token. - */ - public function deleteAllStreams() { - return $this->httpReq('delete',$this->_baseUrl.'streams'); - } - - /** - * Internal function used to process incoming chunks from the stream. This is only - * public because it needs to be accessed by CURL. Do not call or use this function - * in your own code. - * @ignore - */ - public function httpStreamReceive($ch,$data) { - $this->_lastStreamActivity = time(); - $this->_streamBuffer .= $data; - if (!$this->_streamHeaders) { - $pos = strpos($this->_streamBuffer,"\r\n\r\n"); - if ($pos!==false) { - $this->_streamHeaders = substr($this->_streamBuffer,0,$pos); - $this->_streamBuffer = substr($this->_streamBuffer,$pos+4); - } - } - else { - $pos = strpos($this->_streamBuffer,"\r\n"); - while ($pos!==false) { - $command = substr($this->_streamBuffer,0,$pos); - $this->_streamBuffer = substr($this->_streamBuffer,$pos+2); - $command = json_decode($command,true); - if ($command) { - call_user_func($this->_streamCallback,$command); - } - $pos = strpos($this->_streamBuffer,"\r\n"); - } - } - return strlen($data); - } - - /** - * Opens a long lived HTTP connection to the app.net servers, and sends data - * received to the httpStreamReceive function. As a general rule you should not - * directly call this method, it's used by openStream(). - */ - protected function httpStream($act, $req, $params=array(),$contentType='application/x-www-form-urlencoded') { - if ($this->_currentStream) { - throw new AppDotNetException('There is already an open stream, you must close the existing one before opening a new one'); - } - $headers = array(); - $this->_streamBuffer = ''; - if ($this->_accessToken) { - $headers[] = 'Authorization: Bearer '.$this->_accessToken; - } - $this->_currentStream = curl_init($req); - curl_setopt($this->_currentStream, CURLOPT_HTTPHEADER, $headers); - curl_setopt($this->_currentStream, CURLOPT_RETURNTRANSFER, true); - curl_setopt($this->_currentStream, CURLINFO_HEADER_OUT, true); - curl_setopt($this->_currentStream, CURLOPT_HEADER, true); - if ($this->_sslCA) { - curl_setopt($this->_currentStream, CURLOPT_CAINFO, $this->_sslCA); - } - // every time we receive a chunk of data, forward it to httpStreamReceive - curl_setopt($this->_currentStream, CURLOPT_WRITEFUNCTION, array($this, "httpStreamReceive")); - - // curl_exec($ch); - // return; - - $this->_multiStream = curl_multi_init(); - $this->_lastStreamActivity = time(); - curl_multi_add_handle($this->_multiStream,$this->_currentStream); - } - - public function reconnectStream() { - $this->closeStream(); - $this->_connectFailCounter++; - // if we've failed a few times, back off - if ($this->_connectFailCounter>1) { - $sleepTime = pow(2,$this->_connectFailCounter); - // don't sleep more than 60 seconds - if ($sleepTime>60) { - $sleepTime = 60; - } - sleep($sleepTime); - } - $this->httpStream('get',$this->_streamUrl); - } - - /** - * Process an open stream for x microseconds, then return. This is useful if you want - * to be doing other things while processing the stream. If you just want to - * consume the stream without other actions, you can call processForever() instead. - * @param float @microseconds The number of microseconds to process for before - * returning. There are 1,000,000 microseconds in a second. - * - * @return void - */ - public function processStream($microseconds=null) { - if (!$this->_multiStream) { - throw new AppDotNetException('You must open a stream before calling processStream()'); - } - $start = microtime(true); - $active = null; - $inQueue = null; - $sleepFor = 0; - do { - // if we haven't received anything within 5.5 minutes, reconnect - // keepalives are sent every 5 minutes (measured on 2013-3-12 by @ryantharp) - if (time()-$this->_lastStreamActivity>=330) { - $this->reconnectStream(); - } - curl_multi_exec($this->_multiStream, $active); - if (!$active) { - $httpCode = curl_getinfo($this->_currentStream,CURLINFO_HTTP_CODE); - // don't reconnect on 400 errors - if ($httpCode>=400 && $httpCode<=499) { - throw new AppDotNetException('Received HTTP error '.$httpCode.' check your URL and credentials before reconnecting'); - } - $this->reconnectStream(); - } - // sleep for a max of 2/10 of a second - $timeSoFar = (microtime(true)-$start)*1000000; - $sleepFor = $this->streamingSleepFor; - if ($timeSoFar+$sleepFor>$microseconds) { - $sleepFor = $microseconds - $timeSoFar; - } - - if ($sleepFor>0) { - usleep($sleepFor); - } - } while ($timeSoFar+$sleepFor<$microseconds); - } - - /** - * Process an open stream forever. This function will never return, if you - * want to perform other actions while consuming the stream, you should use - * processFor() instead. - * @return void This function will never return - * @see processFor(); - */ - public function processStreamForever() { - while (true) { - $this->processStream(600); - } - } - - - /** - * Upload a file to a user's file store - * @param string $file A string containing the path of the file to upload. - * @param array $data Additional data about the file you're uploading. At the - * moment accepted keys are: mime-type, kind, type, name, public and annotations. - * - If you don't specify mime-type, ADNPHP will attempt to guess the mime type - * based on the file, however this isn't always reliable. - * - If you don't specify kind ADNPHP will attempt to determine if the file is - * an image or not. - * - If you don't specify name, ADNPHP will use the filename of the first - * parameter. - * - If you don't specify public, your file will be uploaded as a private file. - * - Type is REQUIRED. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_annotations|include_file_annotations. - * @return array An associative array representing the file - */ - public function createFile($file, $data, $params=array()) { - if (!$file) { - throw new AppDotNetException('You must specify a path to a file'); - } - if (!file_exists($file)) { - throw new AppDotNetException('File path specified does not exist'); - } - if (!is_readable($file)) { - throw new AppDotNetException('File path specified is not readable'); - } - - if (!$data) { - $data = array(); - } - - if (!array_key_exists('type',$data) || !$data['type']) { - throw new AppDotNetException('Type is required when creating a file'); - } - - if (!array_key_exists('name',$data)) { - $data['name'] = basename($file); - } - - if (array_key_exists('mime-type',$data)) { - $mimeType = $data['mime-type']; - unset($data['mime-type']); - } - else { - $mimeType = null; - } - if (!array_key_exists('kind',$data)) { - $test = @getimagesize($path); - if ($test && array_key_exists('mime',$test)) { - $data['kind'] = 'image'; - if (!$mimeType) { - $mimeType = $test['mime']; - } - } - else { - $data['kind'] = 'other'; - } - } - if (!$mimeType) { - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $mimeType = finfo_file($finfo, $file); - finfo_close($finfo); - } - if (!$mimeType) { - throw new AppDotNetException('Unable to determine mime type of file, try specifying it explicitly'); - } - if (!array_key_exists('public',$data) || !$data['public']) { - $public = false; - } - else { - $public = true; - } - - $data['content'] = "@$file;type=$mimeType"; - return $this->httpReq('post-raw',$this->_baseUrl.'files', $data, 'multipart/form-data'); - } - - - public function createFilePlaceholder($file = null, $params=array()) { - $name = basename($file); - $data = array('annotations' => $params['annotations'], 'kind' => $params['kind'], - 'name' => $name, 'type' => $params['metadata']); - $json = json_encode($data); - return $this->httpReq('post',$this->_baseUrl.'files', $json, 'application/json'); - } - - public function updateFileContent($fileid, $file) { - - $data = file_get_contents($file); - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $mime = finfo_file($finfo, $file); - finfo_close($finfo); - - return $this->httpReq('put',$this->_baseUrl.'files/' . $fileid - .'/content', $data, $mime); - } - - /** - * Allows for file rename and annotation changes. - * @param integer $file_id The ID of the file to update - * @param array $params An associative array of file parameters. - * @return array An associative array representing the updated file - */ - public function updateFile($file_id=null, $params=array()) { - $data = array('annotations' => $params['annotations'] , 'name' => $params['name']); - $json = json_encode($data); - return $this->httpReq('put',$this->_baseUrl.'files/'.urlencode($file_id), $json, 'application/json'); - } - - /** - * Returns a specific File. - * @param integer $file_id The ID of the file to retrieve - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_annotations|include_file_annotations. - * @return array An associative array representing the file - */ - public function getFile($file_id=null,$params = array()) { - return $this->httpReq('get',$this->_baseUrl.'files/'.urlencode($file_id) - .'?'.$this->buildQueryString($params)); - } - - public function getFileContent($file_id=null,$params = array()) { - return $this->httpReq('get',$this->_baseUrl.'files/'.urlencode($file_id) - .'/content?'.$this->buildQueryString($params)); - } - - /** $file_key : derived_file_key */ - public function getDerivedFileContent($file_id=null,$file_key=null,$params = array()) { - return $this->httpReq('get',$this->_baseUrl.'files/'.urlencode($file_id) - .'/content/'.urlencode($file_key) - .'?'.$this->buildQueryString($params)); - } - - /** - * Returns file objects. - * @param array $file_ids The IDs of the files to retrieve - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_annotations|include_file_annotations. - * @return array An associative array representing the file data. - */ - public function getFiles($file_ids=array(), $params = array()) { - $ids = ''; - foreach($file_ids as $id) { - $ids .= $id . ','; - } - $params['ids'] = substr($ids, 0, -1); - return $this->httpReq('get',$this->_baseUrl.'files' - .'?'.$this->buildQueryString($params)); - } - - /** - * Returns a user's file objects. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_annotations|include_file_annotations|include_user_annotations. - * @return array An associative array representing the file data. - */ - public function getUserFiles($params = array()) { - return $this->httpReq('get',$this->_baseUrl.'users/me/files' - .'?'.$this->buildQueryString($params)); - } - - /** - * Delete a File. The current user must be the same user who created the File. - * It returns the deleted File on success. - * @param integer $file_id The ID of the file to delete - * @return array An associative array representing the file that was deleted - */ - public function deleteFile($file_id=null) { - return $this->httpReq('delete',$this->_baseUrl.'files/'.urlencode($file_id)); - } - -} - -class AppDotNetException extends Exception {} diff --git a/appnet/DigiCertHighAssuranceEVRootCA.pem b/appnet/DigiCertHighAssuranceEVRootCA.pem deleted file mode 100644 index 9e6810ab..00000000 --- a/appnet/DigiCertHighAssuranceEVRootCA.pem +++ /dev/null @@ -1,23 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j -ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL -MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 -LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug -RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm -+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW -PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM -xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB -Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3 -hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg -EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF -MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA -FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec -nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z -eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF -hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2 -Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe -vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep -+OkuE6N36B9K ------END CERTIFICATE----- diff --git a/appnet/README.md b/appnet/README.md deleted file mode 100644 index ec24753c..00000000 --- a/appnet/README.md +++ /dev/null @@ -1,15 +0,0 @@ -App.net Plugin -============== - -With this addon to friendica you can give your users the possibility to post their *public* messages to App.net and -to import their timeline. The messages will be strapped their rich context and shortened to 256 characters length if -necessary. - -Installation ------------- - -If you have an developer account you can create an Application for all of your users at -[https://account.app.net/developer/apps/](https://account.app.net/developer/apps/). Add the redirect uri -"https://your.server.name/appnet/connect" (Replace "your.server.name" with the hostname of your server) - -If you can't create an application (because you only have a free account) this addon still works, but your users have to create individual applications on their own. diff --git a/appnet/appnet.css b/appnet/appnet.css deleted file mode 100755 index b1d8d27e..00000000 --- a/appnet/appnet.css +++ /dev/null @@ -1,29 +0,0 @@ -#appnet-import-label, #appnet-disconnect-label, #appnet-token-label, -#appnet-enable-label, #appnet-bydefault-label, -#appnet-clientid-label, #appnet-clientsecret-label { - float: left; - width: 200px; - margin-top: 10px; -} - -#appnet-import, #appnet-disconnect, #appnet-token, -#appnet-checkbox, #appnet-bydefault, -#appnet-clientid, #appnet-clientsecret { - float: left; - margin-top: 10px; -} - -#appnet-submit { - margin-top: 15px; -} - -#appnet-avatar { - float: left; - width: 48px; - height: 48px; - padding: 2px; -} -#appnet-info-block { - height: 52px; - vertical-align: middle; -} diff --git a/appnet/appnet.php b/appnet/appnet.php deleted file mode 100644 index 151a81ee..00000000 --- a/appnet/appnet.php +++ /dev/null @@ -1,1358 +0,0 @@ - - * Status: Unsupported - */ - -/* - To-Do: - - Use embedded pictures for the attachment information (large attachment) - - Sound links must be handled - - https://alpha.app.net/sr_rolando/post/32365203 - double pictures - - https://alpha.app.net/opendev/post/34396399 - location data -*/ - -require_once('include/enotify.php'); -require_once("include/socgraph.php"); - -define('APPNET_DEFAULT_POLL_INTERVAL', 5); // given in minutes - -function appnet_install() { - register_hook('post_local', 'addon/appnet/appnet.php', 'appnet_post_local'); - register_hook('notifier_normal', 'addon/appnet/appnet.php', 'appnet_send'); - register_hook('jot_networks', 'addon/appnet/appnet.php', 'appnet_jot_nets'); - register_hook('cron', 'addon/appnet/appnet.php', 'appnet_cron'); - register_hook('connector_settings', 'addon/appnet/appnet.php', 'appnet_settings'); - register_hook('connector_settings_post','addon/appnet/appnet.php', 'appnet_settings_post'); - register_hook('prepare_body', 'addon/appnet/appnet.php', 'appnet_prepare_body'); - register_hook('check_item_notification','addon/appnet/appnet.php', 'appnet_check_item_notification'); -} - - -function appnet_uninstall() { - unregister_hook('post_local', 'addon/appnet/appnet.php', 'appnet_post_local'); - unregister_hook('notifier_normal', 'addon/appnet/appnet.php', 'appnet_send'); - unregister_hook('jot_networks', 'addon/appnet/appnet.php', 'appnet_jot_nets'); - unregister_hook('cron', 'addon/appnet/appnet.php', 'appnet_cron'); - unregister_hook('connector_settings', 'addon/appnet/appnet.php', 'appnet_settings'); - unregister_hook('connector_settings_post', 'addon/appnet/appnet.php', 'appnet_settings_post'); - unregister_hook('prepare_body', 'addon/appnet/appnet.php', 'appnet_prepare_body'); - unregister_hook('check_item_notification','addon/appnet/appnet.php', 'appnet_check_item_notification'); -} - -function appnet_module() {} - -function appnet_content(&$a) { - if(! local_user()) { - notice( t('Permission denied.') . EOL); - return ''; - } - - require_once("mod/settings.php"); - settings_init($a); - - if (isset($a->argv[1])) - switch ($a->argv[1]) { - case "connect": - $o = appnet_connect($a); - break; - default: - $o = print_r($a->argv, true); - break; - } - else - $o = appnet_connect($a); - - return $o; -} - -function appnet_check_item_notification($a, &$notification_data) { - $own_id = get_pconfig($notification_data["uid"], 'appnet', 'ownid'); - - $own_user = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND `alias` = '%s' LIMIT 1", - intval($notification_data["uid"]), - dbesc("adn::".$own_id) - ); - - if ($own_user) - $notification_data["profiles"][] = $own_user[0]["url"]; -} - -function appnet_plugin_admin(&$a, &$o){ - $t = get_markup_template( "admin.tpl", "addon/appnet/" ); - - $o = replace_macros($t, array( - '$submit' => t('Save Settings'), - // name, label, value, help, [extra values] - '$clientid' => array('clientid', t('Client ID'), get_config('appnet', 'clientid' ), ''), - '$clientsecret' => array('clientsecret', t('Client Secret'), get_config('appnet', 'clientsecret' ), ''), - )); -} - -function appnet_plugin_admin_post(&$a){ - $clientid = ((x($_POST,'clientid')) ? notags(trim($_POST['clientid'])) : ''); - $clientsecret = ((x($_POST,'clientsecret')) ? notags(trim($_POST['clientsecret'])): ''); - set_config('appnet','clientid',$clientid); - set_config('appnet','clientsecret',$clientsecret); - info( t('Settings updated.'). EOL ); -} - -function appnet_connect(&$a) { - require_once 'addon/appnet/AppDotNet.php'; - - $clientId = get_config('appnet','clientid'); - $clientSecret = get_config('appnet','clientsecret'); - - if (($clientId == "") || ($clientSecret == "")) { - $clientId = get_pconfig(local_user(),'appnet','clientid'); - $clientSecret = get_pconfig(local_user(),'appnet','clientsecret'); - } - - $app = new AppDotNet($clientId, $clientSecret); - - try { - $token = $app->getAccessToken($a->get_baseurl().'/appnet/connect'); - - logger("appnet_connect: authenticated"); - $o .= t("You are now authenticated to app.net. "); - set_pconfig(local_user(),'appnet','token', $token); - } - catch (AppDotNetException $e) { - $o .= t("

Error fetching token. Please try again.

"); - } - - $o .= '
'.t("return to the connector page").''; - - return($o); -} - -function appnet_jot_nets(&$a,&$b) { - if(! local_user()) - return; - - $post = get_pconfig(local_user(),'appnet','post'); - if(intval($post) == 1) { - $defpost = get_pconfig(local_user(),'appnet','post_by_default'); - $selected = ((intval($defpost) == 1) ? ' checked="checked" ' : ''); - $b .= '
' - . t('Post to app.net') . '
'; - } -} - -function appnet_settings(&$a,&$s) { - require_once 'addon/appnet/AppDotNet.php'; - - if(! local_user()) - return; - - $token = get_pconfig(local_user(),'appnet','token'); - - $app_clientId = get_config('appnet','clientid'); - $app_clientSecret = get_config('appnet','clientsecret'); - - if (($app_clientId == "") || ($app_clientSecret == "")) { - $app_clientId = get_pconfig(local_user(),'appnet','clientid'); - $app_clientSecret = get_pconfig(local_user(),'appnet','clientsecret'); - } - - /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; - - $enabled = get_pconfig(local_user(),'appnet','post'); - $checked = (($enabled) ? ' checked="checked" ' : ''); - - $css = (($enabled) ? '' : '-disabled'); - - $def_enabled = get_pconfig(local_user(),'appnet','post_by_default'); - $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); - - $importenabled = get_pconfig(local_user(),'appnet','import'); - $importchecked = (($importenabled) ? ' checked="checked" ' : ''); - - $ownid = get_pconfig(local_user(),'appnet','ownid'); - - $s .= ''; - $s .= '

'. t('App.net Import/Export').'

'; - $s .= '
'; - $s .= ''; -} - -function appnet_settings_post(&$a,&$b) { - - if(x($_POST,'appnet-submit')) { - - if (isset($_POST['appnet-disconnect'])) { - del_pconfig(local_user(), 'appnet', 'clientsecret'); - del_pconfig(local_user(), 'appnet', 'clientid'); - del_pconfig(local_user(), 'appnet', 'token'); - del_pconfig(local_user(), 'appnet', 'post'); - del_pconfig(local_user(), 'appnet', 'post_by_default'); - del_pconfig(local_user(), 'appnet', 'import'); - } - - if (isset($_POST["clientsecret"])) - set_pconfig(local_user(),'appnet','clientsecret', $_POST['clientsecret']); - - if (isset($_POST["clientid"])) - set_pconfig(local_user(),'appnet','clientid', $_POST['clientid']); - - if (isset($_POST["token"]) && ($_POST["token"] != "")) - set_pconfig(local_user(),'appnet','token', $_POST['token']); - - set_pconfig(local_user(), 'appnet', 'post', intval($_POST['appnet'])); - set_pconfig(local_user(), 'appnet', 'post_by_default', intval($_POST['appnet_bydefault'])); - set_pconfig(local_user(), 'appnet', 'import', intval($_POST['appnet_import'])); - } -} - -function appnet_post_local(&$a,&$b) { - if($b['edit']) - return; - - if((local_user()) && (local_user() == $b['uid']) && (!$b['private']) && (!$b['parent'])) { - $appnet_post = intval(get_pconfig(local_user(),'appnet','post')); - $appnet_enable = (($appnet_post && x($_REQUEST,'appnet_enable')) ? intval($_REQUEST['appnet_enable']) : 0); - - // if API is used, default to the chosen settings - if($b['api_source'] && intval(get_pconfig(local_user(),'appnet','post_by_default'))) - $appnet_enable = 1; - - if(! $appnet_enable) - return; - - if(strlen($b['postopts'])) - $b['postopts'] .= ','; - - $b['postopts'] .= 'appnet'; - } -} - -function appnet_create_entities($a, $b, $postdata) { - require_once("include/bbcode.php"); - require_once("include/plaintext.php"); - - $bbcode = $b["body"]; - $bbcode = bb_remove_share_information($bbcode, false, true); - - // Change pure links in text to bbcode uris - $bbcode = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url=$2]$2[/url]', $bbcode); - - $URLSearchString = "^\[\]"; - - $bbcode = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",'#$2',$bbcode); - $bbcode = preg_replace("/@\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",'@$2',$bbcode); - $bbcode = preg_replace("/\[bookmark\=([$URLSearchString]*)\](.*?)\[\/bookmark\]/ism",'[url=$1]$2[/url]',$bbcode); - $bbcode = preg_replace("/\[video\](.*?)\[\/video\]/ism",'[url=$1]$1[/url]',$bbcode); - $bbcode = preg_replace("/\[youtube\]https?:\/\/(.*?)\[\/youtube\]/ism",'[url=https://$1]https://$1[/url]',$bbcode); - $bbcode = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", - '[url=https://www.youtube.com/watch?v=$1]https://www.youtube.com/watch?v=$1[/url]', $bbcode); - $bbcode = preg_replace("/\[vimeo\]https?:\/\/(.*?)\[\/vimeo\]/ism",'[url=https://$1]https://$1[/url]',$bbcode); - $bbcode = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", - '[url=https://vimeo.com/$1]https://vimeo.com/$1[/url]', $bbcode); - //$bbcode = preg_replace("/\[vimeo\](.*?)\[\/vimeo\]/ism",'[url=$1]$1[/url]',$bbcode); - - $bbcode = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $bbcode); - - - preg_match_all("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", $bbcode, $urls, PREG_SET_ORDER); - - $bbcode = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",'$1',$bbcode); - - $b["body"] = $bbcode; - - // To-Do: - // Bilder - // https://alpha.app.net/heluecht/post/32424376 - // https://alpha.app.net/heluecht/post/32424307 - - $plaintext = plaintext($a, $b, 0, false, 6); - - $text = $plaintext["text"]; - - $start = 0; - $entities = array(); - - foreach ($urls AS $url) { - $lenurl = iconv_strlen($url[1], "UTF-8"); - $len = iconv_strlen($url[2], "UTF-8"); - $pos = iconv_strpos($text, $url[1], $start, "UTF-8"); - $pre = iconv_substr($text, 0, $pos, "UTF-8"); - $post = iconv_substr($text, $pos + $lenurl, 1000000, "UTF-8"); - - $mid = $url[2]; - $html = bbcode($mid, false, false, 6); - $mid = html2plain($html, 0, true); - - $mid = trim(html_entity_decode($mid,ENT_QUOTES,'UTF-8')); - - $text = $pre.$mid.$post; - - if ($mid != "") - $entities[] = array("pos" => $pos, "len" => $len, "url" => $url[1], "text" => $mid); - - $start = $pos + 1; - } - - if (isset($postdata["url"]) && isset($postdata["title"]) && ($postdata["type"] != "photo")) { - $postdata["title"] = shortenmsg($postdata["title"], 90); - $max = 256 - strlen($postdata["title"]); - $text = shortenmsg($text, $max); - $text .= "\n[".$postdata["title"]."](".$postdata["url"].")"; - } elseif (isset($postdata["url"]) && ($postdata["type"] != "photo")) { - $postdata["url"] = short_link($postdata["url"]); - $max = 240; - $text = shortenmsg($text, $max); - $text .= " [".$postdata["url"]."](".$postdata["url"].")"; - } else { - $max = 256; - $text = shortenmsg($text, $max); - } - - if (iconv_strlen($text, "UTF-8") < $max) - $max = iconv_strlen($text, "UTF-8"); - - krsort($entities); - foreach ($entities AS $entity) { - //if (iconv_strlen($text, "UTF-8") >= $entity["pos"] + $entity["len"]) { - if (($entity["pos"] + $entity["len"]) <= $max) { - $pre = iconv_substr($text, 0, $entity["pos"], "UTF-8"); - $post = iconv_substr($text, $entity["pos"] + $entity["len"], 1000000, "UTF-8"); - - $text = $pre."[".$entity["text"]."](".$entity["url"].")".$post; - } - } - - - return($text); -} - -function appnet_send(&$a,&$b) { - - logger('appnet_send: invoked for post '.$b['id']." ".$b['app']); - - if (!get_pconfig($b["uid"],'appnet','import')) { - if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) - return; - } - - if($b['parent'] != $b['id']) { - logger("appnet_send: parameter ".print_r($b, true), LOGGER_DATA); - - // Looking if its a reply to an app.net post - if ((substr($b["parent-uri"], 0, 5) != "adn::") && (substr($b["extid"], 0, 5) != "adn::") && (substr($b["thr-parent"], 0, 5) != "adn::")) { - logger("appnet_send: no app.net post ".$b["parent"]); - return; - } - - $r = q("SELECT * FROM item WHERE item.uri = '%s' AND item.uid = %d LIMIT 1", - dbesc($b["thr-parent"]), - intval($b["uid"])); - - if(!count($r)) { - logger("appnet_send: no parent found ".$b["thr-parent"]); - return; - } else { - $iscomment = true; - $orig_post = $r[0]; - } - - $nicknameplain = preg_replace("=https?://alpha.app.net/(.*)=ism", "$1", $orig_post["author-link"]); - $nickname = "@[url=".$orig_post["author-link"]."]".$nicknameplain."[/url]"; - $nicknameplain = "@".$nicknameplain; - - logger("appnet_send: comparing ".$nickname." and ".$nicknameplain." with ".$b["body"], LOGGER_DEBUG); - if ((strpos($b["body"], $nickname) === false) && (strpos($b["body"], $nicknameplain) === false)) - $b["body"] = $nickname." ".$b["body"]; - - logger("appnet_send: parent found ".print_r($orig_post, true), LOGGER_DATA); - } else { - $iscomment = false; - - if($b['private'] || !strstr($b['postopts'],'appnet')) - return; - } - - if (($b['verb'] == ACTIVITY_POST) && $b['deleted']) - appnet_action($a, $b["uid"], substr($orig_post["uri"], 5), "delete"); - - if($b['verb'] == ACTIVITY_LIKE) { - logger("appnet_send: ".print_r($b, true), LOGGER_DEBUG); - logger("appnet_send: parameter 2 ".substr($b["thr-parent"], 5), LOGGER_DEBUG); - if ($b['deleted']) - appnet_action($a, $b["uid"], substr($b["thr-parent"], 5), "unlike"); - else - appnet_action($a, $b["uid"], substr($b["thr-parent"], 5), "like"); - return; - } - - if($b['deleted'] || ($b['created'] !== $b['edited'])) - return; - - $token = get_pconfig($b['uid'],'appnet','token'); - - if($token) { - - // If it's a repeated message from app.net then do a native repost and exit - if (appnet_is_repost($a, $b['uid'], $b['body'])) - return; - - - require_once 'addon/appnet/AppDotNet.php'; - - $clientId = get_pconfig($b["uid"],'appnet','clientid'); - $clientSecret = get_pconfig($b["uid"],'appnet','clientsecret'); - - $app = new AppDotNet($clientId, $clientSecret); - $app->setAccessToken($token); - - $data = array(); - - require_once("include/plaintext.php"); - require_once("include/network.php"); - - $post = plaintext($a, $b, 256, false, 6); - logger("appnet_send: converted message ".$b["id"]." result: ".print_r($post, true), LOGGER_DEBUG); - - if (isset($post["image"])) { - $img_str = fetch_url($post['image'],true, $redirects, 10); - $tempfile = tempnam(get_temppath(), "cache"); - file_put_contents($tempfile, $img_str); - - try { - $photoFile = $app->createFile($tempfile, array(type => "com.github.jdolitsky.appdotnetphp.photo")); - - $data["annotations"][] = array( - "type" => "net.app.core.oembed", - "value" => array( - "+net.app.core.file" => array( - "file_id" => $photoFile["id"], - "file_token" => $photoFile["file_token"], - "format" => "oembed") - ) - ); - } - catch (AppDotNetException $e) { - logger("appnet_send: Error creating file ".appnet_error($e->getMessage())); - } - - unlink($tempfile); - } - - // Adding a link to the original post, if it is a root post - if($b['parent'] == $b['id']) - $data["annotations"][] = array( - "type" => "net.app.core.crosspost", - "value" => array("canonical_url" => $b["plink"]) - ); - - // Adding the original post - $attached_data = get_attached_data($b["body"]); - $attached_data["post-uri"] = $b["uri"]; - $attached_data["post-title"] = $b["title"]; - $attached_data["post-body"] = substr($b["body"], 0, 4000); // To-Do: Better shortening - $attached_data["post-tag"] = $b["tag"]; - $attached_data["author-name"] = $b["author-name"]; - $attached_data["author-link"] = $b["author-link"]; - $attached_data["author-avatar"] = $b["author-avatar"]; - - $data["annotations"][] = array( - "type" => "com.friendica.post", - "value" => $attached_data - ); - - if (isset($post["url"]) && !isset($post["title"]) && ($post["type"] != "photo")) { - $display_url = str_replace(array("http://www.", "https://www."), array("", ""), $post["url"]); - $display_url = str_replace(array("http://", "https://"), array("", ""), $display_url); - - if (strlen($display_url) > 26) - $display_url = substr($display_url, 0, 25)."…"; - - $post["title"] = $display_url; - } - - $text = appnet_create_entities($a, $b, $post); - - $data["entities"]["parse_markdown_links"] = true; - - if ($iscomment) - $data["reply_to"] = substr($orig_post["uri"], 5); - - try { - logger("appnet_send: sending message ".$b["id"]." ".$text." ".print_r($data, true), LOGGER_DEBUG); - $ret = $app->createPost($text, $data); - logger("appnet_send: send message ".$b["id"]." result: ".print_r($ret, true), LOGGER_DEBUG); - if ($iscomment) { - logger('appnet_send: Update extid '.$ret["id"]." for post id ".$b['id']); - q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d", - dbesc("adn::".$ret["id"]), - intval($b['id']) - ); - } - } - catch (AppDotNetException $e) { - logger("appnet_send: Error sending message ".$b["id"]." ".appnet_error($e->getMessage())); - } - } -} - -function appnet_action($a, $uid, $pid, $action) { - require_once 'addon/appnet/AppDotNet.php'; - - $token = get_pconfig($uid,'appnet','token'); - $clientId = get_pconfig($uid,'appnet','clientid'); - $clientSecret = get_pconfig($uid,'appnet','clientsecret'); - - $app = new AppDotNet($clientId, $clientSecret); - $app->setAccessToken($token); - - logger("appnet_action '".$action."' ID: ".$pid, LOGGER_DATA); - - try { - switch ($action) { - case "delete": - $result = $app->deletePost($pid); - break; - case "like": - $result = $app->starPost($pid); - break; - case "unlike": - $result = $app->unstarPost($pid); - break; - } - logger("appnet_action '".$action."' send, result: " . print_r($result, true), LOGGER_DEBUG); - } - catch (AppDotNetException $e) { - logger("appnet_action: Error sending action ".$action." pid ".$pid." ".appnet_error($e->getMessage()), LOGGER_DEBUG); - } -} - -function appnet_is_repost($a, $uid, $body) { - $body = trim($body); - - // Skip if it isn't a pure repeated messages - // Does it start with a share? - if (strpos($body, "[share") > 0) - return(false); - - // Does it end with a share? - if (strlen($body) > (strrpos($body, "[/share]") + 8)) - return(false); - - $attributes = preg_replace("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","$1",$body); - // Skip if there is no shared message in there - if ($body == $attributes) - return(false); - - $link = ""; - preg_match("/link='(.*?)'/ism", $attributes, $matches); - if ($matches[1] != "") - $link = $matches[1]; - - preg_match('/link="(.*?)"/ism', $attributes, $matches); - if ($matches[1] != "") - $link = $matches[1]; - - $id = preg_replace("=https?://alpha.app.net/(.*)/post/(.*)=ism", "$2", $link); - if ($id == $link) - return(false); - - logger('appnet_is_repost: Reposting id '.$id.' for user '.$uid, LOGGER_DEBUG); - - require_once 'addon/appnet/AppDotNet.php'; - - $token = get_pconfig($uid,'appnet','token'); - $clientId = get_pconfig($uid,'appnet','clientid'); - $clientSecret = get_pconfig($uid,'appnet','clientsecret'); - - $app = new AppDotNet($clientId, $clientSecret); - $app->setAccessToken($token); - - try { - $result = $app->repost($id); - logger('appnet_is_repost: result '.print_r($result, true), LOGGER_DEBUG); - return true; - } - catch (AppDotNetException $e) { - logger('appnet_is_repost: error doing repost '.appnet_error($e->getMessage()), LOGGER_DEBUG); - return false; - } -} - -function appnet_fetchstream($a, $uid) { - require_once("addon/appnet/AppDotNet.php"); - require_once('include/items.php'); - - $token = get_pconfig($uid,'appnet','token'); - $clientId = get_pconfig($uid,'appnet','clientid'); - $clientSecret = get_pconfig($uid,'appnet','clientsecret'); - - $app = new AppDotNet($clientId, $clientSecret); - $app->setAccessToken($token); - - $r = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", - intval($uid)); - - if(count($r)) - $me = $r[0]; - else { - logger("appnet_fetchstream: Own contact not found for user ".$uid, LOGGER_DEBUG); - return; - } - - $user = q("SELECT * FROM `user` WHERE `uid` = %d AND `account_expired` = 0 LIMIT 1", - intval($uid) - ); - - if(count($user)) - $user = $user[0]; - else { - logger("appnet_fetchstream: Own user not found for user ".$uid, LOGGER_DEBUG); - return; - } - - $ownid = get_pconfig($uid,'appnet','ownid'); - - // Fetch stream - $param = array("count" => 200, "include_deleted" => false, "include_directed_posts" => true, - "include_html" => false, "include_post_annotations" => true); - - $lastid = get_pconfig($uid, 'appnet', 'laststreamid'); - - if ($lastid <> "") - $param["since_id"] = $lastid; - - try { - $stream = $app->getUserStream($param); - } - catch (AppDotNetException $e) { - logger("appnet_fetchstream: Error fetching stream for user ".$uid." ".appnet_error($e->getMessage())); - return; - } - - if (!is_array($stream)) - $stream = array(); - - $stream = array_reverse($stream); - foreach ($stream AS $post) { - $postarray = appnet_createpost($a, $uid, $post, $me, $user, $ownid, true); - - $item = item_store($postarray); - $postarray["id"] = $item; - - logger('appnet_fetchstream: User '.$uid.' posted stream item '.$item); - - $lastid = $post["id"]; - - if (($item != 0) && ($postarray['contact-id'] != $me["id"]) && !function_exists("check_item_notification")) { - $r = q("SELECT `thread`.`iid` AS `parent` FROM `thread` - INNER JOIN `item` ON `thread`.`iid` = `item`.`parent` AND `thread`.`uid` = `item`.`uid` - WHERE `item`.`id` = %d AND `thread`.`mention` LIMIT 1", dbesc($item)); - - if (count($r)) { - require_once('include/enotify.php'); - notification(array( - 'type' => NOTIFY_COMMENT, - 'notify_flags' => $user['notify-flags'], - 'language' => $user['language'], - 'to_name' => $user['username'], - 'to_email' => $user['email'], - 'uid' => $user['uid'], - 'item' => $postarray, - 'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($item)), - 'source_name' => $postarray['author-name'], - 'source_link' => $postarray['author-link'], - 'source_photo' => $postarray['author-avatar'], - 'verb' => ACTIVITY_POST, - 'otype' => 'item', - 'parent' => $r[0]["parent"], - )); - } - } - } - - set_pconfig($uid, 'appnet', 'laststreamid', $lastid); - - // Fetch mentions - $param = array("count" => 200, "include_deleted" => false, "include_directed_posts" => true, - "include_html" => false, "include_post_annotations" => true); - - $lastid = get_pconfig($uid, 'appnet', 'lastmentionid'); - - if ($lastid <> "") - $param["since_id"] = $lastid; - - try { - $mentions = $app->getUserMentions("me", $param); - } - catch (AppDotNetException $e) { - logger("appnet_fetchstream: Error fetching mentions for user ".$uid." ".appnet_error($e->getMessage())); - return; - } - - if (!is_array($mentions)) - $mentions = array(); - - $mentions = array_reverse($mentions); - foreach ($mentions AS $post) { - $postarray = appnet_createpost($a, $uid, $post, $me, $user, $ownid, false); - - if (isset($postarray["id"])) { - $item = $postarray["id"]; - $parent_id = $postarray['parent']; - } elseif (isset($postarray["body"])) { - $item = item_store($postarray); - $postarray["id"] = $item; - - $parent_id = 0; - logger('appnet_fetchstream: User '.$uid.' posted mention item '.$item); - - if ($item && function_exists("check_item_notification")) - check_item_notification($item, $uid, NOTIFY_TAGSELF); - - } else { - $item = 0; - $parent_id = 0; - } - - // Fetch the parent and id - if (($parent_id == 0) && ($postarray['uri'] != "")) { - $r = q("SELECT `id`, `parent` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($postarray['uri']), - intval($uid) - ); - - if (count($r)) { - $item = $r[0]['id']; - $parent_id = $r[0]['parent']; - } - } - - $lastid = $post["id"]; - - //if (($item != 0) && ($postarray['contact-id'] != $me["id"])) { - if (($item != 0) && !function_exists("check_item_notification")) { - require_once('include/enotify.php'); - notification(array( - 'type' => NOTIFY_TAGSELF, - 'notify_flags' => $user['notify-flags'], - 'language' => $user['language'], - 'to_name' => $user['username'], - 'to_email' => $user['email'], - 'uid' => $user['uid'], - 'item' => $postarray, - 'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($item)), - 'source_name' => $postarray['author-name'], - 'source_link' => $postarray['author-link'], - 'source_photo' => $postarray['author-avatar'], - 'verb' => ACTIVITY_TAG, - 'otype' => 'item', - 'parent' => $parent_id, - )); - } - } - - set_pconfig($uid, 'appnet', 'lastmentionid', $lastid); - - -/* To-Do - $param = array("interaction_actions" => "star"); - $interactions = $app->getMyInteractions($param); - foreach ($interactions AS $interaction) - appnet_dolike($a, $uid, $interaction); -*/ -} - -function appnet_createpost($a, $uid, $post, $me, $user, $ownid, $createuser, $threadcompletion = true, $nodupcheck = false) { - require_once('include/items.php'); - - if ($post["machine_only"]) - return; - - if ($post["is_deleted"]) - return; - - $postarray = array(); - $postarray['gravity'] = 0; - $postarray['uid'] = $uid; - $postarray['wall'] = 0; - $postarray['verb'] = ACTIVITY_POST; - $postarray['network'] = dbesc(NETWORK_APPNET); - if (is_array($post["repost_of"])) { - // You can't reply to reposts. So use the original id and thread-id - $postarray['uri'] = "adn::".$post["repost_of"]["id"]; - $postarray['parent-uri'] = "adn::".$post["repost_of"]["thread_id"]; - } else { - $postarray['uri'] = "adn::".$post["id"]; - $postarray['parent-uri'] = "adn::".$post["thread_id"]; - } - - if (!$nodupcheck) { - $r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($postarray['uri']), - intval($uid) - ); - - if (count($r)) - return($r[0]); - - $r = q("SELECT * FROM `item` WHERE `extid` = '%s' AND `uid` = %d LIMIT 1", - dbesc($postarray['uri']), - intval($uid) - ); - - if (count($r)) - return($r[0]); - } - - if (isset($post["reply_to"]) && ($post["reply_to"] != "")) { - $postarray['thr-parent'] = "adn::".$post["reply_to"]; - - // Complete the thread (if the parent doesn't exists) - if ($threadcompletion) { - //$r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - // dbesc($postarray['thr-parent']), - // intval($uid) - // ); - //if (!count($r)) { - logger("appnet_createpost: completing thread ".$post["thread_id"]." for user ".$uid, LOGGER_DEBUG); - - require_once("addon/appnet/AppDotNet.php"); - - $token = get_pconfig($uid,'appnet','token'); - $clientId = get_pconfig($uid,'appnet','clientid'); - $clientSecret = get_pconfig($uid,'appnet','clientsecret'); - - $app = new AppDotNet($clientId, $clientSecret); - $app->setAccessToken($token); - - $param = array("count" => 200, "include_deleted" => false, "include_directed_posts" => true, - "include_html" => false, "include_post_annotations" => true); - try { - $thread = $app->getPostReplies($post["thread_id"], $param); - } - catch (AppDotNetException $e) { - logger("appnet_createpost: Error fetching thread for user ".$uid." ".appnet_error($e->getMessage())); - } - $thread = array_reverse($thread); - - logger("appnet_createpost: fetched ".count($thread)." items for thread ".$post["thread_id"]." for user ".$uid, LOGGER_DEBUG); - - foreach ($thread AS $tpost) { - $threadpost = appnet_createpost($a, $uid, $tpost, $me, $user, $ownid, false, false); - $item = item_store($threadpost); - $threadpost["id"] = $item; - - logger("appnet_createpost: stored post ".$post["id"]." thread ".$post["thread_id"]." in item ".$item, LOGGER_DEBUG); - } - //} - } - // Don't create accounts of people who just comment something - $createuser = false; - - $postarray['object-type'] = ACTIVITY_OBJ_COMMENT; - } else { - $postarray['thr-parent'] = $postarray['uri']; - $postarray['object-type'] = ACTIVITY_OBJ_NOTE; - } - - if (($post["user"]["id"] != $ownid) || ($postarray['thr-parent'] == $postarray['uri'])) { - $postarray['owner-name'] = $post["user"]["name"]; - $postarray['owner-link'] = $post["user"]["canonical_url"]; - $postarray['owner-avatar'] = $post["user"]["avatar_image"]["url"]; - $postarray['contact-id'] = appnet_fetchcontact($a, $uid, $post["user"], $me, $createuser); - } else { - $postarray['owner-name'] = $me["name"]; - $postarray['owner-link'] = $me["url"]; - $postarray['owner-avatar'] = $me["thumb"]; - $postarray['contact-id'] = $me["id"]; - } - - $links = array(); - - if (is_array($post["repost_of"])) { - $postarray['author-name'] = $post["repost_of"]["user"]["name"]; - $postarray['author-link'] = $post["repost_of"]["user"]["canonical_url"]; - $postarray['author-avatar'] = $post["repost_of"]["user"]["avatar_image"]["url"]; - - $content = $post["repost_of"]; - } else { - $postarray['author-name'] = $postarray['owner-name']; - $postarray['author-link'] = $postarray['owner-link']; - $postarray['author-avatar'] = $postarray['owner-avatar']; - - $content = $post; - } - - $postarray['plink'] = $content["canonical_url"]; - - if (is_array($content["entities"])) { - $converted = appnet_expand_entities($a, $content["text"], $content["entities"]); - $postarray['body'] = $converted["body"]; - $postarray['tag'] = $converted["tags"]; - } else - $postarray['body'] = $content["text"]; - - if (sizeof($content["entities"]["links"])) - foreach($content["entities"]["links"] AS $link) { - $url = normalise_link($link["url"]); - $links[$url] = $link["url"]; - } - - /* if (sizeof($content["annotations"])) - foreach($content["annotations"] AS $annotation) { - if ($annotation[type] == "net.app.core.oembed") { - if (isset($annotation["value"]["embeddable_url"])) { - $url = normalise_link($annotation["value"]["embeddable_url"]); - if (isset($links[$url])) - unset($links[$url]); - } - } elseif ($annotation[type] == "com.friendica.post") { - //$links = array(); - //if (isset($annotation["value"]["post-title"])) - // $postarray['title'] = $annotation["value"]["post-title"]; - - //if (isset($annotation["value"]["post-body"])) - // $postarray['body'] = $annotation["value"]["post-body"]; - - //if (isset($annotation["value"]["post-tag"])) - // $postarray['tag'] = $annotation["value"]["post-tag"]; - - if (isset($annotation["value"]["author-name"])) - $postarray['author-name'] = $annotation["value"]["author-name"]; - - if (isset($annotation["value"]["author-link"])) - $postarray['author-link'] = $annotation["value"]["author-link"]; - - if (isset($annotation["value"]["author-avatar"])) - $postarray['author-avatar'] = $annotation["value"]["author-avatar"]; - } - - } */ - - $page_info = ""; - - if (is_array($content["annotations"])) { - $photo = appnet_expand_annotations($a, $content["annotations"]); - if (($photo["large"] != "") && ($photo["url"] != "")) - $page_info = "\n[url=".$photo["url"]."][img]".$photo["large"]."[/img][/url]"; - elseif ($photo["url"] != "") - $page_info = "\n[img]".$photo["url"]."[/img]"; - - if ($photo["url"] != "") - $postarray['object-type'] = ACTIVITY_OBJ_IMAGE; - - } else - $photo = array("url" => "", "large" => ""); - - if (sizeof($links)) { - $link = array_pop($links); - $url = str_replace(array('/', '.'), array('\/', '\.'), $link); - - $page_info = add_page_info($link, false, $photo["url"]); - - if (trim($page_info) != "") { - $removedlink = preg_replace("/\[url\=".$url."\](.*?)\[\/url\]/ism", '', $postarray['body']); - if (($removedlink == "") || strstr($postarray['body'], $removedlink)) - $postarray['body'] = $removedlink; - } - } - - $postarray['body'] .= $page_info; - - $postarray['created'] = datetime_convert('UTC','UTC',$post["created_at"]); - $postarray['edited'] = datetime_convert('UTC','UTC',$post["created_at"]); - - $postarray['app'] = $post["source"]["name"]; - - return($postarray); -} - -function appnet_expand_entities($a, $body, $entities) { - - if (!function_exists('substr_unicode')) { - function substr_unicode($str, $s, $l = null) { - return join("", array_slice( - preg_split("//u", $str, -1, PREG_SPLIT_NO_EMPTY), $s, $l)); - } - } - - $tags_arr = array(); - $replace = array(); - - foreach ($entities["mentions"] AS $mention) { - $url = "@[url=https://alpha.app.net/".rawurlencode($mention["name"])."]".$mention["name"]."[/url]"; - $tags_arr["@".$mention["name"]] = $url; - $replace[$mention["pos"]] = array("pos"=> $mention["pos"], "len"=> $mention["len"], "replace"=> $url); - } - - foreach ($entities["hashtags"] AS $hashtag) { - $url = "#[url=".$a->get_baseurl()."/search?tag=".rawurlencode($hashtag["name"])."]".$hashtag["name"]."[/url]"; - $tags_arr["#".$hashtag["name"]] = $url; - $replace[$hashtag["pos"]] = array("pos"=> $hashtag["pos"], "len"=> $hashtag["len"], "replace"=> $url); - } - - foreach ($entities["links"] AS $links) { - $url = "[url=".$links["url"]."]".$links["text"]."[/url]"; - if (isset($links["amended_len"]) && ($links["amended_len"] > $links["len"])) - $replace[$links["pos"]] = array("pos"=> $links["pos"], "len"=> $links["amended_len"], "replace"=> $url); - else - $replace[$links["pos"]] = array("pos"=> $links["pos"], "len"=> $links["len"], "replace"=> $url); - } - - - if (sizeof($replace)) { - krsort($replace); - foreach ($replace AS $entity) { - $pre = substr_unicode($body, 0, $entity["pos"]); - $post = substr_unicode($body, $entity["pos"] + $entity["len"]); - //$pre = iconv_substr($body, 0, $entity["pos"], "UTF-8"); - //$post = iconv_substr($body, $entity["pos"] + $entity["len"], "UTF-8"); - - $body = $pre.$entity["replace"].$post; - } - } - - return(array("body" => $body, "tags" => implode($tags_arr, ","))); -} - -function appnet_expand_annotations($a, $annotations) { - $photo = array("url" => "", "large" => ""); - foreach ($annotations AS $annotation) { - if (($annotation[type] == "net.app.core.oembed") && - ($annotation["value"]["type"] == "photo")) { - if ($annotation["value"]["url"] != "") - $photo["url"] = $annotation["value"]["url"]; - - if ($annotation["value"]["thumbnail_large_url"] != "") - $photo["large"] = $annotation["value"]["thumbnail_large_url"]; - - //if (($annotation["value"]["thumbnail_large_url"] != "") && ($annotation["value"]["url"] != "")) - // $embedded = "\n[url=".$annotation["value"]["url"]."][img]".$annotation["value"]["thumbnail_large_url"]."[/img][/url]"; - //elseif ($annotation["value"]["url"] != "") - // $embedded = "\n[img]".$annotation["value"]["url"]."[/img]"; - } - } - return $photo; -} - -function appnet_fetchcontact($a, $uid, $contact, $me, $create_user) { - - update_gcontact(array("url" => $contact["canonical_url"], "generation" => 2, - "network" => NETWORK_APPNET, "photo" => $contact["avatar_image"]["url"], - "name" => $contact["name"], "nick" => $contact["username"], - "about" => $contact["description"]["text"], "hide" => true, - "addr" => $contact["username"]."@app.net")); - - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `alias` = '%s' LIMIT 1", - intval($uid), dbesc("adn::".$contact["id"])); - - if(!count($r) && !$create_user) - return($me["id"]); - - if ($contact["canonical_url"] == "") - return($me["id"]); - - if (count($r) && ($r[0]["readonly"] || $r[0]["blocked"])) { - logger("appnet_fetchcontact: Contact '".$r[0]["nick"]."' is blocked or readonly.", LOGGER_DEBUG); - return(-1); - } - - if(!count($r)) { - - if ($contact["name"] == "") - $contact["name"] = $contact["username"]; - - if ($contact["username"] == "") - $contact["username"] = $contact["name"]; - - // create contact record - q("INSERT INTO `contact` (`uid`, `created`, `url`, `nurl`, `addr`, `alias`, `notify`, `poll`, - `name`, `nick`, `photo`, `network`, `rel`, `priority`, - `about`, `writable`, `blocked`, `readonly`, `pending` ) - VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, 0, 0, 0 ) ", - intval($uid), - dbesc(datetime_convert()), - dbesc($contact["canonical_url"]), - dbesc(normalise_link($contact["canonical_url"])), - dbesc($contact["username"]."@app.net"), - dbesc("adn::".$contact["id"]), - dbesc(''), - dbesc("adn::".$contact["id"]), - dbesc($contact["name"]), - dbesc($contact["username"]), - dbesc($contact["avatar_image"]["url"]), - dbesc(NETWORK_APPNET), - intval(CONTACT_IS_FRIEND), - intval(1), - dbesc($contact["description"]["text"]), - intval(1) - ); - - $r = q("SELECT * FROM `contact` WHERE `alias` = '%s' AND `uid` = %d LIMIT 1", - dbesc("adn::".$contact["id"]), - intval($uid) - ); - - if(! count($r)) - return(false); - - $contact_id = $r[0]['id']; - - $g = q("SELECT def_gid FROM user WHERE uid = %d LIMIT 1", - intval($uid) - ); - - if($g && intval($g[0]['def_gid'])) { - require_once('include/group.php'); - group_add_member($uid,'',$contact_id,$g[0]['def_gid']); - } - - require_once("Photo.php"); - - $photos = import_profile_photo($contact["avatar_image"]["url"],$uid,$contact_id); - - q("UPDATE `contact` SET `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s' - WHERE `id` = %d", - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($contact_id) - ); - } else { - // update profile photos once every two weeks as we have no notification of when they change. - - //$update_photo = (($r[0]['avatar-date'] < datetime_convert('','','now -2 days')) ? true : false); - $update_photo = ($r[0]['avatar-date'] < datetime_convert('','','now -12 hours')); - - // check that we have all the photos, this has been known to fail on occasion - - if((! $r[0]['photo']) || (! $r[0]['thumb']) || (! $r[0]['micro']) || ($update_photo)) { - - logger("appnet_fetchcontact: Updating contact ".$contact["username"], LOGGER_DEBUG); - - require_once("Photo.php"); - - $photos = import_profile_photo($contact["avatar_image"]["url"], $uid, $r[0]['id']); - - q("UPDATE `contact` SET `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s', - `url` = '%s', - `nurl` = '%s', - `addr` = '%s', - `name` = '%s', - `nick` = '%s', - `about` = '%s' - WHERE `id` = %d", - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc($contact["canonical_url"]), - dbesc(normalise_link($contact["canonical_url"])), - dbesc($contact["username"]."@app.net"), - dbesc($contact["name"]), - dbesc($contact["username"]), - dbesc($contact["description"]["text"]), - intval($r[0]['id']) - ); - } - } - - return($r[0]["id"]); -} - -function appnet_prepare_body(&$a,&$b) { - if ($b["item"]["network"] != NETWORK_APPNET) - return; - - if ($b["preview"]) { - $max_char = 256; - require_once("include/plaintext.php"); - $item = $b["item"]; - $item["plink"] = $a->get_baseurl()."/display/".$a->user["nickname"]."/".$item["parent"]; - - $r = q("SELECT `author-link` FROM item WHERE item.uri = '%s' AND item.uid = %d LIMIT 1", - dbesc($item["thr-parent"]), - intval(local_user())); - - if(count($r)) { - $orig_post = $r[0]; - - $nicknameplain = preg_replace("=https?://alpha.app.net/(.*)=ism", "$1", $orig_post["author-link"]); - $nickname = "@[url=".$orig_post["author-link"]."]".$nicknameplain."[/url]"; - $nicknameplain = "@".$nicknameplain; - - if ((strpos($item["body"], $nickname) === false) && (strpos($item["body"], $nicknameplain) === false)) - $item["body"] = $nickname." ".$item["body"]; - } - - - - $msgarr = plaintext($a, $item, $max_char, true); - $msg = appnet_create_entities($a, $item, $msgarr); - - require_once("library/markdown.php"); - $msg = Markdown($msg); - - $b['html'] = $msg; - } -} - -function appnet_cron($a,$b) { - $last = get_config('appnet','last_poll'); - - $poll_interval = intval(get_config('appnet','poll_interval')); - if(! $poll_interval) - $poll_interval = APPNET_DEFAULT_POLL_INTERVAL; - - if($last) { - $next = $last + ($poll_interval * 60); - if($next > time()) { - logger('appnet_cron: poll intervall not reached'); - return; - } - } - logger('appnet_cron: cron_start'); - - $abandon_days = intval(get_config('system','account_abandon_days')); - if ($abandon_days < 1) - $abandon_days = 0; - - $abandon_limit = date("Y-m-d H:i:s", time() - $abandon_days * 86400); - - $r = q("SELECT * FROM `pconfig` WHERE `cat` = 'appnet' AND `k` = 'import' AND `v` = '1' ORDER BY RAND()"); - if(count($r)) { - foreach($r as $rr) { - if ($abandon_days != 0) { - $user = q("SELECT `login_date` FROM `user` WHERE uid=%d AND `login_date` >= '%s'", $rr['uid'], $abandon_limit); - if (!count($user)) { - logger('abandoned account: timeline from user '.$rr['uid'].' will not be imported'); - continue; - } - } - - logger('appnet_cron: importing timeline from user '.$rr['uid']); - appnet_fetchstream($a, $rr["uid"]); - } - } - - logger('appnet_cron: cron_end'); - - set_config('appnet','last_poll', time()); -} - -function appnet_error($msg) { - $msg = trim($msg); - $pos = strrpos($msg, "\r\n\r\n"); - - if (!$pos) - return($msg); - - $msg = substr($msg, $pos + 4); - - $error = json_decode($msg); - - if ($error == NULL) - return($msg); - - if (isset($error->meta->error_message)) - return($error->meta->error_message); - else - return(print_r($error)); -} diff --git a/appnet/lang/C/messages.po b/appnet/lang/C/messages.po deleted file mode 100644 index a6617de9..00000000 --- a/appnet/lang/C/messages.po +++ /dev/null @@ -1,116 +0,0 @@ -# ADDON appnet -# Copyright (C) -# This file is distributed under the same license as the Friendica appnet addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 11:47+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: appnet.php:39 -msgid "Permission denied." -msgstr "" - -#: appnet.php:73 -msgid "You are now authenticated to app.net. " -msgstr "" - -#: appnet.php:77 -msgid "

Error fetching token. Please try again.

" -msgstr "" - -#: appnet.php:80 -msgid "return to the connector page" -msgstr "" - -#: appnet.php:94 -msgid "Post to app.net" -msgstr "" - -#: appnet.php:125 appnet.php:129 -msgid "App.net Export" -msgstr "" - -#: appnet.php:142 -msgid "Currently connected to: " -msgstr "" - -#: appnet.php:144 -msgid "Enable App.net Post Plugin" -msgstr "" - -#: appnet.php:149 -msgid "Post to App.net by default" -msgstr "" - -#: appnet.php:153 -msgid "Import the remote timeline" -msgstr "" - -#: appnet.php:159 -msgid "" -"

Error fetching user profile. Please clear the configuration and try again." -"

" -msgstr "" - -#: appnet.php:164 -msgid "

You have two ways to connect to App.net.

" -msgstr "" - -#: appnet.php:166 -msgid "" -"

First way: Register an application at https://account.app.net/developer/apps/ and enter " -"Client ID and Client Secret. " -msgstr "" - -#: appnet.php:167 -#, php-format -msgid "Use '%s' as Redirect URI

" -msgstr "" - -#: appnet.php:169 -msgid "Client ID" -msgstr "" - -#: appnet.php:173 -msgid "Client Secret" -msgstr "" - -#: appnet.php:177 -msgid "" -"

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. " -msgstr "" - -#: appnet.php:178 -msgid "" -"Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', " -"'Messages'.

" -msgstr "" - -#: appnet.php:180 -msgid "Token" -msgstr "" - -#: appnet.php:192 -msgid "Sign in using App.net" -msgstr "" - -#: appnet.php:197 -msgid "Clear OAuth configuration" -msgstr "" - -#: appnet.php:204 -msgid "Save Settings" -msgstr "" diff --git a/appnet/lang/cs/messages.po b/appnet/lang/cs/messages.po deleted file mode 100644 index b6527459..00000000 --- a/appnet/lang/cs/messages.po +++ /dev/null @@ -1,118 +0,0 @@ -# ADDON appnet -# Copyright (C) -# This file is distributed under the same license as the Friendica appnet addon package. -# -# -# Translators: -# Michal Šupler , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 11:47+0200\n" -"PO-Revision-Date: 2014-07-02 15:24+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" - -#: appnet.php:39 -msgid "Permission denied." -msgstr "Přístup odmítnut." - -#: appnet.php:73 -msgid "You are now authenticated to app.net. " -msgstr "Nyní jste přihlášen k app.net." - -#: appnet.php:77 -msgid "

Error fetching token. Please try again.

" -msgstr "

Chyba v přenesení tokenu. Prosím zkuste to znovu.

" - -#: appnet.php:80 -msgid "return to the connector page" -msgstr "návrat ke stránce konektor" - -#: appnet.php:94 -msgid "Post to app.net" -msgstr "Poslat příspěvek na app.net" - -#: appnet.php:125 appnet.php:129 -msgid "App.net Export" -msgstr "App.net Export" - -#: appnet.php:142 -msgid "Currently connected to: " -msgstr "V současné době připojen k:" - -#: appnet.php:144 -msgid "Enable App.net Post Plugin" -msgstr "Aktivovat App.net Post Plugin" - -#: appnet.php:149 -msgid "Post to App.net by default" -msgstr "Defaultně poslat na App.net" - -#: appnet.php:153 -msgid "Import the remote timeline" -msgstr "Importovat vzdálenou časovou osu" - -#: appnet.php:159 -msgid "" -"

Error fetching user profile. Please clear the configuration and try " -"again.

" -msgstr "

Chyba v přenesení uživatelského profilu. Prosím zkuste smazat konfiguraci a zkusit to znovu.

" - -#: appnet.php:164 -msgid "

You have two ways to connect to App.net.

" -msgstr "

Máte nyní dvě možnosti jak se připojit k App.net.

" - -#: appnet.php:166 -msgid "" -"

First way: Register an application at https://account.app.net/developer/apps/" -" and enter Client ID and Client Secret. " -msgstr "

První možnost: Registrovat svou žádost na https://account.app.net/developer/apps/ a zadat Client ID and Client Secret. " - -#: appnet.php:167 -#, php-format -msgid "Use '%s' as Redirect URI

" -msgstr "Použít '%s' jako URI pro přesměrování

" - -#: appnet.php:169 -msgid "Client ID" -msgstr "Client ID" - -#: appnet.php:173 -msgid "Client Secret" -msgstr "Client Secret" - -#: appnet.php:177 -msgid "" -"

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. " -msgstr "

Druhá možnost: vložit token do http://dev-lite.jonathonduerig.com/. " - -#: appnet.php:178 -msgid "" -"Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', " -"'Messages'.

" -msgstr "Nastavte tyto rámce: 'Základní', 'Stream', 'Psaní příspěvků, 'Veřejné zprávy', 'Zprávy'.

" - -#: appnet.php:180 -msgid "Token" -msgstr "Token" - -#: appnet.php:192 -msgid "Sign in using App.net" -msgstr "Přihlásit se s použitím App.net" - -#: appnet.php:197 -msgid "Clear OAuth configuration" -msgstr "Vymazat konfiguraci OAuth" - -#: appnet.php:204 -msgid "Save Settings" -msgstr "Uložit Nastavení" diff --git a/appnet/lang/cs/strings.php b/appnet/lang/cs/strings.php deleted file mode 100644 index 4bc45427..00000000 --- a/appnet/lang/cs/strings.php +++ /dev/null @@ -1,29 +0,0 @@ -=2 && $n<=4) ? 1 : 2;; -}} -; -$a->strings["Permission denied."] = "Přístup odmítnut."; -$a->strings["You are now authenticated to app.net. "] = "Nyní jste přihlášen k app.net."; -$a->strings["

Error fetching token. Please try again.

"] = "

Chyba v přenesení tokenu. Prosím zkuste to znovu.

"; -$a->strings["return to the connector page"] = "návrat ke stránce konektor"; -$a->strings["Post to app.net"] = "Poslat příspěvek na app.net"; -$a->strings["App.net Export"] = "App.net Export"; -$a->strings["Currently connected to: "] = "V současné době připojen k:"; -$a->strings["Enable App.net Post Plugin"] = "Aktivovat App.net Post Plugin"; -$a->strings["Post to App.net by default"] = "Defaultně poslat na App.net"; -$a->strings["Import the remote timeline"] = "Importovat vzdálenou časovou osu"; -$a->strings["

Error fetching user profile. Please clear the configuration and try again.

"] = "

Chyba v přenesení uživatelského profilu. Prosím zkuste smazat konfiguraci a zkusit to znovu.

"; -$a->strings["

You have two ways to connect to App.net.

"] = "

Máte nyní dvě možnosti jak se připojit k App.net.

"; -$a->strings["

First way: Register an application at https://account.app.net/developer/apps/ and enter Client ID and Client Secret. "] = "

První možnost: Registrovat svou žádost na https://account.app.net/developer/apps/ a zadat Client ID and Client Secret. "; -$a->strings["Use '%s' as Redirect URI

"] = "Použít '%s' jako URI pro přesměrování

"; -$a->strings["Client ID"] = "Client ID"; -$a->strings["Client Secret"] = "Client Secret"; -$a->strings["

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. "] = "

Druhá možnost: vložit token do http://dev-lite.jonathonduerig.com/. "; -$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"] = "Nastavte tyto rámce: 'Základní', 'Stream', 'Psaní příspěvků, 'Veřejné zprávy', 'Zprávy'.

"; -$a->strings["Token"] = "Token"; -$a->strings["Sign in using App.net"] = "Přihlásit se s použitím App.net"; -$a->strings["Clear OAuth configuration"] = "Vymazat konfiguraci OAuth"; -$a->strings["Save Settings"] = "Uložit Nastavení"; diff --git a/appnet/lang/de/messages.po b/appnet/lang/de/messages.po deleted file mode 100644 index 6e8f7c88..00000000 --- a/appnet/lang/de/messages.po +++ /dev/null @@ -1,118 +0,0 @@ -# ADDON appnet -# Copyright (C) -# This file is distributed under the same license as the Friendica appnet addon package. -# -# -# Translators: -# bavatar , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 11:47+0200\n" -"PO-Revision-Date: 2014-06-25 04:31+0000\n" -"Last-Translator: bavatar \n" -"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: appnet.php:39 -msgid "Permission denied." -msgstr "Zugriff verweigert." - -#: appnet.php:73 -msgid "You are now authenticated to app.net. " -msgstr "Du bist nun auf app.net authentifiziert." - -#: appnet.php:77 -msgid "

Error fetching token. Please try again.

" -msgstr "

Fehler beim Holen des Tokens, bitte versuche es später noch einmal.

" - -#: appnet.php:80 -msgid "return to the connector page" -msgstr "zurück zur Connector Seite" - -#: appnet.php:94 -msgid "Post to app.net" -msgstr "Nach app.net senden" - -#: appnet.php:125 appnet.php:129 -msgid "App.net Export" -msgstr "App.net Export" - -#: appnet.php:142 -msgid "Currently connected to: " -msgstr "Momentan verbunden mit: " - -#: appnet.php:144 -msgid "Enable App.net Post Plugin" -msgstr "Veröffentlichungen bei App.net erlauben" - -#: appnet.php:149 -msgid "Post to App.net by default" -msgstr "Standardmäßig bei App.net veröffentlichen" - -#: appnet.php:153 -msgid "Import the remote timeline" -msgstr "Importiere die entfernte Zeitleiste" - -#: appnet.php:159 -msgid "" -"

Error fetching user profile. Please clear the configuration and try " -"again.

" -msgstr "

Beim Laden des Nutzerprofils ist ein Fehler aufgetreten. Bitte versuche es später noch einmal.

" - -#: appnet.php:164 -msgid "

You have two ways to connect to App.net.

" -msgstr "

Du hast zwei Wege deinen friendica Account mit App.net zu verbinden.

" - -#: appnet.php:166 -msgid "" -"

First way: Register an application at https://account.app.net/developer/apps/" -" and enter Client ID and Client Secret. " -msgstr "

Erster Weg: Registriere eine Anwendung unter https://account.app.net/developer/apps/ und wähle eine Client ID und ein Client Secret." - -#: appnet.php:167 -#, php-format -msgid "Use '%s' as Redirect URI

" -msgstr "Verwende '%s' als Redirect URI

" - -#: appnet.php:169 -msgid "Client ID" -msgstr "Client ID" - -#: appnet.php:173 -msgid "Client Secret" -msgstr "Client Secret" - -#: appnet.php:177 -msgid "" -"

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. " -msgstr "

Zweiter Weg: Beantrage ein Token unter http://dev-lite.jonathonduerig.com/. " - -#: appnet.php:178 -msgid "" -"Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', " -"'Messages'.

" -msgstr "Verwende folgende Scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

" - -#: appnet.php:180 -msgid "Token" -msgstr "Token" - -#: appnet.php:192 -msgid "Sign in using App.net" -msgstr "Per App.net anmelden" - -#: appnet.php:197 -msgid "Clear OAuth configuration" -msgstr "OAuth Konfiguration löschen" - -#: appnet.php:204 -msgid "Save Settings" -msgstr "Einstellungen speichern" diff --git a/appnet/lang/de/strings.php b/appnet/lang/de/strings.php deleted file mode 100644 index da80cf7c..00000000 --- a/appnet/lang/de/strings.php +++ /dev/null @@ -1,29 +0,0 @@ -strings["Permission denied."] = "Zugriff verweigert."; -$a->strings["You are now authenticated to app.net. "] = "Du bist nun auf app.net authentifiziert."; -$a->strings["

Error fetching token. Please try again.

"] = "

Fehler beim Holen des Tokens, bitte versuche es später noch einmal.

"; -$a->strings["return to the connector page"] = "zurück zur Connector Seite"; -$a->strings["Post to app.net"] = "Nach app.net senden"; -$a->strings["App.net Export"] = "App.net Export"; -$a->strings["Currently connected to: "] = "Momentan verbunden mit: "; -$a->strings["Enable App.net Post Plugin"] = "Veröffentlichungen bei App.net erlauben"; -$a->strings["Post to App.net by default"] = "Standardmäßig bei App.net veröffentlichen"; -$a->strings["Import the remote timeline"] = "Importiere die entfernte Zeitleiste"; -$a->strings["

Error fetching user profile. Please clear the configuration and try again.

"] = "

Beim Laden des Nutzerprofils ist ein Fehler aufgetreten. Bitte versuche es später noch einmal.

"; -$a->strings["

You have two ways to connect to App.net.

"] = "

Du hast zwei Wege deinen friendica Account mit App.net zu verbinden.

"; -$a->strings["

First way: Register an application at https://account.app.net/developer/apps/ and enter Client ID and Client Secret. "] = "

Erster Weg: Registriere eine Anwendung unter https://account.app.net/developer/apps/ und wähle eine Client ID und ein Client Secret."; -$a->strings["Use '%s' as Redirect URI

"] = "Verwende '%s' als Redirect URI

"; -$a->strings["Client ID"] = "Client ID"; -$a->strings["Client Secret"] = "Client Secret"; -$a->strings["

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. "] = "

Zweiter Weg: Beantrage ein Token unter http://dev-lite.jonathonduerig.com/. "; -$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"] = "Verwende folgende Scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"; -$a->strings["Token"] = "Token"; -$a->strings["Sign in using App.net"] = "Per App.net anmelden"; -$a->strings["Clear OAuth configuration"] = "OAuth Konfiguration löschen"; -$a->strings["Save Settings"] = "Einstellungen speichern"; diff --git a/appnet/lang/es/messages.po b/appnet/lang/es/messages.po deleted file mode 100644 index a44089d7..00000000 --- a/appnet/lang/es/messages.po +++ /dev/null @@ -1,118 +0,0 @@ -# ADDON appnet -# Copyright (C) -# This file is distributed under the same license as the Friendica appnet addon package. -# -# -# Translators: -# Alberto Díaz Tormo , 2016 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 11:47+0200\n" -"PO-Revision-Date: 2016-10-13 21:25+0000\n" -"Last-Translator: Alberto Díaz Tormo \n" -"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: appnet.php:39 -msgid "Permission denied." -msgstr "Permiso denegado" - -#: appnet.php:73 -msgid "You are now authenticated to app.net. " -msgstr "Ahora está autenticado en app.net." - -#: appnet.php:77 -msgid "

Error fetching token. Please try again.

" -msgstr "

Advertencia de error. Por favor inténtelo de nuevo.

" - -#: appnet.php:80 -msgid "return to the connector page" -msgstr "vuelva a pa página de conexón" - -#: appnet.php:94 -msgid "Post to app.net" -msgstr "Publique en app.net" - -#: appnet.php:125 appnet.php:129 -msgid "App.net Export" -msgstr "Exportar a app.net" - -#: appnet.php:142 -msgid "Currently connected to: " -msgstr "Actualmente conectado a:" - -#: appnet.php:144 -msgid "Enable App.net Post Plugin" -msgstr "Habilitar el plugin de publicación de App.net" - -#: appnet.php:149 -msgid "Post to App.net by default" -msgstr "Publicar en App.net por defecto" - -#: appnet.php:153 -msgid "Import the remote timeline" -msgstr "Importar la línea de tiempo remota" - -#: appnet.php:159 -msgid "" -"

Error fetching user profile. Please clear the configuration and try " -"again.

" -msgstr "

Advertencia de error de perfil. Por favor borre la configuración e inténtelo de nuevo.

" - -#: appnet.php:164 -msgid "

You have two ways to connect to App.net.

" -msgstr "

Tiene dos formas de conectar a App.net.

" - -#: appnet.php:166 -msgid "" -"

First way: Register an application at https://account.app.net/developer/apps/" -" and enter Client ID and Client Secret. " -msgstr "

Primera forma: Registrar una aplicación en https://account.app.net/developer/apps/ y seleccionar Client ID y Client Secret. " - -#: appnet.php:167 -#, php-format -msgid "Use '%s' as Redirect URI

" -msgstr "Use '%s' como Redirigir URI" - -#: appnet.php:169 -msgid "Client ID" -msgstr "ID de cliente" - -#: appnet.php:173 -msgid "Client Secret" -msgstr "Secreto de cliente" - -#: appnet.php:177 -msgid "" -"

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. " -msgstr "

Segunda manera: traiga un símbolo a http://dev-lite.jonathonduerig.com/" - -#: appnet.php:178 -msgid "" -"Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', " -"'Messages'.

" -msgstr "Seleccione estas posibilidades: 'Básico', 'Continuo', 'Escribir entrada', 'Mensajes públicos', 'Mensajes'.

" - -#: appnet.php:180 -msgid "Token" -msgstr "Símbolo" - -#: appnet.php:192 -msgid "Sign in using App.net" -msgstr "Regístrese usando App.net" - -#: appnet.php:197 -msgid "Clear OAuth configuration" -msgstr "Borre la configuración OAuth" - -#: appnet.php:204 -msgid "Save Settings" -msgstr "Guardar los ajustes" diff --git a/appnet/lang/es/strings.php b/appnet/lang/es/strings.php deleted file mode 100644 index 020c6f35..00000000 --- a/appnet/lang/es/strings.php +++ /dev/null @@ -1,29 +0,0 @@ -strings["Permission denied."] = "Permiso denegado"; -$a->strings["You are now authenticated to app.net. "] = "Ahora está autenticado en app.net."; -$a->strings["

Error fetching token. Please try again.

"] = "

Advertencia de error. Por favor inténtelo de nuevo.

"; -$a->strings["return to the connector page"] = "vuelva a pa página de conexón"; -$a->strings["Post to app.net"] = "Publique en app.net"; -$a->strings["App.net Export"] = "Exportar a app.net"; -$a->strings["Currently connected to: "] = "Actualmente conectado a:"; -$a->strings["Enable App.net Post Plugin"] = "Habilitar el plugin de publicación de App.net"; -$a->strings["Post to App.net by default"] = "Publicar en App.net por defecto"; -$a->strings["Import the remote timeline"] = "Importar la línea de tiempo remota"; -$a->strings["

Error fetching user profile. Please clear the configuration and try again.

"] = "

Advertencia de error de perfil. Por favor borre la configuración e inténtelo de nuevo.

"; -$a->strings["

You have two ways to connect to App.net.

"] = "

Tiene dos formas de conectar a App.net.

"; -$a->strings["

First way: Register an application at https://account.app.net/developer/apps/ and enter Client ID and Client Secret. "] = "

Primera forma: Registrar una aplicación en https://account.app.net/developer/apps/ y seleccionar Client ID y Client Secret. "; -$a->strings["Use '%s' as Redirect URI

"] = "Use '%s' como Redirigir URI"; -$a->strings["Client ID"] = "ID de cliente"; -$a->strings["Client Secret"] = "Secreto de cliente"; -$a->strings["

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. "] = "

Segunda manera: traiga un símbolo a http://dev-lite.jonathonduerig.com/"; -$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"] = "Seleccione estas posibilidades: 'Básico', 'Continuo', 'Escribir entrada', 'Mensajes públicos', 'Mensajes'.

"; -$a->strings["Token"] = "Símbolo"; -$a->strings["Sign in using App.net"] = "Regístrese usando App.net"; -$a->strings["Clear OAuth configuration"] = "Borre la configuración OAuth"; -$a->strings["Save Settings"] = "Guardar los ajustes"; diff --git a/appnet/lang/fr/messages.po b/appnet/lang/fr/messages.po deleted file mode 100644 index 6f5f2997..00000000 --- a/appnet/lang/fr/messages.po +++ /dev/null @@ -1,119 +0,0 @@ -# ADDON appnet -# Copyright (C) -# This file is distributed under the same license as the Friendica appnet addon package. -# -# -# Translators: -# Hypolite Petovan , 2016 -# Jak , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 11:47+0200\n" -"PO-Revision-Date: 2016-09-24 02:12+0000\n" -"Last-Translator: Hypolite Petovan \n" -"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: appnet.php:39 -msgid "Permission denied." -msgstr "Autorisation refusée" - -#: appnet.php:73 -msgid "You are now authenticated to app.net. " -msgstr "Vous êtes maintenant authentifié sur app.net" - -#: appnet.php:77 -msgid "

Error fetching token. Please try again.

" -msgstr "

Impossible d'obtenir le jeton, merci de réessayer.

" - -#: appnet.php:80 -msgid "return to the connector page" -msgstr "revenir à la page du connecteur" - -#: appnet.php:94 -msgid "Post to app.net" -msgstr "Publier sur app.net" - -#: appnet.php:125 appnet.php:129 -msgid "App.net Export" -msgstr "Export App.net" - -#: appnet.php:142 -msgid "Currently connected to: " -msgstr "Actuellement connecté à :" - -#: appnet.php:144 -msgid "Enable App.net Post Plugin" -msgstr "Activer le plugin de publication app.net" - -#: appnet.php:149 -msgid "Post to App.net by default" -msgstr "Publier sur App.net par défaut" - -#: appnet.php:153 -msgid "Import the remote timeline" -msgstr "Importer la timeline distante" - -#: appnet.php:159 -msgid "" -"

Error fetching user profile. Please clear the configuration and try " -"again.

" -msgstr "

Impossible d'obtenir le profil utilisateur. Merci de réinitialiser la configuration et de réessayer.

" - -#: appnet.php:164 -msgid "

You have two ways to connect to App.net.

" -msgstr "

Vous avez deux possibilités pour vous connecter à App.net.

" - -#: appnet.php:166 -msgid "" -"

First way: Register an application at https://account.app.net/developer/apps/" -" and enter Client ID and Client Secret. " -msgstr "

Première méthode: Enregistrer une application sur App.net [en] et entrez l'ID Client et le Secret Client. " - -#: appnet.php:167 -#, php-format -msgid "Use '%s' as Redirect URI

" -msgstr "Utilisez '%s' pour l'URI de Redirection" - -#: appnet.php:169 -msgid "Client ID" -msgstr "ID Client" - -#: appnet.php:173 -msgid "Client Secret" -msgstr "Secret Client" - -#: appnet.php:177 -msgid "" -"

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. " -msgstr "

Deuxième méthode: obtenez un jeton ur http://dev-lite.jonathonduerig.com/ [en]. " - -#: appnet.php:178 -msgid "" -"Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', " -"'Messages'.

" -msgstr "Cochez les \"scopes\" suivant: \"Basic\", \"Stream\", \"Write Post\", \"Public Messages\", \"Messages\".

" - -#: appnet.php:180 -msgid "Token" -msgstr "Jeton" - -#: appnet.php:192 -msgid "Sign in using App.net" -msgstr "Se connecter avec App.net" - -#: appnet.php:197 -msgid "Clear OAuth configuration" -msgstr "Effacer la configuration OAuth" - -#: appnet.php:204 -msgid "Save Settings" -msgstr "Sauvegarder les paramètres" diff --git a/appnet/lang/fr/strings.php b/appnet/lang/fr/strings.php deleted file mode 100644 index ef9fc9e2..00000000 --- a/appnet/lang/fr/strings.php +++ /dev/null @@ -1,29 +0,0 @@ - 1);; -}} -; -$a->strings["Permission denied."] = "Autorisation refusée"; -$a->strings["You are now authenticated to app.net. "] = "Vous êtes maintenant authentifié sur app.net"; -$a->strings["

Error fetching token. Please try again.

"] = "

Impossible d'obtenir le jeton, merci de réessayer.

"; -$a->strings["return to the connector page"] = "revenir à la page du connecteur"; -$a->strings["Post to app.net"] = "Publier sur app.net"; -$a->strings["App.net Export"] = "Export App.net"; -$a->strings["Currently connected to: "] = "Actuellement connecté à :"; -$a->strings["Enable App.net Post Plugin"] = "Activer le plugin de publication app.net"; -$a->strings["Post to App.net by default"] = "Publier sur App.net par défaut"; -$a->strings["Import the remote timeline"] = "Importer la timeline distante"; -$a->strings["

Error fetching user profile. Please clear the configuration and try again.

"] = "

Impossible d'obtenir le profil utilisateur. Merci de réinitialiser la configuration et de réessayer.

"; -$a->strings["

You have two ways to connect to App.net.

"] = "

Vous avez deux possibilités pour vous connecter à App.net.

"; -$a->strings["

First way: Register an application at https://account.app.net/developer/apps/ and enter Client ID and Client Secret. "] = "

Première méthode: Enregistrer une application sur App.net [en] et entrez l'ID Client et le Secret Client. "; -$a->strings["Use '%s' as Redirect URI

"] = "Utilisez '%s' pour l'URI de Redirection"; -$a->strings["Client ID"] = "ID Client"; -$a->strings["Client Secret"] = "Secret Client"; -$a->strings["

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. "] = "

Deuxième méthode: obtenez un jeton ur http://dev-lite.jonathonduerig.com/ [en]. "; -$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"] = "Cochez les \"scopes\" suivant: \"Basic\", \"Stream\", \"Write Post\", \"Public Messages\", \"Messages\".

"; -$a->strings["Token"] = "Jeton"; -$a->strings["Sign in using App.net"] = "Se connecter avec App.net"; -$a->strings["Clear OAuth configuration"] = "Effacer la configuration OAuth"; -$a->strings["Save Settings"] = "Sauvegarder les paramètres"; diff --git a/appnet/lang/it/messages.po b/appnet/lang/it/messages.po deleted file mode 100644 index 17b933fe..00000000 --- a/appnet/lang/it/messages.po +++ /dev/null @@ -1,118 +0,0 @@ -# ADDON appnet -# Copyright (C) -# This file is distributed under the same license as the Friendica appnet addon package. -# -# -# Translators: -# fabrixxm , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 11:47+0200\n" -"PO-Revision-Date: 2014-09-10 10:18+0000\n" -"Last-Translator: fabrixxm \n" -"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: appnet.php:39 -msgid "Permission denied." -msgstr "Permesso negato." - -#: appnet.php:73 -msgid "You are now authenticated to app.net. " -msgstr "Sei autenticato su app.net" - -#: appnet.php:77 -msgid "

Error fetching token. Please try again.

" -msgstr "

Errore recuperando il token. Prova di nuovo

" - -#: appnet.php:80 -msgid "return to the connector page" -msgstr "ritorna alla pagina del connettore" - -#: appnet.php:94 -msgid "Post to app.net" -msgstr "Invia ad app.net" - -#: appnet.php:125 appnet.php:129 -msgid "App.net Export" -msgstr "Esporta App.net" - -#: appnet.php:142 -msgid "Currently connected to: " -msgstr "Al momento connesso con:" - -#: appnet.php:144 -msgid "Enable App.net Post Plugin" -msgstr "Abilita il plugin di invio ad App.net" - -#: appnet.php:149 -msgid "Post to App.net by default" -msgstr "Invia sempre ad App.net" - -#: appnet.php:153 -msgid "Import the remote timeline" -msgstr "Importa la timeline remota" - -#: appnet.php:159 -msgid "" -"

Error fetching user profile. Please clear the configuration and try " -"again.

" -msgstr "

Errore recuperando il profilo utente. Svuota la configurazione e prova di nuovo.

" - -#: appnet.php:164 -msgid "

You have two ways to connect to App.net.

" -msgstr "

Puoi collegarti ad App.net in due modi.

" - -#: appnet.php:166 -msgid "" -"

First way: Register an application at https://account.app.net/developer/apps/" -" and enter Client ID and Client Secret. " -msgstr "

Registrare un'applicazione su https://account.app.net/developer/apps/ e inserire Client ID e Client Secret." - -#: appnet.php:167 -#, php-format -msgid "Use '%s' as Redirect URI

" -msgstr "Usa '%s' come Redirect URI

" - -#: appnet.php:169 -msgid "Client ID" -msgstr "Client ID" - -#: appnet.php:173 -msgid "Client Secret" -msgstr "Client Secret" - -#: appnet.php:177 -msgid "" -"

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. " -msgstr "

Oppure puoi recuperare un token su http://dev-lite.jonathonduerig.com/." - -#: appnet.php:178 -msgid "" -"Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', " -"'Messages'.

" -msgstr "Imposta gli ambiti 'Basic', 'Stream', 'Scrivi Post', 'Messaggi Pubblici', 'Messaggi'.

" - -#: appnet.php:180 -msgid "Token" -msgstr "Token" - -#: appnet.php:192 -msgid "Sign in using App.net" -msgstr "Autenticati con App.net" - -#: appnet.php:197 -msgid "Clear OAuth configuration" -msgstr "Pulisci configurazione OAuth" - -#: appnet.php:204 -msgid "Save Settings" -msgstr "Salva Impostazioni" diff --git a/appnet/lang/it/strings.php b/appnet/lang/it/strings.php deleted file mode 100644 index 01c56524..00000000 --- a/appnet/lang/it/strings.php +++ /dev/null @@ -1,29 +0,0 @@ -strings["Permission denied."] = "Permesso negato."; -$a->strings["You are now authenticated to app.net. "] = "Sei autenticato su app.net"; -$a->strings["

Error fetching token. Please try again.

"] = "

Errore recuperando il token. Prova di nuovo

"; -$a->strings["return to the connector page"] = "ritorna alla pagina del connettore"; -$a->strings["Post to app.net"] = "Invia ad app.net"; -$a->strings["App.net Export"] = "Esporta App.net"; -$a->strings["Currently connected to: "] = "Al momento connesso con:"; -$a->strings["Enable App.net Post Plugin"] = "Abilita il plugin di invio ad App.net"; -$a->strings["Post to App.net by default"] = "Invia sempre ad App.net"; -$a->strings["Import the remote timeline"] = "Importa la timeline remota"; -$a->strings["

Error fetching user profile. Please clear the configuration and try again.

"] = "

Errore recuperando il profilo utente. Svuota la configurazione e prova di nuovo.

"; -$a->strings["

You have two ways to connect to App.net.

"] = "

Puoi collegarti ad App.net in due modi.

"; -$a->strings["

First way: Register an application at https://account.app.net/developer/apps/ and enter Client ID and Client Secret. "] = "

Registrare un'applicazione su https://account.app.net/developer/apps/ e inserire Client ID e Client Secret."; -$a->strings["Use '%s' as Redirect URI

"] = "Usa '%s' come Redirect URI

"; -$a->strings["Client ID"] = "Client ID"; -$a->strings["Client Secret"] = "Client Secret"; -$a->strings["

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. "] = "

Oppure puoi recuperare un token su http://dev-lite.jonathonduerig.com/."; -$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"] = "Imposta gli ambiti 'Basic', 'Stream', 'Scrivi Post', 'Messaggi Pubblici', 'Messaggi'.

"; -$a->strings["Token"] = "Token"; -$a->strings["Sign in using App.net"] = "Autenticati con App.net"; -$a->strings["Clear OAuth configuration"] = "Pulisci configurazione OAuth"; -$a->strings["Save Settings"] = "Salva Impostazioni"; diff --git a/appnet/lang/nl/messages.po b/appnet/lang/nl/messages.po deleted file mode 100644 index 74653c76..00000000 --- a/appnet/lang/nl/messages.po +++ /dev/null @@ -1,118 +0,0 @@ -# ADDON appnet -# Copyright (C) -# This file is distributed under the same license as the Friendica appnet addon package. -# -# -# Translators: -# Jeroen S , 2016 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 11:47+0200\n" -"PO-Revision-Date: 2016-06-23 19:52+0000\n" -"Last-Translator: Jeroen S \n" -"Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: nl\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: appnet.php:39 -msgid "Permission denied." -msgstr "Toegang geweigerd" - -#: appnet.php:73 -msgid "You are now authenticated to app.net. " -msgstr "Je bent nu aangemeld bij app.net." - -#: appnet.php:77 -msgid "

Error fetching token. Please try again.

" -msgstr "

Fout tijdens token fetching. Probeer het nogmaals.

" - -#: appnet.php:80 -msgid "return to the connector page" -msgstr "ga terug naar de connector pagina" - -#: appnet.php:94 -msgid "Post to app.net" -msgstr "Post naar app.net." - -#: appnet.php:125 appnet.php:129 -msgid "App.net Export" -msgstr "App.net Export" - -#: appnet.php:142 -msgid "Currently connected to: " -msgstr "Momenteel verbonden met:" - -#: appnet.php:144 -msgid "Enable App.net Post Plugin" -msgstr "App.net Post Plugin inschakelen" - -#: appnet.php:149 -msgid "Post to App.net by default" -msgstr "Naar App.net posten als standaard instellen" - -#: appnet.php:153 -msgid "Import the remote timeline" -msgstr "The tijdlijn op afstand importeren" - -#: appnet.php:159 -msgid "" -"

Error fetching user profile. Please clear the configuration and try " -"again.

" -msgstr "

Fout tijdens het ophalen van gebruikersprofiel. Leeg de configuratie en probeer het opnieuw.

" - -#: appnet.php:164 -msgid "

You have two ways to connect to App.net.

" -msgstr "

Er zijn twee manieren om met App.net te verbinden.

" - -#: appnet.php:166 -msgid "" -"

First way: Register an application at https://account.app.net/developer/apps/" -" and enter Client ID and Client Secret. " -msgstr "" - -#: appnet.php:167 -#, php-format -msgid "Use '%s' as Redirect URI

" -msgstr "" - -#: appnet.php:169 -msgid "Client ID" -msgstr "" - -#: appnet.php:173 -msgid "Client Secret" -msgstr "" - -#: appnet.php:177 -msgid "" -"

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. " -msgstr "" - -#: appnet.php:178 -msgid "" -"Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', " -"'Messages'.

" -msgstr "" - -#: appnet.php:180 -msgid "Token" -msgstr "" - -#: appnet.php:192 -msgid "Sign in using App.net" -msgstr "" - -#: appnet.php:197 -msgid "Clear OAuth configuration" -msgstr "" - -#: appnet.php:204 -msgid "Save Settings" -msgstr "" diff --git a/appnet/lang/nl/strings.php b/appnet/lang/nl/strings.php deleted file mode 100644 index ba72e364..00000000 --- a/appnet/lang/nl/strings.php +++ /dev/null @@ -1,29 +0,0 @@ -strings["Permission denied."] = "Toegang geweigerd"; -$a->strings["You are now authenticated to app.net. "] = "Je bent nu aangemeld bij app.net."; -$a->strings["

Error fetching token. Please try again.

"] = "

Fout tijdens token fetching. Probeer het nogmaals.

"; -$a->strings["return to the connector page"] = "ga terug naar de connector pagina"; -$a->strings["Post to app.net"] = "Post naar app.net."; -$a->strings["App.net Export"] = "App.net Export"; -$a->strings["Currently connected to: "] = "Momenteel verbonden met:"; -$a->strings["Enable App.net Post Plugin"] = "App.net Post Plugin inschakelen"; -$a->strings["Post to App.net by default"] = "Naar App.net posten als standaard instellen"; -$a->strings["Import the remote timeline"] = "The tijdlijn op afstand importeren"; -$a->strings["

Error fetching user profile. Please clear the configuration and try again.

"] = "

Fout tijdens het ophalen van gebruikersprofiel. Leeg de configuratie en probeer het opnieuw.

"; -$a->strings["

You have two ways to connect to App.net.

"] = "

Er zijn twee manieren om met App.net te verbinden.

"; -$a->strings["

First way: Register an application at https://account.app.net/developer/apps/ and enter Client ID and Client Secret. "] = ""; -$a->strings["Use '%s' as Redirect URI

"] = ""; -$a->strings["Client ID"] = ""; -$a->strings["Client Secret"] = ""; -$a->strings["

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. "] = ""; -$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"] = ""; -$a->strings["Token"] = ""; -$a->strings["Sign in using App.net"] = ""; -$a->strings["Clear OAuth configuration"] = ""; -$a->strings["Save Settings"] = ""; diff --git a/appnet/lang/pt-br/messages.po b/appnet/lang/pt-br/messages.po deleted file mode 100644 index c279c7dd..00000000 --- a/appnet/lang/pt-br/messages.po +++ /dev/null @@ -1,119 +0,0 @@ -# ADDON appnet -# Copyright (C) -# This file is distributed under the same license as the Friendica appnet addon package. -# -# -# Translators: -# Beatriz Vital , 2016 -# Calango Jr , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 11:47+0200\n" -"PO-Revision-Date: 2016-08-19 20:37+0000\n" -"Last-Translator: Beatriz Vital \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/Friendica/friendica/language/pt_BR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: pt_BR\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: appnet.php:39 -msgid "Permission denied." -msgstr "Permissão negada." - -#: appnet.php:73 -msgid "You are now authenticated to app.net. " -msgstr "Você está autenticado no app.net." - -#: appnet.php:77 -msgid "

Error fetching token. Please try again.

" -msgstr "Erro ocorrido na obtenção do token. Tente novamente." - -#: appnet.php:80 -msgid "return to the connector page" -msgstr "Volte a página de conectores." - -#: appnet.php:94 -msgid "Post to app.net" -msgstr "Publicar no App.net" - -#: appnet.php:125 appnet.php:129 -msgid "App.net Export" -msgstr "App.net exportar" - -#: appnet.php:142 -msgid "Currently connected to: " -msgstr "Atualmente conectado em: " - -#: appnet.php:144 -msgid "Enable App.net Post Plugin" -msgstr "Habilitar plug-in para publicar no App.net" - -#: appnet.php:149 -msgid "Post to App.net by default" -msgstr "Publicar em App.net por padrão" - -#: appnet.php:153 -msgid "Import the remote timeline" -msgstr "Importar a linha do tempo remota" - -#: appnet.php:159 -msgid "" -"

Error fetching user profile. Please clear the configuration and try " -"again.

" -msgstr "Erro na obtenção do perfil do usuário. Confira as configurações e tente novamente." - -#: appnet.php:164 -msgid "

You have two ways to connect to App.net.

" -msgstr "

Você possui duas formas de conectar ao App.net

" - -#: appnet.php:166 -msgid "" -"

First way: Register an application at https://account.app.net/developer/apps/" -" and enter Client ID and Client Secret. " -msgstr "

1º Método: Registre uma aplicação em https://account.app.net/developer/apps/ e entre o Client ID e Client Secret" - -#: appnet.php:167 -#, php-format -msgid "Use '%s' as Redirect URI

" -msgstr "Use '%s' como URI redirecionador

" - -#: appnet.php:169 -msgid "Client ID" -msgstr "Client ID" - -#: appnet.php:173 -msgid "Client Secret" -msgstr "Client Secret" - -#: appnet.php:177 -msgid "" -"

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. " -msgstr "

2º Método: obtenha um token em http://dev-lite.jonathonduerig.com/. " - -#: appnet.php:178 -msgid "" -"Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', " -"'Messages'.

" -msgstr "Adicione valor as estas saídas: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

" - -#: appnet.php:180 -msgid "Token" -msgstr "Token" - -#: appnet.php:192 -msgid "Sign in using App.net" -msgstr "Entre usando o App.net" - -#: appnet.php:197 -msgid "Clear OAuth configuration" -msgstr "Limpar configuração OAuth" - -#: appnet.php:204 -msgid "Save Settings" -msgstr "Salvar Configurações" diff --git a/appnet/lang/pt-br/strings.php b/appnet/lang/pt-br/strings.php deleted file mode 100644 index b8e1112c..00000000 --- a/appnet/lang/pt-br/strings.php +++ /dev/null @@ -1,29 +0,0 @@ - 1);; -}} -; -$a->strings["Permission denied."] = "Permissão negada."; -$a->strings["You are now authenticated to app.net. "] = "Você está autenticado no app.net."; -$a->strings["

Error fetching token. Please try again.

"] = "Erro ocorrido na obtenção do token. Tente novamente."; -$a->strings["return to the connector page"] = "Volte a página de conectores."; -$a->strings["Post to app.net"] = "Publicar no App.net"; -$a->strings["App.net Export"] = "App.net exportar"; -$a->strings["Currently connected to: "] = "Atualmente conectado em: "; -$a->strings["Enable App.net Post Plugin"] = "Habilitar plug-in para publicar no App.net"; -$a->strings["Post to App.net by default"] = "Publicar em App.net por padrão"; -$a->strings["Import the remote timeline"] = "Importar a linha do tempo remota"; -$a->strings["

Error fetching user profile. Please clear the configuration and try again.

"] = "Erro na obtenção do perfil do usuário. Confira as configurações e tente novamente."; -$a->strings["

You have two ways to connect to App.net.

"] = "

Você possui duas formas de conectar ao App.net

"; -$a->strings["

First way: Register an application at https://account.app.net/developer/apps/ and enter Client ID and Client Secret. "] = "

1º Método: Registre uma aplicação em https://account.app.net/developer/apps/ e entre o Client ID e Client Secret"; -$a->strings["Use '%s' as Redirect URI

"] = "Use '%s' como URI redirecionador

"; -$a->strings["Client ID"] = "Client ID"; -$a->strings["Client Secret"] = "Client Secret"; -$a->strings["

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. "] = "

2º Método: obtenha um token em http://dev-lite.jonathonduerig.com/. "; -$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"] = "Adicione valor as estas saídas: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"; -$a->strings["Token"] = "Token"; -$a->strings["Sign in using App.net"] = "Entre usando o App.net"; -$a->strings["Clear OAuth configuration"] = "Limpar configuração OAuth"; -$a->strings["Save Settings"] = "Salvar Configurações"; diff --git a/appnet/lang/ro/messages.po b/appnet/lang/ro/messages.po deleted file mode 100644 index a9c5242f..00000000 --- a/appnet/lang/ro/messages.po +++ /dev/null @@ -1,117 +0,0 @@ -# ADDON appnet -# Copyright (C) -# This file is distributed under the same license as the Friendica appnet addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 11:47+0200\n" -"PO-Revision-Date: 2014-07-08 11:40+0000\n" -"Last-Translator: Arian - Cazare Muncitori \n" -"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ro_RO\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" - -#: appnet.php:39 -msgid "Permission denied." -msgstr "Permisiune refuzată." - -#: appnet.php:73 -msgid "You are now authenticated to app.net. " -msgstr "Acum sunteți autentificat pe App.net." - -#: appnet.php:77 -msgid "

Error fetching token. Please try again.

" -msgstr "

Eroare la procesarea token-ului. Vă rugăm să reîncercați.

" - -#: appnet.php:80 -msgid "return to the connector page" -msgstr "revenire la pagina de conectare" - -#: appnet.php:94 -msgid "Post to app.net" -msgstr "Postați pe App.net" - -#: appnet.php:125 appnet.php:129 -msgid "App.net Export" -msgstr "Exportare pe App.net" - -#: appnet.php:142 -msgid "Currently connected to: " -msgstr "Conectat curent la:" - -#: appnet.php:144 -msgid "Enable App.net Post Plugin" -msgstr "Activare Modul Postare pe App.net" - -#: appnet.php:149 -msgid "Post to App.net by default" -msgstr "Postați implicit pe App.net" - -#: appnet.php:153 -msgid "Import the remote timeline" -msgstr "Importare cronologie la distanță" - -#: appnet.php:159 -msgid "" -"

Error fetching user profile. Please clear the configuration and try " -"again.

" -msgstr "

Eroare la procesarea profilului de utilizator. Vă rugăm să ștergeți configurarea şi apoi reîncercați.

" - -#: appnet.php:164 -msgid "

You have two ways to connect to App.net.

" -msgstr "

Aveți două modalități de a vă conecta la App.net.

" - -#: appnet.php:166 -msgid "" -"

First way: Register an application at https://account.app.net/developer/apps/" -" and enter Client ID and Client Secret. " -msgstr "

Prima modalitate: Înregistrați o cerere pe https://account.app.net/developer/apps/ şi introduceți ID Client şi Cheia Secretă Client." - -#: appnet.php:167 -#, php-format -msgid "Use '%s' as Redirect URI

" -msgstr "Utilizați '%s' ca URI de Redirecţionare

" - -#: appnet.php:169 -msgid "Client ID" -msgstr "ID Client" - -#: appnet.php:173 -msgid "Client Secret" -msgstr "Cheia Secretă Client" - -#: appnet.php:177 -msgid "" -"

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. " -msgstr "

A doua cale: autorizați un indicativ de acces token de pe http://dev-lite.jonathonduerig.com/ ." - -#: appnet.php:178 -msgid "" -"Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', " -"'Messages'.

" -msgstr "Stabiliți aceste scopuri: 'De Bază', 'Flux', 'Scriere Postare', 'Mesaje Publice', 'Mesaje'.

" - -#: appnet.php:180 -msgid "Token" -msgstr "Token" - -#: appnet.php:192 -msgid "Sign in using App.net" -msgstr "Autentificați-vă utilizând App.net" - -#: appnet.php:197 -msgid "Clear OAuth configuration" -msgstr "Ștergeți configurările OAuth" - -#: appnet.php:204 -msgid "Save Settings" -msgstr "Salvare Configurări" diff --git a/appnet/lang/ro/strings.php b/appnet/lang/ro/strings.php deleted file mode 100644 index fa8d139d..00000000 --- a/appnet/lang/ro/strings.php +++ /dev/null @@ -1,29 +0,0 @@ -19)||(($n%100==0)&&($n!=0)))?2:1));; -}} -; -$a->strings["Permission denied."] = "Permisiune refuzată."; -$a->strings["You are now authenticated to app.net. "] = "Acum sunteți autentificat pe App.net."; -$a->strings["

Error fetching token. Please try again.

"] = "

Eroare la procesarea token-ului. Vă rugăm să reîncercați.

"; -$a->strings["return to the connector page"] = "revenire la pagina de conectare"; -$a->strings["Post to app.net"] = "Postați pe App.net"; -$a->strings["App.net Export"] = "Exportare pe App.net"; -$a->strings["Currently connected to: "] = "Conectat curent la:"; -$a->strings["Enable App.net Post Plugin"] = "Activare Modul Postare pe App.net"; -$a->strings["Post to App.net by default"] = "Postați implicit pe App.net"; -$a->strings["Import the remote timeline"] = "Importare cronologie la distanță"; -$a->strings["

Error fetching user profile. Please clear the configuration and try again.

"] = "

Eroare la procesarea profilului de utilizator. Vă rugăm să ștergeți configurarea şi apoi reîncercați.

"; -$a->strings["

You have two ways to connect to App.net.

"] = "

Aveți două modalități de a vă conecta la App.net.

"; -$a->strings["

First way: Register an application at https://account.app.net/developer/apps/ and enter Client ID and Client Secret. "] = "

Prima modalitate: Înregistrați o cerere pe https://account.app.net/developer/apps/ şi introduceți ID Client şi Cheia Secretă Client."; -$a->strings["Use '%s' as Redirect URI

"] = "Utilizați '%s' ca URI de Redirecţionare

"; -$a->strings["Client ID"] = "ID Client"; -$a->strings["Client Secret"] = "Cheia Secretă Client"; -$a->strings["

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. "] = "

A doua cale: autorizați un indicativ de acces token de pe http://dev-lite.jonathonduerig.com/ ."; -$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"] = "Stabiliți aceste scopuri: 'De Bază', 'Flux', 'Scriere Postare', 'Mesaje Publice', 'Mesaje'.

"; -$a->strings["Token"] = "Token"; -$a->strings["Sign in using App.net"] = "Autentificați-vă utilizând App.net"; -$a->strings["Clear OAuth configuration"] = "Ștergeți configurările OAuth"; -$a->strings["Save Settings"] = "Salvare Configurări"; diff --git a/appnet/lang/ru/messages.po b/appnet/lang/ru/messages.po deleted file mode 100644 index a5755caa..00000000 --- a/appnet/lang/ru/messages.po +++ /dev/null @@ -1,118 +0,0 @@ -# ADDON appnet -# Copyright (C) -# This file is distributed under the same license as the Friendica appnet addon package. -# -# -# Translators: -# Stanislav N. , 2017 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 11:47+0200\n" -"PO-Revision-Date: 2017-04-08 05:32+0000\n" -"Last-Translator: Stanislav N. \n" -"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: appnet.php:39 -msgid "Permission denied." -msgstr "Доступ запрещен." - -#: appnet.php:73 -msgid "You are now authenticated to app.net. " -msgstr "Вы аутентифицированы на app.net" - -#: appnet.php:77 -msgid "

Error fetching token. Please try again.

" -msgstr "

Ошибка получения токена. Попробуйте еще раз.

" - -#: appnet.php:80 -msgid "return to the connector page" -msgstr "вернуться на страницу коннектора" - -#: appnet.php:94 -msgid "Post to app.net" -msgstr "Отправить на app.net" - -#: appnet.php:125 appnet.php:129 -msgid "App.net Export" -msgstr "Экспорт app.net" - -#: appnet.php:142 -msgid "Currently connected to: " -msgstr "В настоящее время соединены с: " - -#: appnet.php:144 -msgid "Enable App.net Post Plugin" -msgstr "Включить плагин App.net" - -#: appnet.php:149 -msgid "Post to App.net by default" -msgstr "Отправлять сообщения на App.net по-умолчанию" - -#: appnet.php:153 -msgid "Import the remote timeline" -msgstr "Импортировать удаленные сообщения" - -#: appnet.php:159 -msgid "" -"

Error fetching user profile. Please clear the configuration and try " -"again.

" -msgstr "

Ошибка при получении профиля пользователя. Сбросьте конфигурацию и попробуйте еще раз.

" - -#: appnet.php:164 -msgid "

You have two ways to connect to App.net.

" -msgstr "

У вас есть два способа соединения с App.net.

" - -#: appnet.php:166 -msgid "" -"

First way: Register an application at https://account.app.net/developer/apps/" -" and enter Client ID and Client Secret. " -msgstr "

Первый способ: зарегистрируйте приложение на https://account.app.net/developer/apps/ и введите Client ID и Client Secret" - -#: appnet.php:167 -#, php-format -msgid "Use '%s' as Redirect URI

" -msgstr "Используйте '%s' как Redirect URI

" - -#: appnet.php:169 -msgid "Client ID" -msgstr "Client ID" - -#: appnet.php:173 -msgid "Client Secret" -msgstr "Client Secret" - -#: appnet.php:177 -msgid "" -"

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. " -msgstr "

Второй путь: получите токен на http://dev-lite.jonathonduerig.com/. " - -#: appnet.php:178 -msgid "" -"Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', " -"'Messages'.

" -msgstr "Выберите области: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

" - -#: appnet.php:180 -msgid "Token" -msgstr "Токен" - -#: appnet.php:192 -msgid "Sign in using App.net" -msgstr "Войти через App.net" - -#: appnet.php:197 -msgid "Clear OAuth configuration" -msgstr "Удалить конфигурацию OAuth" - -#: appnet.php:204 -msgid "Save Settings" -msgstr "Сохранить настройки" diff --git a/appnet/lang/ru/strings.php b/appnet/lang/ru/strings.php deleted file mode 100644 index c2d9b440..00000000 --- a/appnet/lang/ru/strings.php +++ /dev/null @@ -1,29 +0,0 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14) ? 1 : $n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)? 2 : 3);; -}} -; -$a->strings["Permission denied."] = "Доступ запрещен."; -$a->strings["You are now authenticated to app.net. "] = "Вы аутентифицированы на app.net"; -$a->strings["

Error fetching token. Please try again.

"] = "

Ошибка получения токена. Попробуйте еще раз.

"; -$a->strings["return to the connector page"] = "вернуться на страницу коннектора"; -$a->strings["Post to app.net"] = "Отправить на app.net"; -$a->strings["App.net Export"] = "Экспорт app.net"; -$a->strings["Currently connected to: "] = "В настоящее время соединены с: "; -$a->strings["Enable App.net Post Plugin"] = "Включить плагин App.net"; -$a->strings["Post to App.net by default"] = "Отправлять сообщения на App.net по-умолчанию"; -$a->strings["Import the remote timeline"] = "Импортировать удаленные сообщения"; -$a->strings["

Error fetching user profile. Please clear the configuration and try again.

"] = "

Ошибка при получении профиля пользователя. Сбросьте конфигурацию и попробуйте еще раз.

"; -$a->strings["

You have two ways to connect to App.net.

"] = "

У вас есть два способа соединения с App.net.

"; -$a->strings["

First way: Register an application at https://account.app.net/developer/apps/ and enter Client ID and Client Secret. "] = "

Первый способ: зарегистрируйте приложение на https://account.app.net/developer/apps/ и введите Client ID и Client Secret"; -$a->strings["Use '%s' as Redirect URI

"] = "Используйте '%s' как Redirect URI

"; -$a->strings["Client ID"] = "Client ID"; -$a->strings["Client Secret"] = "Client Secret"; -$a->strings["

Second way: fetch a token at http://dev-lite.jonathonduerig.com/. "] = "

Второй путь: получите токен на http://dev-lite.jonathonduerig.com/. "; -$a->strings["Set these scopes: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"] = "Выберите области: 'Basic', 'Stream', 'Write Post', 'Public Messages', 'Messages'.

"; -$a->strings["Token"] = "Токен"; -$a->strings["Sign in using App.net"] = "Войти через App.net"; -$a->strings["Clear OAuth configuration"] = "Удалить конфигурацию OAuth"; -$a->strings["Save Settings"] = "Сохранить настройки"; diff --git a/appnet/templates/admin.tpl b/appnet/templates/admin.tpl deleted file mode 100644 index a933f3d3..00000000 --- a/appnet/templates/admin.tpl +++ /dev/null @@ -1,3 +0,0 @@ -{{include file="field_input.tpl" field=$clientid}} -{{include file="field_input.tpl" field=$clientsecret}} -
diff --git a/cal/LICENSE b/cal/LICENSE deleted file mode 100644 index 2c696e9a..00000000 --- a/cal/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013 Tobias Diekershoff - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cal/README.md b/cal/README.md deleted file mode 100644 index cb7501cd..00000000 --- a/cal/README.md +++ /dev/null @@ -1,29 +0,0 @@ -Calendar Export -=============== - -This addon makes it possible to export the events posted by your users, -so they can be imported into other calendar applications. - -Exporting a calendar is an _opt-in_ feature which has to be activated by each -of the users in the _addon settings_. As the admin you can only provide the -service but should not force it upon your users. - -The calendars are exported at - - http://example.com/cal/username/export/format - -currently the following formats are supported - -* ical -* csv. - -Author ------- - -This addon is developed by [Tobias Diekershoff](https://f.diekershoff.de/profile/tobias). - -License -------- - -This addon is licensed under the [MIT](http://opensource.org/licenses/MIT) -license, see also the LICENSE file in the addon directory. diff --git a/cal/cal.php b/cal/cal.php deleted file mode 100644 index 5c2f1021..00000000 --- a/cal/cal.php +++ /dev/null @@ -1,200 +0,0 @@ - - * License: MIT - * Status: Unsupported - * ******************************************************************/ - - -function cal_install() -{ - register_hook('plugin_settings', 'addon/cal/cal.php', 'cal_addon_settings'); - register_hook('plugin_settings_post', 'addon/cal/cal.php', 'cal_addon_settings_post'); -} -function cal_uninstall() -{ - unregister_hook('plugin_settings', 'addon/cal/cal.php', 'cal_addon_settings'); - unregister_hook('plugin_settings_post', 'addon/cal/cal.php', 'cal_addon_settings_post'); -} -function cal_module() -{ -} -/* pathes - * /cal/$user/export/$format - * currently supported formats are ical (iCalendar) and CSV - */ -function cal_content() -{ - $a = get_app(); - $o = ""; - if ($a->argc == 1) { - $o .= "

".t('Event Export')."

".t('You can download public events from: ').$a->get_baseurl()."/cal/username/export/ical

"; - } elseif ($a->argc==4) { - // get the parameters from the request we just received - $username = $a->argv[1]; - $do = $a->argv[2]; - $format = $a->argv[3]; - // check that there is a user matching the requested profile - $r = q("SELECT uid FROM user WHERE nickname='".$username."' LIMIT 1;"); - if (count($r)) - { - $uid = $r[0]['uid']; - } else { - killme(); - } - // if we shall do anything other then export, end here - if (! $do == 'export' ) - killme(); - // check if the user allows us to share the profile - $enable = get_pconfig( $uid, 'cal', 'enable'); - if (! $enable == 1) { - info(t('The user does not export the calendar.')); - return; - } - // we are allowed to show events - // get the timezone the user is in - $r = q("SELECT timezone FROM user WHERE uid=".$uid." LIMIT 1;"); - if (count($r)) - $timezone = $r[0]['timezone']; - // does the user who requests happen to be the owner of the events - // requested? then show all of your events, otherwise only those that - // don't have limitations set in allow_cid and allow_gid - if (local_user() == $uid) { - $r = q("SELECT `start`, `finish`, `adjust`, `summary`, `desc`, `location` FROM `event` WHERE `uid`=".$uid." and `cid`=0;"); - } else { - $r = q("SELECT `start`, `finish`, `adjust`, `summary`, `desc`, `location` FROM `event` WHERE `allow_cid`='' and `allow_gid`='' and `uid`='".$uid."' and `cid`='0';"); - } - // we have the events that are available for the requestor - // now format the output according to the requested format - $res = cal_format_output($r, $format, $timezone); - if (! $res=='') - info($res); - } else { - // wrong number of parameters - killme(); - } - return $o; -} - -function cal_format_output ($r, $f, $tz) -{ - $res = t('This calendar format is not supported'); - switch ($f) - { - // format the exported data as a CSV file - case "csv": - header("Content-type: text/csv"); - $o = '"Subject", "Start Date", "Start Time", "Description", "End Date", "End Time", "Location"' . PHP_EOL; - foreach ($r as $rr) { -// TODO the time / date entries don't include any information about the -// timezone the event is scheduled in :-/ - $tmp1 = strtotime($rr['start']); - $tmp2 = strtotime($rr['finish']); - $time_format = "%H:%M:%S"; - $date_format = "%Y-%m-%d"; - $o .= '"'.$rr['summary'].'", "'.strftime($date_format, $tmp1) . - '", "'.strftime($time_format, $tmp1).'", "'.$rr['desc'] . - '", "'.strftime($date_format, $tmp2) . - '", "'.strftime($time_format, $tmp2) . - '", "'.$rr['location'].'"' . PHP_EOL; - } - echo $o; - killme(); - - case "ical": - header("Content-type: text/ics"); - $o = 'BEGIN:VCALENDAR'. PHP_EOL - . 'VERSION:2.0' . PHP_EOL - . 'PRODID:-//friendica calendar export//0.1//EN' . PHP_EOL; -// TODO include timezone informations in cases were the time is not in UTC -// see http://tools.ietf.org/html/rfc2445#section-4.8.3 -// . 'BEGIN:VTIMEZONE' . PHP_EOL -// . 'TZID:' . $tz . PHP_EOL -// . 'END:VTIMEZONE' . PHP_EOL; -// TODO instead of PHP_EOL CRLF should be used for long entries -// but test your solution against http://icalvalid.cloudapp.net/ -// also long lines SHOULD be split at 75 characters length - foreach ($r as $rr) { - if ($rr['adjust'] == 1) { - $UTC = 'Z'; - } else { - $UTC = ''; - } - $o .= 'BEGIN:VEVENT' . PHP_EOL; - if ($rr[start]) { - $tmp = strtotime($rr['start']); - $dtformat = "%Y%m%dT%H%M%S".$UTC; - $o .= 'DTSTART:'.strftime($dtformat, $tmp).PHP_EOL; - } - if ($rr['finish']) { - $tmp = strtotime($rr['finish']); - $dtformat = "%Y%m%dT%H%M%S".$UTC; - $o .= 'DTEND:'.strftime($dtformat, $tmp).PHP_EOL; - } - if ($rr['summary']) - $tmp = $rr['summary']; - $tmp = str_replace(PHP_EOL, PHP_EOL.' ',$tmp); - $tmp = addcslashes($tmp, ',;'); - $o .= 'SUMMARY:' . $tmp . PHP_EOL; - if ($rr['desc']) - $tmp = $rr['desc']; - $tmp = str_replace(PHP_EOL, PHP_EOL.' ',$tmp); - $tmp = addcslashes($tmp, ',;'); - $o .= 'DESCRIPTION:' . $tmp . PHP_EOL; - if ($rr['location']) { - $tmp = $rr['location']; - $tmp = str_replace(PHP_EOL, PHP_EOL.' ',$tmp); - $tmp = addcslashes($tmp, ',;'); - $o .= 'LOCATION:' . $tmp . PHP_EOL; - } - $o .= 'END:VEVENT' . PHP_EOL; - } - $o .= 'END:VCALENDAR' . PHP_EOL; - echo $o; - killme(); - } - return $res; -} - -function cal_addon_settings_post ( &$a, &$b ) -{ - if (! local_user()) - return; - - if (!x($_POST,'cal-submit')) - return; - - set_pconfig(local_user(),'cal','enable',intval($_POST['cal-enable'])); -} -function cal_addon_settings ( &$a, &$s ) -{ - if (! local_user()) - return; - - $enabled = get_pconfig(local_user(), 'cal', 'enable'); - $checked = (($enabled) ? ' checked="checked" ' : ''); - $url = $a->get_baseurl().'/cal/'.$a->user['nickname'].'/export/format'; - - $s .= ''; - $s .= '

'.t('Export Events').'

'; - $s .= '
'; - $s .= ''; -} - -?> diff --git a/cal/lang/C/messages.po b/cal/lang/C/messages.po deleted file mode 100644 index 91883299..00000000 --- a/cal/lang/C/messages.po +++ /dev/null @@ -1,54 +0,0 @@ -# ADDON cal -# Copyright (C) -# This file is distributed under the same license as the Friendica cal addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: cal.php:33 -msgid "Event Export" -msgstr "" - -#: cal.php:33 -msgid "You can download public events from: " -msgstr "" - -#: cal.php:53 -msgid "The user does not export the calendar." -msgstr "" - -#: cal.php:83 -msgid "This calendar format is not supported" -msgstr "" - -#: cal.php:181 cal.php:185 -msgid "Export Events" -msgstr "" - -#: cal.php:189 -msgid "If this is enabled, your public events will be available at" -msgstr "" - -#: cal.php:190 -msgid "Currently supported formats are ical and csv." -msgstr "" - -#: cal.php:191 -msgid "Enable calendar export" -msgstr "" - -#: cal.php:193 -msgid "Save Settings" -msgstr "" diff --git a/cal/lang/C/strings.php b/cal/lang/C/strings.php deleted file mode 100644 index a72dc119..00000000 --- a/cal/lang/C/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Event Export"] = ""; -$a->strings["You can download public events from: "] = ""; -$a->strings["The user does not export the calendar."] = ""; -$a->strings["This calendar format is not supported"] = ""; -$a->strings["Export Events"] = ""; -$a->strings["If this is enabled, your public events will be available at"] = ""; -$a->strings["Currently supported formats are ical and csv."] = ""; -$a->strings["Enable calendar export"] = ""; -$a->strings["Submit"] = ""; diff --git a/cal/lang/cs/messages.po b/cal/lang/cs/messages.po deleted file mode 100644 index 28fcb4f9..00000000 --- a/cal/lang/cs/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON cal -# Copyright (C) -# This file is distributed under the same license as the Friendica cal addon package. -# -# -# Translators: -# Michal Šupler , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2014-09-07 11:04+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" - -#: cal.php:33 -msgid "Event Export" -msgstr "Export událostí" - -#: cal.php:33 -msgid "You can download public events from: " -msgstr "Veřejné události si můžete stánout z:" - -#: cal.php:53 -msgid "The user does not export the calendar." -msgstr "Uživatel kalenář neexportuje." - -#: cal.php:83 -msgid "This calendar format is not supported" -msgstr "Tento kalendářový formát není podporován." - -#: cal.php:181 cal.php:185 -msgid "Export Events" -msgstr "Export událostí" - -#: cal.php:189 -msgid "If this is enabled, your public events will be available at" -msgstr "Pokud je toto povoleno, vaše veřejné události budou viditelné na" - -#: cal.php:190 -msgid "Currently supported formats are ical and csv." -msgstr "Aktuálně podporované formáty jsou ical a csv." - -#: cal.php:191 -msgid "Enable calendar export" -msgstr "Povolit export kalendáře" - -#: cal.php:193 -msgid "Save Settings" -msgstr "Uložit Nastavení" diff --git a/cal/lang/cs/strings.php b/cal/lang/cs/strings.php deleted file mode 100644 index 9a99079d..00000000 --- a/cal/lang/cs/strings.php +++ /dev/null @@ -1,16 +0,0 @@ -=2 && $n<=4) ? 1 : 2;; -}} -; -$a->strings["Event Export"] = "Export událostí"; -$a->strings["You can download public events from: "] = "Veřejné události si můžete stánout z:"; -$a->strings["The user does not export the calendar."] = "Uživatel kalenář neexportuje."; -$a->strings["This calendar format is not supported"] = "Tento kalendářový formát není podporován."; -$a->strings["Export Events"] = "Export událostí"; -$a->strings["If this is enabled, your public events will be available at"] = "Pokud je toto povoleno, vaše veřejné události budou viditelné na"; -$a->strings["Currently supported formats are ical and csv."] = "Aktuálně podporované formáty jsou ical a csv."; -$a->strings["Enable calendar export"] = "Povolit export kalendáře"; -$a->strings["Save Settings"] = "Uložit Nastavení"; diff --git a/cal/lang/de/messages.po b/cal/lang/de/messages.po deleted file mode 100644 index 29f6b601..00000000 --- a/cal/lang/de/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON cal -# Copyright (C) -# This file is distributed under the same license as the Friendica cal addon package. -# -# -# Translators: -# bavatar , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2014-09-28 10:39+0000\n" -"Last-Translator: bavatar \n" -"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: cal.php:33 -msgid "Event Export" -msgstr "Ereignis Export" - -#: cal.php:33 -msgid "You can download public events from: " -msgstr "Du kannst öffentliche Ereignisse hier herunterladen;" - -#: cal.php:53 -msgid "The user does not export the calendar." -msgstr "Diese_r Nutzer_in exportiert den Kalender nicht." - -#: cal.php:83 -msgid "This calendar format is not supported" -msgstr "Dieses Kalenderformat wird nicht unterstützt." - -#: cal.php:181 cal.php:185 -msgid "Export Events" -msgstr "Exportiere Ereignisse" - -#: cal.php:189 -msgid "If this is enabled, your public events will be available at" -msgstr "Wenn dies aktiviert ist, werden alle öffentliche Ereignisse unter folgender URL verfügbar sein" - -#: cal.php:190 -msgid "Currently supported formats are ical and csv." -msgstr "Derzeit werden die Formate ical und csv unterstützt." - -#: cal.php:191 -msgid "Enable calendar export" -msgstr "Kalenderexport aktivieren" - -#: cal.php:193 -msgid "Save Settings" -msgstr "Einstellungen speichern" diff --git a/cal/lang/de/strings.php b/cal/lang/de/strings.php deleted file mode 100644 index 39359271..00000000 --- a/cal/lang/de/strings.php +++ /dev/null @@ -1,16 +0,0 @@ -strings["Event Export"] = "Ereignis Export"; -$a->strings["You can download public events from: "] = "Du kannst öffentliche Ereignisse hier herunterladen;"; -$a->strings["The user does not export the calendar."] = "Diese_r Nutzer_in exportiert den Kalender nicht."; -$a->strings["This calendar format is not supported"] = "Dieses Kalenderformat wird nicht unterstützt."; -$a->strings["Export Events"] = "Exportiere Ereignisse"; -$a->strings["If this is enabled, your public events will be available at"] = "Wenn dies aktiviert ist, werden alle öffentliche Ereignisse unter folgender URL verfügbar sein"; -$a->strings["Currently supported formats are ical and csv."] = "Derzeit werden die Formate ical und csv unterstützt."; -$a->strings["Enable calendar export"] = "Kalenderexport aktivieren"; -$a->strings["Save Settings"] = "Einstellungen speichern"; diff --git a/cal/lang/es/messages.po b/cal/lang/es/messages.po deleted file mode 100644 index 65b2a322..00000000 --- a/cal/lang/es/messages.po +++ /dev/null @@ -1,55 +0,0 @@ -# ADDON cal -# Copyright (C) -# This file is distributed under the same license as the Friendica cal addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2016-10-10 20:48+0000\n" -"Last-Translator: Athalbert\n" -"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: cal.php:33 -msgid "Event Export" -msgstr "Exportación de evento" - -#: cal.php:33 -msgid "You can download public events from: " -msgstr "Puede descargar eventos públicos desde:" - -#: cal.php:53 -msgid "The user does not export the calendar." -msgstr "El usuario no exporta el calendario." - -#: cal.php:83 -msgid "This calendar format is not supported" -msgstr "No se soporta este formato de calendario" - -#: cal.php:181 cal.php:185 -msgid "Export Events" -msgstr "Exportar Eventos" - -#: cal.php:189 -msgid "If this is enabled, your public events will be available at" -msgstr "Si esto está habilitado, sus eventos públicos estarán permitidos en" - -#: cal.php:190 -msgid "Currently supported formats are ical and csv." -msgstr "Los formatos soportados actualmente son ical y csv." - -#: cal.php:191 -msgid "Enable calendar export" -msgstr "Habilitar exportar calendario" - -#: cal.php:193 -msgid "Save Settings" -msgstr "Guardar Ajustes" diff --git a/cal/lang/es/strings.php b/cal/lang/es/strings.php deleted file mode 100644 index 29c9cc93..00000000 --- a/cal/lang/es/strings.php +++ /dev/null @@ -1,16 +0,0 @@ -strings["Event Export"] = "Exportación de evento"; -$a->strings["You can download public events from: "] = "Puede descargar eventos públicos desde:"; -$a->strings["The user does not export the calendar."] = "El usuario no exporta el calendario."; -$a->strings["This calendar format is not supported"] = "No se soporta este formato de calendario"; -$a->strings["Export Events"] = "Exportar Eventos"; -$a->strings["If this is enabled, your public events will be available at"] = "Si esto está habilitado, sus eventos públicos estarán permitidos en"; -$a->strings["Currently supported formats are ical and csv."] = "Los formatos soportados actualmente son ical y csv."; -$a->strings["Enable calendar export"] = "Habilitar exportar calendario"; -$a->strings["Save Settings"] = "Guardar Ajustes"; diff --git a/cal/lang/fr/messages.po b/cal/lang/fr/messages.po deleted file mode 100644 index 1b33c119..00000000 --- a/cal/lang/fr/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON cal -# Copyright (C) -# This file is distributed under the same license as the Friendica cal addon package. -# -# -# Translators: -# Tubuntu , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2014-09-07 09:24+0000\n" -"Last-Translator: Tubuntu \n" -"Language-Team: French (http://www.transifex.com/projects/p/friendica/language/fr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: cal.php:33 -msgid "Event Export" -msgstr "Exportation d'événement" - -#: cal.php:33 -msgid "You can download public events from: " -msgstr "Vous pouvez télécharger les événements publiques de :" - -#: cal.php:53 -msgid "The user does not export the calendar." -msgstr "L'utilisateur n'exporte pas le calendrier." - -#: cal.php:83 -msgid "This calendar format is not supported" -msgstr "Ce format de calendrier n'est pas pris en charge" - -#: cal.php:181 cal.php:185 -msgid "Export Events" -msgstr "Exporter les événements" - -#: cal.php:189 -msgid "If this is enabled, your public events will be available at" -msgstr "Si activé, vos événements publiques seront disponible à" - -#: cal.php:190 -msgid "Currently supported formats are ical and csv." -msgstr "Les formats actuellement pris en charge sont ical et csv." - -#: cal.php:191 -msgid "Enable calendar export" -msgstr "Activer l'export de calendrier" - -#: cal.php:193 -msgid "Save Settings" -msgstr "Sauvegarder les paramètres" diff --git a/cal/lang/fr/strings.php b/cal/lang/fr/strings.php deleted file mode 100644 index b3517062..00000000 --- a/cal/lang/fr/strings.php +++ /dev/null @@ -1,16 +0,0 @@ - 1);; -}} -; -$a->strings["Event Export"] = "Exportation d'événement"; -$a->strings["You can download public events from: "] = "Vous pouvez télécharger les événements publiques de :"; -$a->strings["The user does not export the calendar."] = "L'utilisateur n'exporte pas le calendrier."; -$a->strings["This calendar format is not supported"] = "Ce format de calendrier n'est pas pris en charge"; -$a->strings["Export Events"] = "Exporter les événements"; -$a->strings["If this is enabled, your public events will be available at"] = "Si activé, vos événements publiques seront disponible à"; -$a->strings["Currently supported formats are ical and csv."] = "Les formats actuellement pris en charge sont ical et csv."; -$a->strings["Enable calendar export"] = "Activer l'export de calendrier"; -$a->strings["Save Settings"] = "Sauvegarder les paramètres"; diff --git a/cal/lang/it/messages.po b/cal/lang/it/messages.po deleted file mode 100644 index f2aa1cbb..00000000 --- a/cal/lang/it/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON cal -# Copyright (C) -# This file is distributed under the same license as the Friendica cal addon package. -# -# -# Translators: -# fabrixxm , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2014-09-10 10:30+0000\n" -"Last-Translator: fabrixxm \n" -"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: cal.php:33 -msgid "Event Export" -msgstr "Esporta Evento" - -#: cal.php:33 -msgid "You can download public events from: " -msgstr "Puoi scaricare gli eventi publici da:" - -#: cal.php:53 -msgid "The user does not export the calendar." -msgstr "L'utente non esporta il calendario." - -#: cal.php:83 -msgid "This calendar format is not supported" -msgstr "Il formato del calendario non è supportato" - -#: cal.php:181 cal.php:185 -msgid "Export Events" -msgstr "Esporta Eventi" - -#: cal.php:189 -msgid "If this is enabled, your public events will be available at" -msgstr "Se abilitato, i tuoi eventi pubblici saranno disponibili a" - -#: cal.php:190 -msgid "Currently supported formats are ical and csv." -msgstr "I formati supportati sono ical e csv." - -#: cal.php:191 -msgid "Enable calendar export" -msgstr "Abilita esporazione calendario" - -#: cal.php:193 -msgid "Save Settings" -msgstr "Salva Impostazioni" diff --git a/cal/lang/it/strings.php b/cal/lang/it/strings.php deleted file mode 100644 index c7f228bb..00000000 --- a/cal/lang/it/strings.php +++ /dev/null @@ -1,16 +0,0 @@ -strings["Event Export"] = "Esporta Evento"; -$a->strings["You can download public events from: "] = "Puoi scaricare gli eventi publici da:"; -$a->strings["The user does not export the calendar."] = "L'utente non esporta il calendario."; -$a->strings["This calendar format is not supported"] = "Il formato del calendario non è supportato"; -$a->strings["Export Events"] = "Esporta Eventi"; -$a->strings["If this is enabled, your public events will be available at"] = "Se abilitato, i tuoi eventi pubblici saranno disponibili a"; -$a->strings["Currently supported formats are ical and csv."] = "I formati supportati sono ical e csv."; -$a->strings["Enable calendar export"] = "Abilita esporazione calendario"; -$a->strings["Save Settings"] = "Salva Impostazioni"; diff --git a/cal/lang/pt-br/messages.po b/cal/lang/pt-br/messages.po deleted file mode 100644 index 7defc7d5..00000000 --- a/cal/lang/pt-br/messages.po +++ /dev/null @@ -1,57 +0,0 @@ -# ADDON cal -# Copyright (C) -# This file is distributed under the same license as the Friendica cal addon package. -# -# -# Translators: -# John Brazil, 2015 -# Sérgio Lima , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2015-01-31 01:24+0000\n" -"Last-Translator: John Brazil\n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/friendica/language/pt_BR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: pt_BR\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: cal.php:33 -msgid "Event Export" -msgstr "Exportar Evento" - -#: cal.php:33 -msgid "You can download public events from: " -msgstr "Você pode baixar eventos públicos de:" - -#: cal.php:53 -msgid "The user does not export the calendar." -msgstr "O usuário não exportou o calendário." - -#: cal.php:83 -msgid "This calendar format is not supported" -msgstr "Esse formato de calendário não é suportado." - -#: cal.php:181 cal.php:185 -msgid "Export Events" -msgstr "Exporta Eventos" - -#: cal.php:189 -msgid "If this is enabled, your public events will be available at" -msgstr "Se isso estiver habiltiado, seus eventos públicos estarão disponíveis" - -#: cal.php:190 -msgid "Currently supported formats are ical and csv." -msgstr "Os formatos disponíveis atualmente são ical e csv." - -#: cal.php:191 -msgid "Enable calendar export" -msgstr "Habilite exportar calendário" - -#: cal.php:193 -msgid "Save Settings" -msgstr "Salvar as Configurações" diff --git a/cal/lang/pt-br/strings.php b/cal/lang/pt-br/strings.php deleted file mode 100644 index 69e35ea5..00000000 --- a/cal/lang/pt-br/strings.php +++ /dev/null @@ -1,16 +0,0 @@ - 1);; -}} -; -$a->strings["Event Export"] = "Exportar Evento"; -$a->strings["You can download public events from: "] = "Você pode baixar eventos públicos de:"; -$a->strings["The user does not export the calendar."] = "O usuário não exportou o calendário."; -$a->strings["This calendar format is not supported"] = "Esse formato de calendário não é suportado."; -$a->strings["Export Events"] = "Exporta Eventos"; -$a->strings["If this is enabled, your public events will be available at"] = "Se isso estiver habiltiado, seus eventos públicos estarão disponíveis"; -$a->strings["Currently supported formats are ical and csv."] = "Os formatos disponíveis atualmente são ical e csv."; -$a->strings["Enable calendar export"] = "Habilite exportar calendário"; -$a->strings["Save Settings"] = "Salvar as Configurações"; diff --git a/cal/lang/ro/messages.po b/cal/lang/ro/messages.po deleted file mode 100644 index c0cd3f87..00000000 --- a/cal/lang/ro/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON cal -# Copyright (C) -# This file is distributed under the same license as the Friendica cal addon package. -# -# -# Translators: -# Doru DEACONU , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2014-11-27 14:13+0000\n" -"Last-Translator: Doru DEACONU \n" -"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ro_RO\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" - -#: cal.php:33 -msgid "Event Export" -msgstr "Exportare Eveniment" - -#: cal.php:33 -msgid "You can download public events from: " -msgstr "Puteți descărca evenimente publice de la:" - -#: cal.php:53 -msgid "The user does not export the calendar." -msgstr "Utilizatorul nu își exportă calendarul." - -#: cal.php:83 -msgid "This calendar format is not supported" -msgstr "Acest format de calendar nu este acceptat" - -#: cal.php:181 cal.php:185 -msgid "Export Events" -msgstr "Exportați Evenimente" - -#: cal.php:189 -msgid "If this is enabled, your public events will be available at" -msgstr "Dacă este activat, evenimente dvs publice vor fi disponibile pe" - -#: cal.php:190 -msgid "Currently supported formats are ical and csv." -msgstr "Formate acceptate în prezent sunt ical şi csv." - -#: cal.php:191 -msgid "Enable calendar export" -msgstr "Activați exportarea calendarului" - -#: cal.php:193 -msgid "Save Settings" -msgstr "Salvare Configurări" diff --git a/cal/lang/ro/strings.php b/cal/lang/ro/strings.php deleted file mode 100644 index 8e328e98..00000000 --- a/cal/lang/ro/strings.php +++ /dev/null @@ -1,16 +0,0 @@ -19)||(($n%100==0)&&($n!=0)))?2:1));; -}} -; -$a->strings["Event Export"] = "Exportare Eveniment"; -$a->strings["You can download public events from: "] = "Puteți descărca evenimente publice de la:"; -$a->strings["The user does not export the calendar."] = "Utilizatorul nu își exportă calendarul."; -$a->strings["This calendar format is not supported"] = "Acest format de calendar nu este acceptat"; -$a->strings["Export Events"] = "Exportați Evenimente"; -$a->strings["If this is enabled, your public events will be available at"] = "Dacă este activat, evenimente dvs publice vor fi disponibile pe"; -$a->strings["Currently supported formats are ical and csv."] = "Formate acceptate în prezent sunt ical şi csv."; -$a->strings["Enable calendar export"] = "Activați exportarea calendarului"; -$a->strings["Save Settings"] = "Salvare Configurări"; diff --git a/cal/lang/ru/messages.po b/cal/lang/ru/messages.po deleted file mode 100644 index 155cba8e..00000000 --- a/cal/lang/ru/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON cal -# Copyright (C) -# This file is distributed under the same license as the Friendica cal addon package. -# -# -# Translators: -# Stanislav N. , 2017 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2017-04-08 17:06+0000\n" -"Last-Translator: Stanislav N. \n" -"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: cal.php:33 -msgid "Event Export" -msgstr "Экспорт событий" - -#: cal.php:33 -msgid "You can download public events from: " -msgstr "Вы можете скачать публичные события из:" - -#: cal.php:53 -msgid "The user does not export the calendar." -msgstr "Пользователь не экспортировал календарь." - -#: cal.php:83 -msgid "This calendar format is not supported" -msgstr "Этот формат календарей не поддерживается" - -#: cal.php:181 cal.php:185 -msgid "Export Events" -msgstr "Экспорт событий" - -#: cal.php:189 -msgid "If this is enabled, your public events will be available at" -msgstr "Если эта настройка включена, то ваши публичные события будут доступны на:" - -#: cal.php:190 -msgid "Currently supported formats are ical and csv." -msgstr "Текущие поддерживаемые форматы ical и csv." - -#: cal.php:191 -msgid "Enable calendar export" -msgstr "Включить экспорт календаря" - -#: cal.php:193 -msgid "Save Settings" -msgstr "Сохранить настройки" diff --git a/cal/lang/ru/strings.php b/cal/lang/ru/strings.php deleted file mode 100644 index d2ab1418..00000000 --- a/cal/lang/ru/strings.php +++ /dev/null @@ -1,16 +0,0 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14) ? 1 : $n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)? 2 : 3);; -}} -; -$a->strings["Event Export"] = "Экспорт событий"; -$a->strings["You can download public events from: "] = "Вы можете скачать публичные события из:"; -$a->strings["The user does not export the calendar."] = "Пользователь не экспортировал календарь."; -$a->strings["This calendar format is not supported"] = "Этот формат календарей не поддерживается"; -$a->strings["Export Events"] = "Экспорт событий"; -$a->strings["If this is enabled, your public events will be available at"] = "Если эта настройка включена, то ваши публичные события будут доступны на:"; -$a->strings["Currently supported formats are ical and csv."] = "Текущие поддерживаемые форматы ical и csv."; -$a->strings["Enable calendar export"] = "Включить экспорт календаря"; -$a->strings["Save Settings"] = "Сохранить настройки"; diff --git a/cal/lang/zh-cn/messages.po b/cal/lang/zh-cn/messages.po deleted file mode 100644 index 15f34a47..00000000 --- a/cal/lang/zh-cn/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON cal -# Copyright (C) -# This file is distributed under the same license as the Friendica cal addon package. -# -# -# Translators: -# mytbk , 2017 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2017-10-02 05:52+0000\n" -"Last-Translator: mytbk \n" -"Language-Team: Chinese (China) (http://www.transifex.com/Friendica/friendica/language/zh_CN/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: zh_CN\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: cal.php:33 -msgid "Event Export" -msgstr "事件导出" - -#: cal.php:33 -msgid "You can download public events from: " -msgstr "你可以从这里下载公开事件:" - -#: cal.php:53 -msgid "The user does not export the calendar." -msgstr "这个用户没有导出日历。" - -#: cal.php:83 -msgid "This calendar format is not supported" -msgstr "不支持这个日历格式" - -#: cal.php:181 cal.php:185 -msgid "Export Events" -msgstr "导出事件" - -#: cal.php:189 -msgid "If this is enabled, your public events will be available at" -msgstr "如果这个被启用,你的公开事件会在" - -#: cal.php:190 -msgid "Currently supported formats are ical and csv." -msgstr "当前支持的格式是 ical 和 csv." - -#: cal.php:191 -msgid "Enable calendar export" -msgstr "启用日历导出" - -#: cal.php:193 -msgid "Save Settings" -msgstr "保存设置" diff --git a/cal/lang/zh-cn/strings.php b/cal/lang/zh-cn/strings.php deleted file mode 100644 index e94fa51b..00000000 --- a/cal/lang/zh-cn/strings.php +++ /dev/null @@ -1,16 +0,0 @@ -strings["Event Export"] = "事件导出"; -$a->strings["You can download public events from: "] = "你可以从这里下载公开事件:"; -$a->strings["The user does not export the calendar."] = "这个用户没有导出日历。"; -$a->strings["This calendar format is not supported"] = "不支持这个日历格式"; -$a->strings["Export Events"] = "导出事件"; -$a->strings["If this is enabled, your public events will be available at"] = "如果这个被启用,你的公开事件会在"; -$a->strings["Currently supported formats are ical and csv."] = "当前支持的格式是 ical 和 csv."; -$a->strings["Enable calendar export"] = "启用日历导出"; -$a->strings["Save Settings"] = "保存设置"; diff --git a/convpath/README b/convpath/README deleted file mode 100755 index 9d1c3072..00000000 --- a/convpath/README +++ /dev/null @@ -1,7 +0,0 @@ -convpath - -This addon converts all internal paths according to the current scheme. - -That means that if a page is called via https then all internal links are also converted into https. - -Same happens when you call your page with http. diff --git a/convpath/convpath.php b/convpath/convpath.php deleted file mode 100644 index 0aaeb5f9..00000000 --- a/convpath/convpath.php +++ /dev/null @@ -1,102 +0,0 @@ - - * Status: Unsupported - */ - -function convpath_install() { - register_hook('page_end', 'addon/convpath/convpath.php', 'convpath_page_end'); - register_hook('page_header', 'addon/convpath/convpath.php', 'convpath_page_header'); - register_hook('ping_xmlize', 'addon/convpath/convpath.php', 'convpath_ping_xmlize_hook'); - register_hook('prepare_body', 'addon/convpath/convpath.php', 'convpath_prepare_body_hook'); - register_hook('display_item', 'addon/convpath/convpath.php', 'convpath_display_item_hook'); -} - - -function convpath_uninstall() { - unregister_hook('page_end', 'addon/convpath/convpath.php', 'convpath_page_end'); - unregister_hook('page_header', 'addon/convpath/convpath.php', 'convpath_page_header'); - unregister_hook('ping_xmlize', 'addon/convpath/convpath.php', 'convpath_ping_xmlize_hook'); - unregister_hook('prepare_body', 'addon/convpath/convpath.php', 'convpath_prepare_body_hook'); - unregister_hook('display_item', 'addon/convpath/convpath.php', 'convpath_display_item_hook'); -} - -function convpath_ping_xmlize_hook(&$a, &$o) { - $o["photo"] = convpath_url($a, $o["photo"]); -} - -function convpath_page_header(&$a, &$o){ - $o = convpath_convert($o); -} - -function convpath_page_end(&$a, &$o){ - $o = convpath_convert($o); - if (isset($a->page['aside'])) - $a->page['aside'] = convpath_convert($a->page['aside']); -} - -function convpath_prepare_body_hook(&$a, &$o) { - $o["html"] = convpath_convert($o["html"]); -} - -function convpath_display_item_hook(&$a, &$o) { - if (isset($o["output"])) { - if (isset($o["output"]["thumb"])) - $o["output"]["thumb"] = convpath_url($a, $o["output"]["thumb"]); - if (isset($o["output"]["author-avatar"])) - $o["output"]["author-avatar"] = convpath_url($a, $o["output"]["author-avatar"]); - if (isset($o["output"]["owner-avatar"])) - $o["output"]["owner-avatar"] = convpath_url($a, $o["output"]["owner-avatar"]); - if (isset($o["output"]["owner_photo"])) - $o["output"]["owner_photo"] = convpath_url($a, $o["output"]["owner_photo"]); - } -} - -function convpath_url($a, $path) { - if ($path == "") - return(""); - - $ssl = (substr($a->get_baseurl(), 0, 8) == "https://"); - - if ($ssl) { - $search = "http://".$a->get_hostname(); - $replace = "https://".$a->get_hostname(); - } else { - $search = "https://".$a->get_hostname(); - $replace = "http://".$a->get_hostname(); - } - - $path = str_replace($search, $replace, $path); - - return($path); -} - -/* -Converts a given path according to the current scheme -*/ -function convpath_convert($path) { - global $a; - - if ($path == "") - return(""); - - $ssl = (substr($a->get_baseurl(), 0, 8) == "https://"); - - if ($ssl) { - $search = "http://".$a->get_hostname(); - $replace = "https://".$a->get_hostname(); - } else { - $search = "https://".$a->get_hostname(); - $replace = "http://".$a->get_hostname(); - } - $searcharr = array("src='".$search, 'src="'.$search); - $replacearr = array("src='".$replace, 'src="'.$replace); - $path = str_replace($searcharr, $replacearr, $path); - - //$path = str_replace($search, $replace, $path); - - return($path); -} diff --git a/convpath/lang/C/messages.po b/convpath/lang/C/messages.po deleted file mode 100644 index e69de29b..00000000 diff --git a/defaultfeatures/README b/defaultfeatures/README deleted file mode 100644 index cc45cbf6..00000000 --- a/defaultfeatures/README +++ /dev/null @@ -1,7 +0,0 @@ -Default Features Plugin - -This plugin allows the site admin to choose which Additional Features - are on by default for newly created users on the site. The defaults - apply to all new users upon registration, but do not impact a user's - ability to turn features on/off once their account has been created. -These default settings do not impact existing users. diff --git a/defaultfeatures/defaultfeatures.php b/defaultfeatures/defaultfeatures.php deleted file mode 100755 index c92547d8..00000000 --- a/defaultfeatures/defaultfeatures.php +++ /dev/null @@ -1,60 +0,0 @@ - $fdata) { - foreach(array_slice($fdata,1) as $f) { - set_pconfig($newuid,'feature',$f[0],((intval(get_config('defaultfeatures',$f[0]))) ? "1" : "0")); - } - } -} - -function defaultfeatures_plugin_admin_post (&$a) { - check_form_security_token_redirectOnErr('/admin/plugins/defaultfeatures', 'defaultfeaturessave'); - foreach($_POST as $k => $v) { - if(strpos($k,'feature_') === 0) { - set_config('defaultfeatures',substr($k,8),((intval($v)) ? 1 : 0)); - } - } - info( t('Features updated') . EOL); -} - -function defaultfeatures_plugin_admin (&$a, &$o) { - $t = get_markup_template( "admin.tpl", "addon/defaultfeatures/" ); - $token = get_form_security_token("defaultfeaturessave"); - $arr = array(); - $features = get_features(); - foreach($features as $fname => $fdata) { - $arr[$fname] = array(); - $arr[$fname][0] = $fdata[0]; - foreach(array_slice($fdata,1) as $f) { - $arr[$fname][1][] = array('feature_' .$f[0],$f[1],((intval(get_config('defaultfeatures',$f[0]))) ? "1" : "0"),$f[2],array(t('Off'),t('On'))); - } - } - - //logger("Features: " . print_r($arr,true)); - - $o = replace_macros($t, array( - '$submit' => t('Save Settings'), - '$features' => $arr, - '$form_security_token' => $token - )); -} diff --git a/defaultfeatures/lang/C/messages.po b/defaultfeatures/lang/C/messages.po deleted file mode 100644 index 70c34f69..00000000 --- a/defaultfeatures/lang/C/messages.po +++ /dev/null @@ -1,34 +0,0 @@ -# ADDON defaultfeatures -# Copyright (C) -# This file is distributed under the same license as the Friendica defaultfeatures addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:44+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: defaultfeatures.php:36 -msgid "Features updated" -msgstr "" - -#: defaultfeatures.php:48 -msgid "Off" -msgstr "" - -#: defaultfeatures.php:48 -msgid "On" -msgstr "" - -#: defaultfeatures.php:55 -msgid "Save Settings" -msgstr "" diff --git a/defaultfeatures/templates/admin.tpl b/defaultfeatures/templates/admin.tpl deleted file mode 100644 index 3fbda384..00000000 --- a/defaultfeatures/templates/admin.tpl +++ /dev/null @@ -1,14 +0,0 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} - -{{foreach $features as $f}} -

{{$f.0}}

- -{{foreach $f.1 as $fcat}} - {{include file="field_yesno.tpl" field=$fcat}} -{{/foreach}} -{{/foreach}} -
diff --git a/editplain/editplain.css b/editplain/editplain.css deleted file mode 100755 index 697f6538..00000000 --- a/editplain/editplain.css +++ /dev/null @@ -1,14 +0,0 @@ - - - -#editplain-enable-label { - float: left; - width: 200px; - margin-bottom: 25px; -} - -#editplain-checkbox { - float: left; -} - - diff --git a/editplain/editplain.php b/editplain/editplain.php deleted file mode 100755 index 3aa21491..00000000 --- a/editplain/editplain.php +++ /dev/null @@ -1,86 +0,0 @@ - - * Status: Unsupported - * - */ - - -function editplain_install() { - - register_hook('plugin_settings', 'addon/editplain/editplain.php', 'editplain_settings'); - register_hook('plugin_settings_post', 'addon/editplain/editplain.php', 'editplain_settings_post'); - - logger("installed editplain"); -} - - -function editplain_uninstall() { - - unregister_hook('plugin_settings', 'addon/editplain/editplain.php', 'editplain_settings'); - unregister_hook('plugin_settings_post', 'addon/editplain/editplain.php', 'editplain_settings_post'); - - - logger("removed editplain"); -} - - - -/** - * - * 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 editplain_settings_post($a,$post) { - if(! local_user() || (! x($_POST,'editplain-submit'))) - return; - set_pconfig(local_user(),'system','plaintext',intval($_POST['editplain'])); - - info( t('Editplain settings updated.') . EOL); -} - - -/** - * - * Called from the Plugin Setting form. - * Add our own settings info to the page. - * - */ - - - -function editplain_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','plaintext'); - $checked = (($enabled) ? ' checked="checked" ' : ''); - - /* Add some HTML to the existing form */ - - $s .= '
'; - $s .= '

' . t('Editplain Settings') . '

'; - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - /* provide a submit button */ - - $s .= '
'; - -} diff --git a/editplain/lang/C/messages.po b/editplain/lang/C/messages.po deleted file mode 100644 index 16831de6..00000000 --- a/editplain/lang/C/messages.po +++ /dev/null @@ -1,34 +0,0 @@ -# ADDON editplain -# Copyright (C) -# This file is distributed under the same license as the Friendica editplain addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: editplain.php:46 -msgid "Editplain settings updated." -msgstr "" - -#: editplain.php:76 -msgid "Editplain Settings" -msgstr "" - -#: editplain.php:78 -msgid "Disable richtext status editor" -msgstr "" - -#: editplain.php:84 -msgid "Submit" -msgstr "" diff --git a/editplain/lang/ca/strings.php b/editplain/lang/ca/strings.php deleted file mode 100644 index 8296c498..00000000 --- a/editplain/lang/ca/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["Editplain settings updated."] = "Actualitzar la configuració de Editplain."; -$a->strings["Editplain Settings"] = "Configuració de Editplain"; -$a->strings["Disable richtext status editor"] = "Deshabilitar l'editor d'estatus de texte enriquit"; -$a->strings["Submit"] = "Enviar"; diff --git a/editplain/lang/cs/messages.po b/editplain/lang/cs/messages.po deleted file mode 100644 index 5a5da772..00000000 --- a/editplain/lang/cs/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON editplain -# Copyright (C) -# This file is distributed under the same license as the Friendica editplain addon package. -# -# -# Translators: -# Michal Šupler , 2014-2015 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-02-11 19:40+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" - -#: editplain.php:46 -msgid "Editplain settings updated." -msgstr "Editplain nastavení aktualizováno" - -#: editplain.php:76 -msgid "Editplain Settings" -msgstr "Editplain nastavení" - -#: editplain.php:78 -msgid "Disable richtext status editor" -msgstr "Zakázat richtext status editor" - -#: editplain.php:84 -msgid "Submit" -msgstr "Odeslat" diff --git a/editplain/lang/cs/strings.php b/editplain/lang/cs/strings.php deleted file mode 100644 index 96e5f5ae..00000000 --- a/editplain/lang/cs/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -=2 && $n<=4) ? 1 : 2;; -}} -; -$a->strings["Editplain settings updated."] = "Editplain nastavení aktualizováno"; -$a->strings["Editplain Settings"] = "Editplain nastavení"; -$a->strings["Disable richtext status editor"] = "Zakázat richtext status editor"; -$a->strings["Submit"] = "Odeslat"; diff --git a/editplain/lang/de/messages.po b/editplain/lang/de/messages.po deleted file mode 100644 index 35f216c5..00000000 --- a/editplain/lang/de/messages.po +++ /dev/null @@ -1,37 +0,0 @@ -# ADDON editplain -# Copyright (C) -# This file is distributed under the same license as the Friendica editplain addon package. -# -# -# Translators: -# Abrax , 2014 -# bavatar , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2014-10-15 12:19+0000\n" -"Last-Translator: Abrax \n" -"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: editplain.php:46 -msgid "Editplain settings updated." -msgstr "Editplain Einstellungen gespeichert." - -#: editplain.php:76 -msgid "Editplain Settings" -msgstr "Editplain Einstellungen" - -#: editplain.php:78 -msgid "Disable richtext status editor" -msgstr "Web-Editor für Beiträge deakivieren" - -#: editplain.php:84 -msgid "Submit" -msgstr "Senden" diff --git a/editplain/lang/de/strings.php b/editplain/lang/de/strings.php deleted file mode 100644 index 89647e31..00000000 --- a/editplain/lang/de/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -strings["Editplain settings updated."] = "Editplain Einstellungen gespeichert."; -$a->strings["Editplain Settings"] = "Editplain Einstellungen"; -$a->strings["Disable richtext status editor"] = "Web-Editor für Beiträge deakivieren"; -$a->strings["Submit"] = "Senden"; diff --git a/editplain/lang/eo/strings.php b/editplain/lang/eo/strings.php deleted file mode 100644 index cd2b8a13..00000000 --- a/editplain/lang/eo/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["Editplain settings updated."] = "Ĝisdatigis la Editplain agordojn."; -$a->strings["Editplain Settings"] = "Agordoj por Editplain"; -$a->strings["Disable richtext status editor"] = "Malŝalti la riĉteksto-redaktilon"; -$a->strings["Submit"] = "Sendi"; diff --git a/editplain/lang/es/messages.po b/editplain/lang/es/messages.po deleted file mode 100644 index 97fd2c02..00000000 --- a/editplain/lang/es/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON editplain -# Copyright (C) -# This file is distributed under the same license as the Friendica editplain addon package. -# -# -# Translators: -# Alberto Díaz Tormo , 2016 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2016-10-23 11:35+0000\n" -"Last-Translator: Alberto Díaz Tormo \n" -"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: editplain.php:46 -msgid "Editplain settings updated." -msgstr "Ajustes de edición sencillos actualizados." - -#: editplain.php:76 -msgid "Editplain Settings" -msgstr "Ajustes de edición sencillos" - -#: editplain.php:78 -msgid "Disable richtext status editor" -msgstr "Desactivar el editor de texto enriquecido del estatus" - -#: editplain.php:84 -msgid "Submit" -msgstr "Enviar" diff --git a/editplain/lang/es/strings.php b/editplain/lang/es/strings.php deleted file mode 100644 index 40caa5b0..00000000 --- a/editplain/lang/es/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -strings["Editplain settings updated."] = "Ajustes de edición sencillos actualizados."; -$a->strings["Editplain Settings"] = "Ajustes de edición sencillos"; -$a->strings["Disable richtext status editor"] = "Desactivar el editor de texto enriquecido del estatus"; -$a->strings["Submit"] = "Enviar"; diff --git a/editplain/lang/fr/messages.po b/editplain/lang/fr/messages.po deleted file mode 100644 index 0041578b..00000000 --- a/editplain/lang/fr/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON editplain -# Copyright (C) -# This file is distributed under the same license as the Friendica editplain addon package. -# -# -# Translators: -# Nicola Spanti , 2015 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-07-27 18:13+0000\n" -"Last-Translator: Nicola Spanti \n" -"Language-Team: French (http://www.transifex.com/projects/p/friendica/language/fr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: editplain.php:46 -msgid "Editplain settings updated." -msgstr "" - -#: editplain.php:76 -msgid "Editplain Settings" -msgstr "" - -#: editplain.php:78 -msgid "Disable richtext status editor" -msgstr "Désactiver l'éditeur avancé de statut" - -#: editplain.php:84 -msgid "Submit" -msgstr "Soumettre" diff --git a/editplain/lang/fr/strings.php b/editplain/lang/fr/strings.php deleted file mode 100644 index fcbca583..00000000 --- a/editplain/lang/fr/strings.php +++ /dev/null @@ -1,11 +0,0 @@ - 1);; -}} -; -$a->strings["Editplain settings updated."] = ""; -$a->strings["Editplain Settings"] = ""; -$a->strings["Disable richtext status editor"] = "Désactiver l'éditeur avancé de statut"; -$a->strings["Submit"] = "Soumettre"; diff --git a/editplain/lang/is/strings.php b/editplain/lang/is/strings.php deleted file mode 100644 index 40d01666..00000000 --- a/editplain/lang/is/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["Editplain settings updated."] = ""; -$a->strings["Editplain Settings"] = ""; -$a->strings["Disable richtext status editor"] = ""; -$a->strings["Submit"] = "Senda inn"; diff --git a/editplain/lang/it/messages.po b/editplain/lang/it/messages.po deleted file mode 100644 index 6b931176..00000000 --- a/editplain/lang/it/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON editplain -# Copyright (C) -# This file is distributed under the same license as the Friendica editplain addon package. -# -# -# Translators: -# fabrixxm , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2014-10-22 07:54+0000\n" -"Last-Translator: fabrixxm \n" -"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: editplain.php:46 -msgid "Editplain settings updated." -msgstr "Impostazioni 'Editplain' aggiornate." - -#: editplain.php:76 -msgid "Editplain Settings" -msgstr "Impostazioni Editplain" - -#: editplain.php:78 -msgid "Disable richtext status editor" -msgstr "Disabilita l'editor di testo visuale" - -#: editplain.php:84 -msgid "Submit" -msgstr "Invia" diff --git a/editplain/lang/it/strings.php b/editplain/lang/it/strings.php deleted file mode 100644 index 623400fc..00000000 --- a/editplain/lang/it/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -strings["Editplain settings updated."] = "Impostazioni 'Editplain' aggiornate."; -$a->strings["Editplain Settings"] = "Impostazioni Editplain"; -$a->strings["Disable richtext status editor"] = "Disabilita l'editor di testo visuale"; -$a->strings["Submit"] = "Invia"; diff --git a/editplain/lang/nb-no/strings.php b/editplain/lang/nb-no/strings.php deleted file mode 100644 index 9ecd7551..00000000 --- a/editplain/lang/nb-no/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["Editplain settings updated."] = ""; -$a->strings["Editplain Settings"] = ""; -$a->strings["Disable richtext status editor"] = ""; -$a->strings["Submit"] = "Lagre"; diff --git a/editplain/lang/pl/strings.php b/editplain/lang/pl/strings.php deleted file mode 100644 index 2f00d532..00000000 --- a/editplain/lang/pl/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["Editplain settings updated."] = ""; -$a->strings["Editplain Settings"] = ""; -$a->strings["Disable richtext status editor"] = ""; -$a->strings["Submit"] = "Potwierdź"; diff --git a/editplain/lang/pt-br/strings.php b/editplain/lang/pt-br/strings.php deleted file mode 100644 index 542f1e1f..00000000 --- a/editplain/lang/pt-br/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["Editplain settings updated."] = "Configurações Editplain atualizadas."; -$a->strings["Editplain Settings"] = "Configurações Editplain"; -$a->strings["Disable richtext status editor"] = "Disabilite o modo de edição richtext"; -$a->strings["Submit"] = "Enviar"; diff --git a/editplain/lang/ro/messages.po b/editplain/lang/ro/messages.po deleted file mode 100644 index b21dff58..00000000 --- a/editplain/lang/ro/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON editplain -# Copyright (C) -# This file is distributed under the same license as the Friendica editplain addon package. -# -# -# Translators: -# Doru DEACONU , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2014-11-27 14:13+0000\n" -"Last-Translator: Doru DEACONU \n" -"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ro_RO\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" - -#: editplain.php:46 -msgid "Editplain settings updated." -msgstr "Configurările Editplain au fost actualizate." - -#: editplain.php:76 -msgid "Editplain Settings" -msgstr "Configurări Editplain" - -#: editplain.php:78 -msgid "Disable richtext status editor" -msgstr "Dezactivare editorul status de text îmbogățit" - -#: editplain.php:84 -msgid "Submit" -msgstr "Trimite" diff --git a/editplain/lang/ro/strings.php b/editplain/lang/ro/strings.php deleted file mode 100644 index df97d6cb..00000000 --- a/editplain/lang/ro/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -19)||(($n%100==0)&&($n!=0)))?2:1));; -}} -; -$a->strings["Editplain settings updated."] = "Configurările Editplain au fost actualizate."; -$a->strings["Editplain Settings"] = "Configurări Editplain"; -$a->strings["Disable richtext status editor"] = "Dezactivare editorul status de text îmbogățit"; -$a->strings["Submit"] = "Trimite"; diff --git a/editplain/lang/ru/messages.po b/editplain/lang/ru/messages.po deleted file mode 100644 index 591146dd..00000000 --- a/editplain/lang/ru/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON editplain -# Copyright (C) -# This file is distributed under the same license as the Friendica editplain addon package. -# -# -# Translators: -# Stanislav N. , 2017 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2017-04-08 17:10+0000\n" -"Last-Translator: Stanislav N. \n" -"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: editplain.php:46 -msgid "Editplain settings updated." -msgstr "Настройки Editplain обновлены" - -#: editplain.php:76 -msgid "Editplain Settings" -msgstr "Настройки Editplain" - -#: editplain.php:78 -msgid "Disable richtext status editor" -msgstr "Отключить richtext status editor" - -#: editplain.php:84 -msgid "Submit" -msgstr "Добавить" diff --git a/editplain/lang/ru/strings.php b/editplain/lang/ru/strings.php deleted file mode 100644 index 0b397d89..00000000 --- a/editplain/lang/ru/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14) ? 1 : $n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)? 2 : 3);; -}} -; -$a->strings["Editplain settings updated."] = "Настройки Editplain обновлены"; -$a->strings["Editplain Settings"] = "Настройки Editplain"; -$a->strings["Disable richtext status editor"] = "Отключить richtext status editor"; -$a->strings["Submit"] = "Добавить"; diff --git a/editplain/lang/sv/strings.php b/editplain/lang/sv/strings.php deleted file mode 100644 index 3ec569a7..00000000 --- a/editplain/lang/sv/strings.php +++ /dev/null @@ -1,3 +0,0 @@ -strings["Submit"] = "Spara"; diff --git a/editplain/lang/zh-cn/strings.php b/editplain/lang/zh-cn/strings.php deleted file mode 100644 index ce911217..00000000 --- a/editplain/lang/zh-cn/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["Editplain settings updated."] = "Editplain设置更新了"; -$a->strings["Editplain Settings"] = "Editplain设置"; -$a->strings["Disable richtext status editor"] = "使richtext现状编辑 不能用"; -$a->strings["Submit"] = "提交"; diff --git a/extcron/extcron.php b/extcron/extcron.php deleted file mode 100755 index 4405fb41..00000000 --- a/extcron/extcron.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * Notes: External service needs to make a web request to http(s)://yoursite/extcron - * Status: Unsupported - */ - -require_once "mod/worker.php"; - -function extcron_install() {} - -function extcron_uninstall() {} - -function extcron_module() {} - -function extcron_init(&$a) { - worker_init($a); - killme(); - - // Deactivated - //proc_run('php','include/poller.php'); - //killme(); -} diff --git a/extcron/lang/C/messages.po b/extcron/lang/C/messages.po deleted file mode 100644 index e69de29b..00000000 diff --git a/facebook/README.md b/facebook/README.md deleted file mode 100755 index 6bf5c83a..00000000 --- a/facebook/README.md +++ /dev/null @@ -1,19 +0,0 @@ -> # Note -> **Facebook Connector, Facebook Post Connector and Facebook Sync plugins are deprecated.** -> As of the moment you cannot bridge from or to Facebook with Friendica. - -Installing the Friendica/Facebook connector - -Detailed instructions how to use this plugin can be found at -the [How to: Friendica's Facebook Connector](https://github.com/friendica/friendica/wiki/How-to:-Friendica%E2%80%99s-Facebook-connector) page. - -Vidoes and embeds will not be posted if there is no other content. Links -and images will be converted to a format suitable for the Facebook API and -long posts truncated - with a link to view the full post. - -Facebook contacts will not be able to view private photos, as they are not able to -authenticate to your site to establish identity. We will address this -in a future release. - -Info: please make sure that you understand all aspects due to Friendica's -default licence which is: [MIT License](https://github.com/friendica/friendica/blob/master/LICENSE) diff --git a/facebook/facebook.css b/facebook/facebook.css deleted file mode 100755 index 0c164331..00000000 --- a/facebook/facebook.css +++ /dev/null @@ -1,13 +0,0 @@ - -#facebook-enable-wrapper { - margin-top: 20px; -} - -#facebook-disable-wrapper { - margin-top: 20px; -} - -#facebook-post-default-form input { - margin-top: 20px; - margin-right: 20px; -} \ No newline at end of file diff --git a/facebook/facebook.php b/facebook/facebook.php deleted file mode 100644 index f2e965c4..00000000 --- a/facebook/facebook.php +++ /dev/null @@ -1,2140 +0,0 @@ - - * Author: Tobias Hößl - * Status: Unsupported - */ - -/** - * Installing the Friendica/Facebook connector - * - * Detailed instructions how to use this plugin can be found at - * https://github.com/friendica/friendica/wiki/How-to:-Friendica%E2%80%99s-Facebook-connector - * - * Vidoes and embeds will not be posted if there is no other content. Links - * and images will be converted to a format suitable for the Facebook API and - * long posts truncated - with a link to view the full post. - * - * Facebook contacts will not be able to view private photos, as they are not able to - * 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 - */ - -// Size of maximum post length increased -// see http://www.facebook.com/schrep/posts/203969696349811 -// define('FACEBOOK_MAXPOSTLEN', 420); -define('FACEBOOK_MAXPOSTLEN', 63206); -define('FACEBOOK_SESSION_ERR_NOTIFICATION_INTERVAL', 259200); // 3 days -define('FACEBOOK_DEFAULT_POLL_INTERVAL', 60); // given in minutes -define('FACEBOOK_MIN_POLL_INTERVAL', 5); -define('FACEBOOK_RTU_ERR_MAIL_AFTER_MINUTES', 180); // 3 hours - -require_once('include/security.php'); - -function facebook_install() { - register_hook('post_local', 'addon/facebook/facebook.php', 'facebook_post_local'); - register_hook('notifier_normal', 'addon/facebook/facebook.php', 'facebook_post_hook'); - 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'); -} - - -function facebook_uninstall() { - unregister_hook('post_local', 'addon/facebook/facebook.php', 'facebook_post_local'); - unregister_hook('notifier_normal', 'addon/facebook/facebook.php', 'facebook_post_hook'); - 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'); -} - - -/* declare the facebook_module function so that /facebook url requests will land here */ - -function facebook_module() {} - - - -// If a->argv[1] is a nickname, this is a callback from Facebook oauth requests. -// If $_REQUEST["realtime_cb"] is set, this is a callback from the Real-Time Updates API - -/** - * @param App $a - */ -function facebook_init(&$a) { - - if (x($_REQUEST, "realtime_cb") && x($_REQUEST, "realtime_cb")) { - logger("facebook_init: Facebook Real-Time callback called", LOGGER_DEBUG); - - if (x($_REQUEST, "hub_verify_token")) { - // this is the verification callback while registering for real time updates - - $verify_token = get_config('facebook', 'cb_verify_token'); - if ($verify_token != $_REQUEST["hub_verify_token"]) { - logger('facebook_init: Wrong Facebook Callback Verifier - expected ' . $verify_token . ', got ' . $_REQUEST["hub_verify_token"]); - return; - } - - if (x($_REQUEST, "hub_challenge")) { - logger('facebook_init: Answering Challenge: ' . $_REQUEST["hub_challenge"], LOGGER_DATA); - echo $_REQUEST["hub_challenge"]; - die(); - } - } - - require_once('include/items.php'); - - // this is a status update - $content = file_get_contents("php://input"); - if (is_numeric($content)) $content = file_get_contents("php://input"); - $js = json_decode($content); - logger(print_r($js, true), LOGGER_DATA); - - if (!isset($js->object) || $js->object != "user" || !isset($js->entry)) { - logger('facebook_init: Could not parse Real-Time Update data', LOGGER_DEBUG); - return; - } - - $affected_users = array("feed" => array(), "friends" => array()); - - foreach ($js->entry as $entry) { - $fbuser = $entry->uid; - foreach ($entry->changed_fields as $field) { - if (!isset($affected_users[$field])) { - logger('facebook_init: Unknown field "' . $field . '"'); - continue; - } - if (in_array($fbuser, $affected_users[$field])) continue; - - $r = q("SELECT `uid` FROM `pconfig` WHERE `cat` = 'facebook' AND `k` = 'self_id' AND `v` = '%s' LIMIT 1", dbesc($fbuser)); - if(! count($r)) - continue; - $uid = $r[0]['uid']; - - $access_token = get_pconfig($uid,'facebook','access_token'); - if(! $access_token) - return; - - switch ($field) { - case "feed": - logger('facebook_init: FB-User ' . $fbuser . ' / feed', LOGGER_DEBUG); - - if(! get_pconfig($uid,'facebook','no_wall')) { - $private_wall = intval(get_pconfig($uid,'facebook','private_wall')); - $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); - } - } - } - - break; - case "friends": - logger('facebook_init: FB-User ' . $fbuser . ' / friends', LOGGER_DEBUG); - - fb_get_friends($uid, false); - set_pconfig($uid,'facebook','friend_check',time()); - break; - default: - logger('facebook_init: Unknown callback field for ' . $fbuser, LOGGER_NORMAL); - } - $affected_users[$field][] = $fbuser; - } - } - } - - if($a->argc != 2) - return; - - $nick = $a->argv[1]; - - if(strlen($nick)) - $r = q("SELECT `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1", - dbesc($nick) - ); - if(!(isset($r) && count($r))) - return; - - $uid = $r[0]['uid']; - $auth_code = (x($_GET, 'code') ? $_GET['code'] : ''); - $error = (x($_GET, 'error_description') ? $_GET['error_description'] : ''); - - - if($error) - logger('facebook_init: Error: ' . $error); - - if($auth_code && $uid) { - - $appid = get_config('facebook','appid'); - $appsecret = get_config('facebook', 'appsecret'); - - $x = fetch_url('https://graph.facebook.com/oauth/access_token?client_id=' - . $appid . '&client_secret=' . $appsecret . '&redirect_uri=' - . urlencode($a->get_baseurl() . '/facebook/' . $nick) - . '&code=' . $auth_code); - - logger('facebook_init: returned access token: ' . $x, LOGGER_DATA); - - if(strpos($x,'access_token=') !== false) { - $token = str_replace('access_token=', '', $x); - if(strpos($token,'&') !== false) - $token = substr($token,0,strpos($token,'&')); - set_pconfig($uid,'facebook','access_token',$token); - set_pconfig($uid,'facebook','post','1'); - if(get_pconfig($uid,'facebook','no_linking') === false) - set_pconfig($uid,'facebook','no_linking',1); - fb_get_self($uid); - fb_get_friends($uid, true); - fb_consume_all($uid); - - } - - } - -} - - -/** - * @param int $uid - */ -function fb_get_self($uid) { - $access_token = get_pconfig($uid,'facebook','access_token'); - if(! $access_token) - return; - $s = fetch_url('https://graph.facebook.com/me/?access_token=' . $access_token); - if($s) { - $j = json_decode($s); - set_pconfig($uid,'facebook','self_id',(string) $j->id); - } -} - -/** - * @param int $uid - * @param string $access_token - * @param array $persons - */ -function fb_get_friends_sync_new($uid, $access_token, $persons) { - $persons_todo = array(); - foreach ($persons as $person) { - $link = 'http://facebook.com/profile.php?id=' . $person->id; - - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1", - intval($uid), - dbesc($link) - ); - - if (count($r) == 0) { - logger('fb_get_friends: new contact found: ' . $link, LOGGER_DEBUG); - $persons_todo[] = $person; - } - - if (count($persons_todo) > 0) fb_get_friends_sync_full($uid, $access_token, $persons_todo); - } -} - -/** - * @param int $uid - * @param object $contact - */ -function fb_get_friends_sync_parsecontact($uid, $contact) { - $contact->link = 'http://facebook.com/profile.php?id=' . $contact->id; - - // If its a page then set the first name from the username - if (!$contact->first_name && $contact->username) - $contact->first_name = $contact->username; - - // check if we already have a contact - - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1", - intval($uid), - dbesc($contact->link) - ); - - if(count($r)) { - - // update profile photos once every two weeks as we have no notification of when they change. - - $update_photo = (($r[0]['avatar-date'] < datetime_convert('','','now -14 days')) ? true : false); - - // check that we have all the photos, this has been known to fail on occasion - - if((! $r[0]['photo']) || (! $r[0]['thumb']) || (! $r[0]['micro']) || ($update_photo)) { - require_once("Photo.php"); - - $photos = import_profile_photo('https://graph.facebook.com/' . $contact->id . '/picture', $uid, $r[0]['id']); - - q("UPDATE `contact` SET `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s' - WHERE `id` = %d - ", - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($r[0]['id']) - ); - } - return; - } - else { - - // create contact record - q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `alias`, `notify`, `poll`, - `name`, `nick`, `photo`, `network`, `rel`, `priority`, - `writable`, `blocked`, `readonly`, `pending` ) - VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, 0, 0, 0 ) ", - intval($uid), - dbesc(datetime_convert()), - dbesc($contact->link), - dbesc(normalise_link($contact->link)), - dbesc(''), - dbesc(''), - dbesc($contact->id), - dbesc('facebook ' . $contact->id), - dbesc($contact->name), - dbesc(($contact->nickname) ? $contact->nickname : mb_convert_case($contact->first_name, MB_CASE_LOWER, "UTF-8")), - dbesc('https://graph.facebook.com/' . $contact->id . '/picture'), - dbesc(NETWORK_FACEBOOK), - intval(CONTACT_IS_FRIEND), - intval(1), - intval(1) - ); - } - - $r = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1", - dbesc($contact->link), - intval($uid) - ); - - if(! count($r)) { - return; - } - - $contact_id = $r[0]['id']; - - $g = q("select def_gid from user where uid = %d limit 1", - intval($uid) - ); - if($g && intval($g[0]['def_gid'])) { - require_once('include/group.php'); - group_add_member($uid,'',$contact_id,$g[0]['def_gid']); - } - - require_once("Photo.php"); - - $photos = import_profile_photo($r[0]['photo'],$uid,$contact_id); - - q("UPDATE `contact` SET `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s' - WHERE `id` = %d - ", - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($contact_id) - ); -} - -/** - * @param int $uid - * @param string $access_token - * @param array $persons - */ -function fb_get_friends_sync_full($uid, $access_token, $persons) { - if (count($persons) == 0) return; - $nums = Ceil(count($persons) / 50); - for ($i = 0; $i < $nums; $i++) { - $batch_request = array(); - for ($j = $i * 50; $j < ($i+1) * 50 && $j < count($persons); $j++) $batch_request[] = array('method'=>'GET', 'relative_url'=>$persons[$j]->id); - $s = post_url('https://graph.facebook.com/', array('access_token' => $access_token, 'batch' => json_encode($batch_request))); - if($s) { - $results = json_decode($s); - logger('fb_get_friends: info: ' . print_r($results,true), LOGGER_DATA); - if(count($results)) { - foreach ($results as $contact) { - if ($contact->code != 200) logger('fb_get_friends: not found: ' . print_r($contact,true), LOGGER_DEBUG); - else fb_get_friends_sync_parsecontact($uid, json_decode($contact->body)); - } - } - } - } -} - - - -// if $fullsync is true, only new contacts are searched for - -/** - * @param int $uid - * @param bool $fullsync - */ -function fb_get_friends($uid, $fullsync = true) { - - $r = q("SELECT `uid` FROM `user` WHERE `uid` = %d AND `account_expired` = 0 LIMIT 1", - intval($uid) - ); - if(! count($r)) - return; - - $access_token = get_pconfig($uid,'facebook','access_token'); - - $no_linking = get_pconfig($uid,'facebook','no_linking'); - - if($no_linking) - return; - - if(! $access_token) - return; - $s = fetch_url('https://graph.facebook.com/me/friends?access_token=' . $access_token); - if($s) { - logger('facebook: fb_gwet_friends: ' . $s, LOGGER_DATA); - $j = json_decode($s); - logger('facebook: fb_get_friends: json: ' . print_r($j,true), LOGGER_DATA); - if(! $j->data) - return; - - $persons_todo = array(); - foreach($j->data as $person) $persons_todo[] = $person; - - if ($fullsync) - fb_get_friends_sync_full($uid, $access_token, $persons_todo); - else - fb_get_friends_sync_new($uid, $access_token, $persons_todo); - } -} - -// This is the POST method to the facebook settings page -// Content is posted to Facebook in the function facebook_post_hook() - -/** - * @param App $a - */ -function facebook_post(&$a) { - - $uid = local_user(); - if($uid){ - - - $fb_limited = get_config('facebook','crestrict'); - - - $value = ((x($_POST,'post_by_default')) ? intval($_POST['post_by_default']) : 0); - set_pconfig($uid,'facebook','post_by_default', $value); - - $no_linking = get_pconfig($uid,'facebook','no_linking'); - - $no_wall = ((x($_POST,'facebook_no_wall')) ? intval($_POST['facebook_no_wall']) : 0); - set_pconfig($uid,'facebook','no_wall',$no_wall); - - $private_wall = ((x($_POST,'facebook_private_wall')) ? intval($_POST['facebook_private_wall']) : 0); - set_pconfig($uid,'facebook','private_wall',$private_wall); - - - set_pconfig($uid,'facebook','blocked_apps',escape_tags(trim($_POST['blocked_apps']))); - - $linkvalue = ((x($_POST,'facebook_linking')) ? intval($_POST['facebook_linking']) : 0); - - if($fb_limited) { - if($linkvalue == 0) - set_pconfig($uid,'facebook','no_linking', 1); - } - else - set_pconfig($uid,'facebook','no_linking', (($linkvalue) ? 0 : 1)); - - // FB linkage was allowed but has just been turned off - remove all FB contacts and posts - - if((! intval($no_linking)) && (! intval($linkvalue))) { - $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `network` = '%s' ", - intval($uid), - dbesc(NETWORK_FACEBOOK) - ); - if(count($r)) { - require_once('include/Contact.php'); - foreach($r as $rr) - contact_remove($rr['id']); - } - } - elseif(intval($no_linking) && intval($linkvalue)) { - // FB linkage is now allowed - import stuff. - fb_get_self($uid); - fb_get_friends($uid, true); - fb_consume_all($uid); - } - - info( t('Settings updated.') . EOL); - } - - return; -} - -// Facebook settings form - -/** - * @param App $a - * @return string - */ -function facebook_content(&$a) { - - if(! local_user()) { - notice( t('Permission denied.') . EOL); - return ''; - } - - - if(! service_class_allows(local_user(),'facebook_connect')) { - notice( t('Permission denied.') . EOL); - return upgrade_bool_message(); - } - - - if($a->argc > 1 && $a->argv[1] === 'remove') { - del_pconfig(local_user(),'facebook','post'); - info( t('Facebook disabled') . EOL); - } - - if($a->argc > 1 && $a->argv[1] === 'friends') { - fb_get_friends(local_user(), true); - info( t('Updating contacts') . EOL); - } - - - $fb_limited = get_config('facebook','restrict'); - - $o = ''; - - $fb_installed = false; - if (get_pconfig(local_user(),'facebook','post')) { - $access_token = get_pconfig(local_user(),'facebook','access_token'); - if ($access_token) { - $s = fetch_url('https://graph.facebook.com/me/feed?access_token=' . $access_token); - if($s) { - $j = json_decode($s); - if (isset($j->data)) $fb_installed = true; - } - } - } - - $appid = get_config('facebook','appid'); - - if(! $appid) { - notice( t('Facebook API key is missing.') . EOL); - return ''; - } - - $a->page['htmlhead'] .= '' . "\r\n"; - - $o .= '

' . t('Facebook Connect') . '

'; - - if(! $fb_installed) { - $o .= ''; - } - - if($fb_installed) { - $o .= ''; - - $o .= ''; - - $o .= '
'; - $o .= '
'; - $post_by_default = get_pconfig(local_user(),'facebook','post_by_default'); - $checked = (($post_by_default) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('Post to Facebook by default') . EOL; - - $no_linking = get_pconfig(local_user(),'facebook','no_linking'); - $checked = (($no_linking) ? '' : ' checked="checked" '); - if($fb_limited) { - if($no_linking) { - $o .= EOL . '' . t('Facebook friend linking has been disabled on this site. The following settings will have no effect.') . '' . EOL; - $checked .= " disabled "; - } - else { - $o .= EOL . '' . t('Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it.') . '' . EOL; - } - } - $o .= '' . ' ' . t('Link all your Facebook friends and conversations on this website') . EOL ; - - $o .= '

' . t('Facebook conversations consist of your profile wall and your friend stream.'); - $o .= ' ' . t('On this website, your Facebook friend stream is only visible to you.'); - $o .= ' ' . t('The following settings determine the privacy of your Facebook profile wall on this website.') . '

'; - - $private_wall = get_pconfig(local_user(),'facebook','private_wall'); - $checked = (($private_wall) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('On this website your Facebook profile wall conversations will only be visible to you') . EOL ; - - - $no_wall = get_pconfig(local_user(),'facebook','no_wall'); - $checked = (($no_wall) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('Do not import your Facebook profile wall conversations') . EOL ; - - $o .= '

' . t('If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations.') . '

'; - - - $blocked_apps = get_pconfig(local_user(),'facebook','blocked_apps'); - - $o .= '
'; - $o .= '
'; - - $o .= '
'; - } - - return $o; -} - - -/** - * @param App $a - * @param null|object $b - * @return mixed - */ -function facebook_cron($a,$b) { - - $last = get_config('facebook','last_poll'); - - $poll_interval = intval(get_config('facebook','poll_interval')); - if(! $poll_interval) - $poll_interval = FACEBOOK_DEFAULT_POLL_INTERVAL; - - if($last) { - $next = $last + ($poll_interval * 60); - if($next > time()) - return; - } - - logger('facebook_cron'); - - - // Find the FB users on this site and randomize in case one of them - // uses an obscene amount of memory. It may kill this queue run - // but hopefully we'll get a few others through on each run. - - $r = q("SELECT * FROM `pconfig` WHERE `cat` = 'facebook' AND `k` = 'post' AND `v` = '1' ORDER BY RAND() "); - if(count($r)) { - foreach($r as $rr) { - if(get_pconfig($rr['uid'],'facebook','no_linking')) - continue; - $ab = intval(get_config('system','account_abandon_days')); - if($ab > 0) { - $z = q("SELECT `uid` FROM `user` WHERE `uid` = %d AND `login_date` > UTC_TIMESTAMP() - INTERVAL %d DAY LIMIT 1", - intval($rr['uid']), - intval($ab) - ); - if(! count($z)) - continue; - } - - // check for new friends once a day - $last_friend_check = get_pconfig($rr['uid'],'facebook','friend_check'); - if($last_friend_check) - $next_friend_check = $last_friend_check + 86400; - else - $next_friend_check = 0; - if($next_friend_check <= time()) { - fb_get_friends($rr['uid'], true); - set_pconfig($rr['uid'],'facebook','friend_check',time()); - } - fb_consume_all($rr['uid']); - } - } - - if (get_config('facebook', 'realtime_active') == 1) { - if (!facebook_check_realtime_active()) { - - logger('facebook_cron: Facebook is not sending Real-Time Updates any more, although it is supposed to. Trying to fix it...', LOGGER_NORMAL); - facebook_subscription_add_users(); - - if (facebook_check_realtime_active()) - logger('facebook_cron: Successful', LOGGER_NORMAL); - else { - logger('facebook_cron: Failed', LOGGER_NORMAL); - - $first_err = get_config('facebook', 'realtime_first_err'); - if (!$first_err) { - $first_err = time(); - set_config('facebook', 'realtime_first_err', $first_err); - } - $first_err_ago = (time() - $first_err); - - if(strlen($a->config['admin_email']) && !get_config('facebook', 'realtime_err_mailsent') && $first_err_ago > (FACEBOOK_RTU_ERR_MAIL_AFTER_MINUTES * 60)) { - 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 a permission issue?\n\nPlease try to re-activate it on " . $a->config["system"]["url"] . "/admin/plugins/facebook\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' - ); - - set_config('facebook', 'realtime_err_mailsent', 1); - } - } - } else { // !facebook_check_realtime_active() - del_config('facebook', 'realtime_err_mailsent'); - del_config('facebook', 'realtime_first_err'); - } - } - - set_config('facebook','last_poll', time()); - -} - - -/** - * @param App $a - * @param null|object $b - */ -function facebook_plugin_settings(&$a,&$b) { - - $b .= '
'; - $b .= '

' . t('Facebook') . '

'; - $b .= '' . t('Facebook Connector Settings') . '
'; - $b .= '
'; - -} - - -/** - * @param App $a - * @param null|object $o - */ -function facebook_plugin_admin(&$a, &$o){ - - - $o = ''; - - $o .= '

' . t('Facebook API Key') . '

'; - - $appid = get_config('facebook', 'appid' ); - $appsecret = get_config('facebook', 'appsecret' ); - $poll_interval = get_config('facebook', 'poll_interval' ); - $sync_comments = get_config('facebook', 'sync_comments' ); - if (!$poll_interval) $poll_interval = FACEBOOK_DEFAULT_POLL_INTERVAL; - - $ret1 = q("SELECT `v` FROM `config` WHERE `cat` = 'facebook' AND `k` = 'appid' LIMIT 1"); - $ret2 = q("SELECT `v` FROM `config` WHERE `cat` = 'facebook' AND `k` = 'appsecret' LIMIT 1"); - if ((count($ret1) > 0 && $ret1[0]['v'] != $appid) || (count($ret2) > 0 && $ret2[0]['v'] != $appsecret)) $o .= t('Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

'); - - $working_connection = false; - if ($appid && $appsecret) { - $subs = facebook_subscriptions_get(); - if ($subs === null) $o .= t('Error: the given API Key seems to be incorrect (the application access token could not be retrieved).') . '
'; - elseif (is_array($subs)) { - $o .= t('The given API Key seems to work correctly.') . '
'; - $working_connection = true; - } else $o .= t('The correctness of the API Key could not be detected. Something strange\'s going on.') . '
'; - } - - $o .= '
'; - $o .= '
'; - $o .= '
'; - $o .= '
'; - $o .= ''; - - if ($working_connection) { - $o .= '

' . t('Real-Time Updates') . '

'; - - $activated = facebook_check_realtime_active(); - if ($activated) { - $o .= t('Real-Time Updates are activated.') . '

'; - $o .= ''; - } else { - $o .= t('Real-Time Updates not activated.') . '
'; - } - } -} - -/** - * @param App $a - */ - -function facebook_plugin_admin_post(&$a){ - check_form_security_token_redirectOnErr('/admin/plugins/facebook', 'fbsave'); - - if (x($_REQUEST,'fb_save_keys')) { - set_config('facebook', 'appid', $_REQUEST['appid']); - set_config('facebook', 'appsecret', $_REQUEST['appsecret']); - $poll_interval = IntVal($_REQUEST['poll_interval']); - if ($poll_interval >= FACEBOOK_MIN_POLL_INTERVAL) set_config('facebook', 'poll_interval', $poll_interval); - set_config('facebook', 'sync_comments', (x($_REQUEST, 'sync_comments') ? 1 : 0)); - del_config('facebook', 'app_access_token'); - info(t('The new values have been saved.')); - } - if (x($_REQUEST,'real_time_activate')) { - facebook_subscription_add_users(); - } - if (x($_REQUEST,'real_time_deactivate')) { - facebook_subscription_del_users(); - } -} - -/** - * @param App $a - * @param object $b - * @return mixed - */ -function facebook_jot_nets(&$a,&$b) { - if(! local_user()) - return; - - $fb_post = get_pconfig(local_user(),'facebook','post'); - if(intval($fb_post) == 1) { - $fb_defpost = get_pconfig(local_user(),'facebook','post_by_default'); - $selected = ((intval($fb_defpost) == 1) ? ' checked="checked" ' : ''); - $b .= '
' - . t('Post to Facebook') . '
'; - } -} - - -/** - * @param App $a - * @param object $b - * @return mixed - */ -function facebook_post_hook(&$a,&$b) { - - - if($b['deleted'] || ($b['created'] !== $b['edited'])) - return; - - /** - * Post to Facebook stream - */ - - require_once('include/group.php'); - require_once('include/html2plain.php'); - - logger('Facebook post'); - - $reply = false; - $likes = false; - - $deny_arr = array(); - $allow_arr = array(); - - $toplevel = (($b['id'] == $b['parent']) ? true : false); - - - $linking = ((get_pconfig($b['uid'],'facebook','no_linking')) ? 0 : 1); - - if((! $toplevel) && ($linking)) { - $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($b['parent']), - intval($b['uid']) - ); - if(count($r) && substr($r[0]['uri'],0,4) === 'fb::') - $reply = substr($r[0]['uri'],4); - elseif(count($r) && substr($r[0]['extid'],0,4) === 'fb::') - $reply = substr($r[0]['extid'],4); - else - return; - - $u = q("SELECT * FROM user where uid = %d limit 1", - intval($b['uid']) - ); - if(! count($u)) - return; - - // only accept comments from the item owner. Other contacts are unknown to FB. - - if(! link_compare($b['author-link'], $a->get_baseurl() . '/profile/' . $u[0]['nickname'])) - return; - - - logger('facebook reply id=' . $reply); - } - - if(strstr($b['postopts'],'facebook') || ($b['private']) || ($reply)) { - - if($b['private'] && $reply === false) { - $allow_people = expand_acl($b['allow_cid']); - $allow_groups = expand_groups(expand_acl($b['allow_gid'])); - $deny_people = expand_acl($b['deny_cid']); - $deny_groups = expand_groups(expand_acl($b['deny_gid'])); - - $recipients = array_unique(array_merge($allow_people,$allow_groups)); - $deny = array_unique(array_merge($deny_people,$deny_groups)); - - $allow_str = dbesc(implode(', ',$recipients)); - if($allow_str) { - $r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $allow_str ) AND `network` = 'face'"); - if(count($r)) - foreach($r as $rr) - $allow_arr[] = $rr['notify']; - } - - $deny_str = dbesc(implode(', ',$deny)); - if($deny_str) { - $r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $deny_str ) AND `network` = 'face'"); - if(count($r)) - foreach($r as $rr) - $deny_arr[] = $rr['notify']; - } - - if(count($deny_arr) && (! count($allow_arr))) { - - // One or more FB folks were denied access but nobody on FB was specifically allowed access. - // This might cause the post to be open to public on Facebook, but only to selected members - // on another network. Since this could potentially leak a post to somebody who was denied, - // we will skip posting it to Facebook with a slightly vague but relevant message that will - // hopefully lead somebody to this code comment for a better explanation of what went wrong. - - notice( t('Post to Facebook cancelled because of multi-network access permission conflict.') . EOL); - return; - } - - - // if it's a private message but no Facebook members are allowed or denied, skip Facebook post - - if((! count($allow_arr)) && (! count($deny_arr))) - return; - } - - if($b['verb'] == ACTIVITY_LIKE) - $likes = true; - - - $appid = get_config('facebook', 'appid' ); - $secret = get_config('facebook', 'appsecret' ); - - if($appid && $secret) { - - logger('facebook: have appid+secret'); - - $fb_token = get_pconfig($b['uid'],'facebook','access_token'); - - - // post to facebook if it's a public post and we've ticked the 'post to Facebook' box, - // or it's a private message with facebook participants - // or it's a reply or likes action to an existing facebook post - - if($fb_token && ($toplevel || $b['private'] || $reply)) { - logger('facebook: able to post'); - require_once('library/facebook.php'); - require_once('include/bbcode.php'); - - $msg = $b['body']; - - logger('Facebook post: original msg=' . $msg, LOGGER_DATA); - - // make links readable before we strip the code - - // unless it's a dislike - just send the text as a comment - - // if($b['verb'] == ACTIVITY_DISLIKE) - // $msg = trim(strip_tags(bbcode($msg))); - - // Old code - /*$search_str = $a->get_baseurl() . '/search'; - - if(preg_match("/\[url=(.*?)\](.*?)\[\/url\]/is",$msg,$matches)) { - - // don't use hashtags for message link - - if(strpos($matches[2],$search_str) === false) { - $link = $matches[1]; - if(substr($matches[2],0,5) != '[img]') - $linkname = $matches[2]; - } - } - - // strip tag links to avoid link clutter, this really should be - // configurable because we're losing information - - $msg = preg_replace("/\#\[url=(.*?)\](.*?)\[\/url\]/is",'#$2',$msg); - - // provide the link separately for normal links - $msg = preg_replace("/\[url=(.*?)\](.*?)\[\/url\]/is",'$2 $1',$msg); - - if(preg_match("/\[img\](.*?)\[\/img\]/is",$msg,$matches)) - $image = $matches[1]; - - $msg = preg_replace("/\[img\](.*?)\[\/img\]/is", t('Image: ') . '$1', $msg); - - if((strpos($link,z_root()) !== false) && (! $image)) - $image = $a->get_baseurl() . '/images/friendica-64.jpg'; - - $msg = trim(strip_tags(bbcode($msg)));*/ - - // New code - - // Looking for the first image - $image = ''; - if(preg_match("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/is",$b['body'],$matches)) - $image = $matches[3]; - - if ($image == '') - if(preg_match("/\[img\](.*?)\[\/img\]/is",$b['body'],$matches)) - $image = $matches[1]; - - // When saved into the database the content is sent through htmlspecialchars - // That means that we have to decode all image-urls - $image = htmlspecialchars_decode($image); - - // Checking for a bookmark element - $body = $b['body']; - if (strpos($body, "[bookmark") !== false) { - // splitting the text in two parts: - // before and after the bookmark - $pos = strpos($body, "[bookmark"); - $body1 = substr($body, 0, $pos); - $body2 = substr($body, $pos); - - // Removing the bookmark and all quotes after the bookmark - // they are mostly only the content after the bookmark. - $body2 = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",'',$body2); - $body2 = preg_replace("/\[quote\=([^\]]*)\](.*?)\[\/quote\]/ism",'',$body2); - $body2 = preg_replace("/\[quote\](.*?)\[\/quote\]/ism",'',$body2); - - $body = $body1.$body2; - } - - // At first convert the text to html - $html = bbcode($body, false, false); - - // Then convert it to plain text - $msg = trim($b['title']." \n\n".html2plain($html, 0, true)); - $msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8'); - - // Removing multiple newlines - while (strpos($msg, "\n\n\n") !== false) - $msg = str_replace("\n\n\n", "\n\n", $msg); - - // add any attachments as text urls - $arr = explode(',',$b['attach']); - - if(count($arr)) { - $msg .= "\n"; - foreach($arr as $r) { - $matches = false; - $cnt = preg_match('|\[attach\]href=\"(.*?)\" size=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches); - if($cnt) { - $msg .= "\n".$matches[1]; - } - } - } - - $link = ''; - $linkname = ''; - // look for bookmark-bbcode and handle it with priority - if(preg_match("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/is",$b['body'],$matches)) { - $link = $matches[1]; - $linkname = $matches[2]; - } - - // If there is no bookmark element then take the first link - if ($link == '') { - $links = collecturls($html); - if (sizeof($links) > 0) { - reset($links); - $link = current($links); - } - } - - // Remove trailing and leading spaces - $msg = trim($msg); - - // Since facebook increased the maxpostlen massively this never should happen again :) - if (strlen($msg) > FACEBOOK_MAXPOSTLEN) { - require_once('library/slinky.php'); - - $display_url = $b['plink']; - - $slinky = new Slinky( $display_url ); - // setup a cascade of shortening services - // try to get a short link from these services - // in the order ur1.ca, trim, id.gd, tinyurl - $slinky->set_cascade( array( new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL() ) ); - $shortlink = $slinky->short(); - // the new message will be shortened such that "... $shortlink" - // will fit into the character limit - $msg = substr($msg, 0, FACEBOOK_MAXPOSTLEN - strlen($shortlink) - 4); - $msg .= '... ' . $shortlink; - } - - // Fallback - if message is empty - if(!strlen($msg)) - $msg = $linkname; - - if(!strlen($msg)) - $msg = $link; - - if(!strlen($msg)) - $msg = $image; - - // If there is nothing to post then exit - if(!strlen($msg)) - return; - - logger('Facebook post: msg=' . $msg, LOGGER_DATA); - - if($likes) { - $postvars = array('access_token' => $fb_token); - } - else { - // message, picture, link, name, caption, description, source, place, tags - $postvars = array( - 'access_token' => $fb_token, - 'message' => $msg - ); - if(trim($image) != "") { - $postvars['picture'] = $image; - } - if(trim($link) != "") { - $postvars['link'] = $link; - - // The following doesn't work - why? - if ((stristr($link,'youtube')) || (stristr($link,'youtu.be')) || (stristr($link,'vimeo'))) { - $postvars['source'] = $link; - } - } - if(trim($linkname) != "") - $postvars['name'] = $linkname; - } - - if(($b['private']) && ($toplevel)) { - $postvars['privacy'] = '{"value": "CUSTOM", "friends": "SOME_FRIENDS"'; - if(count($allow_arr)) - $postvars['privacy'] .= ',"allow": "' . implode(',',$allow_arr) . '"'; - if(count($deny_arr)) - $postvars['privacy'] .= ',"deny": "' . implode(',',$deny_arr) . '"'; - $postvars['privacy'] .= '}'; - - } - - if($reply) { - $url = 'https://graph.facebook.com/' . $reply . '/' . (($likes) ? 'likes' : 'comments'); - } else if (($link != "") || ($image != "") || ($b['title'] == '') || (strlen($msg) < 500)) { - $url = 'https://graph.facebook.com/me/feed'; - if($b['plink']) - $postvars['actions'] = '{"name": "' . t('View on Friendica') . '", "link": "' . $b['plink'] . '"}'; - } else { - // if its only a message and a subject and the message is larger than 500 characters then post it as note - $postvars = array( - 'access_token' => $fb_token, - 'message' => bbcode($b['body'], false, false), - 'subject' => $b['title'], - ); - $url = 'https://graph.facebook.com/me/notes'; - } - - logger('facebook: post to ' . $url); - logger('facebook: postvars: ' . print_r($postvars,true)); - - // "test_mode" prevents anything from actually being posted. - // Otherwise, let's do it. - - if(! get_config('facebook','test_mode')) { - $x = post_url($url, $postvars); - logger('Facebook post returns: ' . $x, LOGGER_DEBUG); - - $retj = json_decode($x); - if($retj->id) { - q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d", - dbesc('fb::' . $retj->id), - intval($b['id']) - ); - } - else { - if(! $likes) { - $s = serialize(array('url' => $url, 'item' => $b['id'], 'post' => $postvars)); - require_once('include/queue_fn.php'); - 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); - - $last_notification = get_pconfig($b['uid'], 'facebook', 'session_expired_mailsent'); - if (!$last_notification || $last_notification < (time() - FACEBOOK_SESSION_ERR_NOTIFICATION_INTERVAL)) { - 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'], - 'source_name' => t('Administrator'), - 'source_link' => $a->config["system"]["url"], - 'source_photo' => $a->config["system"]["url"] . '/images/person-80.jpg', - )); - - set_pconfig($b['uid'], 'facebook', 'session_expired_mailsent', time()); - } else logger('Facebook: No notification, as the last one was sent on ' . $last_notification, LOGGER_DEBUG); - } - } - } - } - } - } -} - -/** - * @param App $app - * @param object $data - */ -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'); - $data['body'] = sprintf( t("Hi %1\$s,\n\nThe connection between your accounts on %2\$s and Facebook became invalid. This usually happens after you change your Facebook-password. To enable the connection again, you have to %3\$sre-authenticate the Facebook-connector%4\$s."), $data['params']['to_name'], "[url=" . $app->config["system"]["url"] . "]" . $app->config["sitename"] . "[/url]", "[url=" . $app->config["system"]["url"] . "/facebook]", "[/url]"); - } -} - -/** - * @param App $a - * @param object $b - */ -function facebook_post_local(&$a,&$b) { - - // Figure out if Facebook posting is enabled for this post and file it in 'postopts' - // where we will discover it during background delivery. - - // This can only be triggered by a local user posting to their own wall. - - if((local_user()) && (local_user() == $b['uid'])) { - - $fb_post = intval(get_pconfig(local_user(),'facebook','post')); - $fb_enable = (($fb_post && x($_REQUEST,'facebook_enable')) ? intval($_REQUEST['facebook_enable']) : 0); - - // if API is used, default to the chosen settings - // but allow a specific override - - if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default'))) { - if(! x($_REQUEST,'facebook_enable')) - $fb_enable = 1; - } - - if(! $fb_enable) - return; - - if(strlen($b['postopts'])) - $b['postopts'] .= ','; - $b['postopts'] .= 'facebook'; - } -} - - -/** - * @param App $a - * @param object $b - */ -function fb_queue_hook(&$a,&$b) { - - $qi = q("SELECT * FROM `queue` WHERE `network` = '%s'", - dbesc(NETWORK_FACEBOOK) - ); - if(! count($qi)) - return; - - require_once('include/queue_fn.php'); - - foreach($qi as $x) { - if($x['network'] !== NETWORK_FACEBOOK) - continue; - - logger('facebook_queue: run'); - - $r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid` - WHERE `contact`.`self` = 1 AND `contact`.`id` = %d LIMIT 1", - intval($x['cid']) - ); - if(! count($r)) - continue; - - $user = $r[0]; - - $appid = get_config('facebook', 'appid' ); - $secret = get_config('facebook', 'appsecret' ); - - if($appid && $secret) { - $fb_post = intval(get_pconfig($user['uid'],'facebook','post')); - $fb_token = get_pconfig($user['uid'],'facebook','access_token'); - - if($fb_post && $fb_token) { - logger('facebook_queue: able to post'); - require_once('library/facebook.php'); - - $z = unserialize($x['content']); - $item = $z['item']; - $j = post_url($z['url'],$z['post']); - - $retj = json_decode($j); - if($retj->id) { - q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d", - dbesc('fb::' . $retj->id), - intval($item) - ); - logger('facebook_queue: success: ' . $j); - remove_queue_item($x['id']); - } - else { - logger('facebook_queue: failed: ' . $j); - update_queue_time($x['id']); - } - } - } - } -} - -/** - * @param string $access_token - * @param int $since - * @return object - */ -function fb_get_timeline($access_token, &$since) { - - $entries = new stdClass(); - $entries->data = array(); - $newest = 0; - - $url = 'https://graph.facebook.com/me/home?access_token='.$access_token; - - if ($since != 0) - $url .= "&since=".$since; - - do { - $s = fetch_url($url); - $j = json_decode($s); - $oldestdate = time(); - if (isset($j->data)) - foreach ($j->data as $entry) { - $created = strtotime($entry->created_time); - - if ($newest < $created) - $newest = $created; - - if ($created >= $since) - $entries->data[] = $entry; - - if ($created <= $oldestdate) - $oldestdate = $created; - } - else - break; - - $url = (isset($j->paging) && isset($j->paging->next) ? $j->paging->next : ''); - - } while (($oldestdate > $since) and ($since != 0) and ($url != '')); - - if ($newest > $since) - $since = $newest; - - return($entries); -} - -/** - * @param int $uid - */ -function fb_consume_all($uid) { - - require_once('include/items.php'); - - $access_token = get_pconfig($uid,'facebook','access_token'); - if(! $access_token) - return; - - if(! get_pconfig($uid,'facebook','no_wall')) { - $private_wall = intval(get_pconfig($uid,'facebook','private_wall')); - $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); - } - } - } - // Get the last date - $lastdate = get_pconfig($uid,'facebook','lastdate'); - // fetch all items since the last date - $j = fb_get_timeline($access_token, $lastdate); - if (isset($j->data)) { - logger('fb_consume_stream: feed: ' . print_r($j,true), LOGGER_DATA); - fb_consume_stream($uid,$j,false); - - // Write back the last date - set_pconfig($uid,'facebook','lastdate', $lastdate); - } else - logger('fb_consume_stream: feed: got no data from Facebook: ' . print_r($j,true), LOGGER_NORMAL); -} - -/** - * @param int $uid - * @param string $link - * @return string - */ -function fb_get_photo($uid,$link) { - $access_token = get_pconfig($uid,'facebook','access_token'); - if(! $access_token || (! stristr($link,'facebook.com/photo.php'))) - return ""; - //return "\n" . '[url=' . $link . ']' . t('link') . '[/url]'; - $ret = preg_match('/fbid=([0-9]*)/',$link,$match); - if($ret) - $photo_id = $match[1]; - else - return ""; - $x = fetch_url('https://graph.facebook.com/' . $photo_id . '?access_token=' . $access_token); - $j = json_decode($x); - if($j->picture) - return "\n\n" . '[url=' . $link . '][img]' . $j->picture . '[/img][/url]'; - //else - // return "\n" . '[url=' . $link . ']' . t('link') . '[/url]'; - return ""; -} - - -/** - * @param App $a - * @param array $user - * @param array $self - * @param string $fb_id - * @param bool $wall - * @param array $orig_post - * @param object $cmnt - */ -function fb_consume_comment(&$a, &$user, &$self, $fb_id, $wall, &$orig_post, &$cmnt) { - - if(! $orig_post) - return; - - $top_item = $orig_post['id']; - $uid = IntVal($user[0]['uid']); - - $r = q("SELECT * FROM `item` WHERE `uid` = %d AND ( `uri` = '%s' OR `extid` = '%s' ) LIMIT 1", - intval($uid), - dbesc('fb::' . $cmnt->id), - dbesc('fb::' . $cmnt->id) - ); - if(count($r)) - return; - - $cmntdata = array(); - $cmntdata['parent'] = $top_item; - $cmntdata['verb'] = ACTIVITY_POST; - $cmntdata['gravity'] = 6; - $cmntdata['uid'] = $uid; - $cmntdata['wall'] = (($wall) ? 1 : 0); - $cmntdata['uri'] = 'fb::' . $cmnt->id; - $cmntdata['parent-uri'] = $orig_post['uri']; - if($cmnt->from->id == $fb_id) { - $cmntdata['contact-id'] = $self[0]['id']; - } - else { - $r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d LIMIT 1", - dbesc($cmnt->from->id), - intval($uid) - ); - if(count($r)) { - $cmntdata['contact-id'] = $r[0]['id']; - if($r[0]['blocked'] || $r[0]['readonly']) - return; - } - } - if(! x($cmntdata,'contact-id')) - $cmntdata['contact-id'] = $orig_post['contact-id']; - - $cmntdata['app'] = 'facebook'; - $cmntdata['created'] = datetime_convert('UTC','UTC',$cmnt->created_time); - $cmntdata['edited'] = datetime_convert('UTC','UTC',$cmnt->created_time); - $cmntdata['verb'] = ACTIVITY_POST; - $cmntdata['author-name'] = $cmnt->from->name; - $cmntdata['author-link'] = 'http://facebook.com/profile.php?id=' . $cmnt->from->id; - $cmntdata['author-avatar'] = 'https://graph.facebook.com/' . $cmnt->from->id . '/picture'; - $cmntdata['body'] = $cmnt->message; - $item = item_store($cmntdata); - - $myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 AND `deleted` = 0", - dbesc($orig_post['uri']), - intval($uid) - ); - - if(count($myconv)) { - $importer_url = $a->get_baseurl() . '/profile/' . $user[0]['nickname']; - - foreach($myconv as $conv) { - - // now if we find a match, it means we're in this conversation - - if(! link_compare($conv['author-link'],$importer_url)) - continue; - - require_once('include/enotify.php'); - - $conv_parent = $conv['parent']; - - notification(array( - 'type' => NOTIFY_COMMENT, - 'notify_flags' => $user[0]['notify-flags'], - 'language' => $user[0]['language'], - 'to_name' => $user[0]['username'], - 'to_email' => $user[0]['email'], - 'uid' => $user[0]['uid'], - 'item' => $cmntdata, - 'link' => $a->get_baseurl() . '/display/' . $user[0]['nickname'] . '/' . $item, - 'source_name' => $cmntdata['author-name'], - 'source_link' => $cmntdata['author-link'], - 'source_photo' => $cmntdata['author-avatar'], - 'verb' => ACTIVITY_POST, - 'otype' => 'item', - 'parent' => $conv_parent, - )); - - // only send one notification - break; - } - } -} - - -/** - * @param App $a - * @param array $user - * @param array $self - * @param string $fb_id - * @param bool $wall - * @param array $orig_post - * @param object $likes - */ -function fb_consume_like(&$a, &$user, &$self, $fb_id, $wall, &$orig_post, &$likes) { - - $top_item = $orig_post['id']; - $uid = IntVal($user[0]['uid']); - - if(! $orig_post) - return; - - // If we posted the like locally, it will be found with our url, not the FB url. - - $second_url = (($likes->id == $fb_id) ? $self[0]['url'] : 'http://facebook.com/profile.php?id=' . $likes->id); - - $r = q("SELECT * FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `verb` = '%s' - AND ( `author-link` = '%s' OR `author-link` = '%s' ) LIMIT 1", - dbesc($orig_post['uri']), - intval($uid), - dbesc(ACTIVITY_LIKE), - dbesc('http://facebook.com/profile.php?id=' . $likes->id), - dbesc($second_url) - ); - - if(count($r)) - return; - - $likedata = array(); - $likedata['parent'] = $top_item; - $likedata['verb'] = ACTIVITY_LIKE; - $likedata['gravity'] = 3; - $likedata['uid'] = $uid; - $likedata['wall'] = (($wall) ? 1 : 0); - $likedata['uri'] = item_new_uri($a->get_baseurl(), $uid); - $likedata['parent-uri'] = $orig_post['uri']; - if($likes->id == $fb_id) - $likedata['contact-id'] = $self[0]['id']; - else { - $r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d AND `blocked` = 0 AND `readonly` = 0 LIMIT 1", - dbesc($likes->id), - intval($uid) - ); - if(count($r)) - $likedata['contact-id'] = $r[0]['id']; - } - if(! x($likedata,'contact-id')) - $likedata['contact-id'] = $orig_post['contact-id']; - - $likedata['app'] = 'facebook'; - $likedata['verb'] = ACTIVITY_LIKE; - $likedata['author-name'] = $likes->name; - $likedata['author-link'] = 'http://facebook.com/profile.php?id=' . $likes->id; - $likedata['author-avatar'] = 'https://graph.facebook.com/' . $likes->id . '/picture'; - - $author = '[url=' . $likedata['author-link'] . ']' . $likedata['author-name'] . '[/url]'; - $objauthor = '[url=' . $orig_post['author-link'] . ']' . $orig_post['author-name'] . '[/url]'; - $post_type = t('status'); - $plink = '[url=' . $orig_post['plink'] . ']' . $post_type . '[/url]'; - $likedata['object-type'] = ACTIVITY_OBJ_NOTE; - - $likedata['body'] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink); - $likedata['object'] = '' . ACTIVITY_OBJ_NOTE . '1' . - '' . $orig_post['uri'] . '' . xmlify('') . '' . $orig_post['title'] . '' . $orig_post['body'] . ''; - - item_store($likedata); -} - -/** - * @param App $a - * @param array $user - * @param object $entry - * @param array $self - * @param string $fb_id - * @param bool $wall - * @param array $orig_post - */ -function fb_consume_status(&$a, &$user, &$entry, &$self, $fb_id, $wall, &$orig_post) { - $uid = IntVal($user[0]['uid']); - $access_token = get_pconfig($uid, 'facebook', 'access_token'); - - $s = fetch_url('https://graph.facebook.com/' . $entry->id . '?access_token=' . $access_token); - if($s) { - $j = json_decode($s); - if (isset($j->comments) && isset($j->comments->data)) - foreach ($j->comments->data as $cmnt) - fb_consume_comment($a, $user, $self, $fb_id, $wall, $orig_post, $cmnt); - - if (isset($j->likes) && isset($j->likes->data) && isset($j->likes->count)) { - if (count($j->likes->data) == $j->likes->count) { - foreach ($j->likes->data as $likers) fb_consume_like($a, $user, $self, $fb_id, $wall, $orig_post, $likers); - } else { - $t = fetch_url('https://graph.facebook.com/' . $entry->id . '/likes?access_token=' . $access_token); - if ($t) { - $k = json_decode($t); - if (isset($k->data)) - foreach ($k->data as $likers) - fb_consume_like($a, $user, $self, $fb_id, $wall, $orig_post, $likers); - } - } - } - } -} - -/** - * @param int $uid - * @param object $j - * @param bool $wall - */ -function fb_consume_stream($uid,$j,$wall = false) { - - $a = get_app(); - - $user = q("SELECT * FROM `user` WHERE `uid` = %d AND `account_expired` = 0 LIMIT 1", - intval($uid) - ); - if(! count($user)) - return; - - // $my_local_url = $a->get_baseurl() . '/profile/' . $user[0]['nickname']; - - $no_linking = get_pconfig($uid,'facebook','no_linking'); - if($no_linking) - return; - - $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", - intval($uid) - ); - - $blocked_apps = get_pconfig($uid,'facebook','blocked_apps'); - $blocked_apps_arr = explode(',',$blocked_apps); - - $sync_comments = get_config('facebook', 'sync_comments'); - - /** @var string $self_id */ - $self_id = get_pconfig($uid,'facebook','self_id'); - if(! count($j->data) || (! strlen($self_id))) - return; - - $top_item = 0; - - foreach($j->data as $entry) { - logger('fb_consume: entry: ' . print_r($entry,true), LOGGER_DATA); - $datarray = array(); - - $r = q("SELECT * FROM `item` WHERE ( `uri` = '%s' OR `extid` = '%s') AND `uid` = %d LIMIT 1", - dbesc('fb::' . $entry->id), - dbesc('fb::' . $entry->id), - intval($uid) - ); - if(count($r)) { - $orig_post = $r[0]; - $top_item = $r[0]['id']; - } - else { - $orig_post = null; - } - - if(! $orig_post) { - $datarray['gravity'] = 0; - $datarray['uid'] = $uid; - $datarray['wall'] = (($wall) ? 1 : 0); - $datarray['uri'] = $datarray['parent-uri'] = 'fb::' . $entry->id; - $from = $entry->from; - if($from->id == $self_id) - $datarray['contact-id'] = $self[0]['id']; - else { - // Looking if user is known - if not he is added - $access_token = get_pconfig($uid, 'facebook', 'access_token'); - fb_get_friends_sync_new($uid, $access_token, array($from)); - - $r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d AND `blocked` = 0 AND `readonly` = 0 LIMIT 1", - dbesc($from->id), - intval($uid) - ); - if(count($r)) - $datarray['contact-id'] = $r[0]['id']; - } - - // don't store post if we don't have a contact - if(! x($datarray,'contact-id')) { - logger('facebook: no contact '.$from->name.' '.$from->id.'. post ignored'); - continue; - } - - $datarray['verb'] = ACTIVITY_POST; - if($wall) { - $datarray['owner-name'] = $self[0]['name']; - $datarray['owner-link'] = $self[0]['url']; - $datarray['owner-avatar'] = $self[0]['thumb']; - } - if(isset($entry->application) && isset($entry->application->name) && strlen($entry->application->name)) - $datarray['app'] = strip_tags($entry->application->name); - else - $datarray['app'] = 'facebook'; - - $found_blocked = false; - - if(count($blocked_apps_arr)) { - foreach($blocked_apps_arr as $bad_appl) { - if(strlen(trim($bad_appl)) && (stristr($datarray['app'],trim($bad_appl)))) { - $found_blocked = true; - } - } - } - - if($found_blocked) { - logger('facebook: blocking application: ' . $datarray['app']); - continue; - } - - $datarray['author-name'] = $from->name; - $datarray['author-link'] = 'http://facebook.com/profile.php?id=' . $from->id; - $datarray['author-avatar'] = 'https://graph.facebook.com/' . $from->id . '/picture'; - $datarray['plink'] = $datarray['author-link'] . '&v=wall&story_fbid=' . substr($entry->id,strpos($entry->id,'_') + 1); - - logger('facebook: post '.$entry->id.' from '.$from->name); - - $datarray['body'] = (isset($entry->message) ? escape_tags($entry->message) : ''); - - if(isset($entry->name) && isset($entry->link)) - $datarray['body'] .= "\n\n[bookmark=".$entry->link."]".$entry->name."[/bookmark]"; - elseif (isset($entry->name)) - $datarray['body'] .= "\n\n[b]" . $entry->name."[/b]"; - - if(isset($entry->caption)) { - if(!isset($entry->name) && isset($entry->link)) - $datarray['body'] .= "\n\n[bookmark=".$entry->link."]".$entry->caption."[/bookmark]"; - else - $datarray['body'] .= "[i]" . $entry->caption."[/i]\n"; - } - - if(!isset($entry->caption) && !isset($entry->name)) { - if (isset($entry->link)) - $datarray['body'] .= "\n[url]".$entry->link."[/url]\n"; - else - $datarray['body'] .= "\n"; - } - - $quote = ""; - if(isset($entry->description)) - $quote = $entry->description; - - if (isset($entry->properties)) - foreach ($entry->properties as $property) - $quote .= "\n".$property->name.": [url=".$property->href."]".$property->text."[/url]"; - - if ($quote) - $datarray['body'] .= "\n[quote]".$quote."[/quote]"; - - // Only import the picture when the message is no video - // oembed display a picture of the video as well - if ($entry->type != "video") { - if(isset($entry->picture) && isset($entry->link)) { - $datarray['body'] .= "\n" . '[url=' . $entry->link . '][img]'.$entry->picture.'[/img][/url]'; - } - else { - if(isset($entry->picture)) - $datarray['body'] .= "\n" . '[img]' . $entry->picture . '[/img]'; - // if just a link, it may be a wall photo - check - if(isset($entry->link)) - $datarray['body'] .= fb_get_photo($uid,$entry->link); - } - } - - if (($datarray['app'] == "Events") && isset($entry->actions)) - foreach ($entry->actions as $action) - if ($action->name == "View") - $datarray['body'] .= " [url=".$action->link."]".$entry->story."[/url]"; - - // Just as a test - to see if these are the missing entries - //if(trim($datarray['body']) == '') - // $datarray['body'] = $entry->story; - - // Adding the "story" text to see if there are useful data in it (testing) - //if (($datarray['app'] != "Events") && $entry->story) - // $datarray['body'] .= "\n".$entry->story; - - if(trim($datarray['body']) == '') { - logger('facebook: empty body '.$entry->id.' '.print_r($entry, true)); - continue; - } - - $datarray['body'] .= "\n"; - - if (isset($entry->icon)) - $datarray['body'] .= "[img]".$entry->icon."[/img]   "; - - if (isset($entry->actions)) - foreach ($entry->actions as $action) - if (($action->name != "Comment") && ($action->name != "Like")) - $datarray['body'] .= "[url=".$action->link."]".$action->name."[/url]   "; - - $datarray['body'] = trim($datarray['body']); - - //if(($datarray['body'] != '') && ($uid == 1)) - // $datarray['body'] .= "[noparse]".print_r($entry, true)."[/noparse]"; - - if (isset($entry->place)) { - if ($entry->place->name || $entry->place->location->street || - $entry->place->location->city || $entry->place->location->Denmark) { - $datarray['coord'] = ''; - if ($entry->place->name) - $datarray['coord'] .= $entry->place->name; - if ($entry->place->location->street) - $datarray['coord'] .= $entry->place->location->street; - if ($entry->place->location->city) - $datarray['coord'] .= " ".$entry->place->location->city; - if ($entry->place->location->country) - $datarray['coord'] .= " ".$entry->place->location->country; - } else if ($entry->place->location->latitude && $entry->place->location->longitude) - $datarray['coord'] = substr($entry->place->location->latitude, 0, 8) - .' '.substr($entry->place->location->longitude, 0, 8); - } - $datarray['created'] = datetime_convert('UTC','UTC',$entry->created_time); - $datarray['edited'] = datetime_convert('UTC','UTC',$entry->updated_time); - - // If the entry has a privacy policy, we cannot assume who can or cannot see it, - // as the identities are from a foreign system. Mark it as private to the owner. - - if(isset($entry->privacy) && $entry->privacy->value !== 'EVERYONE') { - $datarray['private'] = 1; - $datarray['allow_cid'] = '<' . $self[0]['id'] . '>'; - } - - $top_item = item_store($datarray); - $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($top_item), - intval($uid) - ); - if(count($r)) { - $orig_post = $r[0]; - logger('fb: new top level item posted'); - } - } - - /** @var array $orig_post */ - - $likers_num = (isset($entry->likes) && isset($entry->likes->count) ? IntVal($entry->likes->count) : 0 ); - if(isset($entry->likes) && isset($entry->likes->data)) - $likers = $entry->likes->data; - else - $likers = null; - - $comments_num = (isset($entry->comments) && isset($entry->comments->count) ? IntVal($entry->comments->count) : 0 ); - if(isset($entry->comments) && isset($entry->comments->data)) - $comments = $entry->comments->data; - else - $comments = null; - - $needs_sync = false; - - if(is_array($likers)) { - foreach($likers as $likes) fb_consume_like($a, $user, $self, $self_id, $wall, $orig_post, $likes); - if ($sync_comments) { - $r = q("SELECT COUNT(*) likes FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `verb` = '%s' AND `parent-uri` != `uri`", - dbesc($orig_post['uri']), - intval($uid), - dbesc(ACTIVITY_LIKE) - ); - if ($r[0]['likes'] < $likers_num) { - logger('fb_consume_stream: missing likes found for ' . $orig_post['uri'] . ' (we have ' . $r[0]['likes'] . ' of ' . $likers_num . '). Synchronizing...', LOGGER_DEBUG); - $needs_sync = true; - } - } - } - - if(is_array($comments)) { - foreach($comments as $cmnt) fb_consume_comment($a, $user, $self, $self_id, $wall, $orig_post, $cmnt); - if ($sync_comments) { - $r = q("SELECT COUNT(*) comments FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `verb` = '%s' AND `parent-uri` != `uri`", - dbesc($orig_post['uri']), - intval($uid), - ACTIVITY_POST - ); - if ($r[0]['comments'] < $comments_num) { - logger('fb_consume_stream: missing comments found for ' . $orig_post['uri'] . ' (we have ' . $r[0]['comments'] . ' of ' . $comments_num . '). Synchronizing...', LOGGER_DEBUG); - $needs_sync = true; - } - } - } - - if ($needs_sync) fb_consume_status($a, $user, $entry, $self, $self_id, $wall, $orig_post); - } -} - - -/** - * @return bool|string - */ -function fb_get_app_access_token() { - - $acc_token = get_config('facebook','app_access_token'); - - if ($acc_token !== false) return $acc_token; - - $appid = get_config('facebook','appid'); - $appsecret = get_config('facebook', 'appsecret'); - - if ($appid === false || $appsecret === false) { - logger('fb_get_app_access_token: appid and/or appsecret not set', LOGGER_DEBUG); - return false; - } - logger('https://graph.facebook.com/oauth/access_token?client_id=' . $appid . '&client_secret=' . $appsecret . '&grant_type=client_credentials', LOGGER_DATA); - $x = fetch_url('https://graph.facebook.com/oauth/access_token?client_id=' . $appid . '&client_secret=' . $appsecret . '&grant_type=client_credentials'); - - if(strpos($x,'access_token=') !== false) { - logger('fb_get_app_access_token: returned access token: ' . $x, LOGGER_DATA); - - $token = str_replace('access_token=', '', $x); - if(strpos($token,'&') !== false) - $token = substr($token,0,strpos($token,'&')); - - if ($token == "") { - logger('fb_get_app_access_token: empty token: ' . $x, LOGGER_DEBUG); - return false; - } - set_config('facebook','app_access_token',$token); - return $token; - } else { - logger('fb_get_app_access_token: response did not contain an access_token: ' . $x, LOGGER_DATA); - return false; - } -} - -function facebook_subscription_del_users() { - $a = get_app(); - $access_token = fb_get_app_access_token(); - - $url = "https://graph.facebook.com/" . get_config('facebook', 'appid' ) . "/subscriptions?access_token=" . $access_token; - facebook_delete_url($url); - - if (!facebook_check_realtime_active()) del_config('facebook', 'realtime_active'); -} - -/** - * @param bool $second_try - */ -function facebook_subscription_add_users($second_try = false) { - $a = get_app(); - $access_token = fb_get_app_access_token(); - - $url = "https://graph.facebook.com/" . get_config('facebook', 'appid' ) . "/subscriptions?access_token=" . $access_token; - - list($usec, $sec) = explode(" ", microtime()); - $verify_token = sha1($usec . $sec . rand(0, 999999999)); - set_config('facebook', 'cb_verify_token', $verify_token); - - $cb = $a->get_baseurl() . '/facebook/?realtime_cb=1'; - - $j = post_url($url,array( - "object" => "user", - "fields" => "feed,friends", - "callback_url" => $cb, - "verify_token" => $verify_token, - )); - del_config('facebook', 'cb_verify_token'); - - if ($j) { - $x = json_decode($j); - logger("Facebook reponse: " . $j, LOGGER_DATA); - if (isset($x->error)) { - logger('facebook_subscription_add_users: got an error: ' . $j); - if ($x->error->type == "OAuthException" && $x->error->code == 190) { - del_config('facebook', 'app_access_token'); - if ($second_try === false) facebook_subscription_add_users(true); - } - } else { - logger('facebook_subscription_add_users: sucessful'); - if (facebook_check_realtime_active()) set_config('facebook', 'realtime_active', 1); - } - }; -} - -/** - * @return null|array - */ -function facebook_subscriptions_get() { - - $access_token = fb_get_app_access_token(); - if (!$access_token) return null; - - $url = "https://graph.facebook.com/" . get_config('facebook', 'appid' ) . "/subscriptions?access_token=" . $access_token; - $j = fetch_url($url); - $ret = null; - if ($j) { - $x = json_decode($j); - if (isset($x->data)) $ret = $x->data; - } - return $ret; -} - - -/** - * @return bool - */ -function facebook_check_realtime_active() { - $ret = facebook_subscriptions_get(); - if (is_null($ret)) return false; - if (is_array($ret)) foreach ($ret as $re) if (is_object($re) && $re->object == "user") return true; - return false; -} - - - - -// DELETE-request to $url - -if(! function_exists('facebook_delete_url')) { - /** - * @param string $url - * @param null|array $headers - * @param int $redirects - * @param int $timeout - * @return bool|string - */ - function facebook_delete_url($url,$headers = null, &$redirects = 0, $timeout = 0) { - $a = get_app(); - $ch = curl_init($url); - if(($redirects > 8) || (! $ch)) - return false; - - curl_setopt($ch, CURLOPT_HEADER, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); - curl_setopt($ch, CURLOPT_USERAGENT, "Friendica"); - - if(intval($timeout)) { - curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); - } - else { - $curl_time = intval(get_config('system','curl_timeout')); - curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60)); - } - - if(defined('LIGHTTPD')) { - if(!is_array($headers)) { - $headers = array('Expect:'); - } else { - if(!in_array('Expect:', $headers)) { - array_push($headers, 'Expect:'); - } - } - } - if($headers) - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - - $check_cert = get_config('system','verifyssl'); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false)); - $prx = get_config('system','proxy'); - if(strlen($prx)) { - curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); - curl_setopt($ch, CURLOPT_PROXY, $prx); - $prxusr = get_config('system','proxyuser'); - if(strlen($prxusr)) - curl_setopt($ch, CURLOPT_PROXYUSERPWD, $prxusr); - } - - $a->set_curl_code(0); - - // don't let curl abort the entire application - // if it throws any errors. - - $s = @curl_exec($ch); - - $base = $s; - $curl_info = curl_getinfo($ch); - $http_code = $curl_info['http_code']; - - $header = ''; - - // Pull out multiple headers, e.g. proxy and continuation headers - // allow for HTTP/2.x without fixing code - - while(preg_match('/^HTTP\/[1-2].+? [1-5][0-9][0-9]/',$base)) { - $chunk = substr($base,0,strpos($base,"\r\n\r\n")+4); - $header .= $chunk; - $base = substr($base,strlen($chunk)); - } - - if($http_code == 301 || $http_code == 302 || $http_code == 303) { - $matches = array(); - preg_match('/(Location:|URI:)(.*?)\n/', $header, $matches); - $url = trim(array_pop($matches)); - $url_parsed = @parse_url($url); - if (isset($url_parsed)) { - $redirects++; - return facebook_delete_url($url,$headers,$redirects,$timeout); - } - } - $a->set_curl_code($http_code); - $body = substr($s,strlen($header)); - - $a->set_curl_headers($header); - - curl_close($ch); - return($body); -}} diff --git a/facebook/lang/C/messages.po b/facebook/lang/C/messages.po deleted file mode 100644 index 8018e828..00000000 --- a/facebook/lang/C/messages.po +++ /dev/null @@ -1,253 +0,0 @@ -# ADDON facebook -# Copyright (C) -# This file is distributed under the same license as the Friendica facebook addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: facebook.php:497 -msgid "Settings updated." -msgstr "" - -#: facebook.php:512 facebook.php:518 -msgid "Permission denied." -msgstr "" - -#: facebook.php:525 -msgid "Facebook disabled" -msgstr "" - -#: facebook.php:530 -msgid "Updating contacts" -msgstr "" - -#: facebook.php:553 -msgid "Facebook API key is missing." -msgstr "" - -#: facebook.php:560 -msgid "Facebook Connect" -msgstr "" - -#: facebook.php:566 -msgid "Install Facebook connector for this account." -msgstr "" - -#: facebook.php:573 -msgid "Remove Facebook connector" -msgstr "" - -#: facebook.php:578 -msgid "" -"Re-authenticate [This is necessary whenever your Facebook password is " -"changed.]" -msgstr "" - -#: facebook.php:585 -msgid "Post to Facebook by default" -msgstr "" - -#: facebook.php:591 -msgid "" -"Facebook friend linking has been disabled on this site. The following " -"settings will have no effect." -msgstr "" - -#: facebook.php:595 -msgid "" -"Facebook friend linking has been disabled on this site. If you disable it, " -"you will be unable to re-enable it." -msgstr "" - -#: facebook.php:598 -msgid "Link all your Facebook friends and conversations on this website" -msgstr "" - -#: facebook.php:600 -msgid "" -"Facebook conversations consist of your profile wall and your friend " -"stream." -msgstr "" - -#: facebook.php:601 -msgid "On this website, your Facebook friend stream is only visible to you." -msgstr "" - -#: facebook.php:602 -msgid "" -"The following settings determine the privacy of your Facebook profile wall " -"on this website." -msgstr "" - -#: facebook.php:606 -msgid "" -"On this website your Facebook profile wall conversations will only be " -"visible to you" -msgstr "" - -#: facebook.php:611 -msgid "Do not import your Facebook profile wall conversations" -msgstr "" - -#: facebook.php:613 -msgid "" -"If you choose to link conversations and leave both of these boxes unchecked, " -"your Facebook profile wall will be merged with your profile wall on this " -"website and your privacy settings on this website will be used to determine " -"who may see the conversations." -msgstr "" - -#: facebook.php:618 -msgid "Comma separated applications to ignore" -msgstr "" - -#: facebook.php:621 -msgid "Submit" -msgstr "" - -#: facebook.php:702 -msgid "Problems with Facebook Real-Time Updates" -msgstr "" - -#: facebook.php:704 facebook.php:1202 -msgid "Administrator" -msgstr "" - -#: facebook.php:730 -msgid "Facebook" -msgstr "" - -#: facebook.php:731 -msgid "Facebook Connector Settings" -msgstr "" - -#: facebook.php:746 -msgid "Facebook API Key" -msgstr "" - -#: facebook.php:756 -msgid "" -"Error: it appears that you have specified the App-ID and -Secret in your ." -"htconfig.php file. As long as they are specified there, they cannot be set " -"using this form.

" -msgstr "" - -#: facebook.php:761 -msgid "" -"Error: the given API Key seems to be incorrect (the application access token " -"could not be retrieved)." -msgstr "" - -#: facebook.php:763 -msgid "The given API Key seems to work correctly." -msgstr "" - -#: facebook.php:765 -msgid "" -"The correctness of the API Key could not be detected. Something strange's " -"going on." -msgstr "" - -#: facebook.php:768 -msgid "App-ID / API-Key" -msgstr "" - -#: facebook.php:769 -msgid "Application secret" -msgstr "" - -#: facebook.php:770 -#, php-format -msgid "Polling Interval in minutes (minimum %1$s minutes)" -msgstr "" - -#: facebook.php:771 -msgid "" -"Synchronize comments (no comments on Facebook are missed, at the cost of " -"increased system load)" -msgstr "" - -#: facebook.php:772 -msgid "Save" -msgstr "" - -#: facebook.php:775 -msgid "Real-Time Updates" -msgstr "" - -#: facebook.php:779 -msgid "Real-Time Updates are activated." -msgstr "" - -#: facebook.php:780 -msgid "Deactivate Real-Time Updates" -msgstr "" - -#: facebook.php:782 -msgid "Real-Time Updates not activated." -msgstr "" - -#: facebook.php:782 -msgid "Activate Real-Time Updates" -msgstr "" - -#: facebook.php:801 -msgid "The new values have been saved." -msgstr "" - -#: facebook.php:825 -msgid "Post to Facebook" -msgstr "" - -#: facebook.php:923 -msgid "" -"Post to Facebook cancelled because of multi-network access permission " -"conflict." -msgstr "" - -#: facebook.php:1151 -msgid "View on Friendica" -msgstr "" - -#: facebook.php:1184 -msgid "Facebook post failed. Queued for retry." -msgstr "" - -#: facebook.php:1224 -msgid "Your Facebook connection became invalid. Please Re-authenticate." -msgstr "" - -#: facebook.php:1225 -msgid "Facebook connection became invalid" -msgstr "" - -#: facebook.php:1226 -#, php-format -msgid "" -"Hi %1$s,\n" -"\n" -"The connection between your accounts on %2$s and Facebook became invalid. " -"This usually happens after you change your Facebook-password. To enable the " -"connection again, you have to %3$sre-authenticate the Facebook-connector%4$s." -msgstr "" - -#: facebook.php:1600 -msgid "status" -msgstr "" - -#: facebook.php:1604 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "" diff --git a/facebook/lang/ca/strings.php b/facebook/lang/ca/strings.php deleted file mode 100644 index 14d79481..00000000 --- a/facebook/lang/ca/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Ajustos actualitzats."; -$a->strings["Permission denied."] = "Permís denegat."; -$a->strings["Facebook disabled"] = "Facebook deshabilitat"; -$a->strings["Updating contacts"] = "Actualitzant contactes"; -$a->strings["Facebook API key is missing."] = "La clau del API de Facebook s'ha perdut."; -$a->strings["Facebook Connect"] = "Facebook Connectat"; -$a->strings["Install Facebook connector for this account."] = "Instal·lar el connector de Facebook per aquest compte."; -$a->strings["Remove Facebook connector"] = "Eliminar el connector de Faceboook"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Re-autentificar [Això és necessari cada vegada que la contrasenya de Facebook canvia.]"; -$a->strings["Post to Facebook by default"] = "Enviar a Facebook per defecte"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = "La vinculació amb amics de Facebook s'ha deshabilitat en aquest lloc. Els ajustos que facis no faran efecte."; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = "La vinculació amb amics de Facebook s'ha deshabilitat en aquest lloc. Si esta deshabilitat, no es pot utilitzar."; -$a->strings["Link all your Facebook friends and conversations on this website"] = "Enllaça tots els teus amics i les converses de Facebook en aquest lloc web"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "Les converses de Facebook consisteixen en el perfil del mur i en el flux del seu amic."; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "En aquesta pàgina web, el flux del seu amic a Facebook només és visible per a vostè."; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "Les següents opcions determinen la privacitat del mur del seu perfil de Facebook en aquest lloc web."; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "En aquesta pàgina web les seves converses al mur del perfil de Facebook només seran visible per a vostè"; -$a->strings["Do not import your Facebook profile wall conversations"] = "No importi les seves converses del mur del perfil de Facebook"; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = "Si opta per vincular les converses i deixar ambdues caselles sense marcar, el mur del seu perfil de Facebook es fusionarà amb el mur del seu perfil en aquest lloc web i la seva configuració de privacitat en aquest website serà utilitzada per determinar qui pot veure les converses."; -$a->strings["Comma separated applications to ignore"] = "Separats per comes les aplicacions a ignorar"; -$a->strings["Submit"] = "Enviar"; -$a->strings["Problems with Facebook Real-Time Updates"] = "Problemes amb Actualitzacions en Temps Real a Facebook"; -$a->strings["Administrator"] = "Administrador"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Ajustos del Connector de Facebook"; -$a->strings["Facebook API Key"] = "Facebook API Key"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Error: Apareix que has especificat el App-ID i el Secret en el arxiu .htconfig.php. Per estar especificat allà, no pot ser canviat utilitzant aquest formulari.

"; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "Error: la API Key facilitada sembla incorrecta (no es va poder recuperar el token d'accés de l'aplicatiu)."; -$a->strings["The given API Key seems to work correctly."] = "La API Key facilitada sembla treballar correctament."; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = "La correcció de la API key no pot ser detectada. Quelcom estrany ha succeït."; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Application secret"; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = "Sincronitzar els comentaris (els comentaris a Facebook es perden, a costa de la major càrrega del sistema)"; -$a->strings["Save"] = "Guardar"; -$a->strings["Real-Time Updates"] = "Actualitzacions en Temps Real"; -$a->strings["Real-Time Updates are activated."] = "Actualitzacions en Temps Real està activat."; -$a->strings["Deactivate Real-Time Updates"] = "Actualitzacions en Temps Real Desactivat"; -$a->strings["Real-Time Updates not activated."] = "Actualitzacions en Temps Real no activat."; -$a->strings["Activate Real-Time Updates"] = "Actualitzacions en Temps Real Activat"; -$a->strings["The new values have been saved."] = "Els nous valors s'han guardat."; -$a->strings["Post to Facebook"] = "Enviament a Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Enviament a Facebook cancel·lat perque hi ha un conflicte de permisos d'accés multi-xarxa."; -$a->strings["View on Friendica"] = "Vist en Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Enviament a Facebook fracassat. En cua per a reintent."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "La seva connexió a Facebook es va convertir en no vàlida. Per favor, torni a autenticar-se"; -$a->strings["Facebook connection became invalid"] = "La seva connexió a Facebook es va convertir en no vàlida"; -$a->strings["status"] = "estatus"; diff --git a/facebook/lang/cs/strings.php b/facebook/lang/cs/strings.php deleted file mode 100644 index ad503d68..00000000 --- a/facebook/lang/cs/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Nastavení aktualizováno."; -$a->strings["Permission denied."] = "Přístup odmítnut."; -$a->strings["Facebook disabled"] = "Facebook zakázán"; -$a->strings["Updating contacts"] = "Aktualizace kontaktů"; -$a->strings["Facebook API key is missing."] = "Chybí Facebook API klíč."; -$a->strings["Facebook Connect"] = "Facebook připojen"; -$a->strings["Install Facebook connector for this account."] = "Nainstalovat pro tento účet Facebook konektor."; -$a->strings["Remove Facebook connector"] = "Odstranit konektor na Facebook"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Opětovná autentikace [Toto je nezbytné kdykoliv se změní Vaše heslo na Facebooku.]"; -$a->strings["Post to Facebook by default"] = "Standardně posílat příspěvky na Facebook"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = "Propojování facebookových přátel bylo na tomto webu zablokováno. Následující odkazy nebudou mít žádný efekt."; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = "Propojování facebookových přátel bylo na tomto webu zablokováno. Když to zakážete nebudete schopni toto znovu povolit."; -$a->strings["Link all your Facebook friends and conversations on this website"] = "Připojit na tomto webu všechny Vaše přátelé a konverzace z Facebooku"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "Facebookové konverzace se skládají z Vaší profilové zdi a příspěvků Vašich přátel (stream)."; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "Na tomto webu můžete vidět pouze příspěvky Vašich přátel Facebook (Stream)."; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "Následující nastavení určuje Vaše soukromí na Facebookovém profilu na tomto webu."; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "Na tomto webu bude konverzace z Facebookové profilové zdi viditelná pouze pro Vás."; -$a->strings["Do not import your Facebook profile wall conversations"] = "Neimportovat konverzace z Facebookové zdi"; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = "Pokud budete chtít propojit konverzace a ponecháte obě z těchto dvou polí nezaškrtnuté, bude Vaše profilová zeď na Facebooku sloučená s profilovou zdí na tomto webu a nastavení soukromí na tomto webu bude určovat kdo bude mít možnost vidět konverzace."; -$a->strings["Comma separated applications to ignore"] = "čárkou oddělené aplikace k ignorování"; -$a->strings["Submit"] = "Odeslat"; -$a->strings["Problems with Facebook Real-Time Updates"] = "Problémy s Facebook Real-Time aktualizacemi"; -$a->strings["Administrator"] = "Administrátor"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Nastavení Facebook konektoru "; -$a->strings["Facebook API Key"] = "Facebook API Key"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Chyba: zdá se, že jste specifikoval App-ID a -Secret ve Vašem .htconfig.php souboru. Dokud jsou na tomto místě specifikované, nemohou být nastaveny s pomocí tohoto formuláře.

"; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "Chyba: zadané API Key se zdá být chybné (není možné získat aplikační přístupový token)."; -$a->strings["The given API Key seems to work correctly."] = "Zadané API Key se zdá funguje v pořádku."; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = "Správnost klíče API nemohla být detekovaná. Děje se něco podivného."; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Application secret"; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = "Syncronizovat komentáře (nedojde k vynechání žádného komentáže na Facebooku za cenu vyšší zátěže systému)"; -$a->strings["Save"] = "Uložit"; -$a->strings["Real-Time Updates"] = "Real-Time Aktualizace"; -$a->strings["Real-Time Updates are activated."] = "Real-Time aktualizace aktivovány."; -$a->strings["Deactivate Real-Time Updates"] = "Deaktivovat Real-Time aktualizace"; -$a->strings["Real-Time Updates not activated."] = "Real-Time aktualizace nejsou aktivovány."; -$a->strings["Activate Real-Time Updates"] = "Aktivovat Real-Time aktualizace"; -$a->strings["The new values have been saved."] = "Nové hodnoty byly uloženy"; -$a->strings["Post to Facebook"] = "Přidat příspěvek na Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Příspěvek na Facebook zrušen kvůli konfliktu přístupových práv mezi sítěmi."; -$a->strings["View on Friendica"] = "Zobrazení na Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Zaslání příspěvku na Facebook selhalo. Příspěvek byl zařazen do fronty pro opakované odeslání."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Vaše připojení na Facebook přestalo být platné. Prosím znovu se přihlaste."; -$a->strings["Facebook connection became invalid"] = "Připojení na Facebook bylo zneplatněno."; -$a->strings["status"] = "Stav"; diff --git a/facebook/lang/de/strings.php b/facebook/lang/de/strings.php deleted file mode 100644 index 74cfe839..00000000 --- a/facebook/lang/de/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Einstellungen aktualisiert."; -$a->strings["Permission denied."] = "Zugriff verweigert."; -$a->strings["Facebook disabled"] = "Facebook deaktiviert"; -$a->strings["Updating contacts"] = "Aktualisiere Kontakte"; -$a->strings["Facebook API key is missing."] = "Facebook-API-Schlüssel nicht gefunden"; -$a->strings["Facebook Connect"] = "Mit Facebook verbinden"; -$a->strings["Install Facebook connector for this account."] = "Facebook-Connector für dieses Konto installieren."; -$a->strings["Remove Facebook connector"] = "Facebook-Connector entfernen"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Neu authentifizieren [Das ist immer dann nötig, wenn du dein Facebook-Passwort geändert hast.]"; -$a->strings["Post to Facebook by default"] = "Veröffentliche standardmäßig bei Facebook"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = "Das Verlinken von Facebookkontakten wurde auf dieser Seite deaktiviert. Die folgenden Einstellungen haben keinen Effekt."; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = "Das Verlinken von Facebookkontakten wurde auf dieser Seite deaktiviert. Wenn du es ausgeschaltet hast, kannst du es nicht wieder aktivieren."; -$a->strings["Link all your Facebook friends and conversations on this website"] = "All meine Facebook-Kontakte und -Konversationen hier auf diese Website importieren"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "Facebook-Konversationen bestehen aus deinen Beiträgen auf deinerPinnwand, sowie den Beiträgen deiner Freunde Stream."; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "Hier auf dieser Webseite kannst nur du die Beiträge Deiner Facebook-Freunde (Stream) sehen."; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "Mit den folgenden Einstellungen kannst du die Privatsphäre der Kopie Deiner Facebook-Pinnwand hier auf dieser Seite einstellen."; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "Meine Facebook-Pinnwand hier auf dieser Webseite nur für mich sichtbar machen"; -$a->strings["Do not import your Facebook profile wall conversations"] = "Facebook-Pinnwand nicht importieren"; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = "Wenn du Facebook-Konversationen importierst und diese beiden Häkchen nicht setzt, wird deine Facebook-Pinnwand mit der Pinnwand hier auf dieser Webseite vereinigt. Die Privatsphäre-Einstellungen für deine Pinnwand auf dieser Webseite geben dann an, wer die Konversationen sehen kann."; -$a->strings["Comma separated applications to ignore"] = "Kommaseparierte Anwendungen, die ignoriert werden sollen"; -$a->strings["Submit"] = "Senden"; -$a->strings["Problems with Facebook Real-Time Updates"] = "Probleme mit Facebook Echtzeit-Updates"; -$a->strings["Administrator"] = "Administrator"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Facebook-Verbindungseinstellungen"; -$a->strings["Facebook API Key"] = "Facebook API Schlüssel"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Fehler: du scheinst die App-ID und das App-Geheimnis in deiner .htconfig.php Datei angegeben zu haben. Solange sie dort festgelegt werden kannst du dieses Formular hier nicht verwenden.

"; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "Fehler: der angegebene API Schlüssel scheint nicht korrekt zu sein (Zugriffstoken konnte nicht empfangen werden)."; -$a->strings["The given API Key seems to work correctly."] = "Der angegebene API Schlüssel scheint korrekt zu funktionieren."; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = "Die Richtigkeit des API Schlüssels konnte nicht gefunden werden. Irgendwas stimmt nicht."; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Anwendungs-Geheimnis"; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = "Kommentare synchronisieren (Kein Kommentar von Facebook geht verloren, verursacht höhere Last auf dem Server)"; -$a->strings["Save"] = "Speichern"; -$a->strings["Real-Time Updates"] = "Echtzeit Aktualisierungen"; -$a->strings["Real-Time Updates are activated."] = "Echtzeit-Updates sind aktiviert."; -$a->strings["Deactivate Real-Time Updates"] = "Echtzeit-Updates deaktivieren"; -$a->strings["Real-Time Updates not activated."] = "Echtzeit-Updates nicht aktiviert."; -$a->strings["Activate Real-Time Updates"] = "Echtzeit-Updates aktivieren"; -$a->strings["The new values have been saved."] = "Die neuen Einstellungen wurden gespeichert."; -$a->strings["Post to Facebook"] = "Bei Facebook veröffentlichen"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Beitrag wurde nicht bei Facebook veröffentlicht, da Konflikte bei den Multi-Netzwerk-Zugriffsrechten vorliegen."; -$a->strings["View on Friendica"] = "In Friendica betrachten"; -$a->strings["Facebook post failed. Queued for retry."] = "Veröffentlichung bei Facebook gescheitert. Wir versuchen es später erneut."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Deine Facebook Anmeldedaten sind ungültig geworden. Bitte re-authentifiziere dich."; -$a->strings["Facebook connection became invalid"] = "Facebook Anmeldedaten sind ungültig geworden"; -$a->strings["status"] = "Status"; diff --git a/facebook/lang/eo/strings.php b/facebook/lang/eo/strings.php deleted file mode 100644 index 43115eb8..00000000 --- a/facebook/lang/eo/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Agordoj ĝisdatigita."; -$a->strings["Permission denied."] = "Malpermesita."; -$a->strings["Facebook disabled"] = "Facebook malŝaltita"; -$a->strings["Updating contacts"] = "Mi ĝisdatigas la kontaktojn."; -$a->strings["Facebook API key is missing."] = "La API ŝlosilo de Facebook ne estas konata ĉi tie."; -$a->strings["Facebook Connect"] = "Kontekto al Facebook"; -$a->strings["Install Facebook connector for this account."] = "Instali la Facebook konektilo por ĉi tiu konto."; -$a->strings["Remove Facebook connector"] = "Forigi la Facebook konektilon."; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Reaŭtentiĝi [Tio estas bezonata ĉiam kiam vi ŝanĝis vian pasvorton ĉe Facebook.]"; -$a->strings["Post to Facebook by default"] = "Ĉiam afiŝi al Facebook."; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = "Ligado kun Facebook amikoj estas malaktivita ĉe tiu retejo. La sekvantaj agordoj do ne havas validecon."; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = "Ligado kun Facebook amikoj estas malaktivita ĉe tiu retejo. Se vi malŝaltas ĝin, vi ne eblos ree ŝalti ĝin."; -$a->strings["Link all your Facebook friends and conversations on this website"] = "Alligu ĉiujn viajn Facebook amikojn kaj konversaciojn je ĉi-tiu retejo."; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "Facebok konversacioj konsistas el via profilmuro kaj la fluo de viaj amikoj."; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "Je ĉi-tiu retejo, la fluo de viaj amikoj ĉe Facebook nur videblas al vi."; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "La sekvontaj agordoj difinas la privatecon de via Facebook profilmuro je ĉi-tiu retejo."; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "Je ĉi-tiu retejo, la conversacioj sur via Facebook profilmuro nur videblas al vi."; -$a->strings["Do not import your Facebook profile wall conversations"] = "Ne importi konversaciojn de via Facebook profilmuro"; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = "Se vi elektas alligi conversaciojn kaj ne elektas tiujn butonojn, via Facebook profilmuro estas kunigota kun via profilmuro ĉi tie. Viaj privatecaj agordoj ĉi tie difinos kiu povas vidi la coversaciojn."; -$a->strings["Comma separated applications to ignore"] = "Ignorotaj programoj, disigita per komo"; -$a->strings["Submit"] = "Sendi"; -$a->strings["Problems with Facebook Real-Time Updates"] = "Problemoj kun Facebook Realtempaj Ĝisdatigoj"; -$a->strings["Administrator"] = "Administranto"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Agordoj por la Facebook konektilo"; -$a->strings["Facebook API Key"] = "Facebook API ŝlosilo"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Eraro: Ŝajnas kvazaŭ vi agordis la App-ID kaj la sekreton en via .htconfig.php dosiero. Kiam ili estas agordita tie, vi ne povas agordi ĝin en tiu ĉi formo.

"; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "Eraro: La API ŝlosilo aspektas malĝusta (ne eblas ricevi la programa atingoĵetono)."; -$a->strings["The given API Key seems to work correctly."] = "La API ŝlosilo ŝajne ĝuste funkcias."; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = "Ne povis kontroli la ĝusteco de la API ŝlosilo. Stranga afero okazas."; -$a->strings["App-ID / API-Key"] = "Programo ID / API Ŝlosilo"; -$a->strings["Application secret"] = "Programo sekreto"; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = "Sinkronigi komentojn (vi ricevas ĉiujn komentojn de Facebook, sed la ŝargo de la sistemo iom kreskas)"; -$a->strings["Save"] = "Konservi"; -$a->strings["Real-Time Updates"] = "Realtempaj Ĝisdatigoj"; -$a->strings["Real-Time Updates are activated."] = "Realtempaj Ĝisdatigoj estas ŝaltita"; -$a->strings["Deactivate Real-Time Updates"] = "Malŝalti Realtempaj Ĝisdatigoj"; -$a->strings["Real-Time Updates not activated."] = "Realtempaj Ĝisdatigoj estas malŝaltita"; -$a->strings["Activate Real-Time Updates"] = "Ŝalti Realtempaj Ĝisdatigoj"; -$a->strings["The new values have been saved."] = "Konservis novajn valorojn."; -$a->strings["Post to Facebook"] = "Afiŝi al Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Afiŝado al Facebook nuligita ĉar okazis konflikto en la multretpermesoj."; -$a->strings["View on Friendica"] = "Vidi ĉe Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Malsukcesis afiŝi ĉe Facebook. Enigita en vico."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Via Facbook konekto iĝis nevalida. Bonvolu reaŭtentiĝi."; -$a->strings["Facebook connection became invalid"] = "Facebook konekto iĝis nevalida."; -$a->strings["status"] = "staton"; diff --git a/facebook/lang/es/strings.php b/facebook/lang/es/strings.php deleted file mode 100644 index a5b496e3..00000000 --- a/facebook/lang/es/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Configuración actualizada."; -$a->strings["Permission denied."] = "Permiso denegado."; -$a->strings["Facebook disabled"] = "Facebook deshabilitado"; -$a->strings["Updating contacts"] = "Actualizando contactos"; -$a->strings["Facebook API key is missing."] = "Falta la clave API de Facebook."; -$a->strings["Facebook Connect"] = "Conexión con Facebook"; -$a->strings["Install Facebook connector for this account."] = "Instalar el conector de Facebook para esta cuenta."; -$a->strings["Remove Facebook connector"] = "Eliminar el conector de Facebook"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Volver a identificarse [Esto es necesario cada vez que tu contraseña de Facebook cambie.]"; -$a->strings["Post to Facebook by default"] = "Publicar en Facebook de forma predeterminada"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = "El enlace con los contactos de Facebook ha sido desactivado en este servidor. La configuración no tendrá efecto alguno."; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = "El enlace con los contactos de Facebook ha sido desactivado en este servidor. Si se desactiva no podrá volver a reactivarse."; -$a->strings["Link all your Facebook friends and conversations on this website"] = "Vincula a todos tus amigos de Facebook y las conversaciones con este sitio"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "Las conversaciones de Facebook consisten en tu muro, tu perfil y las publicaciones de tus amigos."; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "En esta página las publicaciones de tus amigos de Facebook solo son visibles para ti."; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "La siguiente configuración determina la privacidad del muro de tu perfil de Facebook en este sitio."; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "En este sitio las publicaciones del muro de Facebook solo son visibles para ti"; -$a->strings["Do not import your Facebook profile wall conversations"] = "No importar las conversaciones de tu muro de Facebook"; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = "Si decides conectar las conversaciones y dejar ambas casillas sin marcar, el muro de tu perfil de Facebook se fusionará con el muro de tu perfil en este sitio y la configuración de privacidad en este sitio será utilizada para determinar quién puede ver las conversaciones."; -$a->strings["Comma separated applications to ignore"] = "Aplicaciones a ignorar separadas por comas"; -$a->strings["Submit"] = "Envíar"; -$a->strings["Problems with Facebook Real-Time Updates"] = "Hay problemas con las actualizaciones en tiempo real de Facebook"; -$a->strings["Administrator"] = "Administrador"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Configuración de conexión a Facebook"; -$a->strings["Facebook API Key"] = "Llave API de Facebook"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Error: parece que la App-ID y el -Secret ya están configurados en tu archivo .htconfig.php. Al estar configurados allí, no se usará este formulario.

"; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "Error: la llave API proporcionada parece incorrecta (no se pudo recuperar la ficha de acceso a la aplicación)."; -$a->strings["The given API Key seems to work correctly."] = "La Llave API proporcionada parece funcionar correctamente."; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = "No se ha podido detectar una llave API correcta. Algo raro está pasando."; -$a->strings["App-ID / API-Key"] = "Añadir ID / Llave API"; -$a->strings["Application secret"] = "Secreto de la aplicación"; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = "Sincronizar comentarios (no se perderán comentarios de Facebook, pero se incrementará la carga del sistema)"; -$a->strings["Save"] = "Guardar"; -$a->strings["Real-Time Updates"] = "Actualizaciones en tiempo real"; -$a->strings["Real-Time Updates are activated."] = "Actualizaciones en tiempo real activada."; -$a->strings["Deactivate Real-Time Updates"] = "Desactivar actualizaciones en tiempo real"; -$a->strings["Real-Time Updates not activated."] = "Actualizaciones en tiempo real desactivada."; -$a->strings["Activate Real-Time Updates"] = "Activar actualizaciones en tiempo real"; -$a->strings["The new values have been saved."] = "Los nuevos valores se han guardado."; -$a->strings["Post to Facebook"] = "Publicar en Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Publicación en Facebook cancelada debido a un conflicto con los permisos de acceso a la multi-red."; -$a->strings["View on Friendica"] = "Ver en Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Publicación en Facebook errónea. Reintentando..."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Tu conexión con Facebook ha sido invalidada. Por favor vuelve a identificarte."; -$a->strings["Facebook connection became invalid"] = "La conexión con Facebook ha sido invalidada"; -$a->strings["status"] = "estado"; diff --git a/facebook/lang/fr/strings.php b/facebook/lang/fr/strings.php deleted file mode 100644 index f5276fe8..00000000 --- a/facebook/lang/fr/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Réglages mis à jour."; -$a->strings["Permission denied."] = "Permission refusée."; -$a->strings["Facebook disabled"] = "Connecteur Facebook désactivé"; -$a->strings["Updating contacts"] = "Mise-à-jour des contacts"; -$a->strings["Facebook API key is missing."] = "Clé d'API Facebook manquante."; -$a->strings["Facebook Connect"] = "Connecteur Facebook"; -$a->strings["Install Facebook connector for this account."] = "Installer le connecteur Facebook sur ce compte."; -$a->strings["Remove Facebook connector"] = "Désinstaller le connecteur Facebook"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Se ré-authentifier [nécessaire chaque fois que vous changez votre mot de passe Facebook.]"; -$a->strings["Post to Facebook by default"] = "Poster sur Facebook par défaut"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = "L'ajout d'amis Facebook a été désactivé sur ce site. Les réglages suivants seront sans effet."; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = "L'ajout d'amis Facebook a été désactivé sur ce site. Si vous désactivez ce réglage, vous ne pourrez le ré-activer."; -$a->strings["Link all your Facebook friends and conversations on this website"] = "Lier tous vos amis et conversations Facebook sur ce site"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "Les conversations Facebook se composent du mur du profil et des flux de vos amis."; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "Sur ce site, les flux de vos amis Facebook ne sont visibles que par vous."; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "Les réglages suivants déterminent le niveau de vie privée de votre mur Facebook depuis ce site."; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "Sur ce site, les conversations de votre mur Facebook ne sont visibles que par vous."; -$a->strings["Do not import your Facebook profile wall conversations"] = "Ne pas importer les conversations de votre mur Facebook."; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = "Si vous choisissez de lier les conversations et de laisser ces deux cases non-cochées, votre mur Facebook sera fusionné avec votre mur de profil (sur ce site). Vos réglages (locaux) de vie privée serviront à en déterminer la visibilité."; -$a->strings["Comma separated applications to ignore"] = "Liste (séparée par des virgules) des applications à ignorer"; -$a->strings["Submit"] = "Envoyer"; -$a->strings["Problems with Facebook Real-Time Updates"] = "Problème avec les mises-à-jour en temps réel de Facebook"; -$a->strings["Administrator"] = "Administrateur"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Réglages du connecteur Facebook"; -$a->strings["Facebook API Key"] = "Clé d'API Facebook"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Erreur: il semble que vous ayez spécifié un App-ID et un Secret dans votre fichier .htconfig.php. Tant qu'ils y seront, vous ne pourrez les configurer avec ce formulaire.

"; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "Erreur: la clé d'API semble incorrecte (le jeton d'accès d'application n'a pu être recupéré)"; -$a->strings["The given API Key seems to work correctly."] = "La clé d'API semble fonctionner correctement."; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = "La validité de la clé d'API ne peut être vérifiée. Quelque-chose d'étrange se passe."; -$a->strings["App-ID / API-Key"] = "App-ID / Clé d'API"; -$a->strings["Application secret"] = "Secret de l'application"; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = "Synchroniser les commentaires (aucun commentaire de Facebook ne devrait être oublié, au prix d'une charge système accrue)"; -$a->strings["Save"] = "Sauver"; -$a->strings["Real-Time Updates"] = "Mises-à-jour en temps réel"; -$a->strings["Real-Time Updates are activated."] = "Mises-à-jour en temps réel activées."; -$a->strings["Deactivate Real-Time Updates"] = "Désactiver les mises-à-jour en temps réel"; -$a->strings["Real-Time Updates not activated."] = "Mises-à-jour en temps réel désactivées."; -$a->strings["Activate Real-Time Updates"] = "Activer les mises-à-jour en temps réel"; -$a->strings["The new values have been saved."] = "Les nouvelles valeurs ont été sauvées."; -$a->strings["Post to Facebook"] = "Poster sur Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Publication sur Facebook annulée pour cause de conflit de permissions inter-réseaux."; -$a->strings["View on Friendica"] = "Voir sur Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Publication sur Facebook échouée. En attente pour re-tentative."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Votre connexion à Facebook est devenue invalide. Merci de vous ré-authentifier."; -$a->strings["Facebook connection became invalid"] = "La connexion Facebook est devenue invalide"; -$a->strings["status"] = "le statut"; diff --git a/facebook/lang/is/strings.php b/facebook/lang/is/strings.php deleted file mode 100644 index df9db5b3..00000000 --- a/facebook/lang/is/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Stillingar uppfærðar"; -$a->strings["Permission denied."] = "Heimild ekki veitt."; -$a->strings["Facebook disabled"] = "Ekki er kveikt á Facebook "; -$a->strings["Updating contacts"] = "Uppfæra tengiliði"; -$a->strings["Facebook API key is missing."] = "Facebook API lykill er ekki til staðar."; -$a->strings["Facebook Connect"] = "Facebook tenging"; -$a->strings["Install Facebook connector for this account."] = "Setja þarf upp Facebook tengil fyrir þennan notanda"; -$a->strings["Remove Facebook connector"] = "Fjarlæga Facebook tengil"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Þörf er á endurauðkenningu [Þetta þarf að gera í hvert skipti sem Facebook aðgangsorði er breytt.]"; -$a->strings["Post to Facebook by default"] = "Senda sjálfgefið færslur á Facebook "; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = ""; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = ""; -$a->strings["Link all your Facebook friends and conversations on this website"] = "Tengjast öllum vinum og samtölum á Facebook af þessum vef"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "Facebook samtöl saman standa af færslum af forsíðuvegg og vinastraum þínum."; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "Aðeins Facebook vinastraumurinn þinn er sjáanlegur á þessum þessum vef."; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "Eftirfarandi stillingar stjórna friðhelgi Facebook forsíðu vegg á þessum vef. "; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "Samtöl á Facebook forsíðu vegg verða einungis sýnileg þér"; -$a->strings["Do not import your Facebook profile wall conversations"] = "Ekki sækja samtöl af Facebook forsíðu vegg"; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = "Ef þú ákveður að hlekkja samtöl saman og hefur bæði þessi hök slökkt, þá mun Facebook forsíðan sameinast forsíðunni á þessum vef þannig að friðhelgisstillingar hér munu stjórna hvernig mega sjá hvað."; -$a->strings["Comma separated applications to ignore"] = "Forrit sem á að hunsa (komma á milli)"; -$a->strings["Submit"] = "Senda inn"; -$a->strings["Problems with Facebook Real-Time Updates"] = ""; -$a->strings["Administrator"] = "Kerfisstjóri"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Facebook tengils stillingar"; -$a->strings["Facebook API Key"] = ""; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = ""; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = ""; -$a->strings["The given API Key seems to work correctly."] = ""; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = ""; -$a->strings["App-ID / API-Key"] = ""; -$a->strings["Application secret"] = ""; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = ""; -$a->strings["Save"] = "Vista"; -$a->strings["Real-Time Updates"] = ""; -$a->strings["Real-Time Updates are activated."] = ""; -$a->strings["Deactivate Real-Time Updates"] = ""; -$a->strings["Real-Time Updates not activated."] = ""; -$a->strings["Activate Real-Time Updates"] = ""; -$a->strings["The new values have been saved."] = ""; -$a->strings["Post to Facebook"] = "Senda á Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Hætt við færslu á Facebook vegna marg nets aðgangs átaka."; -$a->strings["View on Friendica"] = "Skoða á Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Færsla sem átti að flæða yfir á Facebook mistókst. Sett í biðröð til endurtekningar."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = ""; -$a->strings["Facebook connection became invalid"] = ""; -$a->strings["status"] = "staða"; diff --git a/facebook/lang/it/strings.php b/facebook/lang/it/strings.php deleted file mode 100644 index ddc1074e..00000000 --- a/facebook/lang/it/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Impostazioni aggiornate."; -$a->strings["Permission denied."] = "Permesso negato."; -$a->strings["Facebook disabled"] = "Facebook disabilitato"; -$a->strings["Updating contacts"] = "Aggiornamento contatti"; -$a->strings["Facebook API key is missing."] = "Chiave API Facebook mancante."; -$a->strings["Facebook Connect"] = "Facebook Connect"; -$a->strings["Install Facebook connector for this account."] = "Installa Facebook connector per questo account"; -$a->strings["Remove Facebook connector"] = "Rimuovi Facebook connector"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Ri-autentica [Questo è necessario ogni volta che cambia la password di Facebook.]"; -$a->strings["Post to Facebook by default"] = "Invia sempre a Facebook"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = ""; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = ""; -$a->strings["Link all your Facebook friends and conversations on this website"] = "Collega tutti i tuoi amici di Facebook e le conversazioni su questo sito"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "Le conversazione su Facebook sono composte dai i tuoi messsaggi in bacheca e dai messaggi dei tuoi amici"; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "Su questo sito, i messaggi dai vostri amici su Facebook è visibile solo a te."; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "Le seguenti impostazioni determinano la privacy della vostra bacheca di Facebook su questo sito."; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "Su questo sito, le conversazioni sulla tua bacheca di Facebook saranno visibili solo a te"; -$a->strings["Do not import your Facebook profile wall conversations"] = "Non importare le conversazione sulla tua bacheca di Facebook"; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = "Se scegli di collegare le conversazioni e lasci entrambi questi box non segnati, la tua bacheca di Facebook sarà fusa con la tua bacheca su questao sito, e le impostazioni di privacy su questo sito saranno usate per decidere chi potrà vedere le conversazioni."; -$a->strings["Comma separated applications to ignore"] = "Elenco separato da virgola di applicazioni da ignorare"; -$a->strings["Submit"] = "Invia"; -$a->strings["Problems with Facebook Real-Time Updates"] = "Problemi con gli aggiornamenti in tempo reale con Facebook"; -$a->strings["Administrator"] = "Amministratore"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Impostazioni del connettore Facebook"; -$a->strings["Facebook API Key"] = "Facebook API Key"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."; -$a->strings["The given API Key seems to work correctly."] = "L' API Key fornita sembra funzionare correttamente."; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = "L' API Key non puo' essere verificata. Sta succedendo qualcosa di strano."; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Application secret"; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = "Sincronizza i commenti (non vengono persi commenti su Facebook, al prezzo di un maggior carico di sistema)"; -$a->strings["Save"] = "Salva"; -$a->strings["Real-Time Updates"] = "Aggiornamenti Real-Time"; -$a->strings["Real-Time Updates are activated."] = "Gli aggiornamenti in tempo reale sono attivi"; -$a->strings["Deactivate Real-Time Updates"] = "Disattiva gli aggiornamenti in tempo reale"; -$a->strings["Real-Time Updates not activated."] = "Gli aggiornamenti in tempo reale non sono attivi"; -$a->strings["Activate Real-Time Updates"] = "Attiva gli aggiornamenti in tempo reale"; -$a->strings["The new values have been saved."] = "I nuovi valori sono stati salvati."; -$a->strings["Post to Facebook"] = "Invia a Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Invio su Facebook annullato per un conflitto nei permessi di accesso."; -$a->strings["View on Friendica"] = "Vedi su Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Invio a Facebook fallito. In attesa di riprovare."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "La tua connessione con Facebook è diventata invalida. Per favore ri-autenticati."; -$a->strings["Facebook connection became invalid"] = "La connessione Facebook è diventata invalida."; -$a->strings["status"] = "stato"; diff --git a/facebook/lang/nb-no/strings.php b/facebook/lang/nb-no/strings.php deleted file mode 100644 index 29430012..00000000 --- a/facebook/lang/nb-no/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Innstillinger oppdatert."; -$a->strings["Permission denied."] = "Ingen tilgang."; -$a->strings["Facebook disabled"] = "Facebook avskrudd"; -$a->strings["Updating contacts"] = "Oppdaterer kontakter"; -$a->strings["Facebook API key is missing."] = "Facebook API-nøkkel mangler."; -$a->strings["Facebook Connect"] = "Facebook-kobling"; -$a->strings["Install Facebook connector for this account."] = "Legg til Facebook-kobling for denne kontoen."; -$a->strings["Remove Facebook connector"] = "Fjern Facebook-kobling"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = ""; -$a->strings["Post to Facebook by default"] = "Post til Facebook som standard"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = ""; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = ""; -$a->strings["Link all your Facebook friends and conversations on this website"] = ""; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = ""; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = ""; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = ""; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = ""; -$a->strings["Do not import your Facebook profile wall conversations"] = ""; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = ""; -$a->strings["Comma separated applications to ignore"] = ""; -$a->strings["Submit"] = "Lagre"; -$a->strings["Problems with Facebook Real-Time Updates"] = ""; -$a->strings["Administrator"] = "Administrator"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Innstillinger for Facebook-kobling"; -$a->strings["Facebook API Key"] = ""; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = ""; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = ""; -$a->strings["The given API Key seems to work correctly."] = ""; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = ""; -$a->strings["App-ID / API-Key"] = ""; -$a->strings["Application secret"] = ""; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = ""; -$a->strings["Save"] = "Lagre"; -$a->strings["Real-Time Updates"] = ""; -$a->strings["Real-Time Updates are activated."] = ""; -$a->strings["Deactivate Real-Time Updates"] = ""; -$a->strings["Real-Time Updates not activated."] = ""; -$a->strings["Activate Real-Time Updates"] = ""; -$a->strings["The new values have been saved."] = ""; -$a->strings["Post to Facebook"] = "Post til Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Posting til Facebook avbrutt på grunn av konflikt med tilgangsrettigheter i multi-nettverk."; -$a->strings["View on Friendica"] = ""; -$a->strings["Facebook post failed. Queued for retry."] = "Facebook-innlegg mislyktes. Innlegget er lagt i kø for å prøve igjen."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = ""; -$a->strings["Facebook connection became invalid"] = ""; -$a->strings["status"] = "status"; diff --git a/facebook/lang/pl/strings.php b/facebook/lang/pl/strings.php deleted file mode 100644 index 246bf0e1..00000000 --- a/facebook/lang/pl/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Zaktualizowano ustawienia."; -$a->strings["Permission denied."] = "Brak uprawnień."; -$a->strings["Facebook disabled"] = "Facebook wyłączony"; -$a->strings["Updating contacts"] = "Aktualizacja kontaktów"; -$a->strings["Facebook API key is missing."] = "Brakuje klucza API z facebooka."; -$a->strings["Facebook Connect"] = "Połącz konto z kontem Facebook"; -$a->strings["Install Facebook connector for this account."] = "Zainstaluj wtyczkę Facebook "; -$a->strings["Remove Facebook connector"] = "Usuń wtyczkę Facebook"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Ponowna autoryzacja [Jest wymagana jeśli twoje hasło do Facebooka jest zmienione]"; -$a->strings["Post to Facebook by default"] = "Domyślnie opublikuj na stronie Facebook"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = ""; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = ""; -$a->strings["Link all your Facebook friends and conversations on this website"] = "Połącz wszystkie twoje kontakty i konwersacje na tej stronie z serwisem Facebook"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = ""; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = ""; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = ""; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = ""; -$a->strings["Do not import your Facebook profile wall conversations"] = ""; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = ""; -$a->strings["Comma separated applications to ignore"] = ""; -$a->strings["Submit"] = "Potwierdź"; -$a->strings["Problems with Facebook Real-Time Updates"] = "Problemy z aktualizacjami w czasie rzeczywistym Facebook'a"; -$a->strings["Administrator"] = "Administrator"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Ustawienia połączenia z Facebook"; -$a->strings["Facebook API Key"] = "Facebook API Key"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = ""; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = ""; -$a->strings["The given API Key seems to work correctly."] = ""; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = ""; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = ""; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = ""; -$a->strings["Save"] = "Zapisz"; -$a->strings["Real-Time Updates"] = "Aktualizacje w czasie rzeczywistym"; -$a->strings["Real-Time Updates are activated."] = "Aktualizacje w czasie rzeczywistym zostały aktywowane."; -$a->strings["Deactivate Real-Time Updates"] = "Zdezaktywuj aktualizacje w czasie rzeczywistym"; -$a->strings["Real-Time Updates not activated."] = "Aktualizacje w czasie rzeczywistym nie zostały aktywowane."; -$a->strings["Activate Real-Time Updates"] = "Aktywuj aktualizacje w czasie rzeczywistym"; -$a->strings["The new values have been saved."] = ""; -$a->strings["Post to Facebook"] = "Post na Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Publikacja na stronie Facebook nie powiodła się z powodu braku dostępu do sieci"; -$a->strings["View on Friendica"] = "Zobacz na Friendice"; -$a->strings["Facebook post failed. Queued for retry."] = ""; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = ""; -$a->strings["Facebook connection became invalid"] = "Błędne połączenie z Facebookiem"; -$a->strings["status"] = "status"; diff --git a/facebook/lang/pt-br/strings.php b/facebook/lang/pt-br/strings.php deleted file mode 100644 index e370f00b..00000000 --- a/facebook/lang/pt-br/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "As configurações foram atualizadas."; -$a->strings["Permission denied."] = "Permissão negada."; -$a->strings["Facebook disabled"] = "O Facebook está desabilitado"; -$a->strings["Updating contacts"] = "Atualizando os contatos"; -$a->strings["Facebook API key is missing."] = "A chave de API do Facebook não foi encontrada."; -$a->strings["Facebook Connect"] = "Conexão com o Facebook"; -$a->strings["Install Facebook connector for this account."] = "Instalar o conector do Facebook nesta conta."; -$a->strings["Remove Facebook connector"] = "Remover o conector do Facebook"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Reautenticar [Isso é necessário sempre que sua senha do Facebook é modificada.]"; -$a->strings["Post to Facebook by default"] = "Publicar no Facebook por padrão"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = ""; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = ""; -$a->strings["Link all your Facebook friends and conversations on this website"] = "Ligar todos os seus amigos e conversas do Facebook neste site"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "As conversas do Facebook consistem do seu perfil/mural e da linha do tempo dos seus amigos."; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "Neste site, a linha do tempo dos seus amigos do Facebook está visível somente para você."; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "As seguintes configurações determinam a privacidade do mural do seu perfil do Facebook neste site."; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "Nesse site as conversas do mural do seu perfil do Facebook estão visíveis somente para você"; -$a->strings["Do not import your Facebook profile wall conversations"] = "Não importar as conversas do seu perfil/mural do Facebook"; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = "Se você escolher ligar as conversas e deixar ambas opções desmarcadas, seu perfil/mural do Facebook será mesclado com seu perfil/mural nesse website e suas configurações de privacidade nesse website serão usadas para determinar quem pode ver as conversas."; -$a->strings["Comma separated applications to ignore"] = "Ignorar aplicações separadas por vírgula"; -$a->strings["Submit"] = "Enviar"; -$a->strings["Problems with Facebook Real-Time Updates"] = "Problemas com as atualizações em tempo real do Facebook"; -$a->strings["Administrator"] = "Administrador"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Configurações do conector do Facebook"; -$a->strings["Facebook API Key"] = "Chave da API do Facebook"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Erro: parece que você especificou o App-ID e o -Secret no arquivo .htconfig.php. Uma vez estão especificado lá, eles não podem ser definidos neste formulário.

"; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "Erro: a chave de API fornecida parece estar incorreta (não foi possível recuperar o token de acesso à aplicação)."; -$a->strings["The given API Key seems to work correctly."] = "A chave de API fornecida aparentemente está funcionando corretamente."; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = ""; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Segredo da aplicação"; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = ""; -$a->strings["Save"] = "Salvar"; -$a->strings["Real-Time Updates"] = "Atualizações em tempo real"; -$a->strings["Real-Time Updates are activated."] = "As atualizações em tempo real estão ativadas."; -$a->strings["Deactivate Real-Time Updates"] = "Desativar as atualizações em tempo real."; -$a->strings["Real-Time Updates not activated."] = "As atualizações em tempo real não estão ativadas."; -$a->strings["Activate Real-Time Updates"] = "Ativar atualizações em tempo real"; -$a->strings["The new values have been saved."] = "Os novos valores foram salvos."; -$a->strings["Post to Facebook"] = "Publicar no Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "A publicação no Facebook foi cancelada devido a um conflito de permissão de acesso multi-rede."; -$a->strings["View on Friendica"] = "Ver no Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Não foi possível publicar no Facebook. Armazenado na fila para nova tentativa."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "A sua conexão com o Facebook tornou-se invalida. Por favor autentique-se novamente."; -$a->strings["Facebook connection became invalid"] = "A conexão com o Facebook tornou-se inválida"; -$a->strings["status"] = "status"; diff --git a/facebook/lang/ru/strings.php b/facebook/lang/ru/strings.php deleted file mode 100644 index 2b4ed2d0..00000000 --- a/facebook/lang/ru/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "Настройки обновлены."; -$a->strings["Permission denied."] = "Нет разрешения."; -$a->strings["Facebook disabled"] = "Facebook отключен"; -$a->strings["Updating contacts"] = "Обновление контактов"; -$a->strings["Facebook API key is missing."] = "Отсутствует ключ Facebook API."; -$a->strings["Facebook Connect"] = "Facebook подключение"; -$a->strings["Install Facebook connector for this account."] = "Установить Facebook Connector для этого аккаунта."; -$a->strings["Remove Facebook connector"] = "Удалить Facebook Connector"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Переаутентификация [Это необходимо, если вы изменили пароль на Facebook.]"; -$a->strings["Post to Facebook by default"] = "Отправлять на Facebook по умолчанию"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = ""; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = ""; -$a->strings["Link all your Facebook friends and conversations on this website"] = "Прикрепите своих друзей и общение с Facebook на этот сайт"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = ""; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "Facebook-лента друзей видна только вам."; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "Следующие настройки определяют параметры приватности вашей стены с Facebook на этом сайте."; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "Ваша лента профиля Facebook будет видна только вам"; -$a->strings["Do not import your Facebook profile wall conversations"] = "Не импортировать Facebook разговоров с Вашей страницы"; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = ""; -$a->strings["Comma separated applications to ignore"] = "Игнорировать приложения (список через запятую)"; -$a->strings["Submit"] = "Подтвердить"; -$a->strings["Problems with Facebook Real-Time Updates"] = ""; -$a->strings["Administrator"] = "Администратор"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Настройки подключения Facebook"; -$a->strings["Facebook API Key"] = "Facebook API Key"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = ""; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = ""; -$a->strings["The given API Key seems to work correctly."] = ""; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = ""; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Секрет приложения"; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = ""; -$a->strings["Save"] = "Сохранить"; -$a->strings["Real-Time Updates"] = ""; -$a->strings["Real-Time Updates are activated."] = ""; -$a->strings["Deactivate Real-Time Updates"] = "Отключить Real-Time обновления"; -$a->strings["Real-Time Updates not activated."] = ""; -$a->strings["Activate Real-Time Updates"] = "Активировать Real-Time обновления"; -$a->strings["The new values have been saved."] = ""; -$a->strings["Post to Facebook"] = "Отправить на Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Отправка на Facebook отменена из-за конфликта разрешений доступа разных сетей."; -$a->strings["View on Friendica"] = ""; -$a->strings["Facebook post failed. Queued for retry."] = "Ошибка отправки сообщения на Facebook. В очереди на еще одну попытку."; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = ""; -$a->strings["Facebook connection became invalid"] = "Facebook подключение не удалось"; -$a->strings["status"] = "статус"; diff --git a/facebook/lang/sv/strings.php b/facebook/lang/sv/strings.php deleted file mode 100644 index 802e13e5..00000000 --- a/facebook/lang/sv/strings.php +++ /dev/null @@ -1,14 +0,0 @@ -strings["Settings updated."] = "Inställningarna har uppdaterats."; -$a->strings["Permission denied."] = "Åtkomst nekad."; -$a->strings["Facebook disabled"] = "Facebook inaktiverat"; -$a->strings["Facebook API key is missing."] = "Facebook API key is missing."; -$a->strings["Facebook Connect"] = "Facebook Connect"; -$a->strings["Post to Facebook by default"] = "Lägg alltid in inläggen på Facebook"; -$a->strings["Submit"] = "Spara"; -$a->strings["Administrator"] = "Admin"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Facebook Connector Settings"; -$a->strings["Post to Facebook"] = "Lägg in på Facebook"; -$a->strings["status"] = "status"; diff --git a/facebook/lang/zh-cn/strings.php b/facebook/lang/zh-cn/strings.php deleted file mode 100644 index 3aec41bb..00000000 --- a/facebook/lang/zh-cn/strings.php +++ /dev/null @@ -1,49 +0,0 @@ -strings["Settings updated."] = "设置跟新了"; -$a->strings["Permission denied."] = "权限不够。"; -$a->strings["Facebook disabled"] = "Facebook废"; -$a->strings["Updating contacts"] = "正才更新熟人"; -$a->strings["Facebook API key is missing."] = "Facebook API钥匙失踪的。"; -$a->strings["Facebook Connect"] = "Facebook联络"; -$a->strings["Install Facebook connector for this account."] = "安装Facebook连接器为这个账户。"; -$a->strings["Remove Facebook connector"] = "删除Facebook连接器"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "复认证[这是必要的每当您Facebook密码变化了]"; -$a->strings["Post to Facebook by default"] = "默认地放在Facebook"; -$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = "这个网站使Facebook朋友环节不能用。这下的设置没有印象。"; -$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = "这个网站使Facebook朋友环节不能用。假如那样的话您不会再使可用的。"; -$a->strings["Link all your Facebook friends and conversations on this website"] = "连接您所有的Facebook朋友们和交流在这个网站"; -$a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "Facebook交流由您的简介墙和您朋友的溪流组成。 "; -$a->strings["On this website, your Facebook friend stream is only visible to you."] = "在这个网站,您Facebook朋友溪流是只您可见的。"; -$a->strings["The following settings determine the privacy of your Facebook profile wall on this website."] = "下面的设置决定您在这个网站Facebook简介墙的隐私。"; -$a->strings["On this website your Facebook profile wall conversations will only be visible to you"] = "在这个网站您Facebook简介墙交流是只您可见的。"; -$a->strings["Do not import your Facebook profile wall conversations"] = "别进口您Facebook简介墙交流"; -$a->strings["If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations."] = "如果您选择连接交流和留这两个复选框空则,您Facebook简介墙被在您这网站的简介墙融合和您的这网站隐私设置决定谁能看那些交流。"; -$a->strings["Comma separated applications to ignore"] = "逗号分开的应用要不理"; -$a->strings["Submit"] = "提交"; -$a->strings["Problems with Facebook Real-Time Updates"] = "Facebook实时更新有问题"; -$a->strings["Administrator"] = "管理员"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Connector Settings"] = "Facebook连接器设置"; -$a->strings["Facebook API Key"] = "Facebook API密码"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "错误:看上去您输入App-ID和-Secret在您的.htconfig.php文件。它们那里输入的时候,您不能把他们在这个表格输入。

"; -$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "错误:输入的API密码显得不对(取回不了应用代金券)。"; -$a->strings["The given API Key seems to work correctly."] = "输入的API密码显得对地运行。"; -$a->strings["The correctness of the API Key could not be detected. Something strange's going on."] = "API钥匙的正确性发现不了。什么奇怪的进行"; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "应用密码"; -$a->strings["Synchronize comments (no comments on Facebook are missed, at the cost of increased system load)"] = "同步评论(无Facebook评论错过了,代价增添系统工作量)"; -$a->strings["Save"] = "保存"; -$a->strings["Real-Time Updates"] = "实时更新"; -$a->strings["Real-Time Updates are activated."] = "实时更新使活动"; -$a->strings["Deactivate Real-Time Updates"] = "使实时更新不活动"; -$a->strings["Real-Time Updates not activated."] = "实时更新使不活动"; -$a->strings["Activate Real-Time Updates"] = "使实时更新活动"; -$a->strings["The new values have been saved."] = "新的设置保存了。"; -$a->strings["Post to Facebook"] = "放在Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "发送到Facebook取消由于多网络准许矛盾。"; -$a->strings["View on Friendica"] = "看在Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Facebook发送失败了。排队着待再试。"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "您Facebook联系成无效的。请再认证。"; -$a->strings["Facebook connection became invalid"] = "Facebook联系成无效的"; -$a->strings["status"] = "现状"; diff --git a/facebook_restrict/facebook_restrict.php b/facebook_restrict/facebook_restrict.php deleted file mode 100644 index c0720edc..00000000 --- a/facebook_restrict/facebook_restrict.php +++ /dev/null @@ -1,19 +0,0 @@ - - * Status: Unsupported - */ - - -function facebook_restrict_install() { - set_config('facebook','restrict',1); -} - -function facebook_restrict_uninstall() { - set_config('facebook','restrict',0); -} - diff --git a/facebook_restrict/lang/C/messages.po b/facebook_restrict/lang/C/messages.po deleted file mode 100644 index e69de29b..00000000 diff --git a/fbpost/README.md b/fbpost/README.md deleted file mode 100644 index 3b1cd843..00000000 --- a/fbpost/README.md +++ /dev/null @@ -1,14 +0,0 @@ -> # Note -> **Facebook Connector, Facebook Post Connector and Facebook Sync plugins are deprecated.** -> As of the moment you cannot bridge from or to Facebook with Friendica. - -#### Installing the Friendica/Facebook connector - -Please register a Facebook application at [developers.facebook.com](https://developers.facebook.com/apps/async/create/platform-setup/dialog/) - -Chose "Website" as platform. Next you have to let your application be reviewed. You need these permissions for that: - -publish_actions, publish_pages, user_posts, user_photos, user_status, user_videos, manage_pages - -After your application was reviewed, your users can post to Facebook. - diff --git a/fbpost/fbpost.css b/fbpost/fbpost.css deleted file mode 100644 index 224d27bd..00000000 --- a/fbpost/fbpost.css +++ /dev/null @@ -1,13 +0,0 @@ - -#fbpost-enable-wrapper { - margin-top: 20px; -} - -#fbpost-disable-wrapper { - margin-top: 20px; -} - -#fbpost-post-default-form input { - margin-top: 20px; - margin-right: 20px; -} \ No newline at end of file diff --git a/fbpost/fbpost.php b/fbpost/fbpost.php deleted file mode 100644 index 3e6e6e0e..00000000 --- a/fbpost/fbpost.php +++ /dev/null @@ -1,1240 +0,0 @@ - - * Author: Tobias Hößl - * Status: Unsupported - * - */ - -/** - * Installing the Friendica/Facebook connector - * - * Detailed instructions how to use this plugin can be found at - * https://github.com/friendica/friendica/wiki/How-to:-Friendica%E2%80%99s-Facebook-connector - * - * Vidoes and embeds will not be posted if there is no other content. Links - * and images will be converted to a format suitable for the Facebook API and - * long posts truncated - with a link to view the full post. - * - * Facebook contacts will not be able to view private photos, as they are not able to - * authenticate to your site to establish identity. We will address this - * in a future release. - */ - -define('FACEBOOK_DEFAULT_POLL_INTERVAL', 5); // given in minutes - -require_once('include/security.php'); - -function fbpost_install() { - register_hook('post_local', 'addon/fbpost/fbpost.php', 'fbpost_post_local'); - register_hook('notifier_normal', 'addon/fbpost/fbpost.php', 'fbpost_post_hook'); - register_hook('jot_networks', 'addon/fbpost/fbpost.php', 'fbpost_jot_nets'); - register_hook('connector_settings', 'addon/fbpost/fbpost.php', 'fbpost_plugin_settings'); - register_hook('enotify', 'addon/fbpost/fbpost.php', 'fbpost_enotify'); - register_hook('queue_predeliver', 'addon/fbpost/fbpost.php', 'fbpost_queue_hook'); - register_hook('cron', 'addon/fbpost/fbpost.php', 'fbpost_cron'); - register_hook('prepare_body', 'addon/fbpost/fbpost.php', 'fbpost_prepare_body'); -} - - -function fbpost_uninstall() { - unregister_hook('post_local', 'addon/fbpost/fbpost.php', 'fbpost_post_local'); - unregister_hook('notifier_normal', 'addon/fbpost/fbpost.php', 'fbpost_post_hook'); - unregister_hook('jot_networks', 'addon/fbpost/fbpost.php', 'fbpost_jot_nets'); - unregister_hook('connector_settings', 'addon/fbpost/fbpost.php', 'fbpost_plugin_settings'); - unregister_hook('enotify', 'addon/fbpost/fbpost.php', 'fbpost_enotify'); - unregister_hook('queue_predeliver', 'addon/fbpost/fbpost.php', 'fbpost_queue_hook'); - unregister_hook('cron', 'addon/fbpost/fbpost.php', 'fbpost_cron'); - unregister_hook('prepare_body', 'addon/fbpost/fbpost.php', 'fbpost_prepare_body'); -} - - -/* declare the fbpost_module function so that /fbpost url requests will land here */ - -function fbpost_module() {} - - - -// If a->argv[1] is a nickname, this is a callback from Facebook oauth requests. -// If $_REQUEST["realtime_cb"] is set, this is a callback from the Real-Time Updates API - -/** - * @param App $a - */ -function fbpost_init(&$a) { - - if($a->argc != 2) - return; - - $nick = $a->argv[1]; - - if(strlen($nick)) - $r = q("SELECT `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1", - dbesc($nick) - ); - if(!(isset($r) && count($r))) - return; - - $uid = $r[0]['uid']; - $auth_code = (x($_GET, 'code') ? $_GET['code'] : ''); - $error = (x($_GET, 'error_description') ? $_GET['error_description'] : ''); - - - if($error) - logger('fbpost_init: Error: ' . $error); - - if($auth_code && $uid) { - - $appid = get_config('facebook','appid'); - $appsecret = get_config('facebook', 'appsecret'); - - $x = fetch_url('https://graph.facebook.com/oauth/access_token?client_id=' - . $appid . '&client_secret=' . $appsecret . '&redirect_uri=' - . urlencode($a->get_baseurl() . '/fbpost/' . $nick) - . '&code=' . $auth_code); - - logger('fbpost_init: returned access token: ' . $x, LOGGER_DATA); - - if(strpos($x,'access_token=') !== false) { - $token = str_replace('access_token=', '', $x); - if(strpos($token,'&') !== false) - $token = substr($token,0,strpos($token,'&')); - set_pconfig($uid,'facebook','access_token',$token); - set_pconfig($uid,'facebook','post','1'); - fbpost_get_self($uid); - } - - } - -} - - -/** - * @param int $uid - */ -function fbpost_get_self($uid) { - $access_token = get_pconfig($uid,'facebook','access_token'); - if(! $access_token) - return; - $s = fetch_url('https://graph.facebook.com/me/?access_token=' . $access_token); - if($s) { - $j = json_decode($s); - set_pconfig($uid,'facebook','self_id',(string) $j->id); - } -} - - -// This is the POST method to the facebook settings page -// Content is posted to Facebook in the function facebook_post_hook() - -/** - * @param App $a - */ -function fbpost_post(&$a) { - - $uid = local_user(); - if($uid){ - - $value = ((x($_POST,'post_by_default')) ? intval($_POST['post_by_default']) : 0); - set_pconfig($uid,'facebook','post_by_default', $value); - - $value = ((x($_POST,'mirror_posts')) ? intval($_POST['mirror_posts']) : 0); - set_pconfig($uid,'facebook','mirror_posts', $value); - - if (!$value) - del_pconfig($uid,'facebook','last_created'); - - $value = ((x($_POST,'suppress_view_on_friendica')) ? intval($_POST['suppress_view_on_friendica']) : 0); - set_pconfig($uid,'facebook','suppress_view_on_friendica', $value); - - $value = ((x($_POST,'post_to_page')) ? $_POST['post_to_page'] : "0-0"); - $values = explode("-", $value); - set_pconfig($uid,'facebook','post_to_page', $values[0]); - set_pconfig($uid,'facebook','page_access_token', $values[1]); - - $result = q("SELECT `installed` FROM `addon` WHERE `name` = 'fbsync' AND `installed`"); - if (count($result) > 0) { - set_pconfig(local_user(),'fbsync','sync',intval($_POST['fbsync'])); - set_pconfig(local_user(),'fbsync','create_user',intval($_POST['create_user'])); - } - - info( t('Settings updated.') . EOL); - } - - return; -} - -// Facebook settings form - -/** - * @param App $a - * @return string - */ -function fbpost_content(&$a) { - - if(! local_user()) { - notice( t('Permission denied.') . EOL); - return ''; - } - - - if(! service_class_allows(local_user(),'facebook_connect')) { - notice( t('Permission denied.') . EOL); - return upgrade_bool_message(); - } - - - if($a->argc > 1 && $a->argv[1] === 'remove') { - del_pconfig(local_user(),'facebook','post'); - info( t('Facebook Post disabled') . EOL); - } - - require_once("mod/settings.php"); - settings_init($a); - - $o = ''; - $accounts = array(); - - $fb_installed = false; - if (get_pconfig(local_user(),'facebook','post')) { - $access_token = get_pconfig(local_user(),'facebook','access_token'); - if ($access_token) { - // fetching the list of accounts to check, if facebook is working - // The value is needed several lines below. - $url = 'https://graph.facebook.com/me/accounts'; - $s = fetch_url($url."?access_token=".$access_token, false, $redirects, 10); - if($s) { - $accounts = json_decode($s); - if (isset($accounts->data)) - $fb_installed = true; - } - - // I'm not totally sure, if this above will work in every situation, - // So this old code will be called as well. - if (!$fb_installed) { - $url ="https://graph.facebook.com/me/feed"; - $s = fetch_url($url."?access_token=".$access_token."&limit=1", false, $redirects, 10); - if($s) { - $j = json_decode($s); - if (isset($j->data)) - $fb_installed = true; - } - } - } - } - - $appid = get_config('facebook','appid'); - - if(! $appid) { - notice( t('Facebook API key is missing.') . EOL); - return ''; - } - - $a->page['htmlhead'] .= '' . "\r\n"; - - $result = q("SELECT `installed` FROM `addon` WHERE `name` = 'fbsync' AND `installed`"); - $fbsync = (count($result) > 0); - - if($fbsync) - $title = t('Facebook Import/Export/Mirror'); - else - $title = t('Facebook Export/Mirror'); - - $o .= '

'.$title.'

'; - - if(! $fb_installed) { - $o .= '
'; - - //read_stream,publish_stream,manage_pages,photo_upload,user_groups,offline_access - //export_stream,read_stream,publish_stream,manage_pages,photo_upload,user_groups,publish_actions,user_friends,share_item,video_upload,status_update - - $o .= '' . t('Install Facebook Post connector for this account.') . ''; - $o .= '
'; - } - - if($fb_installed) { - $o .= ''; - - $o .= '
'; - - //export_stream,read_stream,publish_stream,manage_pages,photo_upload,user_groups,publish_actions,user_friends,share_item,video_upload,status_update - - $o .= '' . t('Re-authenticate [This is necessary whenever your Facebook password is changed.]') . ''; - $o .= '
'; - - $o .= '
'; - $o .= '
'; - $post_by_default = get_pconfig(local_user(),'facebook','post_by_default'); - $checked = (($post_by_default) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('Post to Facebook by default') . EOL; - - $suppress_view_on_friendica = get_pconfig(local_user(),'facebook','suppress_view_on_friendica'); - $checked = (($suppress_view_on_friendica) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('Suppress "View on friendica"') . EOL; - - $mirror_posts = get_pconfig(local_user(),'facebook','mirror_posts'); - $checked = (($mirror_posts) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('Mirror wall posts from facebook to friendica.') . EOL; - - // List all pages - $post_to_page = get_pconfig(local_user(),'facebook','post_to_page'); - $page_access_token = get_pconfig(local_user(),'facebook','page_access_token'); - $fb_token = get_pconfig($a->user['uid'],'facebook','access_token'); - //$url = 'https://graph.facebook.com/me/accounts'; - //$x = fetch_url($url."?access_token=".$fb_token, false, $redirects, 10); - //$accounts = json_decode($x); - - $o .= t("Post to page/group:").""; - - if ($fbsync) { - - $o .= '
'; - - $sync_enabled = get_pconfig(local_user(),'fbsync','sync'); - $checked = (($sync_enabled) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('Import Facebook newsfeed.') . EOL; - - $create_user = get_pconfig(local_user(),'fbsync','create_user'); - $checked = (($create_user) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('Automatically create contacts.') . EOL; - - } - $o .= '

'; - } - - return $o; -} - -/** - * @param App $a - * @param null|object $b - */ -function fbpost_plugin_settings(&$a,&$b) { - - $enabled = get_pconfig(local_user(),'facebook','post'); - $css = (($enabled) ? '' : '-disabled'); - - $result = q("SELECT `installed` FROM `addon` WHERE `name` = 'fbsync' AND `installed`"); - if(count($result) > 0) - $title = t('Facebook Import/Export/Mirror'); - else - $title = t('Facebook Export/Mirror'); - - $b .= '
'; - $b .= '

'.$title.'

'; - $b .= '
'; -} - - -/** - * @param App $a - * @param null|object $o - */ -function fbpost_plugin_admin(&$a, &$o){ - - - $o = ''; - - $o .= '

' . t('Facebook API Key') . '

'; - - $appid = get_config('facebook', 'appid' ); - $appsecret = get_config('facebook', 'appsecret' ); - - $ret1 = q("SELECT `v` FROM `config` WHERE `cat` = 'facebook' AND `k` = 'appid' LIMIT 1"); - $ret2 = q("SELECT `v` FROM `config` WHERE `cat` = 'facebook' AND `k` = 'appsecret' LIMIT 1"); - if ((count($ret1) > 0 && $ret1[0]['v'] != $appid) || (count($ret2) > 0 && $ret2[0]['v'] != $appsecret)) $o .= t('Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

'); - - $o .= '
'; - $o .= '
'; - - $o .= ''; - -} - -/** - * @param App $a - */ - -function fbpost_plugin_admin_post(&$a){ - check_form_security_token_redirectOnErr('/admin/plugins/fbpost', 'fbsave'); - - if (x($_REQUEST,'fb_save_keys')) { - set_config('facebook', 'appid', $_REQUEST['appid']); - set_config('facebook', 'appsecret', $_REQUEST['appsecret']); - - info(t('The new values have been saved.')); - } - -} - -/** - * @param App $a - * @param object $b - * @return mixed - */ -function fbpost_jot_nets(&$a,&$b) { - if(! local_user()) - return; - - $fb_post = get_pconfig(local_user(),'facebook','post'); - if(intval($fb_post) == 1) { - $fb_defpost = get_pconfig(local_user(),'facebook','post_by_default'); - $selected = ((intval($fb_defpost) == 1) ? ' checked="checked" ' : ''); - $b .= '
' - . t('Post to Facebook') . '
'; - } -} - -/** - * @param App $a - * @param object $b - * @return mixed - */ -function fbpost_post_hook(&$a,&$b) { - - logger('fbpost_post_hook: Facebook post invoked', LOGGER_DEBUG); - - if($b['deleted'] || ($b['created'] !== $b['edited'])) - return; - - logger('fbpost_post_hook: Facebook post first check successful', LOGGER_DEBUG); - - // if post comes from facebook don't send it back - if($b['extid'] == NETWORK_FACEBOOK) - return; - - if(($b['app'] == "Facebook") && ($b['verb'] != ACTIVITY_LIKE)) - return; - - logger('fbpost_post_hook: Facebook post accepted', LOGGER_DEBUG); - - /** - * Post to Facebook stream - */ - - require_once('include/group.php'); - require_once('include/html2plain.php'); - - - $reply = false; - $likes = false; - - $deny_arr = array(); - $allow_arr = array(); - - $toplevel = (($b['id'] == $b['parent']) ? true : false); - - - $linking = ((get_pconfig($b['uid'],'facebook','no_linking')) ? 0 : 1); - - if((!$toplevel) && ($linking)) { - $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($b['parent']), - intval($b['uid']) - ); - //$r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - // dbesc($b['parent-uri']), - // intval($b['uid']) - //); - - // is it a reply to a facebook post? - // A reply to a toplevel post is only allowed for "real" facebook posts - if(count($r) && substr($r[0]['uri'],0,4) === 'fb::') - $reply = substr($r[0]['uri'],4); - elseif(count($r) && (substr($r[0]['extid'],0,4) === 'fb::') && ($r[0]['id'] != $r[0]['parent'])) - $reply = substr($r[0]['extid'],4); - else - return; - - $u = q("SELECT * FROM user where uid = %d limit 1", - intval($b['uid']) - ); - if(! count($u)) - return; - - // only accept comments from the item owner. Other contacts are unknown to FB. - - if(! link_compare($b['author-link'], $a->get_baseurl() . '/profile/' . $u[0]['nickname'])) - return; - - - logger('fbpost_post_hook: facebook reply id=' . $reply); - } - - if(strstr($b['postopts'],'facebook') || ($b['private']) || ($reply)) { - - if($b['private'] && $reply === false) { - $allow_people = expand_acl($b['allow_cid']); - $allow_groups = expand_groups(expand_acl($b['allow_gid'])); - $deny_people = expand_acl($b['deny_cid']); - $deny_groups = expand_groups(expand_acl($b['deny_gid'])); - - $recipients = array_unique(array_merge($allow_people,$allow_groups)); - $deny = array_unique(array_merge($deny_people,$deny_groups)); - - $allow_str = dbesc(implode(', ',$recipients)); - if($allow_str) { - logger("fbpost_post_hook: private post to: ".$allow_str, LOGGER_DEBUG); - $r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $allow_str ) AND `network` = 'face'"); - if(count($r)) - foreach($r as $rr) - $allow_arr[] = $rr['notify']; - } - - $deny_str = dbesc(implode(', ',$deny)); - if($deny_str) { - $r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $deny_str ) AND `network` = 'face'"); - if(count($r)) - foreach($r as $rr) - $deny_arr[] = $rr['notify']; - } - - if(count($deny_arr) && (! count($allow_arr))) { - - // One or more FB folks were denied access but nobody on FB was specifically allowed access. - // This might cause the post to be open to public on Facebook, but only to selected members - // on another network. Since this could potentially leak a post to somebody who was denied, - // we will skip posting it to Facebook with a slightly vague but relevant message that will - // hopefully lead somebody to this code comment for a better explanation of what went wrong. - - notice( t('Post to Facebook cancelled because of multi-network access permission conflict.') . EOL); - return; - } - - - // if it's a private message but no Facebook members are allowed or denied, skip Facebook post - - if((! count($allow_arr)) && (! count($deny_arr))) - return; - } - - if($b['verb'] == ACTIVITY_LIKE) { - $likes = true; - logger('fbpost_post_hook: liking '.print_r($b, true), LOGGER_DEBUG); - } - - - $appid = get_config('facebook', 'appid' ); - $secret = get_config('facebook', 'appsecret' ); - - if($appid && $secret) { - - logger('fbpost_post_hook: have appid+secret'); - - $fb_token = get_pconfig($b['uid'],'facebook','access_token'); - - - // post to facebook if it's a public post and we've ticked the 'post to Facebook' box, - // or it's a private message with facebook participants - // or it's a reply or likes action to an existing facebook post - - if($fb_token && ($toplevel || $b['private'] || $reply)) { - logger('fbpost_post_hook: able to post'); - require_once('library/facebook.php'); - require_once('include/bbcode.php'); - - $msg = $b['body']; - - logger('fbpost_post_hook: original msg=' . $msg, LOGGER_DATA); - - if ($toplevel) { - require_once("include/plaintext.php"); - $msgarr = plaintext($a, $b, 0, false, 9); - $msg = $msgarr["text"]; - $link = $msgarr["url"]; - $linkname = $msgarr["title"]; - - if ($msgarr["type"] != "video") - $image = $msgarr["image"]; - - // Fallback - if message is empty - if(!strlen($msg)) - $msg = $linkname; - - if(!strlen($msg)) - $msg = $link; - - if(!strlen($msg)) - $msg = $image; - } else { - require_once("include/bbcode.php"); - require_once("include/html2plain.php"); - $msg = bb_CleanPictureLinks($msg); - $msg = bbcode($msg, false, false, 2, true); - $msg = trim(html2plain($msg, 0)); - $link = ""; - $image = ""; - $linkname = ""; - } - - // If there is nothing to post then exit - if(!strlen($msg)) - return; - - logger('fbpost_post_hook: msg=' . $msg, LOGGER_DATA); - - $video = ""; - - if($likes) { - $postvars = array('access_token' => $fb_token); - } else { - // message, picture, link, name, caption, description, source, place, tags - //if(trim($link) != "") - // if (@exif_imagetype($link) != 0) { - // $image = $link; - // $link = ""; - // } - - $postvars = array( - 'access_token' => $fb_token, - 'message' => $msg - ); - if(trim($image) != "") - $postvars['picture'] = $image; - - if(trim($link) != "") { - $postvars['link'] = $link; - - if ((stristr($link,'youtube')) || (stristr($link,'youtu.be')) || (stristr($link,'vimeo'))) { - $video = $link; - } - } - if(trim($linkname) != "") - $postvars['name'] = $linkname; - } - - if(($b['private']) && ($toplevel)) { - $postvars['privacy'] = '{"value": "CUSTOM", "friends": "SOME_FRIENDS"'; - if(count($allow_arr)) - $postvars['privacy'] .= ',"allow": "' . implode(',',$allow_arr) . '"'; - if(count($deny_arr)) - $postvars['privacy'] .= ',"deny": "' . implode(',',$deny_arr) . '"'; - $postvars['privacy'] .= '}'; - - } - - $post_to_page = get_pconfig($b['uid'],'facebook','post_to_page'); - $page_access_token = get_pconfig($b['uid'],'facebook','page_access_token'); - if ((intval($post_to_page) != 0) && ($page_access_token != "")) - $target = $post_to_page; - else - $target = "me"; - - if($reply) { - $url = 'https://graph.facebook.com/' . $reply . '/' . (($likes) ? 'likes' : 'comments'); - } else if (($video != "") || (($image == "") && ($link != ""))) { - // If it is a link to a video or a link without a preview picture then post it as a link - if ($video != "") - $link = $video; - - $postvars = array( - 'access_token' => $fb_token, - 'link' => $link, - ); - if ($msg != $video) - $postvars['message'] = $msg; - - $url = 'https://graph.facebook.com/'.$target.'/links'; - } else if (($link == "") && ($image != "")) { - // If it is only an image without a page link then post this image as a photo - $postvars = array( - 'access_token' => $fb_token, - 'url' => $image, - ); - if ($msg != $image) - $postvars['message'] = $msg; - - $url = 'https://graph.facebook.com/'.$target.'/photos'; - //} else if (($link != "") || ($image != "") || ($b['title'] == '') || (strlen($msg) < 500)) { - } else { - $url = 'https://graph.facebook.com/'.$target.'/feed'; - if (!get_pconfig($b['uid'],'facebook','suppress_view_on_friendica') && $b['plink']) - $postvars['actions'] = '{"name": "' . t('View on Friendica') . '", "link": "' . $b['plink'] . '"}'; - } -/* } else { - // if its only a message and a subject and the message is larger than 500 characters then post it as note - $postvars = array( - 'access_token' => $fb_token, - 'message' => bbcode($b['body'], false, false), - 'subject' => $b['title'], - ); - $url = 'https://graph.facebook.com/'.$target.'/notes'; - } */ - - // Post to page? - if (!$reply && ($target != "me") && $page_access_token) - $postvars['access_token'] = $page_access_token; - - logger('fbpost_post_hook: post to ' . $url); - logger('fbpost_post_hook: postvars: ' . print_r($postvars,true)); - - // "test_mode" prevents anything from actually being posted. - // Otherwise, let's do it. - - if(!get_config('facebook','test_mode')) { - $x = post_url($url, $postvars); - logger('fbpost_post_hook: post returns: ' . $x, LOGGER_DEBUG); - - $retj = json_decode($x); - if($retj->id) { - // Only set the extid when it isn't the toplevel post - q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d AND `parent` != %d", - dbesc('fb::' . $retj->id), - intval($b['id']), - intval($b['id']) - ); - } else { - // Sometimes posts are accepted from facebook although it telling an error - // This leads to endless comment flooding. - - // If it is a special kind of failure the post was receiced - // Although facebook said it wasn't received ... - if (!$likes && (($retj->error->type != "OAuthException") || ($retj->error->code != 2)) && ($x <> "")) { - $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", intval($b['uid'])); - if (count($r)) - $a->contact = $r[0]["id"]; - - $s = serialize(array('url' => $url, 'item' => $b['id'], 'post' => $postvars)); - require_once('include/queue_fn.php'); - add_to_queue($a->contact,NETWORK_FACEBOOK,$s); - logger('fbpost_post_hook: Post failed, requeued.', LOGGER_DEBUG); - notice( t('Facebook post failed. Queued for retry.') . EOL); - } - - if (isset($retj->error) && $retj->error->type == "OAuthException" && $retj->error->code == 190) { - logger('fbpost_post_hook: Facebook session has expired due to changed password.', LOGGER_DEBUG); - - $last_notification = get_pconfig($b['uid'], 'facebook', 'session_expired_mailsent'); - if (!$last_notification || $last_notification < (time() - FACEBOOK_SESSION_ERR_NOTIFICATION_INTERVAL)) { - 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'], - 'source_name' => t('Administrator'), - 'source_link' => $a->config["system"]["url"], - 'source_photo' => $a->config["system"]["url"] . '/images/person-80.jpg', - )); - - set_pconfig($b['uid'], 'facebook', 'session_expired_mailsent', time()); - } else logger('fbpost_post_hook: No notification, as the last one was sent on ' . $last_notification, LOGGER_DEBUG); - } - } - } - } - } - } -} - -/** - * @param App $app - * @param object $data - */ -function fbpost_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'] = '/fbpost'; - $data['epreamble'] = $data['preamble'] = t('Your Facebook connection became invalid. Please Re-authenticate.'); - $data['subject'] = t('Facebook connection became invalid'); - $data['body'] = sprintf( t("Hi %1\$s,\n\nThe connection between your accounts on %2\$s and Facebook became invalid. This usually happens after you change your Facebook-password. To enable the connection again, you have to %3\$sre-authenticate the Facebook-connector%4\$s."), $data['params']['to_name'], "[url=" . $app->config["system"]["url"] . "]" . $app->config["sitename"] . "[/url]", "[url=" . $app->config["system"]["url"] . "/fbpost]", "[/url]"); - } -} - -/** - * @param App $a - * @param object $b - */ -function fbpost_post_local(&$a,&$b) { - - // Figure out if Facebook posting is enabled for this post and file it in 'postopts' - // where we will discover it during background delivery. - - // This can only be triggered by a local user posting to their own wall. - - if((local_user()) && (local_user() == $b['uid'])) { - - $fb_post = intval(get_pconfig(local_user(),'facebook','post')); - $fb_enable = (($fb_post && x($_REQUEST,'facebook_enable')) ? intval($_REQUEST['facebook_enable']) : 0); - - // if API is used, default to the chosen settings - // but allow a specific override - - if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default'))) { - if(! x($_REQUEST,'facebook_enable')) - $fb_enable = 1; - } - - if(! $fb_enable) - return; - - if(strlen($b['postopts'])) - $b['postopts'] .= ','; - $b['postopts'] .= 'facebook'; - } -} - - -/** - * @param App $a - * @param object $b - */ -function fbpost_queue_hook(&$a,&$b) { - - $qi = q("SELECT * FROM `queue` WHERE `network` = '%s'", - dbesc(NETWORK_FACEBOOK) - ); - if(! count($qi)) - return; - - require_once('include/queue_fn.php'); - - foreach($qi as $x) { - if($x['network'] !== NETWORK_FACEBOOK) - continue; - - logger('fbpost_queue_hook: run'); - - $r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid` - WHERE `contact`.`self` = 1 AND `contact`.`id` = %d LIMIT 1", - intval($x['cid']) - ); - if(! count($r)) { - logger('fbpost_queue_hook: no user found for entry '.print_r($x, true)); - update_queue_time($x['id']); - continue; - } - - $user = $r[0]; - - $appid = get_config('facebook', 'appid' ); - $secret = get_config('facebook', 'appsecret' ); - - if($appid && $secret) { - $fb_post = intval(get_pconfig($user['uid'],'facebook','post')); - $fb_token = get_pconfig($user['uid'],'facebook','access_token'); - - if($fb_post && $fb_token) { - logger('fbpost_queue_hook: able to post'); - require_once('library/facebook.php'); - - $z = unserialize($x['content']); - $item = $z['item']; - $j = post_url($z['url'],$z['post']); - - $retj = json_decode($j); - if($retj->id) { - // Only set the extid when it isn't the toplevel post - q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d AND `parent` != %d", - dbesc('fb::' . $retj->id), - intval($item), - intval($item) - ); - logger('fbpost_queue_hook: success: ' . $j); - remove_queue_item($x['id']); - } else { - logger('fbpost_queue_hook: failed: ' . $j); - - // If it is a special kind of failure the post was receiced - // Although facebook said it wasn't received ... - $ret = json_decode($j); - if (($ret->error->type != "OAuthException") || ($ret->error->code != 2) && ($j <> "")) - update_queue_time($x['id']); - else - logger('fbpost_queue_hook: Not requeued, since it seems to be received'); - } - } else { - logger('fbpost_queue_hook: No fb_post or fb_token.'); - update_queue_time($x['id']); - } - } else { - logger('fbpost_queue_hook: No appid or secret.'); - update_queue_time($x['id']); - } - } -} - - -/** - * @return bool|string - */ -function fbpost_get_app_access_token() { - - $acc_token = get_config('facebook','app_access_token'); - - if ($acc_token !== false) return $acc_token; - - $appid = get_config('facebook','appid'); - $appsecret = get_config('facebook', 'appsecret'); - - if ($appid === false || $appsecret === false) { - logger('fb_get_app_access_token: appid and/or appsecret not set', LOGGER_DEBUG); - return false; - } - logger('https://graph.facebook.com/oauth/access_token?client_id=' . $appid . '&client_secret=' . $appsecret . '&grant_type=client_credentials', LOGGER_DATA); - $x = fetch_url('https://graph.facebook.com/oauth/access_token?client_id=' . $appid . '&client_secret=' . $appsecret . '&grant_type=client_credentials'); - - if(strpos($x,'access_token=') !== false) { - logger('fb_get_app_access_token: returned access token: ' . $x, LOGGER_DATA); - - $token = str_replace('access_token=', '', $x); - if(strpos($token,'&') !== false) - $token = substr($token,0,strpos($token,'&')); - - if ($token == "") { - logger('fb_get_app_access_token: empty token: ' . $x, LOGGER_DEBUG); - return false; - } - set_config('facebook','app_access_token',$token); - return $token; - } else { - logger('fb_get_app_access_token: response did not contain an access_token: ' . $x, LOGGER_DATA); - return false; - } -} - -function fbpost_prepare_body(&$a,&$b) { - if ($b["item"]["network"] != NETWORK_FACEBOOK) - return; - - if ($b["preview"]) { - $msg = $b["item"]["body"]; - - require_once("include/bbcode.php"); - require_once("include/html2plain.php"); - $msg = bb_CleanPictureLinks($msg); - $msg = bbcode($msg, false, false, 2, true); - $msg = trim(html2plain($msg, 0)); - - $b['html'] = nl2br(htmlspecialchars($msg)); - } -} - -function fbpost_cron($a,$b) { - $last = get_config('facebook','last_poll'); - - $poll_interval = intval(get_config('facebook','poll_interval')); - if(! $poll_interval) - $poll_interval = FACEBOOK_DEFAULT_POLL_INTERVAL; - - if($last) { - $next = $last + ($poll_interval * 60); - if($next > time()) { - logger('facebook: poll intervall not reached'); - return; - } - } - logger('facebook: cron_start'); - - $r = q("SELECT * FROM `pconfig` WHERE `cat` = 'facebook' AND `k` = 'mirror_posts' AND `v` = '1' ORDER BY RAND() "); - if(count($r)) { - foreach($r as $rr) { - logger('facebook: fetching for user '.$rr['uid']); - fbpost_fetchwall($a, $rr['uid']); - } - } - - logger('facebook: cron_end'); - - set_config('facebook','last_poll', time()); -} - -function fbpost_cleanpicture($url) { - require_once("include/Photo.php"); - - $urldata = parse_url($url); - if (isset($urldata["query"])) { - parse_str($urldata["query"], $querydata); - if (isset($querydata["url"]) && (get_photo_info($querydata["url"]))) - return($querydata["url"]); - } - return($url); -} - -function fbpost_fetchwall($a, $uid) { - require_once("include/oembed.php"); - require_once("include/network.php"); - require_once("include/items.php"); - require_once("mod/item.php"); - require_once("include/bbcode.php"); - - $access_token = get_pconfig($uid,'facebook','access_token'); - $post_to_page = get_pconfig($uid,'facebook','post_to_page'); - $mirror_page = get_pconfig($uid,'facebook','mirror_page'); - $lastcreated = get_pconfig($uid,'facebook','last_created'); - - if ((int)$post_to_page == 0) - $post_to_page = "me"; - - if ((int)$mirror_page != 0) - $post_to_page = $mirror_page; - - $url = "https://graph.facebook.com/".$post_to_page."/feed?access_token=".$access_token; - - $first_time = ($lastcreated == ""); - - if ($lastcreated != "") - $url .= "&since=".urlencode($lastcreated); - - $feed = fetch_url($url); - $data = json_decode($feed); - - if (!is_array($data->data)) - return; - - $items = array_reverse($data->data); - - foreach ($items as $item) { - if ($item->created_time > $lastcreated) - $lastcreated = $item->created_time; - - if ($first_time) - continue; - - if ($item->application->id == get_config('facebook','appid')) - continue; - - if(isset($item->privacy) && ($item->privacy->value !== 'EVERYONE') && ((int)$mirror_page == 0)) - continue; - elseif(isset($item->privacy) && ($item->privacy->value !== 'EVERYONE') && ($item->privacy->value !== '')) - continue; - elseif(!isset($item->privacy)) - continue; - - if (($post_to_page != $item->from->id) && ((int)$post_to_page != 0)) - continue; - - if (!strstr($item->id, $item->from->id."_") && isset($item->to) && ((int)$post_to_page == 0)) - continue; - - $_SESSION["authenticated"] = true; - $_SESSION["uid"] = $uid; - - unset($_REQUEST); - $_REQUEST["type"] = "wall"; - $_REQUEST["api_source"] = true; - $_REQUEST["profile_uid"] = $uid; - //$_REQUEST["source"] = "Facebook"; - $_REQUEST["source"] = $item->application->name; - $_REQUEST["extid"] = NETWORK_FACEBOOK; - - $_REQUEST["title"] = ""; - - $_REQUEST["body"] = (isset($item->message) ? escape_tags($item->message) : ''); - - $pagedata = array(); - $content = ""; - $pagedata["type"] = ""; - - if(isset($item->name) && isset($item->link)) { - $item->link = original_url($item->link); - $oembed_data = oembed_fetch_url($item->link); - $pagedata["type"] = $oembed_data->type; - $pagedata["url"] = $item->link; - $pagedata["title"] = $item->name; - $content = "[bookmark=".$item->link."]".$item->name."[/bookmark]"; - - // If a link is not only attached but also added in the body, look if it can be removed in the body. - $removedlink = trim(str_replace($item->link, "", $_REQUEST["body"])); - - if (($removedlink == "") || strstr($_REQUEST["body"], $removedlink)) - $_REQUEST["body"] = $removedlink; - - } elseif (isset($item->name)) - $content .= "[b]".$item->name."[/b]"; - - $pagedata["text"] = ""; - if(isset($item->description) && ($item->type != "photo")) - $pagedata["text"] = $item->description; - - if(isset($item->caption) && ($item->type == "photo")) - $pagedata["text"] = $item->caption; - - // Only import the picture when the message is no video - // oembed display a picture of the video as well - //if ($item->type != "video") { - //if (($item->type != "video") && ($item->type != "photo")) { - if (($pagedata["type"] == "") || ($pagedata["type"] == "link")) { - - $pagedata["type"] = $item->type; - - if (isset($item->picture)) - $pagedata["images"][0]["src"] = $item->picture; - - if (($pagedata["type"] == "photo") && isset($item->object_id)) { - logger('fbpost_fetchwall: fetching fbid '.$item->object_id, LOGGER_DEBUG); - $url = "https://graph.facebook.com/".$item->object_id."?access_token=".$access_token; - $feed = fetch_url($url); - $data = json_decode($feed); - if (isset($data->images)) { - $pagedata["images"][0]["src"] = $data->images[0]->source; - logger('got fbid image from images for '.$item->object_id, LOGGER_DEBUG); - } elseif (isset($data->source)) { - $pagedata["images"][0]["src"] = $data->source; - logger('got fbid image from source for '.$item->object_id, LOGGER_DEBUG); - } elseif (isset($data->picture)) { - $pagedata["images"][0]["src"] = $data->picture; - logger('got fbid image from picture for '.$item->object_id, LOGGER_DEBUG); - } - } - - if(trim($_REQUEST["body"].$content.$pagedata["text"]) == '') { - logger('facebook: empty body 1 '.$item->id.' '.print_r($item, true)); - continue; - } - - $pagedata["images"][0]["src"] = fbpost_cleanpicture($pagedata["images"][0]["src"]); - - if(($pagedata["images"][0]["src"] != "") && isset($item->link)) { - $item->link = original_url($item->link); - $pagedata["url"] = $item->link; - $content .= "\n".'[url='.$item->link.'][img]'.$pagedata["images"][0]["src"].'[/img][/url]'; - } else { - if ($pagedata["images"][0]["src"] != "") - $content .= "\n".'[img]'.$pagedata["images"][0]["src"].'[/img]'; - // if just a link, it may be a wall photo - check - if(isset($item->link)) - $content .= fbpost_get_photo($uid,$item->link); - } - } - - if(trim($_REQUEST["body"].$content.$pagedata["text"]) == '') { - logger('facebook: empty body 2 '.$item->id.' '.print_r($item, true)); - continue; - } - - if ($pagedata["type"] != "") - $_REQUEST["body"] .= add_page_info_data($pagedata); - else { - if ($content) - $_REQUEST["body"] .= "\n".trim($content); - - if ($pagedata["text"]) - $_REQUEST["body"] .= "\n[quote]".$pagedata["text"]."[/quote]"; - - $_REQUEST["body"] = trim($_REQUEST["body"]); - } - - if (isset($item->place)) { - if ($item->place->name || $item->place->location->street || - $item->place->location->city || $item->place->location->country) { - $_REQUEST["location"] = ''; - if ($item->place->name) - $_REQUEST["location"] .= $item->place->name; - if ($item->place->location->street) - $_REQUEST["location"] .= " ".$item->place->location->street; - if ($item->place->location->city) - $_REQUEST["location"] .= " ".$item->place->location->city; - if ($item->place->location->country) - $_REQUEST["location"] .= " ".$item->place->location->country; - - $_REQUEST["location"] = trim($_REQUEST["location"]); - } - if ($item->place->location->latitude && $item->place->location->longitude) - $_REQUEST["coord"] = substr($item->place->location->latitude, 0, 8) - .' '.substr($item->place->location->longitude, 0, 8); - } - - if(trim($_REQUEST["body"]) == '') { - logger('facebook: empty body 3 '.$item->id.' '.print_r($item, true)); - continue; - } - - if(trim(strip_tags(bbcode($_REQUEST["body"], false, false))) == '') { - logger('facebook: empty body 4 '.$item->id.' '.print_r($item, true)); - continue; - } - - - //print_r($_REQUEST); - logger('facebook: posting for user '.$uid); - item_post($a); - } - - set_pconfig($uid,'facebook','last_created', $lastcreated); -} - -function fbpost_get_photo($uid,$link) { - $access_token = get_pconfig($uid,'facebook','access_token'); - if(! $access_token || (! stristr($link,'facebook.com/photo.php'))) - return ""; - - $ret = preg_match('/fbid=([0-9]*)/',$link,$match); - if($ret) - $photo_id = $match[1]; - else - return ""; - - $x = fetch_url('https://graph.facebook.com/'.$photo_id.'?access_token='.$access_token); - $j = json_decode($x); - if($j->picture) - return "\n\n".'[url='.$link.'][img]'.$j->picture.'[/img][/url]'; - - return ""; -} - -function fpost_cleanpicture($image) { - - if ((strpos($image, ".fbcdn.net/") || strpos($image, "/fbcdn-photos-")) && (substr($image, -6) == "_s.jpg")) - $image = substr($image, 0, -6)."_n.jpg"; - - $queryvar = fbpost_parse_query($image); - if ($queryvar['url'] != "") - $image = urldecode($queryvar['url']); - - return $image; -} - -function fbpost_parse_query($var) { - /** - * Use this function to parse out the query array element from - * the output of parse_url(). - */ - $var = parse_url($var, PHP_URL_QUERY); - $var = html_entity_decode($var); - $var = explode('&', $var); - $arr = array(); - - foreach($var as $val) { - $x = explode('=', $val); - $arr[$x[0]] = $x[1]; - } - - unset($val, $x, $var); - return $arr; -} diff --git a/fbpost/lang/C/messages.po b/fbpost/lang/C/messages.po deleted file mode 100644 index 578a673d..00000000 --- a/fbpost/lang/C/messages.po +++ /dev/null @@ -1,156 +0,0 @@ -# ADDON fbpost -# Copyright (C) -# This file is distributed under the same license as the Friendica fbpost addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: fbpost.php:155 -msgid "Settings updated." -msgstr "" - -#: fbpost.php:170 fbpost.php:176 -msgid "Permission denied." -msgstr "" - -#: fbpost.php:183 -msgid "Facebook Post disabled" -msgstr "" - -#: fbpost.php:203 -msgid "Facebook API key is missing." -msgstr "" - -#: fbpost.php:210 -msgid "Facebook Post" -msgstr "" - -#: fbpost.php:216 -msgid "Install Facebook Post connector for this account." -msgstr "" - -#: fbpost.php:223 -msgid "Remove Facebook Post connector" -msgstr "" - -#: fbpost.php:228 -msgid "" -"Re-authenticate [This is necessary whenever your Facebook password is " -"changed.]" -msgstr "" - -#: fbpost.php:235 -msgid "Post to Facebook by default" -msgstr "" - -#: fbpost.php:239 -msgid "Suppress \"View on friendica\"" -msgstr "" - -#: fbpost.php:243 -msgid "Mirror wall posts from facebook to friendica." -msgstr "" - -#: fbpost.php:253 -msgid "Post to page/group:" -msgstr "" - -#: fbpost.php:255 fbpost.php:257 -msgid "None" -msgstr "" - -#: fbpost.php:280 -msgid "Submit" -msgstr "" - -#: fbpost.php:294 -msgid "Facebook" -msgstr "" - -#: fbpost.php:295 -msgid "Facebook Post Settings" -msgstr "" - -#: fbpost.php:310 -msgid "Facebook API Key" -msgstr "" - -#: fbpost.php:317 -msgid "" -"Error: it appears that you have specified the App-ID and -Secret in your ." -"htconfig.php file. As long as they are specified there, they cannot be set " -"using this form.

" -msgstr "" - -#: fbpost.php:319 -msgid "App-ID / API-Key" -msgstr "" - -#: fbpost.php:320 -msgid "Application secret" -msgstr "" - -#: fbpost.php:322 -msgid "Save" -msgstr "" - -#: fbpost.php:337 -msgid "The new values have been saved." -msgstr "" - -#: fbpost.php:356 -msgid "Post to Facebook" -msgstr "" - -#: fbpost.php:375 -#, php-format -msgid "%s:" -msgstr "" - -#: fbpost.php:487 -msgid "" -"Post to Facebook cancelled because of multi-network access permission " -"conflict." -msgstr "" - -#: fbpost.php:766 -msgid "View on Friendica" -msgstr "" - -#: fbpost.php:803 -msgid "Facebook post failed. Queued for retry." -msgstr "" - -#: fbpost.php:821 -msgid "Administrator" -msgstr "" - -#: fbpost.php:843 -msgid "Your Facebook connection became invalid. Please Re-authenticate." -msgstr "" - -#: fbpost.php:844 -msgid "Facebook connection became invalid" -msgstr "" - -#: fbpost.php:845 -#, php-format -msgid "" -"Hi %1$s,\n" -"\n" -"The connection between your accounts on %2$s and Facebook became invalid. " -"This usually happens after you change your Facebook-password. To enable the " -"connection again, you have to %3$sre-authenticate the Facebook-connector%4$s." -msgstr "" diff --git a/fbpost/lang/ca/strings.php b/fbpost/lang/ca/strings.php deleted file mode 100644 index 1ad8afda..00000000 --- a/fbpost/lang/ca/strings.php +++ /dev/null @@ -1,32 +0,0 @@ -strings["Settings updated."] = "Ajustos actualitzats."; -$a->strings["Permission denied."] = "Permís denegat."; -$a->strings["Facebook Post disabled"] = ""; -$a->strings["Facebook API key is missing."] = "La clau del API de Facebook s'ha perdut."; -$a->strings["Facebook Post"] = ""; -$a->strings["Install Facebook Post connector for this account."] = ""; -$a->strings["Remove Facebook Post connector"] = ""; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Re-autentificar [Això és necessari cada vegada que la contrasenya de Facebook canvia.]"; -$a->strings["Post to Facebook by default"] = "Enviar a Facebook per defecte"; -$a->strings["Suppress \"View on friendica\""] = ""; -$a->strings["Mirror wall posts from facebook to friendica."] = ""; -$a->strings["Post to page/group:"] = ""; -$a->strings["None"] = "Cap"; -$a->strings["Submit"] = "Enviar"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = ""; -$a->strings["Facebook API Key"] = "Facebook API Key"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Error: Apareix que has especificat el App-ID i el Secret en el arxiu .htconfig.php. Per estar especificat allà, no pot ser canviat utilitzant aquest formulari.

"; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Application secret"; -$a->strings["Save"] = "Guardar"; -$a->strings["The new values have been saved."] = "Els nous valors s'han guardat."; -$a->strings["Post to Facebook"] = "Enviament a Facebook"; -$a->strings["%s:"] = ""; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Enviament a Facebook cancel·lat perque hi ha un conflicte de permisos d'accés multi-xarxa."; -$a->strings["View on Friendica"] = "Vist en Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Enviament a Facebook fracassat. En cua per a reintent."; -$a->strings["Administrator"] = "Administrador"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "La seva connexió a Facebook es va convertir en no vàlida. Per favor, torni a autenticar-se"; -$a->strings["Facebook connection became invalid"] = "La seva connexió a Facebook es va convertir en no vàlida"; diff --git a/fbpost/lang/cs/strings.php b/fbpost/lang/cs/strings.php deleted file mode 100644 index 2151e0ab..00000000 --- a/fbpost/lang/cs/strings.php +++ /dev/null @@ -1,31 +0,0 @@ -strings["Settings updated."] = "Nastavení aktualizováno."; -$a->strings["Permission denied."] = "Přístup odmítnut."; -$a->strings["Facebook Post disabled"] = "Příspěvky na Facebook zakázán."; -$a->strings["Facebook API key is missing."] = "Chybí Facebook API klíč."; -$a->strings["Facebook Post"] = "Facebook příspěvek"; -$a->strings["Install Facebook Post connector for this account."] = "Instalovat pro tento účet konektor pro příspěvky na Facebook."; -$a->strings["Remove Facebook Post connector"] = "Odstranit konektor pro příspěvky na Facebook"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Opětovná autentikace [Toto je nezbytné kdykoliv se změní Vaše heslo na Facebooku.]"; -$a->strings["Post to Facebook by default"] = "Standardně posílat příspěvky na Facebook"; -$a->strings["Suppress \"View on friendica\""] = "Potlačit \"Zobrazit na friendica\""; -$a->strings["Post to page/group:"] = "Příspěvek na stránku/skupinu"; -$a->strings["None"] = "Žádný"; -$a->strings["Submit"] = "Odeslat"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = "Nastavení konektoru pro příspěvky na Facebook"; -$a->strings["Facebook API Key"] = "Facebook API Key"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Chyba: zdá se, že jste specifikoval App-ID a -Secret ve Vašem .htconfig.php souboru. Dokud jsou na tomto místě specifikované, nemohou být nastaveny s pomocí tohoto formuláře.

"; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Application secret"; -$a->strings["Save"] = "Uložit"; -$a->strings["The new values have been saved."] = "Nové hodnoty byly uloženy"; -$a->strings["Post to Facebook"] = "Přidat příspěvek na Facebook"; -$a->strings["%s:"] = "%s:"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Příspěvek na Facebook zrušen kvůli konfliktu přístupových práv mezi sítěmi."; -$a->strings["View on Friendica"] = "Zobrazení na Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Zaslání příspěvku na Facebook selhalo. Příspěvek byl zařazen do fronty pro opakované odeslání."; -$a->strings["Administrator"] = "Administrátor"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Vaše připojení na Facebook přestalo být platné. Prosím znovu se přihlaste."; -$a->strings["Facebook connection became invalid"] = "Připojení na Facebook bylo zneplatněno."; diff --git a/fbpost/lang/de/strings.php b/fbpost/lang/de/strings.php deleted file mode 100644 index 6746ed2c..00000000 --- a/fbpost/lang/de/strings.php +++ /dev/null @@ -1,32 +0,0 @@ -strings["Settings updated."] = "Einstellungen aktualisiert."; -$a->strings["Permission denied."] = "Zugriff verweigert."; -$a->strings["Facebook Post disabled"] = "Nach Facebook senden deaktiviert"; -$a->strings["Facebook API key is missing."] = "Facebook-API-Schlüssel nicht gefunden"; -$a->strings["Facebook Post"] = "Facebook Relai"; -$a->strings["Install Facebook Post connector for this account."] = "Facebook-Connector für dieses Konto installieren."; -$a->strings["Remove Facebook Post connector"] = "Facebook-Connector entfernen"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Neu authentifizieren [Das ist immer dann nötig, wenn du dein Facebook-Passwort geändert hast.]"; -$a->strings["Post to Facebook by default"] = "Veröffentliche standardmäßig bei Facebook"; -$a->strings["Suppress \"View on friendica\""] = "Unterdrücke \"Auf Friendica Ansehen\""; -$a->strings["Mirror wall posts from facebook to friendica."] = "Spiegle Pinnwandeinträge von Facebook auf friendica"; -$a->strings["Post to page/group:"] = "Auf FB Seite/Gruppe veröffentlichen"; -$a->strings["None"] = "Keine"; -$a->strings["Submit"] = "Senden"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = "Facebook-Beitragseinstellungen"; -$a->strings["Facebook API Key"] = "Facebook API Schlüssel"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Fehler: du scheinst die App-ID und das App-Geheimnis in deiner .htconfig.php Datei angegeben zu haben. Solange sie dort festgelegt werden kannst du dieses Formular hier nicht verwenden.

"; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Anwendungs-Geheimnis"; -$a->strings["Save"] = "Speichern"; -$a->strings["The new values have been saved."] = "Die neuen Einstellungen wurden gespeichert."; -$a->strings["Post to Facebook"] = "Bei Facebook veröffentlichen"; -$a->strings["%s:"] = "%s:"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Beitrag wurde nicht bei Facebook veröffentlicht, da Konflikte bei den Multi-Netzwerk-Zugriffsrechten vorliegen."; -$a->strings["View on Friendica"] = "In Friendica betrachten"; -$a->strings["Facebook post failed. Queued for retry."] = "Veröffentlichung bei Facebook gescheitert. Wir versuchen es später erneut."; -$a->strings["Administrator"] = "Administrator"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Deine Facebook Anmeldedaten sind ungültig geworden. Bitte re-authentifiziere dich."; -$a->strings["Facebook connection became invalid"] = "Facebook Anmeldedaten sind ungültig geworden"; diff --git a/fbpost/lang/eo/strings.php b/fbpost/lang/eo/strings.php deleted file mode 100644 index 99c70e4f..00000000 --- a/fbpost/lang/eo/strings.php +++ /dev/null @@ -1,28 +0,0 @@ -strings["Settings updated."] = "Agordoj ĝisdatigita."; -$a->strings["Permission denied."] = "Malpermesita."; -$a->strings["Facebook Post disabled"] = ""; -$a->strings["Facebook API key is missing."] = "La API ŝlosilo de Facebook ne estas konata ĉi tie."; -$a->strings["Facebook Post"] = ""; -$a->strings["Install Facebook Post connector for this account."] = ""; -$a->strings["Remove Facebook Post connector"] = ""; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Reaŭtentiĝi [Tio estas bezonata ĉiam kiam vi ŝanĝis vian pasvorton ĉe Facebook.]"; -$a->strings["Post to Facebook by default"] = "Ĉiam afiŝi al Facebook."; -$a->strings["None"] = "Nenio"; -$a->strings["Submit"] = "Sendi"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = ""; -$a->strings["Facebook API Key"] = "Facebook API ŝlosilo"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Eraro: Ŝajnas kvazaŭ vi agordis la App-ID kaj la sekreton en via .htconfig.php dosiero. Kiam ili estas agordita tie, vi ne povas agordi ĝin en tiu ĉi formo.

"; -$a->strings["App-ID / API-Key"] = "Programo ID / API Ŝlosilo"; -$a->strings["Application secret"] = "Programo sekreto"; -$a->strings["Save"] = "Konservi"; -$a->strings["The new values have been saved."] = "Konservis novajn valorojn."; -$a->strings["Post to Facebook"] = "Afiŝi al Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Afiŝado al Facebook nuligita ĉar okazis konflikto en la multretpermesoj."; -$a->strings["View on Friendica"] = "Vidi ĉe Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Malsukcesis afiŝi ĉe Facebook. Enigita en vico."; -$a->strings["Administrator"] = "Administranto"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Via Facbook konekto iĝis nevalida. Bonvolu reaŭtentiĝi."; -$a->strings["Facebook connection became invalid"] = "Facebook konekto iĝis nevalida."; diff --git a/fbpost/lang/es/strings.php b/fbpost/lang/es/strings.php deleted file mode 100644 index e3446489..00000000 --- a/fbpost/lang/es/strings.php +++ /dev/null @@ -1,28 +0,0 @@ -strings["Settings updated."] = "Configuración actualizada."; -$a->strings["Permission denied."] = "Permiso denegado."; -$a->strings["Facebook Post disabled"] = "Facebook deshabilitado"; -$a->strings["Facebook API key is missing."] = "Falta la clave API de Facebook."; -$a->strings["Facebook Post"] = "Facebook"; -$a->strings["Install Facebook Post connector for this account."] = "Instalar el conector de Facebook para esta cuenta."; -$a->strings["Remove Facebook Post connector"] = "Eliminar el conector de Facebook"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Volver a identificarse [Esto es necesario cada vez que tu contraseña de Facebook cambie.]"; -$a->strings["Post to Facebook by default"] = "Publicar en Facebook de forma predeterminada"; -$a->strings["None"] = "Ninguna"; -$a->strings["Submit"] = "Envíar"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = "Configuración de conexión a Facebook"; -$a->strings["Facebook API Key"] = "Llave API de Facebook"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Error: parece que la App-ID y el -Secret ya están configurados en tu archivo .htconfig.php. Al estar configurados allí, no se usará este formulario.

"; -$a->strings["App-ID / API-Key"] = "Añadir ID / Llave API"; -$a->strings["Application secret"] = "Secreto de la aplicación"; -$a->strings["Save"] = "Guardar"; -$a->strings["The new values have been saved."] = "Los nuevos valores se han guardado."; -$a->strings["Post to Facebook"] = "Publicar en Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Publicación en Facebook cancelada debido a un conflicto con los permisos de acceso a la multi-red."; -$a->strings["View on Friendica"] = "Ver en Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Publicación en Facebook errónea. Reintentando..."; -$a->strings["Administrator"] = "Administrador"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Tu conexión con Facebook ha sido invalidada. Por favor vuelve a identificarte."; -$a->strings["Facebook connection became invalid"] = "La conexión con Facebook ha sido invalidada"; diff --git a/fbpost/lang/fr/strings.php b/fbpost/lang/fr/strings.php deleted file mode 100644 index 3edd9fa4..00000000 --- a/fbpost/lang/fr/strings.php +++ /dev/null @@ -1,28 +0,0 @@ -strings["Settings updated."] = "Réglages mis à jour."; -$a->strings["Permission denied."] = "Permission refusée."; -$a->strings["Facebook Post disabled"] = "Publications Facebook désactivées"; -$a->strings["Facebook API key is missing."] = "Clé d'API Facebook manquante."; -$a->strings["Facebook Post"] = "Publications Facebook"; -$a->strings["Install Facebook Post connector for this account."] = "Installer le connecteur Facebook pour ce compte."; -$a->strings["Remove Facebook Post connector"] = "Retirer le connecteur Facebook"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Se ré-authentifier [nécessaire chaque fois que vous changez votre mot de passe Facebook.]"; -$a->strings["Post to Facebook by default"] = "Poster sur Facebook par défaut"; -$a->strings["None"] = "Aucun(e)"; -$a->strings["Submit"] = "Envoyer"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = "Réglages Facebook"; -$a->strings["Facebook API Key"] = "Clé d'API Facebook"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Erreur: il semble que vous ayez spécifié un App-ID et un Secret dans votre fichier .htconfig.php. Tant qu'ils y seront, vous ne pourrez les configurer avec ce formulaire.

"; -$a->strings["App-ID / API-Key"] = "App-ID / Clé d'API"; -$a->strings["Application secret"] = "Secret de l'application"; -$a->strings["Save"] = "Sauver"; -$a->strings["The new values have been saved."] = "Les nouvelles valeurs ont été sauvées."; -$a->strings["Post to Facebook"] = "Poster sur Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Publication sur Facebook annulée pour cause de conflit de permissions inter-réseaux."; -$a->strings["View on Friendica"] = "Voir sur Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Publication sur Facebook échouée. En attente pour re-tentative."; -$a->strings["Administrator"] = "Administrateur"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Votre connexion à Facebook est devenue invalide. Merci de vous ré-authentifier."; -$a->strings["Facebook connection became invalid"] = "La connexion Facebook est devenue invalide"; diff --git a/fbpost/lang/is/strings.php b/fbpost/lang/is/strings.php deleted file mode 100644 index 6e64cde8..00000000 --- a/fbpost/lang/is/strings.php +++ /dev/null @@ -1,28 +0,0 @@ -strings["Settings updated."] = "Stillingar uppfærðar"; -$a->strings["Permission denied."] = "Heimild ekki veitt."; -$a->strings["Facebook Post disabled"] = ""; -$a->strings["Facebook API key is missing."] = "Facebook API lykill er ekki til staðar."; -$a->strings["Facebook Post"] = ""; -$a->strings["Install Facebook Post connector for this account."] = ""; -$a->strings["Remove Facebook Post connector"] = ""; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Þörf er á endurauðkenningu [Þetta þarf að gera í hvert skipti sem Facebook aðgangsorði er breytt.]"; -$a->strings["Post to Facebook by default"] = "Senda sjálfgefið færslur á Facebook "; -$a->strings["None"] = "Ekkert"; -$a->strings["Submit"] = "Senda inn"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = ""; -$a->strings["Facebook API Key"] = ""; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = ""; -$a->strings["App-ID / API-Key"] = ""; -$a->strings["Application secret"] = ""; -$a->strings["Save"] = "Vista"; -$a->strings["The new values have been saved."] = ""; -$a->strings["Post to Facebook"] = "Senda á Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Hætt við færslu á Facebook vegna marg nets aðgangs átaka."; -$a->strings["View on Friendica"] = "Skoða á Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Færsla sem átti að flæða yfir á Facebook mistókst. Sett í biðröð til endurtekningar."; -$a->strings["Administrator"] = "Kerfisstjóri"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = ""; -$a->strings["Facebook connection became invalid"] = ""; diff --git a/fbpost/lang/it/strings.php b/fbpost/lang/it/strings.php deleted file mode 100644 index a1aee90e..00000000 --- a/fbpost/lang/it/strings.php +++ /dev/null @@ -1,32 +0,0 @@ -strings["Settings updated."] = "Impostazioni aggiornate."; -$a->strings["Permission denied."] = "Permesso negato."; -$a->strings["Facebook Post disabled"] = ""; -$a->strings["Facebook API key is missing."] = "Chiave API Facebook mancante."; -$a->strings["Facebook Post"] = ""; -$a->strings["Install Facebook Post connector for this account."] = ""; -$a->strings["Remove Facebook Post connector"] = ""; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Ri-autentica [Questo è necessario ogni volta che cambia la password di Facebook.]"; -$a->strings["Post to Facebook by default"] = "Invia sempre a Facebook"; -$a->strings["Suppress \"View on friendica\""] = ""; -$a->strings["Mirror wall posts from facebook to friendica."] = ""; -$a->strings["Post to page/group:"] = ""; -$a->strings["None"] = "Nessuna"; -$a->strings["Submit"] = "Invia"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = ""; -$a->strings["Facebook API Key"] = "Facebook API Key"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Application secret"; -$a->strings["Save"] = "Salva"; -$a->strings["The new values have been saved."] = "I nuovi valori sono stati salvati."; -$a->strings["Post to Facebook"] = "Invia a Facebook"; -$a->strings["%s:"] = ""; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Invio su Facebook annullato per un conflitto nei permessi di accesso."; -$a->strings["View on Friendica"] = "Vedi su Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Invio a Facebook fallito. In attesa di riprovare."; -$a->strings["Administrator"] = "Amministratore"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "La tua connessione con Facebook è diventata invalida. Per favore ri-autenticati."; -$a->strings["Facebook connection became invalid"] = "La connessione Facebook è diventata invalida."; diff --git a/fbpost/lang/nb-no/strings.php b/fbpost/lang/nb-no/strings.php deleted file mode 100644 index e4cf15b3..00000000 --- a/fbpost/lang/nb-no/strings.php +++ /dev/null @@ -1,28 +0,0 @@ -strings["Settings updated."] = "Innstillinger oppdatert."; -$a->strings["Permission denied."] = "Ingen tilgang."; -$a->strings["Facebook Post disabled"] = ""; -$a->strings["Facebook API key is missing."] = "Facebook API-nøkkel mangler."; -$a->strings["Facebook Post"] = ""; -$a->strings["Install Facebook Post connector for this account."] = ""; -$a->strings["Remove Facebook Post connector"] = ""; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = ""; -$a->strings["Post to Facebook by default"] = "Post til Facebook som standard"; -$a->strings["None"] = "Ingen"; -$a->strings["Submit"] = "Lagre"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = ""; -$a->strings["Facebook API Key"] = ""; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = ""; -$a->strings["App-ID / API-Key"] = ""; -$a->strings["Application secret"] = ""; -$a->strings["Save"] = "Lagre"; -$a->strings["The new values have been saved."] = ""; -$a->strings["Post to Facebook"] = "Post til Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Posting til Facebook avbrutt på grunn av konflikt med tilgangsrettigheter i multi-nettverk."; -$a->strings["View on Friendica"] = ""; -$a->strings["Facebook post failed. Queued for retry."] = "Facebook-innlegg mislyktes. Innlegget er lagt i kø for å prøve igjen."; -$a->strings["Administrator"] = "Administrator"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = ""; -$a->strings["Facebook connection became invalid"] = ""; diff --git a/fbpost/lang/pl/strings.php b/fbpost/lang/pl/strings.php deleted file mode 100644 index 6de34a47..00000000 --- a/fbpost/lang/pl/strings.php +++ /dev/null @@ -1,32 +0,0 @@ -strings["Settings updated."] = "Zaktualizowano ustawienia."; -$a->strings["Permission denied."] = "Brak uprawnień."; -$a->strings["Facebook Post disabled"] = ""; -$a->strings["Facebook API key is missing."] = "Brakuje klucza API z facebooka."; -$a->strings["Facebook Post"] = "Wpis z Facebooka"; -$a->strings["Install Facebook Post connector for this account."] = ""; -$a->strings["Remove Facebook Post connector"] = ""; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Ponowna autoryzacja [Jest wymagana jeśli twoje hasło do Facebooka jest zmienione]"; -$a->strings["Post to Facebook by default"] = "Domyślnie opublikuj na stronie Facebook"; -$a->strings["Suppress \"View on friendica\""] = ""; -$a->strings["Mirror wall posts from facebook to friendica."] = ""; -$a->strings["Post to page/group:"] = "Napisz na stronę/grupę:"; -$a->strings["None"] = "Brak"; -$a->strings["Submit"] = "Potwierdź"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = "Ustawienia wpisu z Facebooka"; -$a->strings["Facebook API Key"] = "Facebook API Key"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = ""; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = ""; -$a->strings["Save"] = "Zapisz"; -$a->strings["The new values have been saved."] = ""; -$a->strings["Post to Facebook"] = "Post na Facebook"; -$a->strings["%s:"] = ""; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Publikacja na stronie Facebook nie powiodła się z powodu braku dostępu do sieci"; -$a->strings["View on Friendica"] = "Zobacz na Friendice"; -$a->strings["Facebook post failed. Queued for retry."] = ""; -$a->strings["Administrator"] = "Administrator"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = ""; -$a->strings["Facebook connection became invalid"] = "Błędne połączenie z Facebookiem"; diff --git a/fbpost/lang/pt-br/strings.php b/fbpost/lang/pt-br/strings.php deleted file mode 100644 index 3662a830..00000000 --- a/fbpost/lang/pt-br/strings.php +++ /dev/null @@ -1,28 +0,0 @@ -strings["Settings updated."] = "As configurações foram atualizadas."; -$a->strings["Permission denied."] = "Permissão negada."; -$a->strings["Facebook Post disabled"] = "A publicação no Facebook foi desabilitada"; -$a->strings["Facebook API key is missing."] = "A chave de API do Facebook não foi encontrada."; -$a->strings["Facebook Post"] = "Publicação no Facebook"; -$a->strings["Install Facebook Post connector for this account."] = "Instalar o conector de publicação no Facebook para esta conta."; -$a->strings["Remove Facebook Post connector"] = "Remover o conector de publicação no Facebook"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Reautenticar [Isso é necessário sempre que sua senha do Facebook é modificada.]"; -$a->strings["Post to Facebook by default"] = "Publicar no Facebook por padrão"; -$a->strings["None"] = "Nenhuma"; -$a->strings["Submit"] = "Enviar"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = "Configurações de publicação no Facebook"; -$a->strings["Facebook API Key"] = "Chave da API do Facebook"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "Erro: parece que você especificou o App-ID e o -Secret no arquivo .htconfig.php. Uma vez estão especificado lá, eles não podem ser definidos neste formulário.

"; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Segredo da aplicação"; -$a->strings["Save"] = "Salvar"; -$a->strings["The new values have been saved."] = "Os novos valores foram salvos."; -$a->strings["Post to Facebook"] = "Publicar no Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "A publicação no Facebook foi cancelada devido a um conflito de permissão de acesso multi-rede."; -$a->strings["View on Friendica"] = "Ver no Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Não foi possível publicar no Facebook. Armazenado na fila para nova tentativa."; -$a->strings["Administrator"] = "Administrador"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "A sua conexão com o Facebook tornou-se invalida. Por favor autentique-se novamente."; -$a->strings["Facebook connection became invalid"] = "A conexão com o Facebook tornou-se inválida"; diff --git a/fbpost/lang/ru/strings.php b/fbpost/lang/ru/strings.php deleted file mode 100644 index 3aa2f443..00000000 --- a/fbpost/lang/ru/strings.php +++ /dev/null @@ -1,28 +0,0 @@ -strings["Settings updated."] = "Настройки обновлены."; -$a->strings["Permission denied."] = "Нет разрешения."; -$a->strings["Facebook Post disabled"] = ""; -$a->strings["Facebook API key is missing."] = "Отсутствует ключ Facebook API."; -$a->strings["Facebook Post"] = ""; -$a->strings["Install Facebook Post connector for this account."] = ""; -$a->strings["Remove Facebook Post connector"] = ""; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Переаутентификация [Это необходимо, если вы изменили пароль на Facebook.]"; -$a->strings["Post to Facebook by default"] = "Отправлять на Facebook по умолчанию"; -$a->strings["None"] = "Ничего"; -$a->strings["Submit"] = "Подтвердить"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = ""; -$a->strings["Facebook API Key"] = "Facebook API Key"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = ""; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "Секрет приложения"; -$a->strings["Save"] = "Сохранить"; -$a->strings["The new values have been saved."] = ""; -$a->strings["Post to Facebook"] = "Отправить на Facebook"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "Отправка на Facebook отменена из-за конфликта разрешений доступа разных сетей."; -$a->strings["View on Friendica"] = ""; -$a->strings["Facebook post failed. Queued for retry."] = "Ошибка отправки сообщения на Facebook. В очереди на еще одну попытку."; -$a->strings["Administrator"] = "Администратор"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = ""; -$a->strings["Facebook connection became invalid"] = "Facebook подключение не удалось"; diff --git a/fbpost/lang/sv/strings.php b/fbpost/lang/sv/strings.php deleted file mode 100644 index f3053480..00000000 --- a/fbpost/lang/sv/strings.php +++ /dev/null @@ -1,10 +0,0 @@ -strings["Settings updated."] = "Inställningarna har uppdaterats."; -$a->strings["Permission denied."] = "Åtkomst nekad."; -$a->strings["Facebook API key is missing."] = "Facebook API key is missing."; -$a->strings["Post to Facebook by default"] = "Lägg alltid in inläggen på Facebook"; -$a->strings["Submit"] = "Spara"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Post to Facebook"] = "Lägg in på Facebook"; -$a->strings["Administrator"] = "Admin"; diff --git a/fbpost/lang/zh-cn/strings.php b/fbpost/lang/zh-cn/strings.php deleted file mode 100644 index 55e5a94e..00000000 --- a/fbpost/lang/zh-cn/strings.php +++ /dev/null @@ -1,32 +0,0 @@ -strings["Settings updated."] = "设置跟新了"; -$a->strings["Permission denied."] = "权限不够。"; -$a->strings["Facebook Post disabled"] = "使Facebook文章不可用的"; -$a->strings["Facebook API key is missing."] = "Facebook API钥匙失踪的。"; -$a->strings["Facebook Post"] = "Facebook文章"; -$a->strings["Install Facebook Post connector for this account."] = "安装Facebook文章连接器为这个账户"; -$a->strings["Remove Facebook Post connector"] = "把Facebook文章连接器删除"; -$a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "复认证[这是必要的每当您Facebook密码变化了]"; -$a->strings["Post to Facebook by default"] = "默认地放在Facebook"; -$a->strings["Suppress \"View on friendica\""] = "禁止「看在Friendica」"; -$a->strings["Mirror wall posts from facebook to friendica."] = "复制墙文章从facebook到friendica。"; -$a->strings["Post to page/group:"] = "放在页/组:"; -$a->strings["None"] = "没有"; -$a->strings["Submit"] = "提交"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Facebook Post Settings"] = "Facebook文章设置"; -$a->strings["Facebook API Key"] = "Facebook API密码"; -$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.

"] = "错误:看上去您输入App-ID和-Secret在您的.htconfig.php文件。它们那里输入的时候,您不能把他们在这个表格输入。

"; -$a->strings["App-ID / API-Key"] = "App-ID / API-Key"; -$a->strings["Application secret"] = "应用密码"; -$a->strings["Save"] = "保存"; -$a->strings["The new values have been saved."] = "新的设置保存了。"; -$a->strings["Post to Facebook"] = "放在Facebook"; -$a->strings["%s:"] = "%s:"; -$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = "发送到Facebook取消由于多网络准许矛盾。"; -$a->strings["View on Friendica"] = "看在Friendica"; -$a->strings["Facebook post failed. Queued for retry."] = "Facebook发送失败了。排队着待再试。"; -$a->strings["Administrator"] = "管理员"; -$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "您Facebook联系成无效的。请再认证。"; -$a->strings["Facebook connection became invalid"] = "Facebook联系成无效的"; diff --git a/fbsync/README.md b/fbsync/README.md deleted file mode 100644 index c35d27b3..00000000 --- a/fbsync/README.md +++ /dev/null @@ -1,5 +0,0 @@ -> # Note -> **Facebook Connector, Facebook Post Connector and Facebook Sync plugins are deprecated.** -> As of the moment you cannot bridge from or to Facebook with Friendica. - - diff --git a/fbsync/fbsync.css b/fbsync/fbsync.css deleted file mode 100755 index 9b577aba..00000000 --- a/fbsync/fbsync.css +++ /dev/null @@ -1,15 +0,0 @@ - -#fbsync-enable-label, #fbsync-create_user-label { - float: left; - width: 200px; - margin-top: 10px; -} - -#fbsync-checkbox, #fbsync-create_user { - float: left; - margin-top: 10px; -} - -#fbsync-submit { - margin-top: 15px; -} diff --git a/fbsync/fbsync.php b/fbsync/fbsync.php deleted file mode 100644 index 07f6dcf1..00000000 --- a/fbsync/fbsync.php +++ /dev/null @@ -1,1146 +0,0 @@ - - * Status: Unsupported - */ - -/* To-Do -FBSync: -- B: Threading for incoming comments -- C: Receiving likes for comments - -FBPost: -- A: Posts to pages currently have the page as sender - not the user -- B: Sending likes for comments -- C: Threading for sent comments -*/ - -require_once("addon/fbpost/fbpost.php"); - -define('FBSYNC_DEFAULT_POLL_INTERVAL', 5); // given in minutes - -function fbsync_install() { - register_hook('connector_settings', 'addon/fbsync/fbsync.php', 'fbsync_settings'); - 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() { - unregister_hook('connector_settings', 'addon/fbsync/fbsync.php', 'fbsync_settings'); - 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") && !strstr($contact["url"], "://facebook.com") && !strstr($contact["url"], "@facebook.com")) - return; - - // contact seems to be a facebook contact, so continue - $nickname = preg_replace("=https?://.*facebook.com/([\w.]*).*=ism", "$1", $contact["url"]); - $nickname = str_replace("@facebook.com", "", $nickname); - - $uid = $a->user["uid"]; - - $access_token = get_pconfig($uid,'facebook','access_token'); - - $fql = array( - "profile" => "SELECT id, pic_square, url, username, name FROM profile WHERE username = '$nickname'", - "avatar" => "SELECT url FROM square_profile_pic WHERE id IN (SELECT id FROM #profile) AND size = 256"); - - $url = "https://graph.facebook.com/fql?q=".urlencode(json_encode($fql))."&access_token=".$access_token; - - $feed = fetch_url($url); - $data = json_decode($feed); - - $id = 0; - - logger("fbsync_follow: Query id for nickname ".$nickname, LOGGER_DEBUG); - - if (!is_array($data->data)) - return; - - $contactdata = new stdClass; - - foreach($data->data AS $query) { - switch ($query->name) { - case "profile": - $contactdata->id = number_format($query->fql_result_set[0]->id, 0, '', ''); - $contactdata->pic_square = $query->fql_result_set[0]->pic_square; - $contactdata->url = $query->fql_result_set[0]->url; - $contactdata->username = $query->fql_result_set[0]->username; - $contactdata->name = $query->fql_result_set[0]->name; - break; - - case "avatar": - $contactdata->pic_square = $query->fql_result_set[0]->url; - break; - } - } - - logger("fbsync_follow: Got contact for nickname ".$nickname." ".print_r($contactdata, true), LOGGER_DEBUG); - - // Create contact - fbsync_fetch_contact($uid, $contactdata, true); - - $r = q("SELECT name,nick,url,addr,batch,notify,poll,request,confirm,poco,photo,priority,network,alias,pubkey - FROM `contact` WHERE `uid` = %d AND `alias` = '%s'", - intval($uid), - dbesc("facebook::".$contactdata->id)); - if (count($r)) - $contact["contact"] = $r[0]; -} - - -function fbsync_settings(&$a,&$s) { - - // Settings are done inside the fbpost addon - return; - - 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 variables */ - - $enabled = get_pconfig(local_user(),'fbsync','sync'); - - $checked = (($enabled) ? ' checked="checked" ' : ''); - - $def_enabled = get_pconfig(local_user(),'fbsync','create_user'); - - $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); - - /* Add some HTML to the existing form */ - - $s .= ''; - $s .= '

'. t('Facebook Import').'

'; - $s .= '
'; - $s .= ''; - -} - -function fbsync_settings_post(&$a,&$b) { - - if(x($_POST,'fbsync-submit')) { - set_pconfig(local_user(),'fbsync','sync',intval($_POST['fbsync'])); - set_pconfig(local_user(),'fbsync','create_user',intval($_POST['create_user'])); - } -} - -function fbsync_cron($a,$b) { - $last = get_config('fbsync','last_poll'); - - $poll_interval = intval(get_config('fbsync','poll_interval')); - if(! $poll_interval) - $poll_interval = FBSYNC_DEFAULT_POLL_INTERVAL; - - if($last) { - $next = $last + ($poll_interval * 60); - if($next > time()) { - logger('fbsync_cron: poll intervall not reached'); - return; - } - } - logger('fbsync_cron: cron_start'); - - $abandon_days = intval(get_config('system','account_abandon_days')); - if ($abandon_days < 1) - $abandon_days = 0; - - $abandon_limit = date("Y-m-d H:i:s", time() - $abandon_days * 86400); - - $r = q("SELECT * FROM `pconfig` WHERE `cat` = 'fbsync' AND `k` = 'sync' AND `v` = '1' ORDER BY RAND()"); - if(count($r)) { - foreach($r as $rr) { - - if ($abandon_days != 0) { - $user = q("SELECT `login_date` FROM `user` WHERE uid=%d AND `login_date` >= '%s'", $rr['uid'], $abandon_limit); - if (!count($user)) { - logger('abandoned account: timeline from user '.$rr['uid'].' will not be imported'); - continue; - } - } - - fbsync_get_self($rr['uid']); - - logger('fbsync_cron: importing timeline from user '.$rr['uid']); - fbsync_fetchfeed($a, $rr['uid']); - } - } - - logger('fbsync_cron: cron_end'); - - set_config('fbsync','last_poll', time()); -} - -function fbsync_expire($a,$b) { - - $days = get_config('fbsync', 'expire'); - - if ($days == 0) - return; - - $r = q("DELETE FROM `item` WHERE `deleted` AND `network` = '%s'", dbesc(NETWORK_FACEBOOK)); - - require_once("include/items.php"); - - logger('fbsync_expire: expire_start'); - - $r = q("SELECT * FROM `pconfig` WHERE `cat` = 'fbsync' AND `k` = 'sync' AND `v` = '1' ORDER BY RAND()"); - if(count($r)) { - foreach($r as $rr) { - logger('fbsync_expire: user '.$rr['uid']); - item_expire($rr['uid'], $days, NETWORK_FACEBOOK, true); - } - } - - logger('fbsync_expire: expire_end'); -} - -function fbsync_createpost($a, $uid, $self, $contacts, $applications, $post, $create_user) { - - $access_token = get_pconfig($uid,'facebook','access_token'); - - require_once("include/oembed.php"); - require_once("include/network.php"); - require_once("include/items.php"); - - // check if it was already imported - $r = q("SELECT * FROM `item` WHERE `uid` = %d AND `uri` = '%s' LIMIT 1", - intval($uid), - dbesc('fb::'.$post->post_id) - ); - if(count($r)) - return; - - $postarray = array(); - $postarray['gravity'] = 0; - $postarray['uid'] = $uid; - $postarray['wall'] = 0; - - $postarray['verb'] = ACTIVITY_POST; - $postarray['object-type'] = ACTIVITY_OBJ_NOTE; // default value - is maybe changed later when media is attached - $postarray['network'] = dbesc(NETWORK_FACEBOOK); - - $postarray['uri'] = "fb::".$post->post_id; - $postarray['thr-parent'] = $postarray['uri']; - $postarray['parent-uri'] = $postarray['uri']; - $postarray['plink'] = $post->permalink; - - $postarray['author-name'] = $contacts[$post->actor_id]->name; - $postarray['author-link'] = $contacts[$post->actor_id]->url; - $postarray['author-avatar'] = $contacts[$post->actor_id]->pic_square; - - $postarray['owner-name'] = $contacts[$post->source_id]->name; - $postarray['owner-link'] = $contacts[$post->source_id]->url; - $postarray['owner-avatar'] = $contacts[$post->source_id]->pic_square; - - $contact_id = 0; - - if (($post->parent_post_id != "") && ($post->actor_id == $post->source_id)) { - $pos = strpos($post->parent_post_id, "_"); - - if ($pos != 0) { - $user_id = substr($post->parent_post_id, 0, $pos); - - $userdata = fbsync_fetchuser($a, $uid, $user_id); - - $contact_id = $userdata["contact-id"]; - - $postarray['contact-id'] = $contact_id; - - if (array_key_exists("name", $userdata) && ($userdata["name"] != "") && !link_compare($userdata["link"], $postarray['author-link'])) { - $postarray['owner-name'] = $userdata["name"]; - $postarray['owner-link'] = $userdata["link"]; - $postarray['owner-avatar'] = $userdata["avatar"]; - - if (!intval(get_config('system','wall-to-wall_share'))) { - - $prebody = "[share author='".$postarray['author-name']. - "' profile='".$postarray['author-link']. - "' avatar='".$postarray['author-avatar']."']"; - - $postarray['author-name'] = $postarray['owner-name']; - $postarray['author-link'] = $postarray['owner-link']; - $postarray['author-avatar'] = $postarray['owner-avatar']; - } - } - } - } - - if ($contact_id <= 0) { - if ($post->actor_id != $post->source_id) { - // Testing if we know the source or the actor - $contact_id = fbsync_fetch_contact($uid, $contacts[$post->source_id], false); - - if (($contact_id == 0) && array_key_exists($post->actor_id, $contacts)) - $contact_id = fbsync_fetch_contact($uid, $contacts[$post->actor_id], false); - - // If we don't know anyone, we guess we should know the source. Could be the wrong decision - if ($contact_id == 0) - $contact_id = fbsync_fetch_contact($uid, $contacts[$post->source_id], $create_user); - } else - $contact_id = fbsync_fetch_contact($uid, $contacts[$post->source_id], $create_user); - - - if ($contact_id == -1) { - logger('fbsync_createpost: Contact is blocked. Post not imported '.print_r($post, true), LOGGER_DEBUG); - return; - } elseif (($contact_id <= 0) && !$create_user) { - logger('fbsync_createpost: No matching contact found. Post not imported '.print_r($post, true), LOGGER_DEBUG); - return; - } elseif ($contact_id == 0) { - // This case should never happen - logger('fbsync_createpost: No matching contact found. Using own id. (Should never happen) '.print_r($post, true), LOGGER_DEBUG); - $contact_id = $self[0]["id"]; - } - - $postarray['contact-id'] = $contact_id; - } - - $postarray["body"] = (isset($post->message) ? escape_tags($post->message) : ''); - - $msgdata = fbsync_convertmsg($a, $postarray["body"]); - - $postarray["body"] = $msgdata["body"]; - $postarray["tag"] = $msgdata["tags"]; - - // Change the object type when an attachment is present - if (isset($post->attachment->fb_object_type)) - logger('fb_object_type: '.$post->attachment->fb_object_type." ".print_r($post->attachment, true), LOGGER_DEBUG); - switch ($post->attachment->fb_object_type) { - case 'photo': - $postarray['object-type'] = ACTIVITY_OBJ_IMAGE; // photo is deprecated: http://activitystrea.ms/head/activity-schema.html#image - break; - case 'video': - $postarray['object-type'] = ACTIVITY_OBJ_VIDEO; - break; - case '': - //$postarray['object-type'] = ACTIVITY_OBJ_BOOKMARK; - break; - default: - logger('Unknown object type '.$post->attachment->fb_object_type, LOGGER_DEBUG); - break; - } - - $pagedata = array(); - $content = ""; - $pagedata["type"] = ""; - - if (isset($post->attachment->name) && isset($post->attachment->href)) { - $post->attachment->href = original_url($post->attachment->href); - $oembed_data = oembed_fetch_url($post->attachment->href); - $pagedata["type"] = $oembed_data->type; - if ($pagedata["type"] == "rich") - $pagedata["type"] = "link"; - - $pagedata["url"] = $post->attachment->href; - $pagedata["title"] = $post->attachment->name; - $content = "[bookmark=".$post->attachment->href."]".$post->attachment->name."[/bookmark]"; - - // If a link is not only attached but also added in the body, look if it can be removed in the body. - $removedlink = trim(str_replace($post->attachment->href, "", $postarray["body"])); - - if (($removedlink == "") || strstr($postarray["body"], $removedlink)) - $postarray["body"] = $removedlink; - - } elseif (isset($post->attachment->name) && ($post->attachment->name != "")) - $content = "[b]" . $post->attachment->name."[/b]"; - - $pagedata["text"] = ""; - if (isset($post->attachment->description) && ($post->attachment->fb_object_type != "photo")) - $pagedata["text"] = $post->attachment->description; - - if (isset($post->attachment->caption) && ($post->attachment->fb_object_type == "photo")) - $pagedata["text"] = $post->attachment->caption; - - if ($pagedata["text"].$post->attachment->href.$content.$postarray["body"] == "") - return; - - if (isset($post->attachment->media) && (($pagedata["type"] == "") || ($pagedata["type"] == "link"))) { - foreach ($post->attachment->media AS $media) { - - if (isset($media->type)) - $pagedata["type"] = $media->type; - - if (isset($media->src)) - $pagedata["images"][0]["src"] = $media->src; - - if (isset($media->photo)) { - if (isset($media->photo->images) && (count($media->photo->images) > 1)) - $pagedata["images"][0]["src"] = $media->photo->images[1]->src; - - if (isset($media->photo->fbid)) { - logger('fbsync_createpost: fetching fbid '.$media->photo->fbid, LOGGER_DEBUG); - $url = "https://graph.facebook.com/".$media->photo->fbid."?access_token=".$access_token; - $feed = fetch_url($url); - $data = json_decode($feed); - if (isset($data->images)) { - $pagedata["images"][0]["src"] = $data->images[0]->source; - logger('fbsync_createpost: got fbid '.$media->photo->fbid.' image '.$pagedata["images"][0]["src"], LOGGER_DEBUG); - } else - logger('fbsync_createpost: error fetching fbid '.$media->photo->fbid.' '.print_r($data, true), LOGGER_DEBUG); - } - } - - $pagedata["images"][0]["src"] = fbpost_cleanpicture($pagedata["images"][0]["src"]); - - if (isset($media->href) && ($pagedata["images"][0]["src"] != "") && ($media->href != "")) { - $media->href = original_url($media->href); - $pagedata["url"] = $media->href; - $content .= "\n".'[url='.$media->href.'][img]'.$pagedata["images"][0]["src"].'[/img][/url]'; - } else { - if ($pagedata["images"][0]["src"] != "") - $content .= "\n".'[img]'.$pagedata["images"][0]["src"].'[/img]'; - - // if just a link, it may be a wall photo - check - if (isset($post->link)) - $content .= fbpost_get_photo($media->href); - } - } - } - - if ($pagedata["type"] != "") { - if ($pagedata["type"] == "link") - $postarray["object-type"] = ACTIVITY_OBJ_BOOKMARK; - - $postarray["body"] .= add_page_info_data($pagedata); - } else { - if ($content) - $postarray["body"] .= "\n".trim($content); - - if ($pagedata["text"]) - $postarray["body"] .= "\n[quote]".trim($pagedata["text"])."[/quote]"; - - $postarray["body"] = trim($postarray["body"]); - } - - if (trim($postarray["body"]) == "") - return; - - if ($prebody != "") - $postarray["body"] = $prebody.$postarray["body"]."[/share]"; - - $postarray['created'] = datetime_convert('UTC','UTC',date("c", $post->created_time)); - $postarray['edited'] = datetime_convert('UTC','UTC',date("c", $post->updated_time)); - - $postarray['app'] = $applications[$post->app_id]->display_name; - - if ($postarray['app'] == "") - $postarray['app'] = "Facebook"; - - if(isset($post->privacy) && $post->privacy->value !== '') { - $postarray['private'] = 1; - $postarray['allow_cid'] = '<' . $self[0]['id'] . '>'; - } - - /* - $postarray["location"] = $post->place->name; - postarray["coord"] = $post->geo->coordinates[0]." ".$post->geo->coordinates[1]; - */ - - //$types = array(46, 80, 237, 247, 308); - //if (!in_array($post->type, $types)) - // $postarray["body"] = "Type: ".$post->type."\n".$postarray["body"]; - //print_r($post); - //print_r($postarray); - $item = item_store($postarray); - logger('fbsync_createpost: User '.$self[0]["nick"].' posted feed item '.$item, LOGGER_DEBUG); -} - -function fbsync_createcomment($a, $uid, $self_id, $self, $user, $contacts, $applications, $comment) { - - // check if it was already imported - $r = q("SELECT `uri` FROM `item` WHERE `uid` = %d AND `uri` = '%s' LIMIT 1", - intval($uid), - dbesc('fb::'.$comment->id) - ); - if(count($r)) - return; - - // check if it was an own post (separate posting for performance reasons) - $r = q("SELECT `uri` FROM `item` WHERE `uid` = %d AND `extid` = '%s' LIMIT 1", - intval($uid), - dbesc('fb::'.$comment->id) - ); - if(count($r)) - return; - - $parent_uri = ""; - $parent_contact = 0; - $parent_nick = ""; - - // Fetch the parent uri (Checking if the parent exists) - $r = q("SELECT `uri`, `contact-id` FROM `item` WHERE `uid` = %d AND `uri` = '%s' LIMIT 1", - intval($uid), - dbesc('fb::'.$comment->post_id) - ); - if(count($r)) { - $parent_uri = $r[0]["uri"]; - $parent_contact = $r[0]["contact-id"]; - } - - // check if it is a reply to an own post (separate posting for performance reasons) - $r = q("SELECT `uri`, `contact-id` FROM `item` WHERE `uid` = %d AND `extid` = '%s' LIMIT 1", - intval($uid), - dbesc('fb::'.$comment->post_id) - ); - if(count($r)) { - $parent_uri = $r[0]["uri"]; - $parent_contact = $r[0]["contact-id"]; - } - - // No parent? Then quit - if ($parent_uri == "") - return; - - //logger("fbsync_createcomment: Checking if parent contact is blocked: ".$parent_contact." - ".$parent_uri, LOGGER_DEBUG); - - // Check if the contact id was blocked - if ($parent_contact > 0) { - $r = q("SELECT `blocked`, `readonly`, `nick` FROM `contact` WHERE `uid` = %d AND `id` = %d LIMIT 1", - intval($uid), intval($parent_contact)); - - // Should only happen if someone deleted the contact manually - if(!count($r)) { - logger("fbsync_createcomment: UID ".$uid." - Contact ".$parent_contact." doesn't seem to exist.", LOGGER_DEBUG); - return; - } - - // Is blocked? Then return - if ($r[0]["readonly"] || $r[0]["blocked"]) { - logger("fbsync_createcomment: UID ".$uid." - Contact '".$r[0]["nick"]."' is blocked or readonly.", LOGGER_DEBUG); - return; - } - - $parent_nick = $r[0]["nick"]; - logger("fbsync_createcomment: UID ".$uid." - Contact '".$r[0]["nick"]."' isn't blocked. ".print_r($r, true), LOGGER_DEBUG); - } - - $postarray = array(); - $postarray['gravity'] = 0; - $postarray['uid'] = $uid; - $postarray['wall'] = 0; - - $postarray['verb'] = ACTIVITY_POST; - $postarray['object-type'] = ACTIVITY_OBJ_COMMENT; - $postarray['network'] = dbesc(NETWORK_FACEBOOK); - - $postarray['uri'] = "fb::".$comment->id; - $postarray['thr-parent'] = $parent_uri; - $postarray['parent-uri'] = $parent_uri; - //$postarray['plink'] = $comment->permalink; - - $contact_id = fbsync_fetch_contact($uid, $contacts[$comment->fromid], array(), false); - - $contact_nick = $contacts[$comment->fromid]->name; - - if ($contact_id == -1) { - logger('fbsync_createcomment: Contact was blocked. Comment not imported '.print_r($comment, true), LOGGER_DEBUG); - return; - } - - // If no contact was found, take it from the thread owner - if ($contact_id <= 0) { - $contact_id = $parent_contact; - $contact_nick = $parent_nick; - } - - // This case here should never happen - if ($contact_id <= 0) { - $contact_id = $self[0]["id"]; - $contact_nick = $self[0]["nick"]; - } - - if ($comment->fromid != $self_id) { - $postarray['contact-id'] = $contact_id; - $postarray['owner-name'] = $contacts[$comment->fromid]->name; - $postarray['owner-link'] = $contacts[$comment->fromid]->url; - $postarray['owner-avatar'] = $contacts[$comment->fromid]->pic_square; - } else { - $postarray['contact-id'] = $self[0]["id"]; - $postarray['owner-name'] = $self[0]["name"]; - $postarray['owner-link'] = $self[0]["url"]; - $postarray['owner-avatar'] = $self[0]["photo"]; - $contact_nick = $self[0]["nick"]; - } - - $postarray['author-name'] = $postarray['owner-name']; - $postarray['author-link'] = $postarray['owner-link']; - $postarray['author-avatar'] = $postarray['owner-avatar']; - - $msgdata = fbsync_convertmsg($a, $comment->text); - - $postarray["body"] = $msgdata["body"]; - $postarray["tag"] = $msgdata["tags"]; - - $postarray['created'] = datetime_convert('UTC','UTC',date("c", $comment->time)); - $postarray['edited'] = datetime_convert('UTC','UTC',date("c", $comment->time)); - - $postarray['app'] = $applications[$comment->app_id]->display_name; - - if ($postarray['app'] == "") - $postarray['app'] = "Facebook"; - - if (trim($postarray["body"]) == "") - return; - - $item = item_store($postarray); - $postarray["id"] = $item; - - logger('fbsync_createcomment: UID '.$uid.' - CID '.$postarray['contact-id'].' - Nick '.$contact_nick.' posted comment '.$item, LOGGER_DEBUG); - - if ($item == 0) - return; - - $myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 AND `deleted` = 0", - dbesc($postarray['parent-uri']), - intval($uid) - ); - - if(count($myconv)) { - $importer_url = $a->get_baseurl() . '/profile/' . $user[0]['nickname']; - - $own_contact = q("SELECT * FROM `contact` WHERE `uid` = %d AND `alias` = '%s' LIMIT 1", - intval($uid), dbesc("facebook::".$self_id)); - - if (!count($own_contact)) - return; - - foreach($myconv as $conv) { - - // now if we find a match, it means we're in this conversation - if(!link_compare($conv['author-link'],$importer_url) && !link_compare($conv['author-link'],$own_contact[0]["url"])) - continue; - - require_once('include/enotify.php'); - - $conv_parent = $conv['parent']; - - $notifyarr = array( - 'type' => NOTIFY_COMMENT, - 'notify_flags' => $user[0]['notify-flags'], - 'language' => $user[0]['language'], - 'to_name' => $user[0]['username'], - 'to_email' => $user[0]['email'], - 'uid' => $user[0]['uid'], - 'item' => $postarray, - 'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($item)), - 'source_name' => $postarray['author-name'], - 'source_link' => $postarray['author-link'], - 'source_photo' => $postarray['author-avatar'], - 'verb' => ACTIVITY_POST, - 'otype' => 'item', - 'parent' => $conv_parent, - ); - - notification($notifyarr); - - // only send one notification - break; - } - } -} - -function fbsync_createlike($a, $uid, $self_id, $self, $contacts, $like) { - - $r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc("fb::".$like->post_id), - intval($uid) - ); - - if (count($r)) - $orig_post = $r[0]; - else - return; - - // If we posted the like locally, it will be found with our url, not the FB url. - - $second_url = (($like->user_id == $self_id) ? $self[0]["url"] : $contacts[$like->user_id]->url); - - $r = q("SELECT * FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `verb` = '%s' - AND (`author-link` = '%s' OR `author-link` = '%s') LIMIT 1", - dbesc($orig_post["uri"]), - intval($uid), - dbesc(ACTIVITY_LIKE), - dbesc($contacts[$like->user_id]->url), - dbesc($second_url) - ); - - if (count($r)) - return; - - $contact_id = fbsync_fetch_contact($uid, $contacts[$like->user_id], array(), false); - - if ($contact_id <= 0) - $contact_id = $self[0]["id"]; - - $likedata = array(); - $likedata['parent'] = $orig_post['id']; - - $likedata['verb'] = ACTIVITY_LIKE; - $likedata['object-type'] = ACTIVITY_OBJ_NOTE; - $likedate['network'] = dbesc(NETWORK_FACEBOOK); - - $likedata['gravity'] = 3; - $likedata['uid'] = $uid; - $likedata['wall'] = 0; - $likedata['uri'] = item_new_uri($a->get_baseurl(), $uid); - $likedata['parent-uri'] = $orig_post["uri"]; - $likedata['app'] = "Facebook"; - - if ($like->user_id != $self_id) { - $likedata['contact-id'] = $contact_id; - $likedata['author-name'] = $contacts[$like->user_id]->name; - $likedata['author-link'] = $contacts[$like->user_id]->url; - $likedata['author-avatar'] = $contacts[$like->user_id]->pic_square; - } else { - $likedata['contact-id'] = $self[0]["id"]; - $likedata['author-name'] = $self[0]["name"]; - $likedata['author-link'] = $self[0]["url"]; - $likedata['author-avatar'] = $self[0]["photo"]; - } - - $author = '[url=' . $likedata['author-link'] . ']' . $likedata['author-name'] . '[/url]'; - - $objauthor = '[url=' . $orig_post['author-link'] . ']' . $orig_post['author-name'] . '[/url]'; - $post_type = t('status'); - - $plink = '[url=' . $orig_post['plink'] . ']' . $post_type . '[/url]'; - $likedata['object-type'] = ACTIVITY_OBJ_NOTE; - - $likedata['body'] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink); - - $likedata['object'] = '' . ACTIVITY_OBJ_NOTE . '1' . - '' . $orig_post['uri'] . '' . xmlify('') . '' . $orig_post['title'] . '' . $orig_post['body'] . ''; - - - $r = q("SELECT * FROM `item` WHERE `parent-uri` = '%s' AND `author-link` = '%s' AND `verb` = '%s' AND `uid` = %d LIMIT 1", - dbesc($likedata['parent-uri']), - dbesc($likedata['author-link']), - dbesc(ACTIVITY_LIKE), - intval($uid) - ); - - if (count($r)) - return; - - $item = item_store($likedata); - logger('fbsync_createlike: liked item '.$item.'. User '.$self[0]["nick"], LOGGER_DEBUG); -} - -function fbsync_fetch_contact($uid, $contact, $create_user) { - - if($contact->url == "") - return(0); - - // Check if the unique contact is existing - // To-Do: only update once a while - $r = q("SELECT id FROM unique_contacts WHERE url='%s' LIMIT 1", - dbesc(normalise_link($contact->url))); - - if (count($r) == 0) - q("INSERT INTO unique_contacts (url, name, nick, avatar) VALUES ('%s', '%s', '%s', '%s')", - dbesc(normalise_link($contact->url)), - dbesc($contact->name), - dbesc($contact->username), - dbesc($contact->pic_square)); - else - q("UPDATE unique_contacts SET name = '%s', nick = '%s', avatar = '%s' WHERE url = '%s'", - dbesc($contact->name), - dbesc($contact->username), - dbesc($contact->pic_square), - dbesc(normalise_link($contact->url))); - - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `alias` = '%s' LIMIT 1", - intval($uid), dbesc("facebook::".$contact->id)); - - if(!count($r) && !$create_user) - return(0); - - if (count($r) && ($r[0]["readonly"] || $r[0]["blocked"])) { - logger("fbsync_fetch_contact: Contact '".$r[0]["nick"]."' is blocked or readonly.", LOGGER_DEBUG); - return(-1); - } - - $avatarpicture = $contact->pic_square; - - if(!count($r)) { - // create contact record - q("INSERT INTO `contact` (`uid`, `created`, `url`, `nurl`, `addr`, `alias`, `notify`, `poll`, - `name`, `nick`, `photo`, `network`, `rel`, `priority`, - `writable`, `blocked`, `readonly`, `pending`) - VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, 0, 0, 0)", - intval($uid), - dbesc(datetime_convert()), - dbesc($contact->url), - dbesc(normalise_link($contact->url)), - dbesc($contact->username."@facebook.com"), - dbesc("facebook::".$contact->id), - dbesc($contact->id), - dbesc("facebook::".$contact->id), - dbesc($contact->name), - dbesc($contact->username), - dbesc($avatarpicture), - dbesc(NETWORK_FACEBOOK), - intval(CONTACT_IS_FRIEND), - intval(1), - intval(1) - ); - - $r = q("SELECT * FROM `contact` WHERE `alias` = '%s' AND `uid` = %d LIMIT 1", - dbesc("facebook::".$contact->id), - intval($uid) - ); - - if(! count($r)) - return(false); - - $contact_id = $r[0]['id']; - - $g = q("SELECT def_gid FROM user WHERE uid = %d LIMIT 1", - intval($uid) - ); - - if($g && intval($g[0]['def_gid'])) { - require_once('include/group.php'); - group_add_member($uid,'',$contact_id,$g[0]['def_gid']); - } - - require_once("Photo.php"); - - $photos = import_profile_photo($avatarpicture,$uid,$contact_id); - - q("UPDATE `contact` SET `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s' - WHERE `id` = %d", - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($contact_id) - ); - } else { - // update profile photos once every 12 hours as we have no notification of when they change. - $update_photo = ($r[0]['avatar-date'] < datetime_convert('','','now -12 hours')); - - // check that we have all the photos, this has been known to fail on occasion - if((! $r[0]['photo']) || (! $r[0]['thumb']) || (! $r[0]['micro']) || ($update_photo)) { - - logger("fbsync_fetch_contact: Updating contact ".$contact->username, LOGGER_DEBUG); - - require_once("Photo.php"); - - $photos = import_profile_photo($avatarpicture, $uid, $r[0]['id']); - - q("UPDATE `contact` SET `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s', - `url` = '%s', - `nurl` = '%s', - `addr` = '%s', - `name` = '%s', - `nick` = '%s', - `notify` = '%s' - WHERE `id` = %d", - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc($contact->url), - dbesc(normalise_link($contact->url)), - dbesc($contact->username."@facebook.com"), - dbesc($contact->name), - dbesc($contact->username), - dbesc($contact->id), - intval($r[0]['id']) - ); - } - } - return($r[0]["id"]); -} - -function fbsync_get_self($uid) { - $access_token = get_pconfig($uid,'facebook','access_token'); - if(! $access_token) - return; - $s = fetch_url('https://graph.facebook.com/me/?access_token=' . $access_token); - if($s) { - $j = json_decode($s); - set_pconfig($uid,'fbsync','self_id',(string) $j->id); - } -} - -function fbsync_convertmsg($a, $body) { - $str_tags = ''; - - $tags = get_tags($body); - - if(count($tags)) { - foreach($tags as $tag) { - if (strstr(trim($tag), " ")) - continue; - - if(strpos($tag,'#') === 0) { - if(strpos($tag,'[url=')) - continue; - - // don't link tags that are already embedded in links - - if(preg_match('/\[(.*?)' . preg_quote($tag,'/') . '(.*?)\]/',$body)) - continue; - if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag,'/') . '(.*?)\)/',$body)) - continue; - - $basetag = str_replace('_',' ',substr($tag,1)); - $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body); - if(strlen($str_tags)) - $str_tags .= ','; - $str_tags .= '#[url=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]'; - continue; - } elseif(strpos($tag,'@') === 0) { - $basetag = substr($tag,1); - $body = str_replace($tag,'@[url=https://twitter.com/' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body); - } - - } - } - - $cnt = preg_match_all('/@\[url=(.*?)\[\/url\]/ism',$body,$matches,PREG_SET_ORDER); - if($cnt) { - foreach($matches as $mtch) { - if(strlen($str_tags)) - $str_tags .= ','; - $str_tags .= '@[url=' . $mtch[1] . '[/url]'; - } - } - - return(array("body"=>$body, "tags"=>$str_tags)); - -} - -function fbsync_fetchuser($a, $uid, $id) { - $access_token = get_pconfig($uid,'facebook','access_token'); - $self_id = get_pconfig($uid,'fbsync','self_id'); - - $user = array(); - - $contact = q("SELECT `id`, `name`, `url`, `photo` FROM `contact` WHERE `uid` = %d AND `alias` = '%s' LIMIT 1", - intval($uid), dbesc("facebook::".$id)); - - if (count($contact)) { - if (($contact[0]["readonly"] || $contact[0]["blocked"])) { - logger("fbsync_fetchuser: Contact '".$contact[0]["nick"]."' is blocked or readonly.", LOGGER_DEBUG); - $user["contact-id"] = -1; - } else - $user["contact-id"] = $contact[0]["id"]; - - $user["name"] = $contact[0]["name"]; - $user["link"] = $contact[0]["url"]; - $user["avatar"] = $contact[0]["photo"]; - - return($user); - } - - $own_contact = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `alias` = '%s' LIMIT 1", - intval($uid), dbesc("facebook::".$self_id)); - - if (!count($own_contact)) - return($user); - - $fql = "SELECT name, url, pic_square FROM profile WHERE id = ".$id; - - $url = "https://graph.facebook.com/fql?q=".urlencode($fql)."&access_token=".$access_token; - - $feed = fetch_url($url); - $data = json_decode($feed); - - if (is_array($data->data)) { - $user["contact-id"] = $own_contact[0]["id"]; - $user["name"] = $data->data[0]->name; - $user["link"] = $data->data[0]->url; - $user["avatar"] = $data->data[0]->pic_square; - } - return($user); -} - -function fbsync_fetchfeed($a, $uid) { - $access_token = get_pconfig($uid,'facebook','access_token'); - $last_updated = get_pconfig($uid,'fbsync','last_updated'); - $self_id = get_pconfig($uid,'fbsync','self_id'); - - $create_user = get_pconfig($uid, 'fbsync', 'create_user'); - $do_likes = get_config('fbsync', 'do_likes'); - - $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", - intval($uid) - ); - - $user = q("SELECT * FROM `user` WHERE `uid` = %d AND `account_expired` = 0 LIMIT 1", - intval($uid) - ); - if(! count($user)) - return; - - require_once('include/items.php'); - - if ($last_updated == "") - $last_updated = 0; - - logger("fbsync_fetchfeed: fetching content for user ".$self_id); - - $fql = array( - "posts" => "SELECT action_links, actor_id, app_data, app_id, attachment, attribution, comment_info, created_time, filter_key, like_info, message, message_tags, parent_post_id, permalink, place, post_id, privacy, share_count, share_info, source_id, subscribed, tagged_ids, type, updated_time, with_tags FROM stream where filter_key in (SELECT filter_key FROM stream_filter WHERE uid=me() AND type='newsfeed') AND updated_time > $last_updated ORDER BY updated_time DESC LIMIT 500", - "comments" => "SELECT app_id, attachment, post_id, id, likes, fromid, time, text, text_tags, user_likes, likes FROM comment WHERE post_id IN (SELECT post_id FROM #posts) ORDER BY time DESC LIMIT 500", - "profiles" => "SELECT id, name, username, url, pic_square FROM profile WHERE id IN (SELECT actor_id FROM #posts) OR id IN (SELECT fromid FROM #comments) OR id IN (SELECT source_id FROM #posts) LIMIT 500", - "applications" => "SELECT app_id, display_name FROM application WHERE app_id IN (SELECT app_id FROM #posts) OR app_id IN (SELECT app_id FROM #comments) LIMIT 500", - "avatars" => "SELECT id, real_size, size, url FROM square_profile_pic WHERE id IN (SELECT id FROM #profiles) AND size = 256 LIMIT 500"); - - if ($do_likes) { - $fql["likes"] = "SELECT post_id, user_id FROM like WHERE post_id IN (SELECT post_id FROM #posts)"; - $fql["profiles"] .= " OR id IN (SELECT user_id FROM #likes)"; - } - - $url = "https://graph.facebook.com/fql?q=".urlencode(json_encode($fql))."&access_token=".$access_token; - - $feed = fetch_url($url); - $data = json_decode($feed); - - if (!is_array($data->data)) { - logger("fbsync_fetchfeed: Error fetching data for user ".$uid.": ".print_r($data, true)); - return; - } - - $posts = array(); - $comments = array(); - $likes = array(); - $profiles = array(); - $applications = array(); - $avatars = array(); - - foreach($data->data AS $query) { - switch ($query->name) { - case "posts": - $posts = array_reverse($query->fql_result_set); - break; - case "comments": - $comments = $query->fql_result_set; - break; - case "likes": - $likes = $query->fql_result_set; - break; - case "profiles": - $profiles = $query->fql_result_set; - break; - case "applications": - $applications = $query->fql_result_set; - break; - case "avatars": - $avatars = $query->fql_result_set; - break; - } - } - - $square_avatars = array(); - $contacts = array(); - $application_data = array(); - $post_data = array(); - $comment_data = array(); - - foreach ($avatars AS $avatar) { - $avatar->id = number_format($avatar->id, 0, '', ''); - $square_avatars[$avatar->id] = $avatar; - } - unset($avatars); - - foreach ($profiles AS $profile) { - $profile->id = number_format($profile->id, 0, '', ''); - - if ($square_avatars[$profile->id]->url != "") - $profile->pic_square = $square_avatars[$profile->id]->url; - - $contacts[$profile->id] = $profile; - } - unset($profiles); - unset($square_avatars); - - foreach ($applications AS $application) { - $application->app_id = number_format($application->app_id, 0, '', ''); - $application_data[$application->app_id] = $application; - } - unset($applications); - - foreach ($posts AS $post) { - $post->actor_id = number_format($post->actor_id, 0, '', ''); - $post->source_id = number_format($post->source_id, 0, '', ''); - $post->app_id = number_format($post->app_id, 0, '', ''); - $post_data[$post->post_id] = $post; - } - unset($posts); - - foreach($comments AS $comment) { - $comment->fromid = number_format($comment->fromid, 0, '', ''); - $comment_data[$comment->id] = $comment; - } - unset($comments); - - foreach ($post_data AS $post) { - if ($post->updated_time > $last_updated) - $last_updated = $post->updated_time; - fbsync_createpost($a, $uid, $self, $contacts, $application_data, $post, $create_user); - } - - foreach ($comment_data AS $comment) { - fbsync_createcomment($a, $uid, $self_id, $self, $user, $contacts, $application_data, $comment); - } - - foreach($likes AS $like) { - $like->user_id = number_format($like->user_id, 0, '', ''); - - fbsync_createlike($a, $uid, $self_id, $self, $contacts, $like); - } - - set_pconfig($uid,'fbsync','last_updated', $last_updated); -} -?> diff --git a/fbsync/lang/C/messages.po b/fbsync/lang/C/messages.po deleted file mode 100644 index a333d3b8..00000000 --- a/fbsync/lang/C/messages.po +++ /dev/null @@ -1,43 +0,0 @@ -# ADDON fbsync -# Copyright (C) -# This file is distributed under the same license as the Friendica fbsync addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:44+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: fbsync.php:128 fbsync.php:132 -msgid "Facebook Import" -msgstr "" - -#: fbsync.php:136 -msgid "Import Facebook newsfeed" -msgstr "" - -#: fbsync.php:141 -msgid "Automatically create contacts" -msgstr "" - -#: fbsync.php:147 -msgid "Save Settings" -msgstr "" - -#: fbsync.php:656 -msgid "status" -msgstr "" - -#: fbsync.php:661 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "" diff --git a/forumlist/forumlist.css b/forumlist/forumlist.css deleted file mode 100644 index 18c8e168..00000000 --- a/forumlist/forumlist.css +++ /dev/null @@ -1,22 +0,0 @@ - -#hide-forum-list { - opacity: 0.3; - filter:alpha(opacity=30); -} - -#hide-forum-list:hover { - opacity: 1.0; - filter:alpha(opacity=100); -} - - -#forumlist-settings-label, #forumlist-random-label, #forumlist-profile-label, #forumlist-network-label { - float: left; - width: 200px; - margin-bottom: 25px; -} - -#forumlist-max-forumlists, #forumlist-random, #forumlist-profile, #forumlist-network { - float: left; -} - diff --git a/forumlist/forumlist.php b/forumlist/forumlist.php deleted file mode 100644 index 63a8de84..00000000 --- a/forumlist/forumlist.php +++ /dev/null @@ -1,188 +0,0 @@ - - * based on pages plugin by - * Author: Michael Vogel - * Status: Unsupported - * - */ - -function forumlist_install() { - register_hook('network_mod_init', 'addon/forumlist/forumlist.php', 'forumlist_network_mod_init'); - register_hook('plugin_settings', 'addon/forumlist/forumlist.php', 'forumlist_plugin_settings'); - register_hook('plugin_settings_post', 'addon/forumlist/forumlist.php', 'forumlist_plugin_settings_post'); - register_hook('profile_advanced', 'addon/forumlist/forumlist.php', 'forumlist_profile_advanced'); - -} - -function forumlist_uninstall() { - unregister_hook('network_mod_init', 'addon/forumlist/forumlist.php', 'forumlist_network_mod_init'); - unregister_hook('plugin_settings', 'addon/forumlist/forumlist.php', 'forumlist_plugin_settings'); - unregister_hook('plugin_settings_post', 'addon/forumlist/forumlist.php', 'forumlist_plugin_settings_post'); - unregister_hook('profile_advanced', 'addon/forumlist/forumlist.php', 'forumlist_profile_advanced'); - -} - - -function forumlist_getpage($uid,$showhidden = true,$randomise = false, $showprivate = false) { - - - $forumlist = array(); - - $order = (($showhidden) ? '' : " and hidden = 0 "); - $order .= (($randomise) ? ' order by rand() ' : ' order by name asc '); - $select = "`forum` = 1"; - if ($showprivate) { - $select = "( `forum` = 1 OR `prv` = 1 )"; - } - - $contacts = q("SELECT `contact`.`id`, `contact`.`url`, `contact`.`name`, `contact`.`micro` from contact - WHERE `network`= 'dfrn' AND $select AND `uid` = %d - and blocked = 0 and hidden = 0 and pending = 0 and archive = 0 - $order ", - intval($uid) - ); - - // Look if the profile is a community page - foreach($contacts as $contact) { - $forumlist[] = array("url"=>$contact["url"], "name"=>$contact["name"], "id"=>$contact["id"], "micro"=>$contact['micro']); - } - return($forumlist); -} - -function forumlist_network_mod_init($a,$b) { - - if(! intval(get_pconfig(local_user(),'forumlist','show_on_network'))) - return; - - $a->page['htmlhead'] .= '' . "\r\n"; - - $forumlist = '
-
-

'.t("Forums").'

'; - - $forumlist .= '' - . '
"; - if (sizeof($contacts) > 0) - $a->page['aside'] = $forumlist . $a->page['aside']; -} - - -function forumlist_profile_advanced($a,&$b) { - $a->page['htmlhead'] .= '' . "\r\n"; - - $profile = intval(get_pconfig($a->profile['profile_uid'],'forumlist','show_on_profile')); - if(! $profile) - return; - - $forumlist = '
-
'.t("Forums:").'
-
'; - - // place holder in case somebody wants configurability - $show_total = 9999; - - $randomise = true; - - $contacts = forumlist_getpage($a->user['uid'],false,$randomise,false); - - $total_shown = 0; - $more = false; - - foreach($contacts as $contact) { - $forumlist .= micropro($contact,false,'forumlist-profile-advanced'); - $total_shown ++; - if($total_shown == $show_total) - break; - } - $forumlist .= '
'; - - if(count($contacts) > 0) - $b .= $forumlist; - -} - - - -function forumlist_plugin_settings_post($a,$post) { - if(! local_user() || (! x($_POST,'forumlist-settings-submit'))) - return; -// set_pconfig(local_user(),'forumlist','max_forumlists',intval($_POST['forumlist_max_forumlists'])); - set_pconfig(local_user(),'forumlist','randomise',intval($_POST['forumlist_random'])); - set_pconfig(local_user(),'forumlist','show_on_profile',intval($_POST['forumlist_profile'])); - set_pconfig(local_user(),'forumlist','show_on_network',intval($_POST['forumlist_network'])); - - info( t('Forumlist settings updated.') . EOL); -} - - -function forumlist_plugin_settings(&$a,&$s) { - - if(! local_user()) - return; - - /* Add our stylesheet to the forumlist so we can make our settings look nice */ - - $a->page['htmlhead'] .= '' . "\r\n"; - - /* Get the current state of our config variable */ - - $randomise = intval(get_pconfig(local_user(),'forumlist','randomise')); - $randomise_checked = (($randomise) ? ' checked="checked" ' : ''); - - $profile = intval(get_pconfig(local_user(),'forumlist','show_on_profile')); - $profile_checked = (($profile) ? ' checked="checked" ' : ''); - - $network = intval(get_pconfig(local_user(),'forumlist','show_on_network')); - $network_checked = (($network) ? ' checked="checked" ' : ''); - - - /* Add some HTML to the existing form */ - $s .= ''; - $s .= '

' . t('Forumlist') . '

'; - $s .= '
'; - $s .= ''; - -} - - diff --git a/forumlist/lang/C/messages.po b/forumlist/lang/C/messages.po deleted file mode 100644 index d905484d..00000000 --- a/forumlist/lang/C/messages.po +++ /dev/null @@ -1,58 +0,0 @@ -# ADDON forumlist -# Copyright (C) -# This file is distributed under the same license as the Friendica forumlist addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: forumlist.php:64 -msgid "Forums" -msgstr "" - -#: forumlist.php:67 -msgid "show/hide" -msgstr "" - -#: forumlist.php:81 -msgid "No forum subscriptions" -msgstr "" - -#: forumlist.php:98 -msgid "Forums:" -msgstr "" - -#: forumlist.php:134 -msgid "Forumlist settings updated." -msgstr "" - -#: forumlist.php:162 -msgid "Forumlist Settings" -msgstr "" - -#: forumlist.php:164 -msgid "Randomise forum list" -msgstr "" - -#: forumlist.php:167 -msgid "Show forums on profile page" -msgstr "" - -#: forumlist.php:170 -msgid "Show forums on network page" -msgstr "" - -#: forumlist.php:178 -msgid "Submit" -msgstr "" diff --git a/forumlist/lang/ca/strings.php b/forumlist/lang/ca/strings.php deleted file mode 100644 index 67c74335..00000000 --- a/forumlist/lang/ca/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Forums"] = "Forums"; -$a->strings["show/hide"] = "mostra/amaga"; -$a->strings["No forum subscriptions"] = "No hi ha subscripcions al fòrum"; -$a->strings["Forums:"] = "Fòrums:"; -$a->strings["Forumlist settings updated."] = "Ajustos de Forumlist actualitzats."; -$a->strings["Forumlist Settings"] = "Ajustos de Forumlist"; -$a->strings["Randomise forum list"] = ""; -$a->strings["Show forums on profile page"] = ""; -$a->strings["Show forums on network page"] = ""; -$a->strings["Submit"] = "Enviar"; diff --git a/forumlist/lang/cs/messages.po b/forumlist/lang/cs/messages.po deleted file mode 100644 index 6ce8d14b..00000000 --- a/forumlist/lang/cs/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON forumlist -# Copyright (C) -# This file is distributed under the same license as the Friendica forumlist addon package. -# -# -# Translators: -# Michal Šupler , 2014-2015 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-02-11 19:40+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" - -#: forumlist.php:64 -msgid "Forums" -msgstr "Fóra" - -#: forumlist.php:67 -msgid "show/hide" -msgstr "zobrazit/skrýt" - -#: forumlist.php:81 -msgid "No forum subscriptions" -msgstr "Žádné registrace k fórům" - -#: forumlist.php:98 -msgid "Forums:" -msgstr "Fóra:" - -#: forumlist.php:134 -msgid "Forumlist settings updated." -msgstr "Nastavení Forumlist aktualizováno." - -#: forumlist.php:162 -msgid "Forumlist Settings" -msgstr "Nastavení Forumlist" - -#: forumlist.php:164 -msgid "Randomise forum list" -msgstr "Zamíchat lis fór" - -#: forumlist.php:167 -msgid "Show forums on profile page" -msgstr "Zobrazit fóra na profilové stránce" - -#: forumlist.php:170 -msgid "Show forums on network page" -msgstr "Zobrazit fóra na stránce Síť" - -#: forumlist.php:178 -msgid "Submit" -msgstr "Odeslat" diff --git a/forumlist/lang/cs/strings.php b/forumlist/lang/cs/strings.php deleted file mode 100644 index ae22a864..00000000 --- a/forumlist/lang/cs/strings.php +++ /dev/null @@ -1,17 +0,0 @@ -=2 && $n<=4) ? 1 : 2;; -}} -; -$a->strings["Forums"] = "Fóra"; -$a->strings["show/hide"] = "zobrazit/skrýt"; -$a->strings["No forum subscriptions"] = "Žádné registrace k fórům"; -$a->strings["Forums:"] = "Fóra:"; -$a->strings["Forumlist settings updated."] = "Nastavení Forumlist aktualizováno."; -$a->strings["Forumlist Settings"] = "Nastavení Forumlist"; -$a->strings["Randomise forum list"] = "Zamíchat lis fór"; -$a->strings["Show forums on profile page"] = "Zobrazit fóra na profilové stránce"; -$a->strings["Show forums on network page"] = "Zobrazit fóra na stránce Síť"; -$a->strings["Submit"] = "Odeslat"; diff --git a/forumlist/lang/de/messages.po b/forumlist/lang/de/messages.po deleted file mode 100644 index 99b12995..00000000 --- a/forumlist/lang/de/messages.po +++ /dev/null @@ -1,61 +0,0 @@ -# ADDON forumlist -# Copyright (C) -# This file is distributed under the same license as the Friendica forumlist addon package. -# -# -# Translators: -# Abrax , 2014 -# bavatar , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2014-10-15 12:28+0000\n" -"Last-Translator: Abrax \n" -"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: forumlist.php:64 -msgid "Forums" -msgstr "Foren" - -#: forumlist.php:67 -msgid "show/hide" -msgstr "anzeigen/verbergen" - -#: forumlist.php:81 -msgid "No forum subscriptions" -msgstr "Keine Foren-Mitgliedschaften." - -#: forumlist.php:98 -msgid "Forums:" -msgstr "Foren:" - -#: forumlist.php:134 -msgid "Forumlist settings updated." -msgstr "Einstellungen zur Foren-Liste aktualisiert." - -#: forumlist.php:162 -msgid "Forumlist Settings" -msgstr "Foren-Liste Einstellungen" - -#: forumlist.php:164 -msgid "Randomise forum list" -msgstr "Zufällige Zusammenstellung der Foren-Liste" - -#: forumlist.php:167 -msgid "Show forums on profile page" -msgstr "Zeige die Liste der Foren auf der Profilseite" - -#: forumlist.php:170 -msgid "Show forums on network page" -msgstr "Zeige Foren auf der Netzwerk-Seite" - -#: forumlist.php:178 -msgid "Submit" -msgstr "Senden" diff --git a/forumlist/lang/de/strings.php b/forumlist/lang/de/strings.php deleted file mode 100644 index 382b6fc1..00000000 --- a/forumlist/lang/de/strings.php +++ /dev/null @@ -1,17 +0,0 @@ -strings["Forums"] = "Foren"; -$a->strings["show/hide"] = "anzeigen/verbergen"; -$a->strings["No forum subscriptions"] = "Keine Foren-Mitgliedschaften."; -$a->strings["Forums:"] = "Foren:"; -$a->strings["Forumlist settings updated."] = "Einstellungen zur Foren-Liste aktualisiert."; -$a->strings["Forumlist Settings"] = "Foren-Liste Einstellungen"; -$a->strings["Randomise forum list"] = "Zufällige Zusammenstellung der Foren-Liste"; -$a->strings["Show forums on profile page"] = "Zeige die Liste der Foren auf der Profilseite"; -$a->strings["Show forums on network page"] = "Zeige Foren auf der Netzwerk-Seite"; -$a->strings["Submit"] = "Senden"; diff --git a/forumlist/lang/eo/strings.php b/forumlist/lang/eo/strings.php deleted file mode 100644 index 23f9a682..00000000 --- a/forumlist/lang/eo/strings.php +++ /dev/null @@ -1,9 +0,0 @@ -strings["Forums"] = "Forumoj"; -$a->strings["show/hide"] = ""; -$a->strings["No forum subscriptions"] = ""; -$a->strings["Forums:"] = "Forumoj:"; -$a->strings["Forumlist settings updated."] = ""; -$a->strings["Forumlist Settings"] = ""; -$a->strings["Submit"] = "Sendi"; diff --git a/forumlist/lang/es/messages.po b/forumlist/lang/es/messages.po deleted file mode 100644 index 5280a1cb..00000000 --- a/forumlist/lang/es/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON forumlist -# Copyright (C) -# This file is distributed under the same license as the Friendica forumlist addon package. -# -# -# Translators: -# Alberto Díaz Tormo , 2016 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2016-10-23 11:41+0000\n" -"Last-Translator: Alberto Díaz Tormo \n" -"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: forumlist.php:64 -msgid "Forums" -msgstr "Foros" - -#: forumlist.php:67 -msgid "show/hide" -msgstr "mostrar/ocultar" - -#: forumlist.php:81 -msgid "No forum subscriptions" -msgstr "Sin subscripciones de foro" - -#: forumlist.php:98 -msgid "Forums:" -msgstr "Foros:" - -#: forumlist.php:134 -msgid "Forumlist settings updated." -msgstr "Ajustes de la lista de foros actualizados." - -#: forumlist.php:162 -msgid "Forumlist Settings" -msgstr "Ajustes de la lista de foros" - -#: forumlist.php:164 -msgid "Randomise forum list" -msgstr "Aleatorizar la lista de foros" - -#: forumlist.php:167 -msgid "Show forums on profile page" -msgstr "Mostrar foros en la página de perfil" - -#: forumlist.php:170 -msgid "Show forums on network page" -msgstr "Mostrar foros en la página de red" - -#: forumlist.php:178 -msgid "Submit" -msgstr "Enviar" diff --git a/forumlist/lang/es/strings.php b/forumlist/lang/es/strings.php deleted file mode 100644 index 6b7d13bb..00000000 --- a/forumlist/lang/es/strings.php +++ /dev/null @@ -1,17 +0,0 @@ -strings["Forums"] = "Foros"; -$a->strings["show/hide"] = "mostrar/ocultar"; -$a->strings["No forum subscriptions"] = "Sin subscripciones de foro"; -$a->strings["Forums:"] = "Foros:"; -$a->strings["Forumlist settings updated."] = "Ajustes de la lista de foros actualizados."; -$a->strings["Forumlist Settings"] = "Ajustes de la lista de foros"; -$a->strings["Randomise forum list"] = "Aleatorizar la lista de foros"; -$a->strings["Show forums on profile page"] = "Mostrar foros en la página de perfil"; -$a->strings["Show forums on network page"] = "Mostrar foros en la página de red"; -$a->strings["Submit"] = "Enviar"; diff --git a/forumlist/lang/fr/strings.php b/forumlist/lang/fr/strings.php deleted file mode 100644 index 881bd2fe..00000000 --- a/forumlist/lang/fr/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Forums"] = "Forums"; -$a->strings["show/hide"] = "Montrer/cacher"; -$a->strings["No forum subscriptions"] = "Pas d'abonnement au forum"; -$a->strings["Forums:"] = "Forums:"; -$a->strings["Forumlist settings updated."] = "Paramètres de la liste des forums mis à jour."; -$a->strings["Forumlist Settings"] = "Paramètres de la liste des forums"; -$a->strings["Randomise forum list"] = "Mélanger la liste de forums"; -$a->strings["Show forums on profile page"] = "Montrer les forums sur le profil"; -$a->strings["Show forums on network page"] = ""; -$a->strings["Submit"] = "Envoyer"; diff --git a/forumlist/lang/is/strings.php b/forumlist/lang/is/strings.php deleted file mode 100644 index ce3f5306..00000000 --- a/forumlist/lang/is/strings.php +++ /dev/null @@ -1,9 +0,0 @@ -strings["Forums"] = ""; -$a->strings["show/hide"] = ""; -$a->strings["No forum subscriptions"] = ""; -$a->strings["Forums:"] = ""; -$a->strings["Forumlist settings updated."] = ""; -$a->strings["Forumlist Settings"] = ""; -$a->strings["Submit"] = "Senda inn"; diff --git a/forumlist/lang/it/messages.po b/forumlist/lang/it/messages.po deleted file mode 100644 index 4bc22e36..00000000 --- a/forumlist/lang/it/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON forumlist -# Copyright (C) -# This file is distributed under the same license as the Friendica forumlist addon package. -# -# -# Translators: -# fabrixxm , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-12-14 11:14+0000\n" -"Last-Translator: fabrixxm \n" -"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: forumlist.php:64 -msgid "Forums" -msgstr "Forum" - -#: forumlist.php:67 -msgid "show/hide" -msgstr "mostra/nascondi" - -#: forumlist.php:81 -msgid "No forum subscriptions" -msgstr "Nessun forum collegato" - -#: forumlist.php:98 -msgid "Forums:" -msgstr "Forum:" - -#: forumlist.php:134 -msgid "Forumlist settings updated." -msgstr "Impostazioni Elenco Forum aggiornate." - -#: forumlist.php:162 -msgid "Forumlist Settings" -msgstr "Impostazioni Elenco Forum" - -#: forumlist.php:164 -msgid "Randomise forum list" -msgstr "Ordina casualmente l'elenco" - -#: forumlist.php:167 -msgid "Show forums on profile page" -msgstr "Mostra i forum sulla pagina profilo" - -#: forumlist.php:170 -msgid "Show forums on network page" -msgstr "Mostra i forum sulla pagina Rete" - -#: forumlist.php:178 -msgid "Submit" -msgstr "Invia" diff --git a/forumlist/lang/it/strings.php b/forumlist/lang/it/strings.php deleted file mode 100644 index 94b1427d..00000000 --- a/forumlist/lang/it/strings.php +++ /dev/null @@ -1,17 +0,0 @@ -strings["Forums"] = "Forum"; -$a->strings["show/hide"] = "mostra/nascondi"; -$a->strings["No forum subscriptions"] = "Nessun forum collegato"; -$a->strings["Forums:"] = "Forum:"; -$a->strings["Forumlist settings updated."] = "Impostazioni Elenco Forum aggiornate."; -$a->strings["Forumlist Settings"] = "Impostazioni Elenco Forum"; -$a->strings["Randomise forum list"] = "Ordina casualmente l'elenco"; -$a->strings["Show forums on profile page"] = "Mostra i forum sulla pagina profilo"; -$a->strings["Show forums on network page"] = "Mostra i forum sulla pagina Rete"; -$a->strings["Submit"] = "Invia"; diff --git a/forumlist/lang/nb-no/strings.php b/forumlist/lang/nb-no/strings.php deleted file mode 100644 index 494de1df..00000000 --- a/forumlist/lang/nb-no/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Forums"] = ""; -$a->strings["show/hide"] = ""; -$a->strings["No forum subscriptions"] = ""; -$a->strings["Forums:"] = ""; -$a->strings["Forumlist settings updated."] = ""; -$a->strings["Forumlist Settings"] = ""; -$a->strings["Randomise forum list"] = ""; -$a->strings["Show forums on profile page"] = ""; -$a->strings["Show forums on network page"] = ""; -$a->strings["Submit"] = "Lagre"; diff --git a/forumlist/lang/pl/strings.php b/forumlist/lang/pl/strings.php deleted file mode 100644 index 2111b126..00000000 --- a/forumlist/lang/pl/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Forums"] = "Fora"; -$a->strings["show/hide"] = "pokaż/ukryj"; -$a->strings["No forum subscriptions"] = ""; -$a->strings["Forums:"] = ""; -$a->strings["Forumlist settings updated."] = ""; -$a->strings["Forumlist Settings"] = ""; -$a->strings["Randomise forum list"] = ""; -$a->strings["Show forums on profile page"] = ""; -$a->strings["Show forums on network page"] = ""; -$a->strings["Submit"] = "Potwierdź"; diff --git a/forumlist/lang/pt-br/strings.php b/forumlist/lang/pt-br/strings.php deleted file mode 100644 index 67c07aa6..00000000 --- a/forumlist/lang/pt-br/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Forums"] = "Fóruns"; -$a->strings["show/hide"] = ""; -$a->strings["No forum subscriptions"] = ""; -$a->strings["Forums:"] = "Fóruns:"; -$a->strings["Forumlist settings updated."] = ""; -$a->strings["Forumlist Settings"] = ""; -$a->strings["Randomise forum list"] = ""; -$a->strings["Show forums on profile page"] = ""; -$a->strings["Show forums on network page"] = ""; -$a->strings["Submit"] = "Enviar"; diff --git a/forumlist/lang/ro/messages.po b/forumlist/lang/ro/messages.po deleted file mode 100644 index 29222446..00000000 --- a/forumlist/lang/ro/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON forumlist -# Copyright (C) -# This file is distributed under the same license as the Friendica forumlist addon package. -# -# -# Translators: -# Doru DEACONU , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2014-11-27 14:19+0000\n" -"Last-Translator: Doru DEACONU \n" -"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ro_RO\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" - -#: forumlist.php:64 -msgid "Forums" -msgstr "Forumuri" - -#: forumlist.php:67 -msgid "show/hide" -msgstr "afișare/ascundere" - -#: forumlist.php:81 -msgid "No forum subscriptions" -msgstr "Nu există subscrieri pe forum" - -#: forumlist.php:98 -msgid "Forums:" -msgstr "Forumuri:" - -#: forumlist.php:134 -msgid "Forumlist settings updated." -msgstr "Configurările Forumlist au fost actualizate." - -#: forumlist.php:162 -msgid "Forumlist Settings" -msgstr "Configurări Forumlist " - -#: forumlist.php:164 -msgid "Randomise forum list" -msgstr "Randomizare listă forum" - -#: forumlist.php:167 -msgid "Show forums on profile page" -msgstr "Afișare forumuri pe pagina de profil" - -#: forumlist.php:170 -msgid "Show forums on network page" -msgstr "Afișare forumuri pe pagina de rețea" - -#: forumlist.php:178 -msgid "Submit" -msgstr "Trimite" diff --git a/forumlist/lang/ro/strings.php b/forumlist/lang/ro/strings.php deleted file mode 100644 index 903877c5..00000000 --- a/forumlist/lang/ro/strings.php +++ /dev/null @@ -1,17 +0,0 @@ -19)||(($n%100==0)&&($n!=0)))?2:1));; -}} -; -$a->strings["Forums"] = "Forumuri"; -$a->strings["show/hide"] = "afișare/ascundere"; -$a->strings["No forum subscriptions"] = "Nu există subscrieri pe forum"; -$a->strings["Forums:"] = "Forumuri:"; -$a->strings["Forumlist settings updated."] = "Configurările Forumlist au fost actualizate."; -$a->strings["Forumlist Settings"] = "Configurări Forumlist "; -$a->strings["Randomise forum list"] = "Randomizare listă forum"; -$a->strings["Show forums on profile page"] = "Afișare forumuri pe pagina de profil"; -$a->strings["Show forums on network page"] = "Afișare forumuri pe pagina de rețea"; -$a->strings["Submit"] = "Trimite"; diff --git a/forumlist/lang/ru/messages.po b/forumlist/lang/ru/messages.po deleted file mode 100644 index ac3d2858..00000000 --- a/forumlist/lang/ru/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON forumlist -# Copyright (C) -# This file is distributed under the same license as the Friendica forumlist addon package. -# -# -# Translators: -# Stanislav N. , 2017 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2017-04-08 17:11+0000\n" -"Last-Translator: Stanislav N. \n" -"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: forumlist.php:64 -msgid "Forums" -msgstr "Форумы" - -#: forumlist.php:67 -msgid "show/hide" -msgstr "показать/скрыть" - -#: forumlist.php:81 -msgid "No forum subscriptions" -msgstr "Нет подписок на форумы" - -#: forumlist.php:98 -msgid "Forums:" -msgstr "Форумы:" - -#: forumlist.php:134 -msgid "Forumlist settings updated." -msgstr "Настройки Forumlist обновлены." - -#: forumlist.php:162 -msgid "Forumlist Settings" -msgstr "Настройки Forumlist" - -#: forumlist.php:164 -msgid "Randomise forum list" -msgstr "Случайный список форумов" - -#: forumlist.php:167 -msgid "Show forums on profile page" -msgstr "Показывать форумы на странице профиля" - -#: forumlist.php:170 -msgid "Show forums on network page" -msgstr "Показывать форумы на странице сети" - -#: forumlist.php:178 -msgid "Submit" -msgstr "Добавить" diff --git a/forumlist/lang/ru/strings.php b/forumlist/lang/ru/strings.php deleted file mode 100644 index 85ec1d7d..00000000 --- a/forumlist/lang/ru/strings.php +++ /dev/null @@ -1,17 +0,0 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14) ? 1 : $n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)? 2 : 3);; -}} -; -$a->strings["Forums"] = "Форумы"; -$a->strings["show/hide"] = "показать/скрыть"; -$a->strings["No forum subscriptions"] = "Нет подписок на форумы"; -$a->strings["Forums:"] = "Форумы:"; -$a->strings["Forumlist settings updated."] = "Настройки Forumlist обновлены."; -$a->strings["Forumlist Settings"] = "Настройки Forumlist"; -$a->strings["Randomise forum list"] = "Случайный список форумов"; -$a->strings["Show forums on profile page"] = "Показывать форумы на странице профиля"; -$a->strings["Show forums on network page"] = "Показывать форумы на странице сети"; -$a->strings["Submit"] = "Добавить"; diff --git a/forumlist/lang/sv/messages.po b/forumlist/lang/sv/messages.po deleted file mode 100644 index a16497d2..00000000 --- a/forumlist/lang/sv/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON forumlist -# Copyright (C) -# This file is distributed under the same license as the Friendica forumlist addon package. -# -# -# Translators: -# Jonatan Nyberg , 2017 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2017-02-13 20:15+0000\n" -"Last-Translator: Jonatan Nyberg \n" -"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: sv\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: forumlist.php:64 -msgid "Forums" -msgstr "Forum" - -#: forumlist.php:67 -msgid "show/hide" -msgstr "" - -#: forumlist.php:81 -msgid "No forum subscriptions" -msgstr "" - -#: forumlist.php:98 -msgid "Forums:" -msgstr "" - -#: forumlist.php:134 -msgid "Forumlist settings updated." -msgstr "" - -#: forumlist.php:162 -msgid "Forumlist Settings" -msgstr "" - -#: forumlist.php:164 -msgid "Randomise forum list" -msgstr "" - -#: forumlist.php:167 -msgid "Show forums on profile page" -msgstr "" - -#: forumlist.php:170 -msgid "Show forums on network page" -msgstr "" - -#: forumlist.php:178 -msgid "Submit" -msgstr "Spara" diff --git a/forumlist/lang/sv/strings.php b/forumlist/lang/sv/strings.php deleted file mode 100644 index f2fe884b..00000000 --- a/forumlist/lang/sv/strings.php +++ /dev/null @@ -1,17 +0,0 @@ -strings["Forums"] = "Forum"; -$a->strings["show/hide"] = ""; -$a->strings["No forum subscriptions"] = ""; -$a->strings["Forums:"] = ""; -$a->strings["Forumlist settings updated."] = ""; -$a->strings["Forumlist Settings"] = ""; -$a->strings["Randomise forum list"] = ""; -$a->strings["Show forums on profile page"] = ""; -$a->strings["Show forums on network page"] = ""; -$a->strings["Submit"] = "Spara"; diff --git a/forumlist/lang/zh-cn/strings.php b/forumlist/lang/zh-cn/strings.php deleted file mode 100644 index 39c74c0d..00000000 --- a/forumlist/lang/zh-cn/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Forums"] = "论坛"; -$a->strings["show/hide"] = "表示/隐藏"; -$a->strings["No forum subscriptions"] = "没有评坛订阅"; -$a->strings["Forums:"] = "评坛:"; -$a->strings["Forumlist settings updated."] = "评坛单设置更新了。"; -$a->strings["Forumlist Settings"] = "评坛单设置"; -$a->strings["Randomise forum list"] = "洗牌评坛单"; -$a->strings["Show forums on profile page"] = "表示评坛在简介页"; -$a->strings["Show forums on network page"] = "表示评坛在网络页"; -$a->strings["Submit"] = "提交"; diff --git a/gpluspost/.gitignore b/gpluspost/.gitignore deleted file mode 100644 index 4e76a242..00000000 --- a/gpluspost/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -postToGooglePlus.php -nxs-http.php diff --git a/gpluspost/gpluspost.css b/gpluspost/gpluspost.css deleted file mode 100755 index b86364b4..00000000 --- a/gpluspost/gpluspost.css +++ /dev/null @@ -1,19 +0,0 @@ - -#gpluspost-enable-label, #gpluspost-bydefault-label, #gpluspost-noloopprevention-label, -#gpluspost-skipwithoutlink-label, #gpluspost-mirror-label, #gpluspost-account-label, -#gpluspost-username-label, #gpluspost-password-label, #gpluspost-page-label { - float: left; - width: 200px; - margin-top: 10px; -} - -#gpluspost-checkbox, #gpluspost-bydefault, #gpluspost-noloopprevention, -#gpluspost-skipwithoutlink, #gpluspost-mirror, #gpluspost-account, -#gpluspost-username, #gpluspost-password, #gpluspost-page { - float: left; - margin-top: 10px; -} - -#gpluspost-submit { - margin-top: 15px; -} diff --git a/gpluspost/gpluspost.php b/gpluspost/gpluspost.php deleted file mode 100644 index c8918e1c..00000000 --- a/gpluspost/gpluspost.php +++ /dev/null @@ -1,576 +0,0 @@ - - * Status: Unsupported - */ - -function gpluspost_install() { - register_hook('post_local', 'addon/gpluspost/gpluspost.php', 'gpluspost_post_local'); - register_hook('notifier_normal', 'addon/gpluspost/gpluspost.php', 'gpluspost_send'); - register_hook('jot_networks', 'addon/gpluspost/gpluspost.php', 'gpluspost_jot_nets'); - register_hook('connector_settings', 'addon/gpluspost/gpluspost.php', 'gpluspost_settings'); - register_hook('connector_settings_post', 'addon/gpluspost/gpluspost.php', 'gpluspost_settings_post'); - register_hook('queue_predeliver', 'addon/gpluspost/gpluspost.php', 'gpluspost_queue_hook'); -} - - -function gpluspost_uninstall() { - unregister_hook('post_local', 'addon/gpluspost/gpluspost.php', 'gpluspost_post_local'); - unregister_hook('notifier_normal', 'addon/gpluspost/gpluspost.php', 'gpluspost_send'); - unregister_hook('jot_networks', 'addon/gpluspost/gpluspost.php', 'gpluspost_jot_nets'); - unregister_hook('connector_settings', 'addon/gpluspost/gpluspost.php', 'gpluspost_settings'); - unregister_hook('connector_settings_post', 'addon/gpluspost/gpluspost.php', 'gpluspost_settings_post'); - unregister_hook('queue_predeliver', 'addon/gpluspost/gpluspost.php', 'gpluspost_queue_hook'); -} - -function gpluspost_jot_nets(&$a,&$b) { - if(! local_user()) - return; - - $post = get_pconfig(local_user(),'gpluspost','post'); - if(intval($post) == 1) { - $defpost = get_pconfig(local_user(),'gpluspost','post_by_default'); - $selected = ((intval($defpost) == 1) ? ' checked="checked" ' : ''); - $b .= '
' - . t('Post to Google+') . '
'; - } -} - -function gpluspost_nextscripts() { - $a = get_app(); - return file_exists($a->get_basepath()."/addon/gpluspost/postToGooglePlus.php"); -} - -function gpluspost_settings(&$a,&$s) { - - if(! local_user()) - return; - - $result = q("SELECT `installed` FROM `addon` WHERE `name` = 'fromgplus' AND `installed`"); - $fromgplus_enabled = count($result) > 0; - - /* Add our stylesheet to the page so we can make our settings look nice */ - - $a->page['htmlhead'] .= '' . "\r\n"; - - $enabled = get_pconfig(local_user(),'gpluspost','post'); - $checked = (($enabled) ? ' checked="checked" ' : ''); - $css = (($enabled) ? '' : '-disabled'); - - $def_enabled = get_pconfig(local_user(),'gpluspost','post_by_default'); - $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); - - $noloop_enabled = get_pconfig(local_user(),'gpluspost','no_loop_prevention'); - $noloop_checked = (($noloop_enabled) ? ' checked="checked" ' : ''); - - $skip_enabled = get_pconfig(local_user(),'gpluspost','skip_without_link'); - $skip_checked = (($skip_enabled) ? ' checked="checked" ' : ''); - - $mirror_enable_checked = (intval(get_pconfig(local_user(),'fromgplus','enable')) ? ' checked="checked"' : ''); - $mirror_account = get_pconfig(local_user(),'fromgplus','account'); - - $username = get_pconfig(local_user(), 'gpluspost', 'username'); - $password = get_pconfig(local_user(), 'gpluspost', 'password'); - $page = get_pconfig(local_user(), 'gpluspost', 'page'); - - if ($fromgplus_enabled) - $title = "Google+ Export/Mirror"; - else - $title = "Google+ Export"; - - $s .= ''; - $s .= '

'. t($title).'

'; - $s .= '
'; - $s .= ''; -} - -function gpluspost_settings_post(&$a,&$b) { - - if(x($_POST,'gpluspost-submit')) { - set_pconfig(local_user(),'gpluspost','post',intval($_POST['gpluspost'])); - set_pconfig(local_user(),'gpluspost','post_by_default',intval($_POST['gpluspost_bydefault'])); - set_pconfig(local_user(),'gpluspost','no_loop_prevention',intval($_POST['gpluspost_noloopprevention'])); - - if (!gpluspost_nextscripts()) { - set_pconfig(local_user(),'gpluspost','skip_without_link',intval($_POST['gpluspost_skipwithoutlink'])); - } else { - set_pconfig(local_user(),'gpluspost','username',trim($_POST['username'])); - set_pconfig(local_user(),'gpluspost','password',trim($_POST['password'])); - set_pconfig(local_user(),'gpluspost','page',trim($_POST['page'])); - } - - $result = q("SELECT `installed` FROM `addon` WHERE `name` = 'fromgplus' AND `installed`"); - if (count($result) > 0) { - set_pconfig(local_user(),'fromgplus','account',trim($_POST['fromgplus-account'])); - $enable = ((x($_POST,'fromgplus-enable')) ? intval($_POST['fromgplus-enable']) : 0); - set_pconfig(local_user(),'fromgplus','enable', $enable); - - if (!$enable) - del_pconfig(local_user(),'fromgplus','lastdate'); - } - } -} - -function gpluspost_post_local(&$a,&$b) { - - if($b['edit']) - return; - - if((! local_user()) || (local_user() != $b['uid'])) - return; - - if($b['private'] || $b['parent']) - return; - - $post = intval(get_pconfig(local_user(),'gpluspost','post')); - - $enable = (($post && x($_REQUEST,'gpluspost_enable')) ? intval($_REQUEST['gpluspost_enable']) : 0); - - if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'gpluspost','post_by_default'))) - $enable = 1; - - if(!$enable) - return; - - if(strlen($b['postopts'])) - $b['postopts'] .= ','; - - $b['postopts'] .= 'gplus'; -} - -function gpluspost_send(&$a,&$b) { - - logger('gpluspost_send: invoked for post '.$b['id']." ".$b['app']); - - if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) - return; - - if(! strstr($b['postopts'],'gplus')) - return; - - if($b['parent'] != $b['id']) - return; - - // if post comes from Google+ don't send it back - if (!get_pconfig($b["uid"],'gpluspost','no_loop_prevention') && (($b['app'] == "Google+") || ($b["extid"] == NETWORK_GPLUS))) - return; - - if (!gpluspost_nextscripts()) { - // Posting via RSS-Feed and Hootsuite - $itemlist = get_pconfig($b["uid"],'gpluspost','itemlist'); - $items = explode(",", $itemlist); - - $i = 0; - $newitems = array($b['id']); - foreach ($items AS $item) - if ($i++ < 9) - $newitems[] = $item; - - $itemlist = implode(",", $newitems); - - logger('gpluspost_send: new itemlist: '.$itemlist." for uid ".$b["uid"]); - - set_pconfig($b["uid"],'gpluspost','itemlist', $itemlist); - - } else { - // Posting via NextScripts - $username = get_pconfig($b['uid'],'gpluspost','username'); - $password = get_pconfig($b['uid'],'gpluspost','password'); - $page = get_pconfig($b['uid'],'gpluspost','page'); - - $success = false; - - if($username && $password) { - require_once("addon/gpluspost/postToGooglePlus.php"); - require_once("include/plaintext.php"); - - $item = $b; - - // Markup for Google+ - if ($item["title"] != "") - $item["title"] = "*".$item["title"]."*"; - - $item["body"] = preg_replace("(\[b\](.*?)\[\/b\])ism",'*$1*',$item["body"]); - $item["body"] = preg_replace("(\[i\](.*?)\[\/i\])ism",'_$1_',$item["body"]); - $item["body"] = preg_replace("(\[s\](.*?)\[\/s\])ism",'-$1-',$item["body"]); - - $data = plaintext($a, $item, 0, false, 9); - - logger('gpluspost_send: data: '.print_r($data, true), LOGGER_DEBUG); - - $loginError = doConnectToGooglePlus2($username, $password); - if (!$loginError) { - if ($data["url"] != "") - $lnk = doGetGoogleUrlInfo2($data["url"]); - elseif ($data["image"] != "") - $lnk = array('img'=>$data["image"]); - else - $lnk = ""; - - // Send a special blank to identify the post through the "fromgplus" addon - $blank = html_entity_decode(" ", ENT_QUOTES, 'UTF-8'); - - doPostToGooglePlus2($data["text"].$blank, $lnk, $page); - - $success = true; - - logger('gpluspost_send: '.$b['uid'].' success', LOGGER_DEBUG); - } else - logger('gpluspost_send: '.$b['uid'].' failed '.$loginError, LOGGER_DEBUG); - - if (!$success) { - logger('gpluspost_send: requeueing '.$b['uid'], LOGGER_DEBUG); - - $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", $b['uid']); - if (count($r)) - $a->contact = $r[0]["id"]; - - $s = serialize(array('url' => $url, 'item' => $b['id'], 'post' => $data)); - require_once('include/queue_fn.php'); - add_to_queue($a->contact,NETWORK_GPLUS,$s); - notice(t('Google+ post failed. Queued for retry.').EOL); - } - } else - logger('gpluspost_send: '.$b['uid'].' missing username or password', LOGGER_DEBUG); - } - -} - -function gpluspost_queue_hook(&$a,&$b) { - - $qi = q("SELECT * FROM `queue` WHERE `network` = '%s'", - dbesc(NETWORK_GPLUS) - ); - if(! count($qi)) - return; - - require_once('include/queue_fn.php'); - - foreach($qi as $x) { - if($x['network'] !== NETWORK_GPLUS) - continue; - - logger('gpluspost_queue: run'); - - $r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid` - WHERE `contact`.`self` = 1 AND `contact`.`id` = %d LIMIT 1", - intval($x['cid']) - ); - if(! count($r)) - continue; - - $userdata = $r[0]; - - //logger('gpluspost_queue: fetching userdata '.print_r($userdata, true)); - - $username = get_pconfig($userdata['uid'],'gpluspost','username'); - $password = get_pconfig($userdata['uid'],'gpluspost','password'); - $page = get_pconfig($userdata['uid'],'gpluspost','page'); - - $success = false; - - if($username && $password) { - require_once("addon/gpluspost/postToGooglePlus.php"); - - logger('gpluspost_queue: able to post for user '.$username); - - $z = unserialize($x['content']); - - $data = $z['post']; - // $z['url'] - - logger('gpluspost_send: data: '.print_r($data, true), LOGGER_DATA); - - $loginError = doConnectToGooglePlus2($username, $password); - if (!$loginError) { - if ($data["url"] != "") - $lnk = doGetGoogleUrlInfo2($data["url"]); - elseif ($data["image"] != "") - $lnk = array('img'=>$data["image"]); - else - $lnk = ""; - - // Send a special blank to identify the post through the "fromgplus" addon - $blank = html_entity_decode(" ", ENT_QUOTES, 'UTF-8'); - - doPostToGooglePlus2($data["text"].$blank, $lnk, $page); - - logger('gpluspost_queue: send '.$userdata['uid'].' success', LOGGER_DEBUG); - - $success = true; - - remove_queue_item($x['id']); - } else - logger('gpluspost_queue: send '.$userdata['uid'].' failed '.$loginError, LOGGER_DEBUG); - } else - logger('gpluspost_queue: send '.$userdata['uid'].' missing username or password', LOGGER_DEBUG); - - if (!$success) { - logger('gpluspost_queue: delayed'); - update_queue_time($x['id']); - } - } -} - -function gpluspost_module() {} - -function gpluspost_init() { - global $a, $_SERVER; - - $uid = 0; - - if (isset($a->argv[1])) { - $uid = (int)$a->argv[1]; - if ($uid == 0) { - $contacts = q("SELECT `username`, `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1", dbesc($a->argv[1])); - if ($contacts) { - $uid = $contacts[0]["uid"]; - $nick = $a->argv[1]; - } - } else { - $contacts = q("SELECT `username` FROM `user` WHERE `uid`=%d LIMIT 1", intval($uid)); - $nick = $uid; - } - } - - header("content-type: application/atom+xml"); - echo ''."\n"; - echo ''."\n"; - echo "\t".'<![CDATA['.$a->config['sitename'].']]>'."\n"; - if ($uid != 0) { - echo "\t".'\n"; - echo "\t".''."\n"; - } else - echo "\t".''."\n"; - echo "\t".$a->get_baseurl()."/\n"; - echo "\t".''."\n"; - echo "\t".date("c")."\n"; // To-Do - // Copyright ... - echo "\t".''.$a->config['sitename'].''."\n"; - - if ($uid != 0) { - $itemlist = get_pconfig($uid,'gpluspost','itemlist'); - $items = explode(",", $itemlist); - - foreach ($items AS $item) - gpluspost_feeditem($item, $uid); - } else { - $items = q("SELECT `id` FROM `item` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `item`.`id` = `item`.`parent` ORDER BY `received` DESC LIMIT 10"); - foreach ($items AS $item) - gpluspost_feeditem($item["id"], $uid); - } - echo "\n"; - killme(); -} - -function gpluspost_feeditem($pid, $uid) { - global $a; - - require_once('include/api.php'); - require_once('include/bbcode.php'); - require_once("include/html2plain.php"); - require_once("include/network.php"); - - $skipwithoutlink = get_pconfig($uid,'gpluspost','skip_without_link'); - - $items = q("SELECT `uri`, `plink`, `author-link`, `author-name`, `created`, `edited`, `id`, `title`, `body` from `item` WHERE id=%d", intval($pid)); - foreach ($items AS $item) { - - $item['body'] = bb_CleanPictureLinks($item['body']); - - $item['body'] = bb_remove_share_information($item['body'], true); - - if ($item["title"] != "") - $item['body'] = "*".$item["title"]."*\n\n".$item['body']; - - // Looking for the first image - $image = ''; - if(preg_match("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/is",$item['body'],$matches)) - $image = $matches[3]; - - if ($image == '') - if(preg_match("/\[img\](.*?)\[\/img\]/is",$item['body'],$matches)) - $image = $matches[1]; - - $multipleimages = (strpos($item['body'], "[img") != strrpos($item['body'], "[img")); - - // When saved into the database the content is sent through htmlspecialchars - // That means that we have to decode all image-urls - $image = htmlspecialchars_decode($image); - - $link = ''; - // look for bookmark-bbcode and handle it with priority - if(preg_match("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/is",$item['body'],$matches)) - $link = $matches[1]; - - $multiplelinks = (strpos($item['body'], "[bookmark") != strrpos($item['body'], "[bookmark")); - - $body = $item['body']; - - $body = preg_replace("(\[b\](.*?)\[\/b\])ism",'*$1*',$body); - $body = preg_replace("(\[i\](.*?)\[\/i\])ism",'_$1_',$body); - $body = preg_replace("(\[s\](.*?)\[\/s\])ism",'-$1-',$body); - - // At first convert the text to html - $html = bbcode(api_clean_plain_items($body), false, false, 2); - - // Then convert it to plain text - $msg = trim(html2plain($html, 0, true)); - $msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8'); - - // If there is no bookmark element then take the first link - if ($link == '') { - $links = collecturls($html); - if (sizeof($links) > 0) { - reset($links); - $link = current($links); - } - $multiplelinks = (sizeof($links) > 1); - - if ($multiplelinks) { - $html2 = bbcode($msg, false, false); - $links2 = collecturls($html2); - if (sizeof($links2) > 0) { - reset($links2); - $link = current($links2); - $multiplelinks = (sizeof($links2) > 1); - } - } - } - - $msglink = ""; - if ($multiplelinks) - $msglink = $item["plink"]; - else if ($link != "") - $msglink = $link; - else if ($multipleimages) - $msglink = $item["plink"]; - else if ($image != "") - $msglink = $image; - - if (($msglink == "") && $skipwithoutlink) - continue; - else if ($msglink == "") - $msglink = $item["plink"]; - - // Fetching the title - or the first line - if ($item["title"] != "") - $title = $item["title"]; - else { - $lines = explode("\n", $msg); - $title = $lines[0]; - } - - //if ($image != $msglink) - // $html = trim(str_replace($msglink, "", $html)); - - $title = trim(str_replace($msglink, "", $title)); - - $msglink = original_url($msglink); - - if ($uid == 0) - $title = $item["author-name"].": ".$title; - - $msglink = htmlspecialchars(html_entity_decode($msglink)); - - if (strpos($msg, $msglink) == 0) - $msg .= "\n".$msglink; - - $msg = nl2br($msg); - - $title = str_replace("&", "&", $title); - //$html = str_replace("&", "&", $html); - - echo "\t".''."\n"; - echo "\t\t".'<![CDATA['.$title."]]>\n"; - echo "\t\t".''."\n"; - // - echo "\t\t".$item["uri"]."\n"; - echo "\t\t".date("c", strtotime($item["edited"]))."\n"; - echo "\t\t".date("c", strtotime($item["created"]))."\n"; - echo "\t\t\n\t\t\t\n"; - echo "\t\t\t".$item["author-link"]."\n\t\t\n"; - //echo ''; - echo "\t\t".'\n"; - echo "\t\n"; - } -} diff --git a/gpluspost/lang/C/messages.po b/gpluspost/lang/C/messages.po deleted file mode 100644 index 117b72e5..00000000 --- a/gpluspost/lang/C/messages.po +++ /dev/null @@ -1,66 +0,0 @@ -# ADDON gpluspost -# Copyright (C) -# This file is distributed under the same license as the Friendica gpluspost addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-11-12 16:50+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: gpluspost.php:39 -msgid "Post to Google+" -msgstr "" - -#: gpluspost.php:94 -msgid "Enable Google+ Post Plugin" -msgstr "" - -#: gpluspost.php:109 -msgid "Google+ username" -msgstr "" - -#: gpluspost.php:114 -msgid "Google+ password" -msgstr "" - -#: gpluspost.php:119 -msgid "Google+ page number" -msgstr "" - -#: gpluspost.php:125 -msgid "Post to Google+ by default" -msgstr "" - -#: gpluspost.php:130 -msgid "Do not prevent posting loops" -msgstr "" - -#: gpluspost.php:136 -msgid "Skip messages without links" -msgstr "" - -#: gpluspost.php:143 -msgid "Mirror all public posts" -msgstr "" - -#: gpluspost.php:147 -msgid "Mirror Google Account ID" -msgstr "" - -#: gpluspost.php:154 -msgid "Save Settings" -msgstr "" - -#: gpluspost.php:310 -msgid "Google+ post failed. Queued for retry." -msgstr "" diff --git a/gpluspost/lang/cs/messages.po b/gpluspost/lang/cs/messages.po deleted file mode 100644 index 0b4af870..00000000 --- a/gpluspost/lang/cs/messages.po +++ /dev/null @@ -1,68 +0,0 @@ -# ADDON gpluspost -# Copyright (C) -# This file is distributed under the same license as the Friendica gpluspost addon package. -# -# -# Translators: -# Michal Å upler , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:44+0200\n" -"PO-Revision-Date: 2014-07-07 19:09+0000\n" -"Last-Translator: Michal Å upler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" - -#: gpluspost.php:38 -msgid "Post to Google+" -msgstr "Příspěvek na Google+" - -#: gpluspost.php:93 -msgid "Enable Google+ Post Plugin" -msgstr "Povolit Google+ Plugin" - -#: gpluspost.php:108 -msgid "Google+ username" -msgstr "Google+ uživatelské jméno" - -#: gpluspost.php:113 -msgid "Google+ password" -msgstr "Google+ heslo" - -#: gpluspost.php:118 -msgid "Google+ page number" -msgstr "Google+ číslo stránky" - -#: gpluspost.php:124 -msgid "Post to Google+ by default" -msgstr "Defaultně zaslat na Google+" - -#: gpluspost.php:129 -msgid "Do not prevent posting loops" -msgstr "Nezabraňovat cyklení příspěvků " - -#: gpluspost.php:135 -msgid "Skip messages without links" -msgstr "Přeskakovat zprávy bez odkazů" - -#: gpluspost.php:142 -msgid "Mirror all public posts" -msgstr "Zrcadlit vÅ¡echny veřejné příspěvky" - -#: gpluspost.php:146 -msgid "Mirror Google Account ID" -msgstr "ID účtu Google pro zrcadlení" - -#: gpluspost.php:153 -msgid "Save Settings" -msgstr "Uložit Nastavení" - -#: gpluspost.php:308 -msgid "Google+ post failed. Queued for retry." -msgstr "Zaslání příspěvku na Google+ selhalo. Příspěvek byl zařazen do fronty pro opakované odeslání." diff --git a/gpluspost/lang/cs/strings.php b/gpluspost/lang/cs/strings.php deleted file mode 100644 index 9068b643..00000000 --- a/gpluspost/lang/cs/strings.php +++ /dev/null @@ -1,19 +0,0 @@ -=2 && $n<=4) ? 1 : 2;; -}} -; -$a->strings["Post to Google+"] = "Příspěvek na Google+"; -$a->strings["Enable Google+ Post Plugin"] = "Povolit Google+ Plugin"; -$a->strings["Google+ username"] = "Google+ uživatelské jméno"; -$a->strings["Google+ password"] = "Google+ heslo"; -$a->strings["Google+ page number"] = "Google+ číslo stránky"; -$a->strings["Post to Google+ by default"] = "Defaultně zaslat na Google+"; -$a->strings["Do not prevent posting loops"] = "Nezabraňovat cyklení příspěvků "; -$a->strings["Skip messages without links"] = "Přeskakovat zprávy bez odkazů"; -$a->strings["Mirror all public posts"] = "Zrcadlit vÅ¡echny veřejné příspěvky"; -$a->strings["Mirror Google Account ID"] = "ID účtu Google pro zrcadlení"; -$a->strings["Save Settings"] = "Uložit Nastavení"; -$a->strings["Google+ post failed. Queued for retry."] = "Zaslání příspěvku na Google+ selhalo. Příspěvek byl zařazen do fronty pro opakované odeslání."; diff --git a/gpluspost/lang/de/messages.po b/gpluspost/lang/de/messages.po deleted file mode 100644 index 1d5a621e..00000000 --- a/gpluspost/lang/de/messages.po +++ /dev/null @@ -1,68 +0,0 @@ -# ADDON gpluspost -# Copyright (C) -# This file is distributed under the same license as the Friendica gpluspost addon package. -# -# -# Translators: -# Abrax , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:44+0200\n" -"PO-Revision-Date: 2014-10-14 09:17+0000\n" -"Last-Translator: Abrax \n" -"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: gpluspost.php:38 -msgid "Post to Google+" -msgstr "An Google+ senden" - -#: gpluspost.php:93 -msgid "Enable Google+ Post Plugin" -msgstr "Google+ Plugin aktivieren" - -#: gpluspost.php:108 -msgid "Google+ username" -msgstr "Google+ Benutzername" - -#: gpluspost.php:113 -msgid "Google+ password" -msgstr "Google+ Passwort" - -#: gpluspost.php:118 -msgid "Google+ page number" -msgstr "Google+ Seitennummer" - -#: gpluspost.php:124 -msgid "Post to Google+ by default" -msgstr "Sende standardmäßig an Google+" - -#: gpluspost.php:129 -msgid "Do not prevent posting loops" -msgstr "Posten von Schleifen nicht verhindern" - -#: gpluspost.php:135 -msgid "Skip messages without links" -msgstr "Überspringe Nachrichten ohne Links" - -#: gpluspost.php:142 -msgid "Mirror all public posts" -msgstr "Spiegle alle öffentlichen Nachrichten" - -#: gpluspost.php:146 -msgid "Mirror Google Account ID" -msgstr "Spiegle Google Account ID" - -#: gpluspost.php:153 -msgid "Save Settings" -msgstr "Einstellungen speichern" - -#: gpluspost.php:308 -msgid "Google+ post failed. Queued for retry." -msgstr "Veröffentlichung bei Google+ gescheitert. Wir versuchen es später erneut." diff --git a/gpluspost/lang/de/strings.php b/gpluspost/lang/de/strings.php deleted file mode 100644 index 93790736..00000000 --- a/gpluspost/lang/de/strings.php +++ /dev/null @@ -1,19 +0,0 @@ -strings["Post to Google+"] = "An Google+ senden"; -$a->strings["Enable Google+ Post Plugin"] = "Google+ Plugin aktivieren"; -$a->strings["Google+ username"] = "Google+ Benutzername"; -$a->strings["Google+ password"] = "Google+ Passwort"; -$a->strings["Google+ page number"] = "Google+ Seitennummer"; -$a->strings["Post to Google+ by default"] = "Sende standardmäßig an Google+"; -$a->strings["Do not prevent posting loops"] = "Posten von Schleifen nicht verhindern"; -$a->strings["Skip messages without links"] = "Überspringe Nachrichten ohne Links"; -$a->strings["Mirror all public posts"] = "Spiegle alle öffentlichen Nachrichten"; -$a->strings["Mirror Google Account ID"] = "Spiegle Google Account ID"; -$a->strings["Save Settings"] = "Einstellungen speichern"; -$a->strings["Google+ post failed. Queued for retry."] = "Veröffentlichung bei Google+ gescheitert. Wir versuchen es später erneut."; diff --git a/gpluspost/lang/es/messages.po b/gpluspost/lang/es/messages.po deleted file mode 100644 index c0e50a69..00000000 --- a/gpluspost/lang/es/messages.po +++ /dev/null @@ -1,68 +0,0 @@ -# ADDON gpluspost -# Copyright (C) -# This file is distributed under the same license as the Friendica gpluspost addon package. -# -# -# Translators: -# Albert, 2016 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-11-12 16:50+0000\n" -"PO-Revision-Date: 2016-11-16 16:43+0000\n" -"Last-Translator: Albert\n" -"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: gpluspost.php:39 -msgid "Post to Google+" -msgstr "Publicar en Google+" - -#: gpluspost.php:94 -msgid "Enable Google+ Post Plugin" -msgstr "Habilitar el plugin de publicación de Google+" - -#: gpluspost.php:109 -msgid "Google+ username" -msgstr "Nombre de usuario de Google+" - -#: gpluspost.php:114 -msgid "Google+ password" -msgstr "Contraseña de Google+" - -#: gpluspost.php:119 -msgid "Google+ page number" -msgstr "Número de página de Google+" - -#: gpluspost.php:125 -msgid "Post to Google+ by default" -msgstr "Publicar en Google+ por defecto" - -#: gpluspost.php:130 -msgid "Do not prevent posting loops" -msgstr "No impedir los bucles de publicación" - -#: gpluspost.php:136 -msgid "Skip messages without links" -msgstr "Saltar los mensajes sin enlaces" - -#: gpluspost.php:143 -msgid "Mirror all public posts" -msgstr "Reflejar todas las entradas públicas" - -#: gpluspost.php:147 -msgid "Mirror Google Account ID" -msgstr "Reflecar la ID de Cuenta de Google" - -#: gpluspost.php:154 -msgid "Save Settings" -msgstr "Guardar ajustes" - -#: gpluspost.php:310 -msgid "Google+ post failed. Queued for retry." -msgstr "La publicación en Google+ falló. En cola para reintentarlo." diff --git a/gpluspost/lang/es/strings.php b/gpluspost/lang/es/strings.php deleted file mode 100644 index a9bbedf5..00000000 --- a/gpluspost/lang/es/strings.php +++ /dev/null @@ -1,19 +0,0 @@ -strings["Post to Google+"] = "Publicar en Google+"; -$a->strings["Enable Google+ Post Plugin"] = "Habilitar el plugin de publicación de Google+"; -$a->strings["Google+ username"] = "Nombre de usuario de Google+"; -$a->strings["Google+ password"] = "Contraseña de Google+"; -$a->strings["Google+ page number"] = "Número de página de Google+"; -$a->strings["Post to Google+ by default"] = "Publicar en Google+ por defecto"; -$a->strings["Do not prevent posting loops"] = "No impedir los bucles de publicación"; -$a->strings["Skip messages without links"] = "Saltar los mensajes sin enlaces"; -$a->strings["Mirror all public posts"] = "Reflejar todas las entradas públicas"; -$a->strings["Mirror Google Account ID"] = "Reflecar la ID de Cuenta de Google"; -$a->strings["Save Settings"] = "Guardar ajustes"; -$a->strings["Google+ post failed. Queued for retry."] = "La publicación en Google+ falló. En cola para reintentarlo."; diff --git a/gpluspost/lang/it/messages.po b/gpluspost/lang/it/messages.po deleted file mode 100644 index e6d636b4..00000000 --- a/gpluspost/lang/it/messages.po +++ /dev/null @@ -1,68 +0,0 @@ -# ADDON gpluspost -# Copyright (C) -# This file is distributed under the same license as the Friendica gpluspost addon package. -# -# -# Translators: -# fabrixxm , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-11-12 16:50+0000\n" -"PO-Revision-Date: 2014-09-10 12:14+0000\n" -"Last-Translator: fabrixxm \n" -"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: gpluspost.php:39 -msgid "Post to Google+" -msgstr "Invia a Google+" - -#: gpluspost.php:94 -msgid "Enable Google+ Post Plugin" -msgstr "Abilita il plugin di invio a Google+" - -#: gpluspost.php:109 -msgid "Google+ username" -msgstr "Nome utente Google+" - -#: gpluspost.php:114 -msgid "Google+ password" -msgstr "Password Google+" - -#: gpluspost.php:119 -msgid "Google+ page number" -msgstr "Numero pagina Google+" - -#: gpluspost.php:125 -msgid "Post to Google+ by default" -msgstr "Invia sempre a Google+" - -#: gpluspost.php:130 -msgid "Do not prevent posting loops" -msgstr "Non prevenire i loop di invio" - -#: gpluspost.php:136 -msgid "Skip messages without links" -msgstr "Salta i messaggi senza collegamenti" - -#: gpluspost.php:143 -msgid "Mirror all public posts" -msgstr "Ricopia tutti i post pubblici" - -#: gpluspost.php:147 -msgid "Mirror Google Account ID" -msgstr "Ricopia l'ID Google Account" - -#: gpluspost.php:154 -msgid "Save Settings" -msgstr "Salva Impostazioni" - -#: gpluspost.php:310 -msgid "Google+ post failed. Queued for retry." -msgstr "Invio a Google+ fallito. In attesa di riprovare." diff --git a/gpluspost/lang/it/strings.php b/gpluspost/lang/it/strings.php deleted file mode 100644 index 90212369..00000000 --- a/gpluspost/lang/it/strings.php +++ /dev/null @@ -1,19 +0,0 @@ -strings["Post to Google+"] = "Invia a Google+"; -$a->strings["Enable Google+ Post Plugin"] = "Abilita il plugin di invio a Google+"; -$a->strings["Google+ username"] = "Nome utente Google+"; -$a->strings["Google+ password"] = "Password Google+"; -$a->strings["Google+ page number"] = "Numero pagina Google+"; -$a->strings["Post to Google+ by default"] = "Invia sempre a Google+"; -$a->strings["Do not prevent posting loops"] = "Non prevenire i loop di invio"; -$a->strings["Skip messages without links"] = "Salta i messaggi senza collegamenti"; -$a->strings["Mirror all public posts"] = "Ricopia tutti i post pubblici"; -$a->strings["Mirror Google Account ID"] = "Ricopia l'ID Google Account"; -$a->strings["Save Settings"] = "Salva Impostazioni"; -$a->strings["Google+ post failed. Queued for retry."] = "Invio a Google+ fallito. In attesa di riprovare."; diff --git a/gpluspost/lang/pt-br/messages.po b/gpluspost/lang/pt-br/messages.po deleted file mode 100644 index 52931f11..00000000 --- a/gpluspost/lang/pt-br/messages.po +++ /dev/null @@ -1,68 +0,0 @@ -# ADDON gpluspost -# Copyright (C) -# This file is distributed under the same license as the Friendica gpluspost addon package. -# -# -# Translators: -# Beatriz Vital , 2016 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:44+0200\n" -"PO-Revision-Date: 2016-08-19 20:36+0000\n" -"Last-Translator: Beatriz Vital \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/Friendica/friendica/language/pt_BR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: pt_BR\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: gpluspost.php:38 -msgid "Post to Google+" -msgstr "Publicar no Google+" - -#: gpluspost.php:93 -msgid "Enable Google+ Post Plugin" -msgstr "Habilitar plug-in para publicar no Google+" - -#: gpluspost.php:108 -msgid "Google+ username" -msgstr "" - -#: gpluspost.php:113 -msgid "Google+ password" -msgstr "Senha do Google+" - -#: gpluspost.php:118 -msgid "Google+ page number" -msgstr "" - -#: gpluspost.php:124 -msgid "Post to Google+ by default" -msgstr "Publicar no Google+ por padrão" - -#: gpluspost.php:129 -msgid "Do not prevent posting loops" -msgstr "" - -#: gpluspost.php:135 -msgid "Skip messages without links" -msgstr "" - -#: gpluspost.php:142 -msgid "Mirror all public posts" -msgstr "" - -#: gpluspost.php:146 -msgid "Mirror Google Account ID" -msgstr "" - -#: gpluspost.php:153 -msgid "Save Settings" -msgstr "Salvar Configurações" - -#: gpluspost.php:308 -msgid "Google+ post failed. Queued for retry." -msgstr "Falha ao publicar no Google+. Na fila para tentar novamente." diff --git a/gpluspost/lang/pt-br/strings.php b/gpluspost/lang/pt-br/strings.php deleted file mode 100644 index ac49ee40..00000000 --- a/gpluspost/lang/pt-br/strings.php +++ /dev/null @@ -1,19 +0,0 @@ - 1);; -}} -; -$a->strings["Post to Google+"] = "Publicar no Google+"; -$a->strings["Enable Google+ Post Plugin"] = "Habilitar plug-in para publicar no Google+"; -$a->strings["Google+ username"] = ""; -$a->strings["Google+ password"] = "Senha do Google+"; -$a->strings["Google+ page number"] = ""; -$a->strings["Post to Google+ by default"] = "Publicar no Google+ por padrão"; -$a->strings["Do not prevent posting loops"] = ""; -$a->strings["Skip messages without links"] = ""; -$a->strings["Mirror all public posts"] = ""; -$a->strings["Mirror Google Account ID"] = ""; -$a->strings["Save Settings"] = "Salvar Configurações"; -$a->strings["Google+ post failed. Queued for retry."] = "Falha ao publicar no Google+. Na fila para tentar novamente."; diff --git a/gpluspost/lang/ro/messages.po b/gpluspost/lang/ro/messages.po deleted file mode 100644 index f6c0f0a5..00000000 --- a/gpluspost/lang/ro/messages.po +++ /dev/null @@ -1,67 +0,0 @@ -# ADDON gpluspost -# Copyright (C) -# This file is distributed under the same license as the Friendica gpluspost addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:44+0200\n" -"PO-Revision-Date: 2014-07-08 11:52+0000\n" -"Last-Translator: Arian - Cazare Muncitori \n" -"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ro_RO\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" - -#: gpluspost.php:38 -msgid "Post to Google+" -msgstr "Postați pe Google+" - -#: gpluspost.php:93 -msgid "Enable Google+ Post Plugin" -msgstr "Activare Modul Postare Google+" - -#: gpluspost.php:108 -msgid "Google+ username" -msgstr "Utilizator Google+ " - -#: gpluspost.php:113 -msgid "Google+ password" -msgstr "Parola Google+" - -#: gpluspost.php:118 -msgid "Google+ page number" -msgstr "Numărul paginii Google+ " - -#: gpluspost.php:124 -msgid "Post to Google+ by default" -msgstr "Postați implicit pe Google+" - -#: gpluspost.php:129 -msgid "Do not prevent posting loops" -msgstr "Nu se previn înlănțuirile postării" - -#: gpluspost.php:135 -msgid "Skip messages without links" -msgstr "Se omit mesajele fără legături" - -#: gpluspost.php:142 -msgid "Mirror all public posts" -msgstr "Reproducere pentru toate postările publice" - -#: gpluspost.php:146 -msgid "Mirror Google Account ID" -msgstr "Reproducere ID Cont Google" - -#: gpluspost.php:153 -msgid "Save Settings" -msgstr "Salvare Configurări" - -#: gpluspost.php:308 -msgid "Google+ post failed. Queued for retry." -msgstr "Postarea pe Google+ a eșuat. S-a pus în așteptare pentru reîncercare." diff --git a/gpluspost/lang/ro/strings.php b/gpluspost/lang/ro/strings.php deleted file mode 100644 index a7494f06..00000000 --- a/gpluspost/lang/ro/strings.php +++ /dev/null @@ -1,19 +0,0 @@ -19)||(($n%100==0)&&($n!=0)))?2:1));; -}} -; -$a->strings["Post to Google+"] = "Postați pe Google+"; -$a->strings["Enable Google+ Post Plugin"] = "Activare Modul Postare Google+"; -$a->strings["Google+ username"] = "Utilizator Google+ "; -$a->strings["Google+ password"] = "Parola Google+"; -$a->strings["Google+ page number"] = "Numărul paginii Google+ "; -$a->strings["Post to Google+ by default"] = "Postați implicit pe Google+"; -$a->strings["Do not prevent posting loops"] = "Nu se previn înlănțuirile postării"; -$a->strings["Skip messages without links"] = "Se omit mesajele fără legături"; -$a->strings["Mirror all public posts"] = "Reproducere pentru toate postările publice"; -$a->strings["Mirror Google Account ID"] = "Reproducere ID Cont Google"; -$a->strings["Save Settings"] = "Salvare Configurări"; -$a->strings["Google+ post failed. Queued for retry."] = "Postarea pe Google+ a eșuat. S-a pus în așteptare pentru reîncercare."; diff --git a/gpluspost/lang/ru/messages.po b/gpluspost/lang/ru/messages.po deleted file mode 100644 index 595ad457..00000000 --- a/gpluspost/lang/ru/messages.po +++ /dev/null @@ -1,68 +0,0 @@ -# ADDON gpluspost -# Copyright (C) -# This file is distributed under the same license as the Friendica gpluspost addon package. -# -# -# Translators: -# Stanislav N. , 2017 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-11-12 16:50+0000\n" -"PO-Revision-Date: 2017-04-08 17:19+0000\n" -"Last-Translator: Stanislav N. \n" -"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: gpluspost.php:39 -msgid "Post to Google+" -msgstr "Написать в Google+" - -#: gpluspost.php:94 -msgid "Enable Google+ Post Plugin" -msgstr "Включить плагин Google+ Post" - -#: gpluspost.php:109 -msgid "Google+ username" -msgstr "Имя пользователя Google+" - -#: gpluspost.php:114 -msgid "Google+ password" -msgstr "Пароль Google+" - -#: gpluspost.php:119 -msgid "Google+ page number" -msgstr "Номер страницы Google+" - -#: gpluspost.php:125 -msgid "Post to Google+ by default" -msgstr "Отправлять в Google+ по умолчанию" - -#: gpluspost.php:130 -msgid "Do not prevent posting loops" -msgstr "Не предотвращать петли отправки" - -#: gpluspost.php:136 -msgid "Skip messages without links" -msgstr "Пропускать сообщения без ссылок" - -#: gpluspost.php:143 -msgid "Mirror all public posts" -msgstr "Зеркалировать все публичные сообщения" - -#: gpluspost.php:147 -msgid "Mirror Google Account ID" -msgstr "Зеркалировать Google Account ID" - -#: gpluspost.php:154 -msgid "Save Settings" -msgstr "Сохранить настройки" - -#: gpluspost.php:310 -msgid "Google+ post failed. Queued for retry." -msgstr "Ошибка отправки сообщения в Google+. В очереди на еще одну попытку." diff --git a/gpluspost/lang/ru/strings.php b/gpluspost/lang/ru/strings.php deleted file mode 100644 index 0e8fbd89..00000000 --- a/gpluspost/lang/ru/strings.php +++ /dev/null @@ -1,19 +0,0 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14) ? 1 : $n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)? 2 : 3);; -}} -; -$a->strings["Post to Google+"] = "Написать в Google+"; -$a->strings["Enable Google+ Post Plugin"] = "Включить плагин Google+ Post"; -$a->strings["Google+ username"] = "Имя пользователя Google+"; -$a->strings["Google+ password"] = "Пароль Google+"; -$a->strings["Google+ page number"] = "Номер страницы Google+"; -$a->strings["Post to Google+ by default"] = "Отправлять в Google+ по умолчанию"; -$a->strings["Do not prevent posting loops"] = "Не предотвращать петли отправки"; -$a->strings["Skip messages without links"] = "Пропускать сообщения без ссылок"; -$a->strings["Mirror all public posts"] = "Зеркалировать все публичные сообщения"; -$a->strings["Mirror Google Account ID"] = "Зеркалировать Google Account ID"; -$a->strings["Save Settings"] = "Сохранить настройки"; -$a->strings["Google+ post failed. Queued for retry."] = "Ошибка отправки сообщения в Google+. В очереди на еще одну попытку."; diff --git a/poormancron/lang/C/messages.po b/poormancron/lang/C/messages.po deleted file mode 100644 index e69de29b..00000000 diff --git a/poormancron/poormancron.php b/poormancron/poormancron.php deleted file mode 100755 index 493f0f17..00000000 --- a/poormancron/poormancron.php +++ /dev/null @@ -1,69 +0,0 @@ - - * Status: Unsupported - */ - -function poormancron_install() { - // check for command line php - $a = get_app(); - $ex = Array(); - $ex[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - $ex[1] = dirname(dirname(dirname(__file__)))."/testargs.php"; - $ex[2] = "test"; - $out = exec(implode(" ", $ex)); - if ($out==="test") { - set_config('poormancron','usecli',1); - logger("poormancron will use cli php"); - } else { - set_config('poormancron','usecli',0); - logger("poormancron will NOT use cli php"); - } - - register_hook('page_end', 'addon/poormancron/poormancron.php', 'poormancron_hook'); - register_hook('proc_run', 'addon/poormancron/poormancron.php','poormancron_procrun'); - logger("installed poormancron"); -} - -function poormancron_uninstall() { - unregister_hook('page_end', 'addon/poormancron/poormancron.php', 'poormancron_hook'); - unregister_hook('proc_run', 'addon/poormancron/poormancron.php','poormancron_procrun'); - logger("removed poormancron"); -} - - - -function poormancron_hook(&$a,&$b) { - return; // deactivated - - //$now = time(); - //$lastupdate = get_config('poormancron', 'lastupdate'); - - // 300 secs, 5 mins - //if (!$lastupdate || ($now-$lastupdate)>300) { - // set_config('poormancron','lastupdate', $now); - // proc_run('php',"include/poller.php"); - //} -} - -function poormancron_procrun(&$a, &$arr) { - return; // deactivated - - if (get_config('poormancron','usecli')==1) return; - $argv = $arr['args']; - $arr['run_cmd'] = false; - logger("poormancron procrun ".implode(", ",$argv)); - array_shift($argv); - $argc = count($argv); - logger("poormancron procrun require_once ".basename($argv[0])); - require_once(basename($argv[0])); - $funcname=str_replace(".php", "", basename($argv[0]))."_run"; - - $funcname($argv, $argc); -} - - -?> diff --git a/posterous/lang/C/messages.po b/posterous/lang/C/messages.po deleted file mode 100644 index 99327c24..00000000 --- a/posterous/lang/C/messages.po +++ /dev/null @@ -1,58 +0,0 @@ -# ADDON posterous -# Copyright (C) -# This file is distributed under the same license as the Friendica posterous addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: posterous.php:37 -msgid "Post to Posterous" -msgstr "" - -#: posterous.php:70 -msgid "Posterous Post Settings" -msgstr "" - -#: posterous.php:72 -msgid "Enable Posterous Post Plugin" -msgstr "" - -#: posterous.php:77 -msgid "Posterous login" -msgstr "" - -#: posterous.php:82 -msgid "Posterous password" -msgstr "" - -#: posterous.php:87 -msgid "Posterous site ID" -msgstr "" - -#: posterous.php:92 -msgid "Posterous API token" -msgstr "" - -#: posterous.php:97 -msgid "Post to Posterous by default" -msgstr "" - -#: posterous.php:103 -msgid "Submit" -msgstr "" - -#: posterous.php:189 -msgid "Post from Friendica" -msgstr "" diff --git a/posterous/lang/ca/strings.php b/posterous/lang/ca/strings.php deleted file mode 100644 index ec7bedf6..00000000 --- a/posterous/lang/ca/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = "enviament a Posterous"; -$a->strings["Posterous Post Settings"] = "Configuració d'Enviaments a Posterous"; -$a->strings["Enable Posterous Post Plugin"] = "Habilitar plugin d'Enviament de Posterous"; -$a->strings["Posterous login"] = "Inici de sessió a Posterous"; -$a->strings["Posterous password"] = "Contrasenya a Posterous"; -$a->strings["Posterous site ID"] = "ID al lloc Posterous"; -$a->strings["Posterous API token"] = "Posterous API token"; -$a->strings["Post to Posterous by default"] = "Enviar a Posterous per defecte"; -$a->strings["Submit"] = "Enviar"; -$a->strings["Post from Friendica"] = "Enviament des de Friendica"; diff --git a/posterous/lang/cs/strings.php b/posterous/lang/cs/strings.php deleted file mode 100644 index 733ec89a..00000000 --- a/posterous/lang/cs/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = "Poslat na Posterous"; -$a->strings["Posterous Post Settings"] = "Posterous nastavení příspěvků"; -$a->strings["Enable Posterous Post Plugin"] = "Umožnit Posterous Plugin"; -$a->strings["Posterous login"] = "Posterous login"; -$a->strings["Posterous password"] = "Posterous heslo"; -$a->strings["Posterous site ID"] = "Posterous site ID"; -$a->strings["Posterous API token"] = "Posterous API token"; -$a->strings["Post to Posterous by default"] = "Příspěvky standardně posílat na Posterous"; -$a->strings["Submit"] = "Odeslat"; -$a->strings["Post from Friendica"] = "Příspěvek z Friendica"; diff --git a/posterous/lang/de/strings.php b/posterous/lang/de/strings.php deleted file mode 100644 index 186c53d6..00000000 --- a/posterous/lang/de/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = "Nach Posterous senden"; -$a->strings["Posterous Post Settings"] = "Posterous Beitrags-Einstellungen"; -$a->strings["Enable Posterous Post Plugin"] = "Posterous-Plugin aktivieren"; -$a->strings["Posterous login"] = "Posterous-Anmeldename"; -$a->strings["Posterous password"] = "Posterous-Passwort"; -$a->strings["Posterous site ID"] = "Posterous site ID"; -$a->strings["Posterous API token"] = "Posterous API token"; -$a->strings["Post to Posterous by default"] = "Veröffentliche öffentliche Beiträge standardmäßig bei Posterous"; -$a->strings["Submit"] = "Senden"; -$a->strings["Post from Friendica"] = "Beitrag via Friendica"; diff --git a/posterous/lang/eo/strings.php b/posterous/lang/eo/strings.php deleted file mode 100644 index 06f48635..00000000 --- a/posterous/lang/eo/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = "Afiŝi al Posterous"; -$a->strings["Posterous Post Settings"] = "Agordoj pri afiŝoj ĉe Posterous"; -$a->strings["Enable Posterous Post Plugin"] = "Ŝalti la Poserous-afiŝo kromprogramon"; -$a->strings["Posterous login"] = "Posterous salutnomo"; -$a->strings["Posterous password"] = "Posterous pasvorto"; -$a->strings["Posterous site ID"] = "Idento de Posterous retejo"; -$a->strings["Posterous API token"] = "API ĵetono de Posterous retejo"; -$a->strings["Post to Posterous by default"] = "DefaÅ­lte afiŝi al Posterous"; -$a->strings["Submit"] = "Sendi"; -$a->strings["Post from Friendica"] = "Afiŝo de Friendica"; diff --git a/posterous/lang/es/strings.php b/posterous/lang/es/strings.php deleted file mode 100644 index 9198865a..00000000 --- a/posterous/lang/es/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = "Publicar en Posterous"; -$a->strings["Posterous Post Settings"] = "Configuración de las publicaciones en Posterous"; -$a->strings["Enable Posterous Post Plugin"] = "Activar el módulo de publicación en Posterous"; -$a->strings["Posterous login"] = "Entrar en Posterous"; -$a->strings["Posterous password"] = "Contraseña de Posterous"; -$a->strings["Posterous site ID"] = "ID de Posterous"; -$a->strings["Posterous API token"] = "API de Posterous"; -$a->strings["Post to Posterous by default"] = "Publicar en Posterous por defecto"; -$a->strings["Submit"] = "Envíar"; -$a->strings["Post from Friendica"] = "Publicado desde Friendica"; diff --git a/posterous/lang/fr/strings.php b/posterous/lang/fr/strings.php deleted file mode 100644 index be14e1ec..00000000 --- a/posterous/lang/fr/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = "Envoyer à Posterous"; -$a->strings["Posterous Post Settings"] = "Réglages de l'envoi à Posterous"; -$a->strings["Enable Posterous Post Plugin"] = "Activer l'envoi à Posterous"; -$a->strings["Posterous login"] = "Login Posterous"; -$a->strings["Posterous password"] = "Mot de passe"; -$a->strings["Posterous site ID"] = "ID du site Posterous"; -$a->strings["Posterous API token"] = "Clé d'API Posterous"; -$a->strings["Post to Posterous by default"] = "Envoyer à Posterous par défaut"; -$a->strings["Submit"] = "Envoyer"; -$a->strings["Post from Friendica"] = "Publier depuis Friendica"; diff --git a/posterous/lang/is/strings.php b/posterous/lang/is/strings.php deleted file mode 100644 index d48afbba..00000000 --- a/posterous/lang/is/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = "Senda færslu á Posterous"; -$a->strings["Posterous Post Settings"] = "Stilla Posterous Post"; -$a->strings["Enable Posterous Post Plugin"] = "Kveðja á Posterous Post viðbót "; -$a->strings["Posterous login"] = "Posterous notendanafn"; -$a->strings["Posterous password"] = "Posterous aðgangsorð"; -$a->strings["Posterous site ID"] = ""; -$a->strings["Posterous API token"] = ""; -$a->strings["Post to Posterous by default"] = "Sjálfgefið láta færslur flæða á Posterous"; -$a->strings["Submit"] = "Senda inn"; -$a->strings["Post from Friendica"] = "Færslur frá Friendica"; diff --git a/posterous/lang/it/strings.php b/posterous/lang/it/strings.php deleted file mode 100644 index 3c2e4067..00000000 --- a/posterous/lang/it/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = "Invia a Posterous"; -$a->strings["Posterous Post Settings"] = "Impostazioni di invio a Posterous"; -$a->strings["Enable Posterous Post Plugin"] = "Abilita il plugin di invio a Posterous"; -$a->strings["Posterous login"] = "Posterous login"; -$a->strings["Posterous password"] = "Posterous password"; -$a->strings["Posterous site ID"] = ""; -$a->strings["Posterous API token"] = ""; -$a->strings["Post to Posterous by default"] = "Invia sempre a Posterous"; -$a->strings["Submit"] = "Invia"; -$a->strings["Post from Friendica"] = "Messaggio da Friendica"; diff --git a/posterous/lang/nb-no/strings.php b/posterous/lang/nb-no/strings.php deleted file mode 100644 index 64d3fb64..00000000 --- a/posterous/lang/nb-no/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = ""; -$a->strings["Posterous Post Settings"] = ""; -$a->strings["Enable Posterous Post Plugin"] = ""; -$a->strings["Posterous login"] = ""; -$a->strings["Posterous password"] = ""; -$a->strings["Posterous site ID"] = ""; -$a->strings["Posterous API token"] = ""; -$a->strings["Post to Posterous by default"] = ""; -$a->strings["Submit"] = "Lagre"; -$a->strings["Post from Friendica"] = ""; diff --git a/posterous/lang/pl/strings.php b/posterous/lang/pl/strings.php deleted file mode 100644 index 2514fadc..00000000 --- a/posterous/lang/pl/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = ""; -$a->strings["Posterous Post Settings"] = ""; -$a->strings["Enable Posterous Post Plugin"] = ""; -$a->strings["Posterous login"] = ""; -$a->strings["Posterous password"] = ""; -$a->strings["Posterous site ID"] = ""; -$a->strings["Posterous API token"] = ""; -$a->strings["Post to Posterous by default"] = ""; -$a->strings["Submit"] = "Potwierdź"; -$a->strings["Post from Friendica"] = "Post z Friendica"; diff --git a/posterous/lang/pt-br/strings.php b/posterous/lang/pt-br/strings.php deleted file mode 100644 index c2ab2977..00000000 --- a/posterous/lang/pt-br/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = "Postar no Posterous"; -$a->strings["Posterous Post Settings"] = "Configurações de Postagem do Posterous"; -$a->strings["Enable Posterous Post Plugin"] = "Habilitar Plugin de Postagem do Posterous"; -$a->strings["Posterous login"] = "Login do Posterous"; -$a->strings["Posterous password"] = "Senha do Posterous"; -$a->strings["Posterous site ID"] = ""; -$a->strings["Posterous API token"] = ""; -$a->strings["Post to Posterous by default"] = "Postar para o Posterous como padrão"; -$a->strings["Submit"] = "Enviar"; -$a->strings["Post from Friendica"] = "Postar do Friendica"; diff --git a/posterous/lang/ru/strings.php b/posterous/lang/ru/strings.php deleted file mode 100644 index 2d1268b6..00000000 --- a/posterous/lang/ru/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = ""; -$a->strings["Posterous Post Settings"] = ""; -$a->strings["Enable Posterous Post Plugin"] = "Включить Posterous плагин сообщений"; -$a->strings["Posterous login"] = ""; -$a->strings["Posterous password"] = ""; -$a->strings["Posterous site ID"] = ""; -$a->strings["Posterous API token"] = ""; -$a->strings["Post to Posterous by default"] = ""; -$a->strings["Submit"] = "Подтвердить"; -$a->strings["Post from Friendica"] = "Сообщение от Friendica"; diff --git a/posterous/lang/sv/strings.php b/posterous/lang/sv/strings.php deleted file mode 100644 index 3ec569a7..00000000 --- a/posterous/lang/sv/strings.php +++ /dev/null @@ -1,3 +0,0 @@ -strings["Submit"] = "Spara"; diff --git a/posterous/lang/zh-cn/strings.php b/posterous/lang/zh-cn/strings.php deleted file mode 100644 index ab258a20..00000000 --- a/posterous/lang/zh-cn/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Post to Posterous"] = "发送往Posterous"; -$a->strings["Posterous Post Settings"] = "Posterous发送设置"; -$a->strings["Enable Posterous Post Plugin"] = "使Posterous发送插件可用的"; -$a->strings["Posterous login"] = "Posterous登记名"; -$a->strings["Posterous password"] = "Posterous密码"; -$a->strings["Posterous site ID"] = "Posterous网站身份证明"; -$a->strings["Posterous API token"] = "Posterous API令牌"; -$a->strings["Post to Posterous by default"] = "默认地发送往Posterous"; -$a->strings["Submit"] = "提交"; -$a->strings["Post from Friendica"] = "文章从Friendica"; diff --git a/posterous/posterous.css b/posterous/posterous.css deleted file mode 100755 index 0a43bf32..00000000 --- a/posterous/posterous.css +++ /dev/null @@ -1,16 +0,0 @@ - -#posterous-enable-label, #posterous-username-label, #posterous-password-label, #posterous-site_id-label, #posterous-api_token-label, #posterous-bydefault-label { - float: left; - width: 200px; - margin-top: 10px; -} - -#posterous-checkbox, #posterous-username, #posterous-password, #posterous-site_id, #posterous-api_token, #posterous-bydefault { - float: left; - margin-top: 10px; -} - -#posterous-submit { - margin-top: 15px; -} - diff --git a/posterous/posterous.php b/posterous/posterous.php deleted file mode 100755 index 76eaf77a..00000000 --- a/posterous/posterous.php +++ /dev/null @@ -1,215 +0,0 @@ - - * Author: Tony Baldwin - * Status: Unsupported - */ - -function posterous_install() { - register_hook('post_local', 'addon/posterous/posterous.php', 'posterous_post_local'); - register_hook('notifier_normal', 'addon/posterous/posterous.php', 'posterous_send'); - register_hook('jot_networks', 'addon/posterous/posterous.php', 'posterous_jot_nets'); - register_hook('connector_settings', 'addon/posterous/posterous.php', 'posterous_settings'); - register_hook('connector_settings_post', 'addon/posterous/posterous.php', 'posterous_settings_post'); - -} -function posterous_uninstall() { - unregister_hook('post_local', 'addon/posterous/posterous.php', 'posterous_post_local'); - unregister_hook('notifier_normal', 'addon/posterous/posterous.php', 'posterous_send'); - unregister_hook('jot_networks', 'addon/posterous/posterous.php', 'posterous_jot_nets'); - unregister_hook('connector_settings', 'addon/posterous/posterous.php', 'posterous_settings'); - unregister_hook('connector_settings_post', 'addon/posterous/posterous.php', 'posterous_settings_post'); -} - - -function posterous_jot_nets(&$a,&$b) { - if(! local_user()) - return; - - $pstr_post = get_pconfig(local_user(),'posterous','post'); - if(intval($pstr_post) == 1) { - $pstr_defpost = get_pconfig(local_user(),'posterous','post_by_default'); - $selected = ((intval($pstr_defpost) == 1) ? ' checked="checked" ' : ''); - $b .= '
' - . t('Post to Posterous') . '
'; - } -} - - -function posterous_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 variables */ - - $enabled = get_pconfig(local_user(),'posterous','post'); - - $checked = (($enabled) ? ' checked="checked" ' : ''); - - $def_enabled = get_pconfig(local_user(),'posterous','post_by_default'); - - $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); - - $pstr_username = get_pconfig(local_user(), 'posterous', 'posterous_username'); - $pstr_password = get_pconfig(local_user(), 'posterous', 'posterous_password'); - $pstr_site_id = get_pconfig(local_user(), 'posterous', 'posterous_site_id'); - $pstr_api_token = get_pconfig(local_user(), 'posterous', 'posterous_api_token'); - - - /* Add some HTML to the existing form */ - - $s .= '
'; - $s .= '

' . t('Posterous Post Settings') . '

'; - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - $s .= '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - /* provide a submit button */ - - $s .= '
'; - -} - - -function posterous_settings_post(&$a,&$b) { - - if(x($_POST,'posterous-submit')) { - - set_pconfig(local_user(),'posterous','post',intval($_POST['posterous'])); - set_pconfig(local_user(),'posterous','post_by_default',intval($_POST['posterous_bydefault'])); - set_pconfig(local_user(),'posterous','posterous_username',trim($_POST['posterous_username'])); - set_pconfig(local_user(),'posterous','posterous_password',trim($_POST['posterous_password'])); - set_pconfig(local_user(),'posterous','posterous_site_id',trim($_POST['posterous_site_id'])); - set_pconfig(local_user(),'posterous','posterous_api_token',trim($_POST['posterous_api_token'])); - - } - -} - -function posterous_post_local(&$a,&$b) { - - // This can probably be changed to allow editing by pointing to a different API endpoint - - if($b['edit']) - return; - - if((! local_user()) || (local_user() != $b['uid'])) - return; - - if($b['private'] || $b['parent']) - return; - - $pstr_post = intval(get_pconfig(local_user(),'posterous','post')); - - $pstr_enable = (($pstr_post && x($_REQUEST,'posterous_enable')) ? intval($_REQUEST['posterous_enable']) : 0); - - if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'posterous','post_by_default'))) - $pstr_enable = 1; - - if(! $pstr_enable) - return; - - if(strlen($b['postopts'])) - $b['postopts'] .= ','; - $b['postopts'] .= 'posterous'; -} - - - - -function posterous_send(&$a,&$b) { - - if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) - return; - - if(! strstr($b['postopts'],'posterous')) - return; - - if($b['parent'] != $b['id']) - return; - - - $pstr_username = get_pconfig($b['uid'],'posterous','posterous_username'); - $pstr_password = get_pconfig($b['uid'],'posterous','posterous_password'); - $pstr_site_id = get_pconfig($b['uid'],'posterous','posterous_site_id'); - $pstr_blog = "http://posterous.com/api/2/sites/$pstr_site_id/posts"; - $pstr_api_token = get_pconfig($b['uid'],'posterous','posterous_api_token'); - - if($pstr_username && $pstr_password && $pstr_blog) { - - require_once('include/bbcode.php'); - $tag_arr = array(); - $tags = ''; - $x = preg_match_all('/\#\[(.*?)\](.*?)\[/',$b['tag'],$matches,PREG_SET_ORDER); - - if($x) { - foreach($matches as $mtch) { - $tag_arr[] = $mtch[2]; - } - } - if(count($tag_arr)) - $tags = implode(',',$tag_arr); - - - $params = array( - 'post[title]' => (($b['title']) ? $b['title'] : t('Post from Friendica')), - 'post[source]' => 'Friendica', - 'post[tags]' => $tags, - 'post[body]' => bbcode($b['body']), - 'api_token' => $pstr_api_token, - 'site_id' => $pstr_site_id - ); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $pstr_blog); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); - curl_setopt($ch, CURLOPT_HEADER, false); - curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); - curl_setopt($ch, CURLOPT_USERPWD, $pstr_username . ':' . $pstr_password); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $params); - - $data = curl_exec($ch); - $result = curl_multi_getcontent($ch); - curl_close($ch); - - logger('posterous_send: ' . $result); - } -} - diff --git a/procrunner/lang/C/messages.po b/procrunner/lang/C/messages.po deleted file mode 100644 index e69de29b..00000000 diff --git a/procrunner/procrunner.php b/procrunner/procrunner.php deleted file mode 100755 index 12f8f41e..00000000 --- a/procrunner/procrunner.php +++ /dev/null @@ -1,55 +0,0 @@ - - * Author: Mike Macgirvin - * Status: Unsupported - */ - -function procrunner_install() { - - $addons = get_config('system','addon'); - if(strstr('poormancron',$addons)) { - logger('procrunner incompatible with poormancron. Not installing procrunner.'); - return; - } - - // check for command line php - $a = get_app(); - $ex = Array(); - $ex[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - $ex[1] = dirname(dirname(dirname(__file__)))."/testargs.php"; - $ex[2] = "test"; - $out = exec(implode(" ", $ex)); - if ($out==="test") { - logger('procrunner not required on this system. Not installing.'); - return; - } else { - register_hook('proc_run', 'addon/procrunner/procrunner.php','procrunner_procrun'); - logger("installed procrunner"); - } - -} - -function procrunner_uninstall() { - unregister_hook('proc_run', 'addon/procrunner/procrunner.php','procrunner_procrun'); - logger("removed procrunner"); -} - - - -function procrunner_procrun(&$a, &$arr) { - return; // deactivated - - $argv = $arr['args']; - $arr['run_cmd'] = false; - logger("procrunner procrun ".implode(", ",$argv)); - array_shift($argv); - $argc = count($argv); - logger("procrunner procrun require_once ".basename($argv[0])); - require_once(basename($argv[0])); - $funcname=str_replace(".php", "", basename($argv[0]))."_run"; - $funcname($argv, $argc); -} diff --git a/retriever/README b/retriever/README deleted file mode 100644 index b9728151..00000000 --- a/retriever/README +++ /dev/null @@ -1,5 +0,0 @@ -"retriever" is deactivated since it has side effects for all received posts. - -It was created in a time when the option 'Fetch further information for feeds' didn't exist. - -To activate it, please go to the list of your contacts, edit the contact and then select between the different options. diff --git a/retriever/database.sql b/retriever/database.sql deleted file mode 100644 index 23cac120..00000000 --- a/retriever/database.sql +++ /dev/null @@ -1,36 +0,0 @@ -CREATE TABLE IF NOT EXISTS `retriever_rule` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `uid` int(11) NOT NULL, - `contact-id` int(11) NOT NULL, - `data` mediumtext NOT NULL, - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - KEY `contact-id` (`contact-id`) -) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; - -CREATE TABLE IF NOT EXISTS `retriever_item` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `item-uri` varchar(800) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, - `item-uid` int(10) unsigned NOT NULL DEFAULT '0', - `contact-id` int(10) unsigned NOT NULL DEFAULT '0', - `resource` int(11) NOT NULL, - `finished` tinyint(1) unsigned NOT NULL DEFAULT '0', - KEY `resource` (`resource`), - KEY `all` (`item-uri`, `item-uid`, `contact-id`), - PRIMARY KEY (`id`) -) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; - -CREATE TABLE IF NOT EXISTS `retriever_resource` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `type` char(255) NOT NULL, - `binary` int(1) NOT NULL DEFAULT 0, - `url` varchar(800) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, - `created` timestamp NOT NULL DEFAULT now(), - `completed` timestamp NULL DEFAULT NULL, - `last-try` timestamp NULL DEFAULT NULL, - `num-tries` int(11) NOT NULL DEFAULT 0, - `data` mediumtext NOT NULL, - `http-code` smallint(1) unsigned NULL DEFAULT NULL, - `redirect-url` varchar(800) CHARACTER SET ascii COLLATE ascii_bin NULL DEFAULT NULL, - PRIMARY KEY (`id`) -) DEFAULT CHARSET=utf8 COLLATE=utf8_bin diff --git a/retriever/lang/C/messages.po b/retriever/lang/C/messages.po deleted file mode 100644 index e9d20af2..00000000 --- a/retriever/lang/C/messages.po +++ /dev/null @@ -1,102 +0,0 @@ -# ADDON retriever -# Copyright (C) -# This file is distributed under the same license as the Friendica retriever addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:45+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: retriever.php:445 -msgid "Retrieved" -msgstr "" - -#: retriever.php:654 -msgid "Enabled" -msgstr "" - -#: retriever.php:658 -msgid "URL Pattern" -msgstr "" - -#: retriever.php:660 -msgid "Regular expression matching part of the URL to replace" -msgstr "" - -#: retriever.php:663 -msgid "URL Replace" -msgstr "" - -#: retriever.php:665 -msgid "Text to replace matching part of above regular expression" -msgstr "" - -#: retriever.php:668 -msgid "Download Images" -msgstr "" - -#: retriever.php:672 -msgid "Retrospectively Apply" -msgstr "" - -#: retriever.php:674 -msgid "Reapply the rules to this number of posts" -msgstr "" - -#: retriever.php:675 -msgid "Retrieve Feed Content" -msgstr "" - -#: retriever.php:677 retriever.php:721 -msgid "Save Settings" -msgstr "" - -#: retriever.php:679 -msgid "Tag" -msgstr "" - -#: retriever.php:680 -msgid "Attribute" -msgstr "" - -#: retriever.php:681 -msgid "Value" -msgstr "" - -#: retriever.php:682 -msgid "Add" -msgstr "" - -#: retriever.php:683 -msgid "Remove" -msgstr "" - -#: retriever.php:684 -msgid "Include" -msgstr "" - -#: retriever.php:686 -msgid "Exclude" -msgstr "" - -#: retriever.php:697 -msgid "Retriever" -msgstr "" - -#: retriever.php:722 -msgid "Retriever Settings" -msgstr "" - -#: retriever.php:725 -msgid "All Photos" -msgstr "" diff --git a/retriever/retriever.php b/retriever/retriever.php deleted file mode 100644 index 72e327b3..00000000 --- a/retriever/retriever.php +++ /dev/null @@ -1,839 +0,0 @@ - - * Status: Unsupported - */ - -require_once('include/html2bbcode.php'); -require_once('include/Photo.php'); - -function retriever_install() { - register_hook('plugin_settings', 'addon/retriever/retriever.php', 'retriever_plugin_settings'); - register_hook('plugin_settings_post', 'addon/retriever/retriever.php', 'retriever_plugin_settings_post'); - register_hook('post_remote', 'addon/retriever/retriever.php', 'retriever_post_remote_hook'); - register_hook('contact_photo_menu', 'addon/retriever/retriever.php', 'retriever_contact_photo_menu'); - register_hook('cron', 'addon/retriever/retriever.php', 'retriever_cron'); - - $r = q("SELECT `id` FROM `pconfig` WHERE `cat` LIKE 'retriever_%%'"); - if (count($r) || (get_config('retriever', 'dbversion') == '0.1')) { - $retrievers = array(); - $r = q("SELECT SUBSTRING(`cat`, 10) AS `contact`, `k`, `v` FROM `pconfig` WHERE `cat` LIKE 'retriever%%'"); - foreach ($r as $rr) { - $retrievers[$rr['contact']][$rr['k']] = $rr['v']; - } - foreach ($retrievers as $k => $v) { - $rr = q("SELECT `uid` FROM `contact` WHERE `id` = %d", intval($k)); - $uid = $rr[0]['uid']; - $v['images'] = 'on'; - q("INSERT INTO `retriever_rule` (`uid`, `contact-id`, `data`) VALUES (%d, %d, '%s')", - intval($uid), intval($k), dbesc(json_encode($v))); - } - q("DELETE FROM `pconfig` WHERE `cat` LIKE 'retriever_%%'"); - set_config('retriever', 'dbversion', '0.2'); - } - if (get_config('retriever', 'dbversion') == '0.2') { - q("ALTER TABLE `retriever_resource` DROP COLUMN `retriever`"); - set_config('retriever', 'dbversion', '0.3'); - } - if (get_config('retriever', 'dbversion') == '0.3') { - q("ALTER TABLE `retriever_item` MODIFY COLUMN `item-uri` varchar(800) CHARACTER SET ascii NOT NULL"); - q("ALTER TABLE `retriever_resource` MODIFY COLUMN `url` varchar(800) CHARACTER SET ascii NOT NULL"); - set_config('retriever', 'dbversion', '0.4'); - } - if (get_config('retriever', 'dbversion') == '0.4') { - q("ALTER TABLE `retriever_item` ADD COLUMN `finished` tinyint(1) unsigned NOT NULL DEFAULT '0'"); - set_config('retriever', 'dbversion', '0.5'); - } - if (get_config('retriever', 'dbversion') == '0.5') { - q('ALTER TABLE `retriever_resource` CHANGE `created` `created` timestamp NOT NULL DEFAULT now()'); - q('ALTER TABLE `retriever_resource` CHANGE `completed` `completed` timestamp NULL DEFAULT NULL'); - q('ALTER TABLE `retriever_resource` CHANGE `last-try` `last-try` timestamp NULL DEFAULT NULL'); - q('ALTER TABLE `retriever_item` DROP KEY `all`'); - q('ALTER TABLE `retriever_item` ADD KEY `all` (`item-uri`, `item-uid`, `contact-id`)'); - set_config('retriever', 'dbversion', '0.6'); - } - if (get_config('retriever', 'dbversion') == '0.6') { - q('ALTER TABLE `retriever_item` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin'); - q('ALTER TABLE `retriever_item` CHANGE `item-uri` `item-uri` varchar(800) CHARACTER SET ascii COLLATE ascii_bin NOT NULL'); - q('ALTER TABLE `retriever_resource` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin'); - q('ALTER TABLE `retriever_resource` CHANGE `url` `url` varchar(800) CHARACTER SET ascii COLLATE ascii_bin NOT NULL'); - q('ALTER TABLE `retriever_rule` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin'); - set_config('retriever', 'dbversion', '0.7'); - } - if (get_config('retriever', 'dbversion') == '0.7') { - $r = q("SELECT `id`, `data` FROM `retriever_rule`"); - foreach ($r as $rr) { - logger('retriever_install: retriever ' . $rr['id'] . ' old config ' . $rr['data'], LOGGER_DATA); - $data = json_decode($rr['data'], true); - if ($data['pattern']) { - $matches = array(); - if (preg_match("/\/(.*)\//", $data['pattern'], $matches)) { - $data['pattern'] = $matches[1]; - } - } - if ($data['match']) { - $include = array(); - foreach (explode('|', $data['match']) as $component) { - $matches = array(); - if (preg_match("/([A-Za-z][A-Za-z0-9]*)\[@([A-Za-z][a-z0-9]*)='([^']*)'\]/", $component, $matches)) { - $include[] = array( - 'element' => $matches[1], - 'attribute' => $matches[2], - 'value' => $matches[3]); - } - if (preg_match("/([A-Za-z][A-Za-z0-9]*)\[contains(concat(' ',normalize-space(@class),' '),' ([^ ']+) ')]/", $component, $matches)) { - $include[] = array( - 'element' => $matches[1], - 'attribute' => $matches[2], - 'value' => $matches[3]); - } - } - $data['include'] = $include; - unset($data['match']); - } - if ($data['remove']) { - $exclude = array(); - foreach (explode('|', $data['remove']) as $component) { - $matches = array(); - if (preg_match("/([A-Za-z][A-Za-z0-9]*)\[@([A-Za-z][a-z0-9]*)='([^']*)'\]/", $component, $matches)) { - $exclude[] = array( - 'element' => $matches[1], - 'attribute' => $matches[2], - 'value' => $matches[3]); - } - if (preg_match("/([A-Za-z][A-Za-z0-9]*)\[contains(concat(' ',normalize-space(@class),' '),' ([^ ']+) ')]/", $component, $matches)) { - $exclude[] = array( - 'element' => $matches[1], - 'attribute' => $matches[2], - 'value' => $matches[3]); - } - } - $data['exclude'] = $exclude; - unset($data['remove']); - } - $r = q('UPDATE `retriever_rule` SET `data` = "%s" WHERE `id` = %d', dbesc(json_encode($data)), $rr['id']); - logger('retriever_install: retriever ' . $rr['id'] . ' new config ' . json_encode($data), LOGGER_DATA); - } - set_config('retriever', 'dbversion', '0.8'); - } - if (get_config('retriever', 'dbversion') == '0.8') { - q("ALTER TABLE `retriever_resource` ADD COLUMN `http-code` smallint(1) unsigned NULL DEFAULT NULL"); - set_config('retriever', 'dbversion', '0.9'); - } - if (get_config('retriever', 'dbversion') == '0.9') { - q("ALTER TABLE `retriever_item` DROP COLUMN `parent`"); - q("ALTER TABLE `retriever_resource` ADD COLUMN `redirect-url` varchar(800) CHARACTER SET ascii COLLATE ascii_bin NULL DEFAULT NULL"); - set_config('retriever', 'dbversion', '0.10'); - } - - if (get_config('retriever', 'dbversion') != '0.10') { - $schema = file_get_contents(dirname(__file__).'/database.sql'); - $arr = explode(';', $schema); - foreach ($arr as $a) { - $r = q($a); - } - set_config('retriever', 'dbversion', '0.10'); - } -} - -function retriever_uninstall() { - unregister_hook('plugin_settings', 'addon/retriever/retriever.php', 'retriever_plugin_settings'); - unregister_hook('plugin_settings_post', 'addon/retriever/retriever.php', 'retriever_plugin_settings_post'); - unregister_hook('post_remote', 'addon/retriever/retriever.php', 'retriever_post_remote_hook'); - unregister_hook('plugin_settings', 'addon/retriever/retriever.php', 'retriever_plugin_settings'); - unregister_hook('plugin_settings_post', 'addon/retriever/retriever.php', 'retriever_plugin_settings_post'); - unregister_hook('contact_photo_menu', 'addon/retriever/retriever.php', 'retriever_contact_photo_menu'); - unregister_hook('cron', 'addon/retriever/retriever.php', 'retriever_cron'); -} - -function retriever_module() {} - -function retriever_cron($a, $b) { - // 100 is a nice sane number. Maybe this should be configurable. - retriever_retrieve_items(100); - retriever_tidy(); -} - -$retriever_item_count = 0; - -function retriever_retrieve_items($max_items) { - global $retriever_item_count; - - $retriever_schedule = array(array(1,'minute'), - array(10,'minute'), - array(1,'hour'), - array(1,'day'), - array(2,'day'), - array(1,'week'), - array(1,'month')); - - $schedule_clauses = array(); - for ($i = 0; $i < count($retriever_schedule); $i++) { - $num = $retriever_schedule[$i][0]; - $unit = $retriever_schedule[$i][1]; - array_push($schedule_clauses, - '(`num-tries` = ' . $i . ' AND TIMESTAMPADD(' . dbesc($unit) . - ', ' . intval($num) . ', `last-try`) < now())'); - } - - $retrieve_items = $max_items - $retriever_item_count; - logger('retriever_retrieve_items: asked for maximum ' . $max_items . ', already retrieved ' . $retriever_item_count . ', retrieve ' . $retrieve_items, LOGGER_DEBUG); - do { - $r = q("SELECT * FROM `retriever_resource` WHERE `completed` IS NULL AND (`last-try` IS NULL OR %s) ORDER BY `last-try` ASC LIMIT %d", - dbesc(implode($schedule_clauses, ' OR ')), - intval($retrieve_items)); - if (!is_array($r)) { - break; - } - if (count($r) == 0) { - break; - } - logger('retriever_retrieve_items: found ' . count($r) . ' waiting resources in database', LOGGER_DEBUG); - foreach ($r as $rr) { - retrieve_resource($rr); - $retriever_item_count++; - } - $retrieve_items = $max_items - $retriever_item_count; - } - while ($retrieve_items > 0); - - /* Look for items that are waiting even though the resource has - * completed. This usually happens because we've been asked to - * retrospectively apply a config change. It could also happen - * due to a cron job dying or something. */ - $r = q("SELECT retriever_resource.`id` as resource, retriever_item.`id` as item FROM retriever_resource, retriever_item, retriever_rule WHERE retriever_item.`finished` = 0 AND retriever_item.`resource` = retriever_resource.`id` AND retriever_resource.`completed` IS NOT NULL AND retriever_item.`contact-id` = retriever_rule.`contact-id` AND retriever_item.`item-uid` = retriever_rule.`uid` LIMIT %d", - intval($retrieve_items)); - if (!$r) { - $r = array(); - } - logger('retriever_retrieve_items: items waiting even though resource has completed: ' . count($r), LOGGER_DEBUG); - foreach ($r as $rr) { - $resource = q("SELECT * FROM retriever_resource WHERE `id` = %d", $rr['resource']); - $retriever_item = retriever_get_retriever_item($rr['item']); - if (!$retriever_item) { - logger('retriever_retrieve_items: no retriever item with id ' . $rr['item'], LOGGER_NORMAL); - continue; - } - $item = retriever_get_item($retriever_item); - if (!$item) { - logger('retriever_retrieve_items: no item ' . $retriever_item['item-uri'], LOGGER_NORMAL); - continue; - } - $retriever = get_retriever($item['contact-id'], $item['uid']); - if (!$retriever) { - logger('retriever_retrieve_items: no retriever for item ' . - $retriever_item['item-uri'] . ' ' . $retriever_item['uid'] . ' ' . $item['contact-id'], - LOGGER_NORMAL); - continue; - } - retriever_apply_completed_resource_to_item($retriever, $item, $resource[0]); - q("UPDATE `retriever_item` SET `finished` = 1 WHERE id = %d", - intval($retriever_item['id'])); - retriever_check_item_completed($item); - } -} - -function retriever_tidy() { - q("DELETE FROM retriever_resource WHERE completed IS NOT NULL AND completed < DATE_SUB(now(), INTERVAL 1 WEEK)"); - q("DELETE FROM retriever_resource WHERE completed IS NULL AND created < DATE_SUB(now(), INTERVAL 3 MONTH)"); - - $r = q("SELECT retriever_item.id FROM retriever_item LEFT OUTER JOIN retriever_resource ON (retriever_item.resource = retriever_resource.id) WHERE retriever_resource.id is null"); - logger('retriever_tidy: found ' . count($r) . ' retriever_items with no retriever_resource'); - foreach ($r as $rr) { - q('DELETE FROM retriever_item WHERE id = %d', intval($rr['id'])); - } -} - -function retrieve_resource($resource) { - $a = get_app(); - - logger('retrieve_resource: ' . ($resource['num-tries'] + 1) . - ' attempt at resource ' . $resource['id'] . ' ' . $resource['url'], LOGGER_DEBUG); - $redirects; - $cookiejar = tempnam(get_temppath(), 'cookiejar-retriever-'); - $fetch_result = z_fetch_url($resource['url'], $resource['binary'], $redirects, array('cookiejar' => $cookiejar)); - unlink($cookiejar); - $resource['data'] = $fetch_result['body']; - $resource['http-code'] = $a->get_curl_code(); - $resource['type'] = $a->get_curl_content_type(); - $resource['redirect-url'] = $fetch_result['redirect_url']; - logger('retrieve_resource: got code ' . $resource['http-code'] . - ' retrieving resource ' . $resource['id'] . - ' final url ' . $resource['redirect-url'], LOGGER_DEBUG); - q("UPDATE `retriever_resource` SET `last-try` = now(), `num-tries` = `num-tries` + 1, `http-code` = %d, `redirect-url` = '%s' WHERE id = %d", - intval($resource['http-code']), - dbesc($resource['redirect-url']), - intval($resource['id'])); - if ($resource['data']) { - q("UPDATE `retriever_resource` SET `completed` = now(), `data` = '%s', `type` = '%s' WHERE id = %d", - dbesc($resource['data']), - dbesc($resource['type']), - intval($resource['id'])); - retriever_resource_completed($resource); - } -} - -function get_retriever($contact_id, $uid, $create = false) { - $r = q("SELECT * FROM `retriever_rule` WHERE `contact-id` = %d AND `uid` = %d", - intval($contact_id), intval($uid)); - if (count($r)) { - $r[0]['data'] = json_decode($r[0]['data'], true); - return $r[0]; - } - if ($create) { - q("INSERT INTO `retriever_rule` (`uid`, `contact-id`) VALUES (%d, %d)", - intval($uid), intval($contact_id)); - $r = q("SELECT * FROM `retriever_rule` WHERE `contact-id` = %d AND `uid` = %d", - intval($contact_id), intval($uid)); - return $r[0]; - } -} - -function retriever_get_retriever_item($id) { - $retriever_items = q("SELECT * FROM `retriever_item` WHERE id = %d", intval($id)); - if (count($retriever_items) != 1) { - logger('retriever_get_retriever_item: unable to find retriever_item ' . $id, LOGGER_NORMAL); - return; - } - return $retriever_items[0]; -} - -function retriever_get_item($retriever_item) { - $items = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d AND `contact-id` = %d", - dbesc($retriever_item['item-uri']), - intval($retriever_item['item-uid']), - intval($retriever_item['contact-id'])); - if (count($items) != 1) { - logger('retriever_get_item: unexpected number of results ' . - count($items) . " when searching for item $uri $uid $cid", LOGGER_NORMAL); - return; - } - return $items[0]; -} - -function retriever_item_completed($retriever_item_id, $resource) { - logger('retriever_item_completed: id ' . $retriever_item_id . ' url ' . $resource['url'], LOGGER_DEBUG); - - $retriever_item = retriever_get_retriever_item($retriever_item_id); - if (!$retriever_item) { - return; - } - // Note: the retriever might be null. Doesn't matter. - $retriever = get_retriever($retriever_item['contact-id'], $retriever_item['item-uid']); - $item = retriever_get_item($retriever_item); - if (!$item) { - return; - } - - retriever_apply_completed_resource_to_item($retriever, $item, $resource); - - q("UPDATE `retriever_item` SET `finished` = 1 WHERE id = %d", - intval($retriever_item['id'])); - retriever_check_item_completed($item); -} - -function retriever_resource_completed($resource) { - logger('retriever_resource_completed: id ' . $resource['id'] . ' url ' . $resource['url'], LOGGER_DEBUG); - $r = q("SELECT `id` FROM `retriever_item` WHERE `resource` = %d", $resource['id']); - foreach ($r as $rr) { - retriever_item_completed($rr['id'], $resource); - } -} - -function apply_retrospective($retriever, $num) { - $r = q("SELECT * FROM `item` WHERE `contact-id` = %d ORDER BY `received` DESC LIMIT %d", - intval($retriever['contact-id']), intval($num)); - foreach ($r as $item) { - q('UPDATE `item` SET `visible` = 0 WHERE `id` = %d', $item['id']); - q('UPDATE `thread` SET `visible` = 0 WHERE `iid` = %d', $item['id']); - retriever_on_item_insert($retriever, $item); - } -} - -function retriever_on_item_insert($retriever, &$item) { - if (!$retriever || !$retriever['id']) { - logger('retriever_on_item_insert: No retriever supplied', LOGGER_NORMAL); - return; - } - if (!$retriever["data"]['enable'] == "on") { - return; - } - if ($retriever["data"]['pattern']) { - $url = preg_replace('/' . $retriever["data"]['pattern'] . '/', $retriever["data"]['replace'], $item['plink']); - logger('retriever_on_item_insert: Changed ' . $item['plink'] . ' to ' . $url, LOGGER_DATA); - } - else { - $url = $item['plink']; - } - - $resource = add_retriever_resource($url); - $retriever_item_id = add_retriever_item($item, $resource); -} - -function add_retriever_resource($url, $binary = false) { - logger('add_retriever_resource: ' . $url, LOGGER_DEBUG); - - $scheme = parse_url($url, PHP_URL_SCHEME); - if ($scheme == 'data') { - $fp = fopen($url, 'r'); - $meta = stream_get_meta_data($fp); - $type = $meta['mediatype']; - $data = stream_get_contents($fp); - fclose($fp); - - $url = 'md5://' . hash('md5', $url); - $r = q("SELECT * FROM `retriever_resource` WHERE `url` = '%s'", dbesc($url)); - $resource = $r[0]; - if (count($r)) { - logger('add_retriever_resource: Resource ' . $url . ' already requested', LOGGER_DEBUG); - return $resource; - } - - logger('retrieve_resource: got data URL type ' . $resource['type'], LOGGER_DEBUG); - q("INSERT INTO `retriever_resource` (`type`, `binary`, `url`, `completed`, `data`) " . - "VALUES ('%s', %d, '%s', now(), '%s')", - dbesc($type), - intval($binary ? 1 : 0), - dbesc($url), - dbesc($data)); - $r = q("SELECT * FROM `retriever_resource` WHERE `url` = '%s'", dbesc($url)); - $resource = $r[0]; - if (count($r)) { - retriever_resource_completed($resource); - } - return $resource; - } - - if (strlen($url) > 800) { - logger('add_retriever_resource: URL is longer than 800 characters', LOGGER_NORMAL); - } - - $r = q("SELECT * FROM `retriever_resource` WHERE `url` = '%s'", dbesc($url)); - $resource = $r[0]; - if (count($r)) { - logger('add_retriever_resource: Resource ' . $url . ' already requested', LOGGER_DEBUG); - return $resource; - } - - q("INSERT INTO `retriever_resource` (`binary`, `url`) " . - "VALUES (%d, '%s')", intval($binary ? 1 : 0), dbesc($url)); - $r = q("SELECT * FROM `retriever_resource` WHERE `url` = '%s'", dbesc($url)); - return $r[0]; -} - -function add_retriever_item(&$item, $resource) { - logger('add_retriever_item: ' . $resource['url'] . ' for ' . $item['uri'] . ' ' . $item['uid'] . ' ' . $item['contact-id'], LOGGER_DEBUG); - - q("INSERT INTO `retriever_item` (`item-uri`, `item-uid`, `contact-id`, `resource`) " . - "VALUES ('%s', %d, %d, %d)", - dbesc($item['uri']), intval($item['uid']), intval($item['contact-id']), intval($resource["id"])); - $r = q("SELECT id FROM `retriever_item` WHERE " . - "`item-uri` = '%s' AND `item-uid` = %d AND `contact-id` = %d AND `resource` = %d ORDER BY id DESC", - dbesc($item['uri']), intval($item['uid']), intval($item['contact-id']), intval($resource['id'])); - if (!count($r)) { - logger("add_retriever_item: couldn't create retriever item for " . - $item['uri'] . ' ' . $item['uid'] . ' ' . $item['contact-id'], - LOGGER_NORMAL); - return; - } - logger('add_retriever_item: created retriever_item ' . $r[0]['id'] . ' for item ' . $item['uri'] . ' ' . $item['uid'] . ' ' . $item['contact-id'], LOGGER_DEBUG); - return $r[0]['id']; -} - -function retriever_get_encoding($resource) { - $matches = array(); - if (preg_match('/charset=(.*)/', $resource['type'], $matches)) { - return trim(array_pop($matches)); - } - return 'utf-8'; -} - -function retriever_apply_xslt_text($xslt_text, $doc) { - if (!$xslt_text) { - logger('retriever_apply_xslt_text: empty XSLT text', LOGGER_NORMAL); - return $doc; - } - $xslt_doc = new DOMDocument(); - if (!$xslt_doc->loadXML($xslt_text)) { - logger('retriever_apply_xslt_text: could not load XML', LOGGER_NORMAL); - return $doc; - } - $xp = new XsltProcessor(); - $xp->importStylesheet($xslt_doc); - $result = $xp->transformToDoc($doc); - return $result; -} - -function retriever_apply_dom_filter($retriever, &$item, $resource) { - logger('retriever_apply_dom_filter: applying XSLT to ' . $item['id'] . ' ' . $item['uri'] . ' contact ' . $item['contact-id'], LOGGER_DEBUG); - - if (!$retriever['data']['include'] && !$retriever['data']['customxslt']) { - return; - } - if (!$resource['data']) { - logger('retriever_apply_dom_filter: no text to work with', LOGGER_NORMAL); - return; - } - - $encoding = retriever_get_encoding($resource); - $content = mb_convert_encoding($resource['data'], 'HTML-ENTITIES', $encoding); - $doc = new DOMDocument('1.0', 'UTF-8'); - if (strpos($resource['type'], 'html') !== false) { - @$doc->loadHTML($content); - } - else { - $doc->loadXML($content); - } - - $params = array('$spec' => $retriever['data']); - $extract_template = get_markup_template('extract.tpl', 'addon/retriever/'); - $extract_xslt = replace_macros($extract_template, $params); - if ($retriever['data']['include']) { - $doc = retriever_apply_xslt_text($extract_xslt, $doc); - } - if ($retriever['data']['customxslt']) { - $doc = retriever_apply_xslt_text($retriever['data']['customxslt'], $doc); - } - if (!$doc) { - logger('retriever_apply_dom_filter: failed to apply extract XSLT template', LOGGER_NORMAL); - return; - } - - $components = parse_url($resource['redirect-url']); - $rooturl = $components['scheme'] . "://" . $components['host']; - $dirurl = $rooturl . dirname($components['path']) . "/"; - $params = array('$dirurl' => $dirurl, '$rooturl' => $rooturl); - $fix_urls_template = get_markup_template('fix-urls.tpl', 'addon/retriever/'); - $fix_urls_xslt = replace_macros($fix_urls_template, $params); - $doc = retriever_apply_xslt_text($fix_urls_xslt, $doc); - if (!$doc) { - logger('retriever_apply_dom_filter: failed to apply fix urls XSLT template', LOGGER_NORMAL); - return; - } - - $item['body'] = html2bbcode($doc->saveXML()); - if (!strlen($item['body'])) { - logger('retriever_apply_dom_filter retriever ' . $retriever['id'] . ' item ' . $item['id'] . ': output was empty', LOGGER_NORMAL); - return; - } - $item['body'] .= "\n\n" . t('Retrieved') . ' ' . date("Y-m-d") . ': [url='; - $item['body'] .= $item['plink']; - $item['body'] .= ']' . $item['plink'] . '[/url]'; - q("UPDATE `item` SET `body` = '%s' WHERE `id` = %d", - dbesc($item['body']), intval($item['id'])); -} - -function retrieve_images(&$item) { - $matches1 = array(); - preg_match_all("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", $item["body"], $matches1); - $matches2 = array(); - preg_match_all("/\[img\](.*?)\[\/img\]/ism", $item["body"], $matches2); - $matches = array_merge($matches1[3], $matches2[1]); - logger('retrieve_images: found ' . count($matches) . ' images for item ' . $item['uri'] . ' ' . $item['uid'] . ' ' . $item['contact-id'], LOGGER_DEBUG); - foreach ($matches as $url) { - if (strpos($url, get_app()->get_baseurl()) === FALSE) { - $resource = add_retriever_resource($url, true); - if (!$resource['completed']) { - add_retriever_item($item, $resource); - } - else { - retriever_transform_images($item, $resource); - } - } - } -} - -function retriever_check_item_completed(&$item) -{ - $r = q('SELECT count(*) FROM retriever_item WHERE `item-uri` = "%s" ' . - 'AND `item-uid` = %d AND `contact-id` = %d AND `finished` = 0', - dbesc($item['uri']), intval($item['uid']), - intval($item['contact-id'])); - $waiting = $r[0]['count(*)']; - logger('retriever_check_item_completed: item ' . $item['uri'] . ' ' . $item['uid'] - . ' '. $item['contact-id'] . ' waiting for ' . $waiting . ' resources', LOGGER_DEBUG); - $old_visible = $item['visible']; - $item['visible'] = $waiting ? 0 : 1; - if (($item['id'] > 0) && ($old_visible != $item['visible'])) { - logger('retriever_check_item_completed: changing visible flag to ' . $item['visible'] . ' and invoking notifier ("edit_post", ' . $item['id'] . ')', LOGGER_DEBUG); - q("UPDATE `item` SET `visible` = %d WHERE `id` = %d", - intval($item['visible']), - intval($item['id'])); - q("UPDATE `thread` SET `visible` = %d WHERE `iid` = %d", - intval($item['visible']), - intval($item['id'])); - } -} - -function retriever_apply_completed_resource_to_item($retriever, &$item, $resource) { - logger('retriever_apply_completed_resource_to_item: retriever ' . - ($retriever ? $retriever['id'] : 'none') . - ' resource ' . $resource['url'] . ' plink ' . $item['plink'], LOGGER_DEBUG); - if (strpos($resource['type'], 'image') !== false) { - retriever_transform_images($item, $resource); - } - if (!$retriever) { - return; - } - if ((strpos($resource['type'], 'html') !== false) || - (strpos($resource['type'], 'xml') !== false)) { - retriever_apply_dom_filter($retriever, $item, $resource); - if ($retriever["data"]['images'] ) { - retrieve_images($item); - } - } -} - -function retriever_store_photo($item, &$resource) { - $hash = photo_new_resource(); - - if (class_exists('Imagick')) { - try { - $image = new Imagick(); - $image->readImageBlob($resource['data']); - $resource['width'] = $image->getImageWidth(); - $resource['height'] = $image->getImageHeight(); - } - catch (Exception $e) { - logger("ImageMagick couldn't process image " . $resource['id'] . " " . $resource['url'] . ' length ' . strlen($resource['data']) . ': ' . $e->getMessage(), LOGGER_DEBUG); - return false; - } - } - if (!array_key_exists('width', $resource)) { - $image = @imagecreatefromstring($resource['data']); - if ($image === false) { - logger("Couldn't process image " . $resource['id'] . " " . $resource['url'], LOGGER_DEBUG); - return false; - } - $resource['width'] = imagesx($image); - $resource['height'] = imagesy($image); - imagedestroy($image); - } - - $url_components = parse_url($resource['url']); - $filename = basename($url_components['path']); - if (!strlen($filename)) { - $filename = 'image'; - } - $r = q("INSERT INTO `photo` - ( `uid`, `contact-id`, `guid`, `resource-id`, `created`, `edited`, `filename`, `type`, `album`, `height`, `width`, `datasize`, `data` ) - VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, '%s' )", - intval($item['item-uid']), - intval($item['contact-id']), - dbesc(get_guid()), - dbesc($hash), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc($filename), - dbesc($resource['type']), - dbesc('Retrieved Images'), - intval($resource['height']), - intval($resource['width']), - intval(strlen($resource['data'])), - dbesc($resource['data']) - ); - - return $hash; -} - -function retriever_transform_images(&$item, $resource) { - if (!$resource["data"]) { - logger('retriever_transform_images: no data available for ' - . $resource['id'] . ' ' . $resource['url'], LOGGER_NORMAL); - return; - } - - $hash = retriever_store_photo($item, $resource); - if ($hash === false) { - logger('retriever_transform_images: unable to store photo ' - . $resource['id'] . ' ' . $resource['url'], LOGGER_NORMAL); - return; - } - - $new_url = get_app()->get_baseurl() . '/photo/' . $hash; - logger('retriever_transform_images: replacing ' . $resource['url'] . ' with ' . - $new_url . ' in item ' . $item['plink'], LOGGER_DEBUG); - $transformed = str_replace($resource["url"], $new_url, $item['body']); - if ($transformed === $item['body']) { - return; - } - - $item['body'] = $transformed; - q("UPDATE `item` SET `body` = '%s' WHERE `plink` = '%s' AND `uid` = %d AND `contact-id` = %d", - dbesc($item['body']), - dbesc($item['plink']), - intval($item['uid']), - intval($item['contact-id'])); -} - -function retriever_content($a) { - if (!local_user()) { - $a->page['content'] .= "

Please log in

"; - return; - } - if ($a->argv[1] === 'help') { - $feeds = q("SELECT `id`, `name`, `thumb` FROM contact WHERE `uid` = %d AND `network` = 'feed'", - local_user()); - foreach ($feeds as $k=>$v) { - $feeds[$k]['url'] = $a->get_baseurl() . '/retriever/' . $v['id']; - } - $template = get_markup_template('/help.tpl', 'addon/retriever/'); - $a->page['content'] .= replace_macros($template, array( - '$config' => $a->get_baseurl() . '/settings/addon', - '$feeds' => $feeds)); - return; - } - if ($a->argv[1]) { - $retriever = get_retriever($a->argv[1], local_user(), false); - - if (x($_POST["id"])) { - $retriever = get_retriever($a->argv[1], local_user(), true); - $retriever["data"] = array(); - foreach (array('pattern', 'replace', 'enable', 'images', 'customxslt') as $setting) { - if (x($_POST['retriever_' . $setting])) { - $retriever["data"][$setting] = $_POST['retriever_' . $setting]; - } - } - foreach ($_POST as $k=>$v) { - if (preg_match("/retriever-(include|exclude)-(\d+)-(element|attribute|value)/", $k, $matches)) { - $retriever['data'][$matches[1]][intval($matches[2])][$matches[3]] = $v; - } - } - // You've gotta have an element, even if it's just "*" - foreach ($retriever['data']['include'] as $k=>$clause) { - if (!$clause['element']) { - unset($retriever['data']['include'][$k]); - } - } - foreach ($retriever['data']['exclude'] as $k=>$clause) { - if (!$clause['element']) { - unset($retriever['data']['exclude'][$k]); - } - } - q("UPDATE `retriever_rule` SET `data`='%s' WHERE `id` = %d", - dbesc(json_encode($retriever["data"])), intval($retriever["id"])); - $a->page['content'] .= "

Settings Updated"; - if (x($_POST["retriever_retrospective"])) { - apply_retrospective($retriever, $_POST["retriever_retrospective"]); - $a->page['content'] .= " and retrospectively applied to " . $_POST["apply"] . " posts"; - } - $a->page['content'] .= ".

"; - } - - $template = get_markup_template('/rule-config.tpl', 'addon/retriever/'); - $a->page['content'] .= replace_macros($template, array( - '$enable' => array( - 'retriever_enable', - t('Enabled'), - $retriever['data']['enable']), - '$pattern' => array( - 'retriever_pattern', - t('URL Pattern'), - $retriever["data"]['pattern'], - t('Regular expression matching part of the URL to replace')), - '$replace' => array( - 'retriever_replace', - t('URL Replace'), - $retriever["data"]['replace'], - t('Text to replace matching part of above regular expression')), - '$images' => array( - 'retriever_images', - t('Download Images'), - $retriever['data']['images']), - '$retrospective' => array( - 'retriever_retrospective', - t('Retrospectively Apply'), - '0', - t('Reapply the rules to this number of posts')), - '$customxslt' => array( - 'retriever_customxslt', - t('Custom XSLT'), - $retriever['data']['customxslt'], - t("When standard rules aren't enough, apply custom XSLT to the article")), - '$title' => t('Retrieve Feed Content'), - '$help' => $a->get_baseurl() . '/retriever/help', - '$help_t' => t('Get Help'), - '$submit_t' => t('Submit'), - '$submit' => t('Save Settings'), - '$id' => ($retriever["id"] ? $retriever["id"] : "create"), - '$tag_t' => t('Tag'), - '$attribute_t' => t('Attribute'), - '$value_t' => t('Value'), - '$add_t' => t('Add'), - '$remove_t' => t('Remove'), - '$include_t' => t('Include'), - '$include' => $retriever['data']['include'], - '$exclude_t' => t('Exclude'), - '$exclude' => $retriever["data"]['exclude'])); - return; - } -} - -function retriever_contact_photo_menu($a, &$args) { - if (!$args) { - return; - } - if ($args["contact"]["network"] == "feed") { - $args["menu"][ 'retriever' ] = array(t('Retriever'), $a->get_baseurl() . '/retriever/' . $args["contact"]['id']); - } -} - -function retriever_post_remote_hook(&$a, &$item) { - logger('retriever_post_remote_hook: ' . $item['uri'] . ' ' . $item['uid'] . ' ' . $item['contact-id'], LOGGER_DEBUG); - - $retriever = get_retriever($item['contact-id'], $item["uid"], false); - if ($retriever) { - retriever_on_item_insert($retriever, $item); - } - else { - if (get_pconfig($item["uid"], 'retriever', 'oembed')) { - // Convert to HTML and back to take advantage of bbcode's resolution of oembeds. - $body = html2bbcode(bbcode($item['body'])); - if ($body) { - $item['body'] = $body; - } - } - if (get_pconfig($item["uid"], 'retriever', 'all_photos')) { - retrieve_images($item, null); - } - } - retriever_check_item_completed($item); -} - -function retriever_plugin_settings(&$a,&$s) { - $all_photos = get_pconfig(local_user(), 'retriever', 'all_photos'); - $oembed = get_pconfig(local_user(), 'retriever', 'oembed'); - $template = get_markup_template('/settings.tpl', 'addon/retriever/'); - $s .= replace_macros($template, array( - '$allphotos' => array( - 'retriever_all_photos', - t('All Photos'), - $all_photos, - t('Check this to retrieve photos for all posts')), - '$oembed' => array( - 'retriever_oembed', - t('Resolve OEmbed'), - $oembed, - t('Check this to attempt to retrieve embedded content for all posts - useful e.g. for Facebook posts')), - '$submit' => t('Save Settings'), - '$title' => t('Retriever Settings'), - '$help' => $a->get_baseurl() . '/retriever/help')); -} - -function retriever_plugin_settings_post($a,$post) { - if ($_POST['retriever_all_photos']) { - set_pconfig(local_user(), 'retriever', 'all_photos', $_POST['retriever_all_photos']); - } - else { - del_pconfig(local_user(), 'retriever', 'all_photos'); - } - if ($_POST['retriever_oembed']) { - set_pconfig(local_user(), 'retriever', 'oembed', $_POST['retriever_oembed']); - } - else { - del_pconfig(local_user(), 'retriever', 'oembed'); - } -} diff --git a/retriever/templates/extract.tpl b/retriever/templates/extract.tpl deleted file mode 100644 index fd38bde6..00000000 --- a/retriever/templates/extract.tpl +++ /dev/null @@ -1,31 +0,0 @@ - - - - - -{{function clause_xpath}} -{{if !$clause.attribute}} -{{$clause.element}}{{elseif $clause.attribute == 'class'}} -{{$clause.element}}[contains(concat(' ', normalize-space(@class), ' '), '{{$clause.value}}')]{{else}} -{{$clause.element}}[@{{$clause.attribute}}='{{$clause.value}}']{{/if}} -{{/function}} - -{{foreach $spec.include as $clause}} - - - - - -{{/foreach}} - -{{foreach $spec.exclude as $clause}} - -{{/foreach}} - - - - - - - - diff --git a/retriever/templates/fix-urls.tpl b/retriever/templates/fix-urls.tpl deleted file mode 100644 index 5bb665ab..00000000 --- a/retriever/templates/fix-urls.tpl +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/retriever/templates/help.tpl b/retriever/templates/help.tpl deleted file mode 100644 index 10b421d0..00000000 --- a/retriever/templates/help.tpl +++ /dev/null @@ -1,148 +0,0 @@ -

Retriever Plugin Help

-

-This plugin replaces the short excerpts you normally get in RSS feeds -with the full content of the article from the source website. You -specify which part of the page you're interested in with a set of -rules. When each item arrives, the plugin downloads the full page -from the website, extracts content using the rules, and replaces the -original article. -

-

-There's a few reasons you may want to do this. The source website -might be slow or overloaded. The source website might be -untrustworthy, in which case using Friendica to scrub the HTML is a -good idea. You might be on a LAN that blacklists certain websites. -It also works neatly with the mailstream plugin, allowing you to read -a news stream comfortably without needing continuous Internet -connectivity. -

-

-However, setting up retriever can be quite tricky since it depends on -the internal design of the website. That was designed to make life -easy for the website's developers, not for you. You'll need to have -some familiarity with HTML, and be willing to adapt when the website -suddenly changes everything without notice. -

-

Configuring Retriever for a feed

-

-To set up retriever for an RSS feed, go to the "Contacts" page and -find your feed. Then click on the drop-down menu on the contact. -Select "Retriever" to get to the retriever configuration. -

-

-The "Include" configuration section specifies parts of the page to -include in the article. Each row has three components: -

-
    -
  • An HTML tag (e.g. "div", "span", "p")
  • -
  • An attribute (usually "class" or "id")
  • -
  • A value for the attribute
  • -
-

-A simple case is when the article is wrapped in a "div" element: -

-
-    ...
-    <div class="ArticleWrapper">
-      <h2>Man Bites Dog</h2>
-      <img src="mbd.jpg">
-      <p>
-        Residents of the sleepy community of Nowheresville were
-        shocked yesterday by the sight of creepy local weirdo Jim
-        McOddman assaulting innocent local dog Snufflekins with his
-        false teeth.
-      </p>
-      ...
-    </div>
-    ...
-
-

-You then specify the tag "div", attribute "class", and value -"ArticleWrapper". Everything else in the page, such as navigation -panels and menus and footers and so on, will be discarded. If there -is more than one section of the page you want to include, specify each -one on a separate row. If the matching section contains some sections -you want to remove, specify those in the "Exclude" section in the same -way. -

-

-Once you've got a configuration that you think will work, you can try -it out on some existing articles. Type a number into the -"Retrospectively Apply" box and click "Submit". After a while -(exactly how long depends on your system's cron configuration) the new -articles should be available. -

-

Techniques

-

-You can leave the attribute and value blank to include all the -corresponding elements with the specified tag name. You can also use -a tag name of just an asterisk ("*"), which will match any element type with the -specified attribute regardless of the tag. -

-

-Note that the "class" attribute is a special case. Many web page -templates will put multiple different classes in the same element, -separated by spaces. If you specify an attribute of "class" it will -match an element if any of its classes matches the specified value. -For example: -

-
-    <div class="article breaking-news">
-
-

-In this case you can specify a value of "article", or "breaking-news". -You can also specify "article breaking-news", but that won't match if -the website suddenly changes to "breaking-news article", so that's not -recommended. -

-

-One useful trick you can try is using the website's "print" pages. -Many news sites have print versions of all their articles. These are -usually drastically simplified compared to the live website page. -Sometimes this is a good way to get the whole article when it's -normally split across multiple pages. -

-

-Hopefully the URL for the print page is a predictable variant of the -normal article URL. For example, an article URL like: -

-
-    http://www.newssite.com/article-8636.html
-
-

-...might have a print version at: -

-
-    http://www.newssite.com/print/article-8636.html
-
-

-To change the URL used to retrieve the page, use the "URL Pattern" and -"URL Replace" fields. The pattern is a regular expression matching -part of the URL to replace. In this case, you might use a pattern of -"/article" and a replace string of "/print/article". A common pattern -is simply a dollar sign ("$"), used to add the replace string to the end of the URL. -

-

Background Processing

-

-Note that retrieving and processing the articles can take some time, -so it's done in the background. Incoming articles will be marked as -invisible while they're in the process of being downloaded. If a URL -fails, the plugin will keep trying at progressively longer intervals -for up to a month, in case the website is temporarily overloaded or -the network is down. -

-

Retrieving Images

-

-Retriever can also optionally download images and store them in the -local Friendica instance. Just check the "Download Images" box. You -can also download images in every item from your network, whether it's -an RSS feed or not. Go to the "Settings" page and -click "Plugin settings". Then check the "All -Photos" box in the "Retriever Settings" section and click "Submit". -

-

Configure Feeds:

-
-{{foreach $feeds as $feed}} -{{include file='contact_template.tpl' contact=$feed}} -{{/foreach}} -
diff --git a/retriever/templates/rule-config.tpl b/retriever/templates/rule-config.tpl deleted file mode 100644 index 228d0326..00000000 --- a/retriever/templates/rule-config.tpl +++ /dev/null @@ -1,112 +0,0 @@ -
- -

{{$title}}

-

{{$help_t}}

-
- -{{include file="field_checkbox.tpl" field=$enable}} -{{include file="field_input.tpl" field=$pattern}} -{{include file="field_input.tpl" field=$replace}} -{{include file="field_checkbox.tpl" field=$images}} -{{include file="field_input.tpl" field=$retrospective}} -

{{$include_t}}:

-
- - - - - -{{if $include}} - {{foreach $include as $k=>$m}} - - - - - - - {{/foreach}} -{{else}} - - - - - - -{{/if}} - -
{{$tag_t}}{{$attribute_t}}{{$value_t}}
- -
-

{{$exclude_t}}:

-
- - - - - -{{if $exclude}} - {{foreach $exclude as $k=>$r}} - - - - - - - {{/foreach}} -{{else}} - - - - - - -{{/if}} - -
TagAttributeValue
- -
-{{include file="field_textarea.tpl" field=$customxslt}} - -
-
diff --git a/retriever/templates/settings.tpl b/retriever/templates/settings.tpl deleted file mode 100644 index 8bfe8db0..00000000 --- a/retriever/templates/settings.tpl +++ /dev/null @@ -1,9 +0,0 @@ -
-

{{$title}}

-

- Get Help -

-{{include file="field_checkbox.tpl" field=$allphotos}} -{{include file="field_checkbox.tpl" field=$oembed}} - -
diff --git a/snautofollow/lang/C/messages.po b/snautofollow/lang/C/messages.po deleted file mode 100644 index 1cfdbc5a..00000000 --- a/snautofollow/lang/C/messages.po +++ /dev/null @@ -1,34 +0,0 @@ -# ADDON snautofollow -# Copyright (C) -# This file is distributed under the same license as the Friendica snautofollow addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: snautofollow.php:32 -msgid "StatusNet AutoFollow settings updated." -msgstr "" - -#: snautofollow.php:56 -msgid "StatusNet AutoFollow Settings" -msgstr "" - -#: snautofollow.php:58 -msgid "Automatically follow any StatusNet followers/mentioners" -msgstr "" - -#: snautofollow.php:64 -msgid "Submit" -msgstr "" diff --git a/snautofollow/lang/ca/strings.php b/snautofollow/lang/ca/strings.php deleted file mode 100644 index 824361aa..00000000 --- a/snautofollow/lang/ca/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = "Ajustos de AutoSeguiment a StatusNet actualitzats."; -$a->strings["StatusNet AutoFollow Settings"] = "Ajustos de AutoSeguiment a StatusNet"; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = "Segueix Automaticament qualsevol seguidor/mencionador de StatusNet"; -$a->strings["Submit"] = "Enviar"; diff --git a/snautofollow/lang/cs/messages.po b/snautofollow/lang/cs/messages.po deleted file mode 100644 index 933478c2..00000000 --- a/snautofollow/lang/cs/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON snautofollow -# Copyright (C) -# This file is distributed under the same license as the Friendica snautofollow addon package. -# -# -# Translators: -# Michal Šupler , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:45+0200\n" -"PO-Revision-Date: 2014-07-28 18:12+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" - -#: snautofollow.php:32 -msgid "StatusNet AutoFollow settings updated." -msgstr "Nastavení automatického následování na StatusNet aktualizováno." - -#: snautofollow.php:56 snautofollow.php:60 -msgid "StatusNet AutoFollow" -msgstr "Nastavení StatusNet automatického následování (AutoFollow)" - -#: snautofollow.php:64 -msgid "Automatically follow any StatusNet followers/mentioners" -msgstr "Automaticky následovat jakékoliv StatusNet následníky/přispivatele" - -#: snautofollow.php:70 -msgid "Save Settings" -msgstr "Uložit Nastavení" diff --git a/snautofollow/lang/cs/strings.php b/snautofollow/lang/cs/strings.php deleted file mode 100644 index 144b8d8e..00000000 --- a/snautofollow/lang/cs/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -=2 && $n<=4) ? 1 : 2;; -}} -; -$a->strings["StatusNet AutoFollow settings updated."] = "Nastavení automatického následování na StatusNet aktualizováno."; -$a->strings["StatusNet AutoFollow"] = "Nastavení StatusNet automatického následování (AutoFollow)"; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = "Automaticky následovat jakékoliv StatusNet následníky/přispivatele"; -$a->strings["Save Settings"] = "Uložit Nastavení"; diff --git a/snautofollow/lang/de/messages.po b/snautofollow/lang/de/messages.po deleted file mode 100644 index fb19d4ff..00000000 --- a/snautofollow/lang/de/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON snautofollow -# Copyright (C) -# This file is distributed under the same license as the Friendica snautofollow addon package. -# -# -# Translators: -# bavatar , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:45+0200\n" -"PO-Revision-Date: 2014-10-02 14:39+0000\n" -"Last-Translator: bavatar \n" -"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: snautofollow.php:32 -msgid "StatusNet AutoFollow settings updated." -msgstr "StatusNet AutoFollow Einstellungen aktualisiert." - -#: snautofollow.php:56 snautofollow.php:60 -msgid "StatusNet AutoFollow" -msgstr "StatusNet AutoFollow" - -#: snautofollow.php:64 -msgid "Automatically follow any StatusNet followers/mentioners" -msgstr "Automatisch allen StatusNet Followern/Erwähnungen folgen" - -#: snautofollow.php:70 -msgid "Save Settings" -msgstr "Einstellungen speichern" diff --git a/snautofollow/lang/de/strings.php b/snautofollow/lang/de/strings.php deleted file mode 100644 index 83e99b85..00000000 --- a/snautofollow/lang/de/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = "StatusNet AutoFollow Einstellungen aktualisiert."; -$a->strings["StatusNet AutoFollow"] = "StatusNet AutoFollow"; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = "Automatisch allen StatusNet Followern/Erwähnungen folgen"; -$a->strings["Save Settings"] = "Einstellungen speichern"; diff --git a/snautofollow/lang/eo/strings.php b/snautofollow/lang/eo/strings.php deleted file mode 100644 index 8bd03fc4..00000000 --- a/snautofollow/lang/eo/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = "Ĝidatigis StatusNet AutoFollow agordojn."; -$a->strings["StatusNet AutoFollow Settings"] = "StatusNet AutoFollow agordoj"; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = "Aŭtomate sekvu ĉiujn StatusNet sekvantojn/menciantojn."; -$a->strings["Submit"] = "Sendi"; diff --git a/snautofollow/lang/es/messages.po b/snautofollow/lang/es/messages.po deleted file mode 100644 index afd88331..00000000 --- a/snautofollow/lang/es/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON snautofollow -# Copyright (C) -# This file is distributed under the same license as the Friendica snautofollow addon package. -# -# -# Translators: -# Albert, 2016 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2016-11-17 22:37+0000\n" -"Last-Translator: Albert\n" -"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: snautofollow.php:32 -msgid "StatusNet AutoFollow settings updated." -msgstr "Ajustes de StatusNet AutoFollow actualizados." - -#: snautofollow.php:56 -msgid "StatusNet AutoFollow Settings" -msgstr "Ajustes de StatusNet AutoFollow" - -#: snautofollow.php:58 -msgid "Automatically follow any StatusNet followers/mentioners" -msgstr "Seguir automáticamente a cualquiera que te siga/mencione en StatusNet" - -#: snautofollow.php:64 -msgid "Submit" -msgstr "Enviar" diff --git a/snautofollow/lang/es/strings.php b/snautofollow/lang/es/strings.php deleted file mode 100644 index 2800360d..00000000 --- a/snautofollow/lang/es/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = "Ajustes de StatusNet AutoFollow actualizados."; -$a->strings["StatusNet AutoFollow Settings"] = "Ajustes de StatusNet AutoFollow"; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = "Seguir automáticamente a cualquiera que te siga/mencione en StatusNet"; -$a->strings["Submit"] = "Enviar"; diff --git a/snautofollow/lang/fr/strings.php b/snautofollow/lang/fr/strings.php deleted file mode 100644 index f6791ffa..00000000 --- a/snautofollow/lang/fr/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = "Réglages de suivi automatique sur StatusNet mis à jour."; -$a->strings["StatusNet AutoFollow Settings"] = "Réglages de suivi automatique sur StatusNet"; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = "Suivre automatiquement les personnes qui vous suivent ou vous mentionnent sur Statusnet"; -$a->strings["Submit"] = "Envoyer"; diff --git a/snautofollow/lang/is/strings.php b/snautofollow/lang/is/strings.php deleted file mode 100644 index 73eda760..00000000 --- a/snautofollow/lang/is/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = ""; -$a->strings["StatusNet AutoFollow Settings"] = ""; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = ""; -$a->strings["Submit"] = "Senda inn"; diff --git a/snautofollow/lang/it/messages.po b/snautofollow/lang/it/messages.po deleted file mode 100644 index b7b8d3f8..00000000 --- a/snautofollow/lang/it/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON snautofollow -# Copyright (C) -# This file is distributed under the same license as the Friendica snautofollow addon package. -# -# -# Translators: -# fabrixxm , 2014-2015 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-08-31 10:23+0000\n" -"Last-Translator: fabrixxm \n" -"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: snautofollow.php:32 -msgid "StatusNet AutoFollow settings updated." -msgstr "Impostazioni \"StatusNet AutoFollow\" aggiornate." - -#: snautofollow.php:56 -msgid "StatusNet AutoFollow Settings" -msgstr "Impostazioni StatusNet AutoFollow" - -#: snautofollow.php:58 -msgid "Automatically follow any StatusNet followers/mentioners" -msgstr "Segui automanticamente chiunque da StatusNet ti segua o ti menzioni" - -#: snautofollow.php:64 -msgid "Submit" -msgstr "Invia" diff --git a/snautofollow/lang/it/strings.php b/snautofollow/lang/it/strings.php deleted file mode 100644 index b6fab060..00000000 --- a/snautofollow/lang/it/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = "Impostazioni \"StatusNet AutoFollow\" aggiornate."; -$a->strings["StatusNet AutoFollow Settings"] = "Impostazioni StatusNet AutoFollow"; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = "Segui automanticamente chiunque da StatusNet ti segua o ti menzioni"; -$a->strings["Submit"] = "Invia"; diff --git a/snautofollow/lang/nb-no/strings.php b/snautofollow/lang/nb-no/strings.php deleted file mode 100644 index 6a25c730..00000000 --- a/snautofollow/lang/nb-no/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = ""; -$a->strings["StatusNet AutoFollow Settings"] = ""; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = ""; -$a->strings["Submit"] = "Lagre"; diff --git a/snautofollow/lang/pl/strings.php b/snautofollow/lang/pl/strings.php deleted file mode 100644 index 8ffa6d98..00000000 --- a/snautofollow/lang/pl/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = ""; -$a->strings["StatusNet AutoFollow Settings"] = ""; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = ""; -$a->strings["Submit"] = "Potwierdź"; diff --git a/snautofollow/lang/pt-br/strings.php b/snautofollow/lang/pt-br/strings.php deleted file mode 100644 index c932de9a..00000000 --- a/snautofollow/lang/pt-br/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = ""; -$a->strings["StatusNet AutoFollow Settings"] = ""; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = ""; -$a->strings["Submit"] = "Enviar"; diff --git a/snautofollow/lang/ro/messages.po b/snautofollow/lang/ro/messages.po deleted file mode 100644 index 108b6c87..00000000 --- a/snautofollow/lang/ro/messages.po +++ /dev/null @@ -1,35 +0,0 @@ -# ADDON snautofollow -# Copyright (C) -# This file is distributed under the same license as the Friendica snautofollow addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:45+0200\n" -"PO-Revision-Date: 2014-07-08 12:07+0000\n" -"Last-Translator: Arian - Cazare Muncitori \n" -"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ro_RO\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" - -#: snautofollow.php:32 -msgid "StatusNet AutoFollow settings updated." -msgstr "Configurări StatusNet AutoFollow actualizate." - -#: snautofollow.php:56 snautofollow.php:60 -msgid "StatusNet AutoFollow" -msgstr "StatusNet AutoFollow" - -#: snautofollow.php:64 -msgid "Automatically follow any StatusNet followers/mentioners" -msgstr "Urmărește automat orice susținător/pe cei ce vă menționează pe StatusNet" - -#: snautofollow.php:70 -msgid "Save Settings" -msgstr "Salvare Configurări" diff --git a/snautofollow/lang/ro/strings.php b/snautofollow/lang/ro/strings.php deleted file mode 100644 index b8fb967f..00000000 --- a/snautofollow/lang/ro/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -19)||(($n%100==0)&&($n!=0)))?2:1));; -}} -; -$a->strings["StatusNet AutoFollow settings updated."] = "Configurări StatusNet AutoFollow actualizate."; -$a->strings["StatusNet AutoFollow"] = "StatusNet AutoFollow"; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = "Urmărește automat orice susținător/pe cei ce vă menționează pe StatusNet"; -$a->strings["Save Settings"] = "Salvare Configurări"; diff --git a/snautofollow/lang/ru/strings.php b/snautofollow/lang/ru/strings.php deleted file mode 100644 index 2f7dec45..00000000 --- a/snautofollow/lang/ru/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = ""; -$a->strings["StatusNet AutoFollow Settings"] = ""; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = ""; -$a->strings["Submit"] = "Подтвердить"; diff --git a/snautofollow/lang/sv/strings.php b/snautofollow/lang/sv/strings.php deleted file mode 100644 index 3ec569a7..00000000 --- a/snautofollow/lang/sv/strings.php +++ /dev/null @@ -1,3 +0,0 @@ -strings["Submit"] = "Spara"; diff --git a/snautofollow/lang/zh-cn/strings.php b/snautofollow/lang/zh-cn/strings.php deleted file mode 100644 index 1c704242..00000000 --- a/snautofollow/lang/zh-cn/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["StatusNet AutoFollow settings updated."] = "StatusNet自动关注设置更新了。"; -$a->strings["StatusNet AutoFollow Settings"] = "StatusNet自动关注设置"; -$a->strings["Automatically follow any StatusNet followers/mentioners"] = "自动关注所有的StatusGet关注者/提及"; -$a->strings["Submit"] = "提交"; diff --git a/snautofollow/snautofollow.css b/snautofollow/snautofollow.css deleted file mode 100644 index 243ecaa8..00000000 --- a/snautofollow/snautofollow.css +++ /dev/null @@ -1,14 +0,0 @@ - - - -#snautofollow-label { - float: left; - width: 200px; - margin-bottom: 25px; -} - -#snautofollow-checkbox { - float: left; -} - - diff --git a/snautofollow/snautofollow.php b/snautofollow/snautofollow.php deleted file mode 100644 index 2d953d5b..00000000 --- a/snautofollow/snautofollow.php +++ /dev/null @@ -1,71 +0,0 @@ - - * Status: Unsupported - */ - - -function snautofollow_install() { - - register_hook('connector_settings', 'addon/snautofollow/snautofollow.php', 'snautofollow_settings'); - register_hook('connector_settings_post', 'addon/snautofollow/snautofollow.php', 'snautofollow_settings_post'); - -} - - -function snautofollow_uninstall() { - unregister_hook('connector_settings', 'addon/snautofollow/snautofollow.php', 'snautofollow_settings'); - unregister_hook('connector_settings_post', 'addon/snautofollow/snautofollow.php', 'snautofollow_settings_post'); - -} - - -function snautofollow_settings_post($a,$post) { - if(! local_user() || (! x($_POST,'snautofollow-submit'))) - return; - - set_pconfig(local_user(),'system','ostatus_autofriend',intval($_POST['snautofollow'])); - info( t('StatusNet AutoFollow settings updated.') . EOL); -} - -function snautofollow_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 */ - - $snautofollow = get_pconfig(local_user(),'system','ostatus_autofriend'); - if($snautofollow === false) - $snautofollow = false; - - $snautofollow_checked = (($snautofollow) ? ' checked="checked" ' : ''); - - - /* Add some HTML to the existing form */ - - $s .= ''; - $s .= '

' . t('StatusNet AutoFollow') . '

'; - $s .= '
'; - $s .= ''; - -} diff --git a/statistics_json/README.md b/statistics_json/README.md deleted file mode 100644 index a4d542cf..00000000 --- a/statistics_json/README.md +++ /dev/null @@ -1,14 +0,0 @@ -With this addon you send some information about your friendica node to the -[the-federation.info](http://the-federation.info) page. It collects -statistical data about building blocks of *The Federation*, the decentralized -federated social networks (Diaspora*, ~friendica and red#matrix). - -The information includes - -* the name of your node -* friendica version -* registration policy -* total number of users of that node and the active user number -* total number of public postings -* which plugins are activated (only Facebook, Twitter, Tumblr and Wordpress - will be displayed on the statistics page at the moment). diff --git a/statistics_json/lang/C/messages.po b/statistics_json/lang/C/messages.po deleted file mode 100644 index e69de29b..00000000 diff --git a/statistics_json/statistics_json.php b/statistics_json/statistics_json.php deleted file mode 100644 index 2bd2f41f..00000000 --- a/statistics_json/statistics_json.php +++ /dev/null @@ -1,148 +0,0 @@ - - * Status: Unsupported - */ - -function statistics_json_install() { - register_hook('cron', 'addon/statistics_json/statistics_json.php', 'statistics_json_cron'); -} - - -function statistics_json_uninstall() { - unregister_hook('cron', 'addon/statistics_json/statistics_json.php', 'statistics_json_cron'); -} - -function statistics_json_module() {} - -function statistics_json_plugin_enabled($plugin) { - $r = q("SELECT * FROM `addon` WHERE `installed` = 1 AND `name` = '%s'", $plugin); - return((bool)(count($r) > 0)); -} - -function statistics_json_init() { - global $a; - - $statistics = array( - "name" => $a->config["sitename"], - "network" => FRIENDICA_PLATFORM, - "version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION, - "registrations_open" => ($a->config['register_policy'] != 0), - "total_users" => get_config('statistics_json','total_users'), - "active_users_halfyear" => get_config('statistics_json','active_users_halfyear'), - "active_users_monthly" => get_config('statistics_json','active_users_monthly'), - "local_posts" => get_config('statistics_json','local_posts') - ); - - $statistics["services"] = array(); - $statistics["services"]["appnet"] = statistics_json_plugin_enabled("appnet"); - $statistics["services"]["blogger"] = statistics_json_plugin_enabled("blogger"); - $statistics["services"]["buffer"] = statistics_json_plugin_enabled("buffer"); - $statistics["services"]["dreamwidth"] = statistics_json_plugin_enabled("dwpost"); - $statistics["services"]["facebook"] = statistics_json_plugin_enabled("fbpost"); - $statistics["services"]["gnusocial"] = statistics_json_plugin_enabled("statusnet"); - $statistics["services"]["googleplus"] = statistics_json_plugin_enabled("gpluspost"); - $statistics["services"]["libertree"] = statistics_json_plugin_enabled("libertree"); - $statistics["services"]["livejournal"] = statistics_json_plugin_enabled("ljpost"); - $statistics["services"]["pumpio"] = statistics_json_plugin_enabled("pumpio"); - $statistics["services"]["twitter"] = statistics_json_plugin_enabled("twitter"); - $statistics["services"]["tumblr"] = statistics_json_plugin_enabled("tumblr"); - $statistics["services"]["wordpress"] = statistics_json_plugin_enabled("wppost"); - - $statistics["appnet"] = $statistics["services"]["appnet"]; - $statistics["blogger"] = $statistics["services"]["blogger"]; - $statistics["buffer"] = $statistics["services"]["buffer"]; - $statistics["dreamwidth"] = $statistics["services"]["dreamwidth"]; - $statistics["facebook"] = $statistics["services"]["facebook"]; - $statistics["gnusocial"] = $statistics["services"]["gnusocial"]; - $statistics["googleplus"] = $statistics["services"]["googleplus"]; - $statistics["libertree"] = $statistics["services"]["libertree"]; - $statistics["livejournal"] = $statistics["services"]["livejournal"]; - $statistics["pumpio"] = $statistics["services"]["pumpio"]; - $statistics["twitter"] = $statistics["services"]["twitter"]; - $statistics["tumblr"] = $statistics["services"]["tumblr"]; - $statistics["wordpress"] = $statistics["services"]["wordpress"]; - - header("Content-Type: application/json"); - echo json_encode($statistics); - logger("statistics_init: printed ".print_r($statistics, true)); - killme(); -} - -function statistics_json_cron($a,$b) { - $last = get_config('statistics_json','last_calucation'); - - if($last) { - // Calculate every 24 hours - $next = $last + (24 * 60 * 60); - if($next > time()) { - logger('statistics_json_cron: calculation intervall not reached'); - return; - } - } - logger('statistics_json_cron: cron_start'); - - - $users = q("SELECT profile.*, `user`.`login_date`, `lastitem`.`lastitem_date` - FROM (SELECT MAX(`item`.`changed`) as `lastitem_date`, `item`.`uid` - FROM `item` - WHERE `item`.`type` = 'wall' - GROUP BY `item`.`uid`) AS `lastitem` - RIGHT OUTER JOIN `user` ON `user`.`uid` = `lastitem`.`uid`, `contact`, `profile` - WHERE - `user`.`uid` = `contact`.`uid` AND `profile`.`uid` = `user`.`uid` - AND `profile`.`is-default` AND (`profile`.`publish` OR `profile`.`net-publish`) - AND `user`.`verified` AND `contact`.`self` - AND NOT `user`.`blocked` - AND NOT `user`.`account_removed` - AND NOT `user`.`account_expired`"); - - if (is_array($users)) { - $total_users = count($users); - $active_users_halfyear = 0; - $active_users_monthly = 0; - - $halfyear = time() - (180 * 24 * 60 * 60); - $month = time() - (30 * 24 * 60 * 60); - - foreach ($users AS $user) { - if ((strtotime($user['login_date']) > $halfyear) || - (strtotime($user['lastitem_date']) > $halfyear)) - ++$active_users_halfyear; - - if ((strtotime($user['login_date']) > $month) || - (strtotime($user['lastitem_date']) > $month)) - ++$active_users_monthly; - - } - set_config('statistics_json','total_users', $total_users); - logger('statistics_json_cron: total_users: '.$total_users, LOGGER_DEBUG); - - set_config('statistics_json','active_users_halfyear', $active_users_halfyear); - set_config('statistics_json','active_users_monthly', $active_users_monthly); - } - - $posts = q("SELECT COUNT(*) AS local_posts FROM `item` WHERE `wall` AND `uid` != 0 AND `id` = `parent` AND left(body, 6) != '[share'"); - - if (!is_array($posts)) - $local_posts = -1; - else - $local_posts = $posts[0]["local_posts"]; - - set_config('statistics_json','local_posts', $local_posts); - - logger('statistics_json_cron: local_posts: '.$local_posts, LOGGER_DEBUG); - - // Now trying to register - $url = "http://the-federation.info/register/".$a->get_hostname(); - logger('statistics_json_cron: registering url: '.$url, LOGGER_DEBUG); - $ret = fetch_url($url); - logger('statistics_json_cron: registering answer: '.$ret, LOGGER_DEBUG); - - logger('statistics_json_cron: cron_end'); - set_config('statistics_json','last_calucation', time()); -} diff --git a/twitter/twitter.php b/twitter/twitter.php index 7272957c..1fdcb89c 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -551,8 +551,20 @@ function twitter_post_hook(&$a,&$b) { } if(strlen($msg) && ($image == "")) { +// ----------------- + $max_char = 280; + require_once("include/plaintext.php"); + $msgarr = plaintext($a, $b, $max_char, true, 8); + $msg = $msgarr["text"]; + + if (($msg == "") && isset($msgarr["title"])) + $msg = shortenmsg($msgarr["title"], $max_char - 50); + + if (isset($msgarr["url"])) + $msg .= "\n".$msgarr["url"]; +// ----------------- $url = 'statuses/update'; - $post = array('status' => $msg); + $post = array('status' => $msg, 'weighted_character_count' => 'true'); if ($iscomment) $post["in_reply_to_status_id"] = substr($orig_post["uri"], 9); diff --git a/uhremotestorage/lang/C/messages.po b/uhremotestorage/lang/C/messages.po deleted file mode 100644 index c4b824be..00000000 --- a/uhremotestorage/lang/C/messages.po +++ /dev/null @@ -1,42 +0,0 @@ -# ADDON uhremotestorage -# Copyright (C) -# This file is distributed under the same license as the Friendica uhremotestorage addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: uhremotestorage.php:84 -#, php-format -msgid "" -"Allow to use your friendica id (%s) to connecto to external unhosted-enabled " -"storage (like ownCloud). See RemoteStorage WebFinger" -msgstr "" - -#: uhremotestorage.php:85 -msgid "Template URL (with {category})" -msgstr "" - -#: uhremotestorage.php:86 -msgid "OAuth end-point" -msgstr "" - -#: uhremotestorage.php:87 -msgid "Api" -msgstr "" - -#: uhremotestorage.php:89 -msgid "Submit" -msgstr "" diff --git a/uhremotestorage/lang/ca/strings.php b/uhremotestorage/lang/ca/strings.php deleted file mode 100644 index 2cfd6535..00000000 --- a/uhremotestorage/lang/ca/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "Permetre l'ús del seu ID de friendica (%s) per Connectar a l'emmagatzematge extern (com ownCloud). Veure WebFinger RemoteStorage "; -$a->strings["Template URL (with {category})"] = "Plantilles de URL (amb {categoria})"; -$a->strings["OAuth end-point"] = "OAuth end-point"; -$a->strings["Api"] = "Api"; -$a->strings["Submit"] = "Enviar"; diff --git a/uhremotestorage/lang/cs/messages.po b/uhremotestorage/lang/cs/messages.po deleted file mode 100644 index 599ff2bb..00000000 --- a/uhremotestorage/lang/cs/messages.po +++ /dev/null @@ -1,45 +0,0 @@ -# ADDON uhremotestorage -# Copyright (C) -# This file is distributed under the same license as the Friendica uhremotestorage addon package. -# -# -# Translators: -# Michal Šupler , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:45+0200\n" -"PO-Revision-Date: 2014-07-07 19:28+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" - -#: uhremotestorage.php:84 -#, php-format -msgid "" -"Allow to use your friendica id (%s) to connecto to external unhosted-enabled" -" storage (like ownCloud). See RemoteStorage" -" WebFinger" -msgstr "Umožnit využití friendica id (%s) k napojení na externí úložiště (unhosted-enabled) (jako ownCloud). Více informací na RemoteStorage WebFinger" - -#: uhremotestorage.php:85 -msgid "Template URL (with {category})" -msgstr "Dočasná URL adresa (s {category})" - -#: uhremotestorage.php:86 -msgid "OAuth end-point" -msgstr "OAuth end-point" - -#: uhremotestorage.php:87 -msgid "Api" -msgstr "Api" - -#: uhremotestorage.php:89 -msgid "Save Settings" -msgstr "Uložit Nastavení" diff --git a/uhremotestorage/lang/cs/strings.php b/uhremotestorage/lang/cs/strings.php deleted file mode 100644 index 0c31cc4b..00000000 --- a/uhremotestorage/lang/cs/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -=2 && $n<=4) ? 1 : 2;; -}} -; -$a->strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "Umožnit využití friendica id (%s) k napojení na externí úložiště (unhosted-enabled) (jako ownCloud). Více informací na RemoteStorage WebFinger"; -$a->strings["Template URL (with {category})"] = "Dočasná URL adresa (s {category})"; -$a->strings["OAuth end-point"] = "OAuth end-point"; -$a->strings["Api"] = "Api"; -$a->strings["Save Settings"] = "Uložit Nastavení"; diff --git a/uhremotestorage/lang/de/messages.po b/uhremotestorage/lang/de/messages.po deleted file mode 100644 index 7c520ac5..00000000 --- a/uhremotestorage/lang/de/messages.po +++ /dev/null @@ -1,45 +0,0 @@ -# ADDON uhremotestorage -# Copyright (C) -# This file is distributed under the same license as the Friendica uhremotestorage addon package. -# -# -# Translators: -# bavatar , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:45+0200\n" -"PO-Revision-Date: 2014-10-14 05:48+0000\n" -"Last-Translator: bavatar \n" -"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: uhremotestorage.php:84 -#, php-format -msgid "" -"Allow to use your friendica id (%s) to connecto to external unhosted-enabled" -" storage (like ownCloud). See RemoteStorage" -" WebFinger" -msgstr "Ermöglicht es deine friendica id (%s) mit externen unhosted-fähigen Speichern (z.B. ownCloud) zu verbinden. Siehe RemoteStorage WebFinger" - -#: uhremotestorage.php:85 -msgid "Template URL (with {category})" -msgstr "Vorlagen URL (mit {Kategorie})" - -#: uhremotestorage.php:86 -msgid "OAuth end-point" -msgstr "OAuth end-point" - -#: uhremotestorage.php:87 -msgid "Api" -msgstr "Api" - -#: uhremotestorage.php:89 -msgid "Save Settings" -msgstr "Einstellungen speichern" diff --git a/uhremotestorage/lang/de/strings.php b/uhremotestorage/lang/de/strings.php deleted file mode 100644 index a6b9bf0a..00000000 --- a/uhremotestorage/lang/de/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "Ermöglicht es deine friendica id (%s) mit externen unhosted-fähigen Speichern (z.B. ownCloud) zu verbinden. Siehe RemoteStorage WebFinger"; -$a->strings["Template URL (with {category})"] = "Vorlagen URL (mit {Kategorie})"; -$a->strings["OAuth end-point"] = "OAuth end-point"; -$a->strings["Api"] = "Api"; -$a->strings["Save Settings"] = "Einstellungen speichern"; diff --git a/uhremotestorage/lang/eo/strings.php b/uhremotestorage/lang/eo/strings.php deleted file mode 100644 index 94020c34..00000000 --- a/uhremotestorage/lang/eo/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "Permesi vian identecon ĉe Friendica (%s) por konekti al eksteraj konservejoj subtenata de unhosted (ekz. OwnCloud). Vidu RemoteStorage WebFinger"; -$a->strings["Template URL (with {category})"] = "URL adreso de ŝablono (kun {category})"; -$a->strings["OAuth end-point"] = "OAuth finpunkto"; -$a->strings["Api"] = "Api"; -$a->strings["Submit"] = "Sendi"; diff --git a/uhremotestorage/lang/es/messages.po b/uhremotestorage/lang/es/messages.po deleted file mode 100644 index 9b3de008..00000000 --- a/uhremotestorage/lang/es/messages.po +++ /dev/null @@ -1,45 +0,0 @@ -# ADDON uhremotestorage -# Copyright (C) -# This file is distributed under the same license as the Friendica uhremotestorage addon package. -# -# -# Translators: -# Albert, 2016 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:45+0200\n" -"PO-Revision-Date: 2016-11-19 11:35+0000\n" -"Last-Translator: Albert\n" -"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: uhremotestorage.php:84 -#, php-format -msgid "" -"Allow to use your friendica id (%s) to connecto to external unhosted-enabled" -" storage (like ownCloud). See RemoteStorage" -" WebFinger" -msgstr "Permite usar su ID de Friendica (%s) para conectar a un almacén habilitado externo sin hospedar (como ownCloud). Vea RemoteStorage WebFinger" - -#: uhremotestorage.php:85 -msgid "Template URL (with {category})" -msgstr "Plantilla de URL (con {categoría})" - -#: uhremotestorage.php:86 -msgid "OAuth end-point" -msgstr "Punto final de OAuth" - -#: uhremotestorage.php:87 -msgid "Api" -msgstr "API" - -#: uhremotestorage.php:89 -msgid "Save Settings" -msgstr "Guardar Ajustes" diff --git a/uhremotestorage/lang/es/strings.php b/uhremotestorage/lang/es/strings.php deleted file mode 100644 index 910a0562..00000000 --- a/uhremotestorage/lang/es/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "Permite usar su ID de Friendica (%s) para conectar a un almacén habilitado externo sin hospedar (como ownCloud). Vea RemoteStorage WebFinger"; -$a->strings["Template URL (with {category})"] = "Plantilla de URL (con {categoría})"; -$a->strings["OAuth end-point"] = "Punto final de OAuth"; -$a->strings["Api"] = "API"; -$a->strings["Save Settings"] = "Guardar Ajustes"; diff --git a/uhremotestorage/lang/fr/strings.php b/uhremotestorage/lang/fr/strings.php deleted file mode 100644 index 7bb4631b..00000000 --- a/uhremotestorage/lang/fr/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "Permet l'utilisation de votre ID Friendica (%s) pour vous connecter à des sites compatibles \"unhosted\" (comme ownCloud). Voyez RemoteStorage WebFinger"; -$a->strings["Template URL (with {category})"] = "Modèle d'URL (avec {catégorie})"; -$a->strings["OAuth end-point"] = "URL OAuth"; -$a->strings["Api"] = "Type d'API"; -$a->strings["Submit"] = "Envoyer"; diff --git a/uhremotestorage/lang/is/strings.php b/uhremotestorage/lang/is/strings.php deleted file mode 100644 index 83f80134..00000000 --- a/uhremotestorage/lang/is/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = ""; -$a->strings["Template URL (with {category})"] = ""; -$a->strings["OAuth end-point"] = ""; -$a->strings["Api"] = "Api"; -$a->strings["Submit"] = "Senda inn"; diff --git a/uhremotestorage/lang/it/messages.po b/uhremotestorage/lang/it/messages.po deleted file mode 100644 index 67fbc575..00000000 --- a/uhremotestorage/lang/it/messages.po +++ /dev/null @@ -1,45 +0,0 @@ -# ADDON uhremotestorage -# Copyright (C) -# This file is distributed under the same license as the Friendica uhremotestorage addon package. -# -# -# Translators: -# fabrixxm , 2015 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:45+0200\n" -"PO-Revision-Date: 2015-08-31 10:30+0000\n" -"Last-Translator: fabrixxm \n" -"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: uhremotestorage.php:84 -#, php-format -msgid "" -"Allow to use your friendica id (%s) to connecto to external unhosted-enabled" -" storage (like ownCloud). See RemoteStorage" -" WebFinger" -msgstr "Permette di usare il tuo id friendica (%s) per collegarsi a storage esterni che supportano unhosted (come ownCloud). Vedi RemoteStorage WebFinger" - -#: uhremotestorage.php:85 -msgid "Template URL (with {category})" -msgstr "Template URL (con {category})" - -#: uhremotestorage.php:86 -msgid "OAuth end-point" -msgstr "OAuth end-point" - -#: uhremotestorage.php:87 -msgid "Api" -msgstr "Api" - -#: uhremotestorage.php:89 -msgid "Save Settings" -msgstr "Salva Impostazioni" diff --git a/uhremotestorage/lang/it/strings.php b/uhremotestorage/lang/it/strings.php deleted file mode 100644 index 9a344892..00000000 --- a/uhremotestorage/lang/it/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "Permette di usare il tuo id friendica (%s) per collegarsi a storage esterni che supportano unhosted (come ownCloud). Vedi RemoteStorage WebFinger"; -$a->strings["Template URL (with {category})"] = "Template URL (con {category})"; -$a->strings["OAuth end-point"] = "OAuth end-point"; -$a->strings["Api"] = "Api"; -$a->strings["Save Settings"] = "Salva Impostazioni"; diff --git a/uhremotestorage/lang/nb-no/strings.php b/uhremotestorage/lang/nb-no/strings.php deleted file mode 100644 index 7ffd9104..00000000 --- a/uhremotestorage/lang/nb-no/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "Tillat å bruke din friendica id (%s) for å koble til ekstern unhosted-aktivert lagring (som ownCloud). Se RemoteStorage WebFinger"; -$a->strings["Template URL (with {category})"] = ""; -$a->strings["OAuth end-point"] = ""; -$a->strings["Api"] = ""; -$a->strings["Submit"] = "Lagre"; diff --git a/uhremotestorage/lang/pl/strings.php b/uhremotestorage/lang/pl/strings.php deleted file mode 100644 index 9f2ace13..00000000 --- a/uhremotestorage/lang/pl/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = ""; -$a->strings["Template URL (with {category})"] = ""; -$a->strings["OAuth end-point"] = ""; -$a->strings["Api"] = "Api"; -$a->strings["Submit"] = "Potwierdź"; diff --git a/uhremotestorage/lang/pt-br/strings.php b/uhremotestorage/lang/pt-br/strings.php deleted file mode 100644 index 082096d6..00000000 --- a/uhremotestorage/lang/pt-br/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "Permite o uso do id friendica (%s) para conectar ao armazenamento tipo unhosted externo (ex: ownCloud). Veja RemoteStorage WebFinger"; -$a->strings["Template URL (with {category})"] = "URL do Template (com {category})"; -$a->strings["OAuth end-point"] = "OAuth terminal"; -$a->strings["Api"] = "Api"; -$a->strings["Submit"] = "Enviar"; diff --git a/uhremotestorage/lang/ro/messages.po b/uhremotestorage/lang/ro/messages.po deleted file mode 100644 index 7eeadf49..00000000 --- a/uhremotestorage/lang/ro/messages.po +++ /dev/null @@ -1,44 +0,0 @@ -# ADDON uhremotestorage -# Copyright (C) -# This file is distributed under the same license as the Friendica uhremotestorage addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-23 14:45+0200\n" -"PO-Revision-Date: 2014-07-08 12:11+0000\n" -"Last-Translator: Arian - Cazare Muncitori \n" -"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ro_RO\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" - -#: uhremotestorage.php:84 -#, php-format -msgid "" -"Allow to use your friendica id (%s) to connecto to external unhosted-enabled" -" storage (like ownCloud). See RemoteStorage" -" WebFinger" -msgstr "Permiteți utilizarea id-ului dvs. friendica (%s) să se conecteze cu medii de stocare externe de tip unhosted (precum ownCloud). Consultați RemoteStorage WebFinger" - -#: uhremotestorage.php:85 -msgid "Template URL (with {category})" -msgstr "URL șablon (cu {categorie})" - -#: uhremotestorage.php:86 -msgid "OAuth end-point" -msgstr "Punct-final OAuth " - -#: uhremotestorage.php:87 -msgid "Api" -msgstr "Api" - -#: uhremotestorage.php:89 -msgid "Save Settings" -msgstr "Salvare Configurări" diff --git a/uhremotestorage/lang/ro/strings.php b/uhremotestorage/lang/ro/strings.php deleted file mode 100644 index 7db8edad..00000000 --- a/uhremotestorage/lang/ro/strings.php +++ /dev/null @@ -1,12 +0,0 @@ -19)||(($n%100==0)&&($n!=0)))?2:1));; -}} -; -$a->strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "Permiteți utilizarea id-ului dvs. friendica (%s) să se conecteze cu medii de stocare externe de tip unhosted (precum ownCloud). Consultați RemoteStorage WebFinger"; -$a->strings["Template URL (with {category})"] = "URL șablon (cu {categorie})"; -$a->strings["OAuth end-point"] = "Punct-final OAuth "; -$a->strings["Api"] = "Api"; -$a->strings["Save Settings"] = "Salvare Configurări"; diff --git a/uhremotestorage/lang/ru/strings.php b/uhremotestorage/lang/ru/strings.php deleted file mode 100644 index ebce59ab..00000000 --- a/uhremotestorage/lang/ru/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = ""; -$a->strings["Template URL (with {category})"] = ""; -$a->strings["OAuth end-point"] = ""; -$a->strings["Api"] = "Api"; -$a->strings["Submit"] = "Подтвердить"; diff --git a/uhremotestorage/lang/sv/strings.php b/uhremotestorage/lang/sv/strings.php deleted file mode 100644 index 3ec569a7..00000000 --- a/uhremotestorage/lang/sv/strings.php +++ /dev/null @@ -1,3 +0,0 @@ -strings["Submit"] = "Spara"; diff --git a/uhremotestorage/lang/zh-cn/strings.php b/uhremotestorage/lang/zh-cn/strings.php deleted file mode 100644 index 7f7c2693..00000000 --- a/uhremotestorage/lang/zh-cn/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger"] = "许用您的friendica用户名(%s)根对外没主办的贮藏(比如ownCloud)。看RemoteStorage WebFinger"; -$a->strings["Template URL (with {category})"] = "模板URL(根{category})"; -$a->strings["OAuth end-point"] = "OAuth 端点"; -$a->strings["Api"] = "API"; -$a->strings["Submit"] = "提交"; diff --git a/uhremotestorage/templates/settings.tpl b/uhremotestorage/templates/settings.tpl deleted file mode 100644 index 9a0a55f3..00000000 --- a/uhremotestorage/templates/settings.tpl +++ /dev/null @@ -1,9 +0,0 @@ -
-

{{$title}}

-

{{$desc}}

- {{include file="field_input.tpl" field=$url}} - {{include file="field_input.tpl" field=$auth}} - {{include file="field_select.tpl" field=$api}} -
- -
diff --git a/uhremotestorage/uhremotestorage.php b/uhremotestorage/uhremotestorage.php deleted file mode 100755 index 76320f5c..00000000 --- a/uhremotestorage/uhremotestorage.php +++ /dev/null @@ -1,93 +0,0 @@ - - * Status: Unsupported - */ - - function uhremotestorage_install() { - register_hook('personal_xrd', 'addon/uhremotestorage/uhremotestorage.php', 'uhremotestorage_personal_xrd'); - register_hook('plugin_settings', 'addon/uhremotestorage/uhremotestorage.php', 'uhremotestorage_settings'); - register_hook('plugin_settings_post', 'addon/uhremotestorage/uhremotestorage.php', 'uhremotestorage_settings_post'); - - logger("installed uhremotestorage"); -} - - -function uhremotestorage_uninstall() { - - unregister_hook('personal_xrd', 'addon/uhremotestorage/uhremotestorage.php', 'uhremotestorage_personal_xrd'); - unregister_hook('plugin_settings', 'addon/uhremotestorage/uhremotestorage.php', 'uhremotestorage_settings'); - unregister_hook('plugin_settings_post', 'addon/uhremotestorage/uhremotestorage.php', 'uhremotestorage_settings_post'); - - logger("removed uhremotestorage"); -} - -function uhremotestorage_personal_xrd($a, &$b){ - list($user, $host) = explode("@",$_GET['uri']); - $user = str_replace("acct:","",$user); - $r = q("SELECT uid FROM user WHERE nickname='%s'", dbesc($user)); - $uid = $r[0]['uid']; - - $url = get_pconfig($uid,'uhremotestorage','unhoestedurl'); - $auth = get_pconfig($uid,'uhremotestorage','unhoestedauth'); - $api = get_pconfig($uid,'uhremotestorage','unhoestedapi'); - - if ($url){ - $b['xml'] = str_replace( - '', - "\t".''."\n", - $b['xml'] - ); - } -} - -function uhremotestorage_settings_post($a, $post){ - if(! local_user()) - return; - set_pconfig(local_user(),'uhremotestorage','unhoestedurl',$_POST['unhoestedurl']); - set_pconfig(local_user(),'uhremotestorage','unhoestedauth',$_POST['unhoestedauth']); - set_pconfig(local_user(),'uhremotestorage','unhoestedapi',$_POST['unhoestedapi']); -} - -function uhremotestorage_settings($a, &$s){ - if(! local_user()) - return; - - $uid = $a->user['nickname'] ."@". $a->get_hostname(); - - $url = get_pconfig(local_user(),'uhremotestorage','unhoestedurl'); - $auth = get_pconfig(local_user(),'uhremotestorage','unhoestedauth'); - $api = get_pconfig(local_user(),'uhremotestorage','unhoestedapi'); - - - $arr_api = array( - 'WebDAV' => "WebDAV", - 'simple' => "simple WebDAV", - 'CouchDB' => "CouchDB", - ); - /* experimental apis */ - /* - $api = array_merge($api, array( - 'git' => "git", - 'tahoe-lafs' => 'tahoe-lafs', - 'camlistore' => 'camlistore', - 'AmazonS3' => 'AmazonS3', - 'GoogleDocs' => 'GoogleDocs', - 'Dropbox' => 'Dropbox', - ); - */ - $tpl = get_markup_template("settings.tpl", "addon/uhremotestorage/"); - $s .= replace_macros($tpl, array( - '$title' => 'Unhosted remote storage', - '$desc' => sprintf( t('Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See RemoteStorage WebFinger'), $uid ), - '$url' => array( 'unhoestedurl', t('Template URL (with {category})'), $url, 'If your are using ownCloud, your unhosted url will be like http://HOST/apps/remoteStorage/WebDAV.php/USER/remoteStorage/{category}'), - '$auth' => array( 'unhoestedauth', t('OAuth end-point'), $auth, 'If your are using ownCloud, your OAuth endpoint will be like http://HOST/apps/remoteStorage/auth.php/USER'), - '$api' => array( 'unhoestedapi', t('Api'), $api, 'If your are using ownCloud, your api will be WebDAV', $arr_api), - - '$submit' => t('Save Settings'), - )); - -} -- 2.39.5