]> git.mxchange.org Git - friendica-addons.git/commitdiff
more FB link improvements
authorfriendica <info@friendica.com>
Mon, 5 Dec 2011 01:33:08 +0000 (17:33 -0800)
committerfriendica <info@friendica.com>
Mon, 5 Dec 2011 01:33:08 +0000 (17:33 -0800)
facebook.tgz
facebook/facebook.php

index 174a2890c4d25e45ba40793a2d800eb582f14d9b..0e6623f9d4b9b92056448d05b49502c065c213fe 100644 (file)
Binary files a/facebook.tgz and b/facebook.tgz differ
index db3382fc2b1a145566107ee5f096150cae44f422..a103f2e8fde50f47e35b76f2a224d9ed76df8894 100644 (file)
@@ -928,10 +928,16 @@ function fb_consume_stream($uid,$j,$wall = false) {
                        $datarray['plink'] = $datarray['author-link'] . '&v=wall&story_fbid=' . substr($entry->id,strpos($entry->id,'_') + 1);
 
                        $datarray['body'] = $entry->message;
-                       if($entry->picture)
-                               $datarray['body'] .= "\n\n" . '[img]' . $entry->picture . '[/img]';
-                       if($entry->link)
-                               $datarray['body'] .= "\n" . '[url=' . $entry->link . ']' . t('link') . '[/url]';
+
+                       if($entry->picture && $entry->link) {
+                               $datarray['body'] .= "\n\n" . '[url=' . $entry->link . '][img]' . $entry->picture . '[/img][/url]';
+                       }
+                       else {
+                               if($entry->picture)
+                                       $datarray['body'] .= "\n\n" . '[img]' . $entry->picture . '[/img]';
+                               if($entry->link)
+                                       $datarray['body'] .= "\n" . '[url=' . $entry->link . ']' . t('link') . '[/url]';
+                       }
                        if($entry->name)
                                $datarray['body'] .= "\n" . $entry->name;
                        if($entry->caption)