X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshownotice.php;h=5b3ec93de10b64082bceb30bc5de46a4c3693c2d;hb=255ba42ef120a3ee0ac21c0c639730d8317b7e79;hp=86df5f9f30658bdf560ee5be73104e7882639b42;hpb=64cdbe6c5578df1dc49d8e3dd72451ab0ac96bd2;p=quix0rs-gnu-social.git diff --git a/actions/shownotice.php b/actions/shownotice.php index 86df5f9f30..5b3ec93de1 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -278,12 +278,6 @@ class ShownoticeAction extends OwnerDesignAction 'content' => $id->toString())); } - if ($user->jabbermicroid && $user->jabber && $this->notice->uri) { - $id = new Microid('xmpp:', $user->jabber, - $this->notice->uri); - $this->element('meta', array('name' => 'microid', - 'content' => $id->toString())); - } $this->element('link',array('rel'=>'alternate', 'type'=>'application/json+oembed', 'href'=>common_local_url( @@ -298,10 +292,20 @@ class ShownoticeAction extends OwnerDesignAction array(), array('format'=>'xml','url'=>$this->notice->uri)), 'title'=>'oEmbed'),null); + + // Extras to aid in sharing notices to Facebook + $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE); + $avatarUrl = ($avatar) ? + $avatar->displayUrl() : + Avatar::defaultImage(AVATAR_PROFILE_SIZE); + $this->element('meta', array('property' => 'og:image', + 'content' => $avatarUrl)); + $this->element('meta', array('property' => 'og:description', + 'content' => $this->notice->content)); } } -class SingleNoticeItem extends NoticeListItem +class SingleNoticeItem extends DoFollowListItem { /** * recipe function for displaying a single notice. @@ -314,10 +318,14 @@ class SingleNoticeItem extends NoticeListItem function show() { $this->showStart(); - $this->showNotice(); - $this->showNoticeAttachments(); - $this->showNoticeInfo(); - $this->showNoticeOptions(); + if (Event::handle('StartShowNoticeItem', array($this))) { + $this->showNotice(); + $this->showNoticeAttachments(); + $this->showNoticeInfo(); + $this->showNoticeOptions(); + Event::handle('EndShowNoticeItem', array($this)); + } + $this->showEnd(); }