aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-26 06:46:55 -0700
committerFriendika <info@friendika.com>2011-05-26 06:46:55 -0700
commit5a0690d9407588b7ed2c312c56290e4a9917597d (patch)
tree0c2f7c1f141b60113fac75d643d8959ab173e05b
parent61b730d567ac4bb648a8d4399f35ca0d32328d40 (diff)
downloadvolse-hubzilla-5a0690d9407588b7ed2c312c56290e4a9917597d.tar.gz
volse-hubzilla-5a0690d9407588b7ed2c312c56290e4a9917597d.tar.bz2
volse-hubzilla-5a0690d9407588b7ed2c312c56290e4a9917597d.zip
add attachments to FB posts, fix paren string in statusnet, do not insert attach div into post if no attachments
-rw-r--r--addon/facebook/facebook.php15
-rw-r--r--addon/statusnet/statusnet.php2
-rw-r--r--boot.php4
-rw-r--r--images/content-types.gifbin384 -> 0 bytes
-rw-r--r--util/messages.po24
-rw-r--r--util/strings.php4
6 files changed, 33 insertions, 16 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index 17cc8bf56..d5544601a 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -505,6 +505,21 @@ function facebook_post_hook(&$a,&$b) {
$msg = trim(strip_tags(bbcode($msg)));
$msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8');
+ // 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 .= $matches[1];
+ }
+ }
+ }
+
if (strlen($msg) > FACEBOOK_MAXPOSTLEN) {
$shortlink = "";
require_once('library/slinky.php');
diff --git a/addon/statusnet/statusnet.php b/addon/statusnet/statusnet.php
index bd40f78d8..39df7d962 100644
--- a/addon/statusnet/statusnet.php
+++ b/addon/statusnet/statusnet.php
@@ -207,7 +207,7 @@ function statusnet_settings(&$a,&$s) {
*/
if (! $globalsn == null) {
$s .= '<h4>' . t('Globally Available StatusNet OAuthKeys') . '</h4>';
- $s .= '<p>'. t('There are preconfigured OAuth key pairs for some StatusNet servers available. If you are useing one of them, please use these credentials. If not feel free to connect to any other StatusNet instance (see below).') .'</p>';
+ $s .= '<p>'. t("There are preconfigured OAuth key pairs for some StatusNet servers available. If you are useing one of them, please use these credentials. If not feel free to connect to any other StatusNet instance \x28see below\x29.") .'</p>';
$s .= '<div id="statusnet-preconf-wrapper">';
foreach ($globalsn as $asn) {
$s .= '<input type="radio" name="statusnet-preconf-apiurl" value="'. $asn['apiurl'] .'">'. $asn['sitename'] .'<br />';
diff --git a/boot.php b/boot.php
index 79e520150..cac272be5 100644
--- a/boot.php
+++ b/boot.php
@@ -2547,8 +2547,8 @@ function prepare_body($item,$attach = false) {
return $s;
$arr = explode(',',$item['attach']);
- $s .= '<div class="body-attach">';
if(count($arr)) {
+ $s .= '<div class="body-attach">';
foreach($arr as $r) {
$matches = false;
$icon = '';
@@ -2572,8 +2572,8 @@ function prepare_body($item,$attach = false) {
$s .= '<a href="' . strip_tags($matches[1]) . '" title="' . $title . '" class="attachlink" target="external-link" >' . $icon . '</a>';
}
}
+ $s .= '<div class="clear"></div></div>';
}
- $s .= '<div class="clear"></div></div>';
return $s;
}}
diff --git a/images/content-types.gif b/images/content-types.gif
deleted file mode 100644
index 2b8cc7fc3..000000000
--- a/images/content-types.gif
+++ /dev/null
Binary files differ
diff --git a/util/messages.po b/util/messages.po
index 19c39b249..68c844388 100644
--- a/util/messages.po
+++ b/util/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 2.2.991\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-05-25 17:11-0700\n"
+"POT-Creation-Date: 2011-05-26 06:46-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1725,12 +1725,12 @@ msgstr ""
msgid "Register"
msgstr ""
-#: ../../mod/like.php:110 ../../addon/facebook/facebook.php:759
+#: ../../mod/like.php:110 ../../addon/facebook/facebook.php:774
#: ../../include/conversation.php:20
msgid "status"
msgstr ""
-#: ../../mod/like.php:127 ../../addon/facebook/facebook.php:763
+#: ../../mod/like.php:127 ../../addon/facebook/facebook.php:778
#: ../../include/conversation.php:25
#, php-format
msgid "%1$s likes %2$s's %3$s"
@@ -1822,8 +1822,15 @@ msgstr ""
msgid "Administrator@"
msgstr ""
-#: ../../mod/item.php:562 ../../mod/item.php:626 ../../mod/dfrn_notify.php:573
-msgid " commented on an item at "
+#: ../../mod/item.php:562 ../../mod/dfrn_notify.php:446
+#: ../../mod/dfrn_notify.php:573
+#, php-format
+msgid "%s commented on an item at %s"
+msgstr ""
+
+#: ../../mod/item.php:626
+#, php-format
+msgid "%s posted to your profile wall at %s"
msgstr ""
#: ../../mod/item.php:655
@@ -2084,11 +2091,6 @@ msgstr ""
msgid "New mail received at "
msgstr ""
-#: ../../mod/dfrn_notify.php:446
-#, php-format
-msgid "%s commented on an item at %s"
-msgstr ""
-
#: ../../mod/apps.php:6
msgid "Applications"
msgstr ""
@@ -2508,7 +2510,7 @@ msgstr ""
msgid "Image: "
msgstr ""
-#: ../../addon/facebook/facebook.php:561
+#: ../../addon/facebook/facebook.php:576
msgid "View on Friendika"
msgstr ""
diff --git a/util/strings.php b/util/strings.php
index 659b0a2df..a9591b0c2 100644
--- a/util/strings.php
+++ b/util/strings.php
@@ -158,7 +158,6 @@ $a->strings["Connection accepted at %s"] = "Connection accepted at %s";
$a->strings['Administrator'] = 'Administrator';
$a->strings['noreply'] = 'noreply';
$a->strings['%s commented on an item at %s'] = '%s commented on an item at %s';
-$a->strings[" commented on an item at "] = " commented on an item at ";
$a->strings["This introduction has already been accepted."] = "This introduction has already been accepted.";
$a->strings['Profile location is not valid or does not contain profile information.'] = 'Profile location is not valid or does not contain profile information.';
$a->strings['Warning: profile location has no identifiable owner name.'] = 'Warning: profile location has no identifiable owner name.';
@@ -314,6 +313,7 @@ $a->strings["%d message sent."] = array(
$a->strings['Unable to locate original post.'] = 'Unable to locate original post.';
$a->strings['Empty post discarded.'] = 'Empty post discarded.';
$a->strings['Wall Photos'] = 'Wall Photos';
+$a->strings['%s posted to your profile wall at %s'] = '%s posted to your profile wall at %s';
$a->strings['System error. Post not saved.'] = 'System error. Post not saved.';
$a->strings['This message was sent to you by %s, a member of the Friendika social network.'] = 'This message was sent to you by %s, a member of the Friendika social network.';
$a->strings['You may visit them online at %s'] = 'You may visit them online at %s';
@@ -787,7 +787,7 @@ $a->strings['We could not contact the StatusNet API with the Path you entered.']
$a->strings['StatusNet settings updated.'] = 'StatusNet settings updated.';
$a->strings['StatusNet Posting Settings'] = 'StatusNet Posting Settings';
$a->strings['Globally Available StatusNet OAuthKeys'] = 'Globally Available StatusNet OAuthKeys';
-$a->strings['There are preconfigured OAuth key pairs for some StatusNet servers available. If you are useing one of them, please use these credentials. If not feel free to connect to any other StatusNet instance (see below] = 'There are preconfigured OAuth key pairs for some StatusNet servers available. If you are useing one of them, please use these credentials. If not feel free to connect to any other StatusNet instance (see below;
+$a->strings["There are preconfigured OAuth key pairs for some StatusNet servers available. If you are useing one of them, please use these credentials. If not feel free to connect to any other StatusNet instance \x28see below\x29."] = "There are preconfigured OAuth key pairs for some StatusNet servers available. If you are useing one of them, please use these credentials. If not feel free to connect to any other StatusNet instance \x28see below\x29.";
$a->strings['Provide your own OAuth Credentials'] = 'Provide your own OAuth Credentials';
$a->strings['No consumer key pair for StatusNet found. Register your Friendika Account as an desktop client on your StatusNet account, copy the consumer key pair here and enter the API base root.<br />Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendika installation at your favorited StatusNet installation.'] = 'No consumer key pair for StatusNet found. Register your Friendika Account as an desktop client on your StatusNet account, copy the consumer key pair here and enter the API base root.<br />Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendika installation at your favorited StatusNet installation.';
$a->strings['OAuth Consumer Key'] = 'OAuth Consumer Key';