]> git.mxchange.org Git - friendica.git/commitdiff
add attachments to FB posts, fix paren string in statusnet, do not insert attach...
authorFriendika <info@friendika.com>
Thu, 26 May 2011 13:46:55 +0000 (06:46 -0700)
committerFriendika <info@friendika.com>
Thu, 26 May 2011 13:46:55 +0000 (06:46 -0700)
addon/facebook/facebook.php
addon/statusnet/statusnet.php
boot.php
images/content-types.gif [deleted file]
util/messages.po
util/strings.php

index 17cc8bf5652c199b7bbb9b495e16fe2c20feba5f..d5544601aa8ff1f67fa13c96197c0e98cd6181f2 100644 (file)
@@ -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');
index bd40f78d832bec0f74169cf74d139654255db6f1..39df7d9620b52d6e35a203ac3309424f10f04f61 100644 (file)
@@ -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 />';
index 79e520150a52476772560b965c01c70a7ea7d8ac..cac272be54d0df476dc544f395909aa5242e8253 100644 (file)
--- 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 (file)
index 2b8cc7f..0000000
Binary files a/images/content-types.gif and /dev/null differ
index 19c39b249194e7164ea93b98216fdc610b26445b..68c844388b206a8931e9417fe724ebf8427008e1 100644 (file)
@@ -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 ""
 
index 659b0a2df1204b0525001173c4f3528e316a3c29..a9591b0c254b43589e70892f6f1a2f10763498b0 100644 (file)
@@ -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';