]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Bookmark/BookmarkPlugin.php
Remove inline reply forms on click-away if they have initial text as well as if empty...
[quix0rs-gnu-social.git] / plugins / Bookmark / BookmarkPlugin.php
index 1ef5f5c0e32db0eadd56dff66e166ad2700028f5..bc8985e907b8821d992252c1eb8890f45bb5e7b4 100644 (file)
@@ -365,8 +365,8 @@ class BookmarkPlugin extends MicroAppPlugin
     /**
      * Save a bookmark from an activity
      *
-     * @param Profile  $profile  Profile to use as author
      * @param Activity $activity Activity to save
+     * @param Profile  $profile  Profile to use as author
      * @param array    $options  Options to pass to bookmark-saving code
      *
      * @return Notice resulting notice
@@ -508,8 +508,17 @@ class BookmarkPlugin extends MicroAppPlugin
         return $object;
     }
 
+    /**
+     * @fixme WARNING WARNING WARNING this opens a 'div' that is apparently closed by MicroAppPlugin
+     * @fixme that's probably wrong?
+     *
+     * @param Notice $notice
+     * @param HTMLOutputter $out
+     */
     function showNotice($notice, $out)
     {
+        $nb = Bookmark::getByNotice($notice);
+
         $profile = $notice->getProfile();
 
         $atts = $notice->attachments();
@@ -542,8 +551,8 @@ class BookmarkPlugin extends MicroAppPlugin
 
         // Replies look like "for:" tags
 
-        $replies = $nli->notice->getReplies();
-        $tags = $nli->notice->getTags();
+        $replies = $notice->getReplies();
+        $tags = $notice->getTags();
 
         if (!empty($replies) || !empty($tags)) {
 
@@ -607,12 +616,15 @@ class BookmarkPlugin extends MicroAppPlugin
                             'height' => AVATAR_MINI_SIZE,
                             'alt' => $profile->getBestName()));
 
-        $out->raw(' ');
+        $out->raw(' '); // avoid   for AJAX XML compatibility
 
+        $out->elementStart('span', 'vcard author'); // hack for belongsOnTimeline; JS needs to be able to find the author
         $out->element('a', 
-                      array('href' => $profile->profileurl,
+                      array('class' => 'url',
+                            'href' => $profile->profileurl,
                             'title' => $profile->getBestName()),
                       $profile->nickname);
+        $out->elementEnd('span');
     }
 
     function entryForm($out)