]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/classes/Ostatus_profile.php
Updated 'more' anchor for attachments to do an XHR GET
[quix0rs-gnu-social.git] / plugins / OStatus / classes / Ostatus_profile.php
index c7e3b05096863b8028c540ff51945697b0ff6e5d..51a426dc465a79e27d69dfa36877f53a4bc9435c 100644 (file)
@@ -555,9 +555,21 @@ class Ostatus_profile extends Memcached_DataObject
                 $shortSummary = substr($shortSummary,
                                        0,
                                        Notice::maxContent() - (mb_strlen($url) + 2));
-                $shortSummary .= '… ' . $url;
-                $content = $shortSummary;
-                $rendered = common_render_text($content);
+                $shortSummary .= '…';
+                $content = $shortSummary . ' ' . $url;
+
+                // We mark up the attachment link specially for the HTML output
+                // so we can fold-out the full version inline.
+                $attachUrl = common_local_url('attachment',
+                                              array('attachment' => $attachment->id));
+                $rendered = common_render_text($shortSummary) .
+                            ' ' .
+                            '<a href="' .
+                            htmlspecialchars($attachUrl) .
+                            '" class="attachment more">' .
+                            // TRANS: expansion link for too-long remote messages
+                            htmlspecialchars(_m('more')) .
+                            '</a>';
             }
         }