From 12f68c4ff243829a435f774e4d486ccfb381a11d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 1 Oct 2010 11:05:15 -0700 Subject: Throw in a quick event hook to override the profile list type on showstream (should be made more general in future). Replace with a NoticeList to have output include avatar and username -- but CSS still hides them in default theme. Event::addHandler('ShowStreamNoticeList', 'awesome'); function awesome($notice, $action, &$pnl) { $pnl = new NoticeList($notice, $action); return false; } --- actions/showstream.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actions') diff --git a/actions/showstream.php b/actions/showstream.php index 2476f19fa..e9f117afc 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -222,7 +222,10 @@ class ShowstreamAction extends ProfileAction ? $this->user->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1) : $this->user->getTaggedNotices($this->tag, ($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, 0, 0, null); - $pnl = new ProfileNoticeList($notice, $this); + $pnl = null; + if (Event::handle('ShowStreamNoticeList', array($notice, $this, &$pnl))) { + $pnl = new ProfileNoticeList($notice, $this); + } $cnt = $pnl->show(); if (0 == $cnt) { $this->showEmptyListMessage(); -- cgit v1.2.3-54-g00ecf From 5c19d33b27e44449e72e5c4b8f3d21c98b31f63a Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 1 Oct 2010 14:42:12 -0700 Subject: Bugfix in FB-sharing header for empty profile avatar --- actions/shownotice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actions') diff --git a/actions/shownotice.php b/actions/shownotice.php index 005335e3b..c5180568b 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -303,7 +303,7 @@ class ShownoticeAction extends OwnerDesignAction $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE); $avatarUrl = ($avatar) ? $avatar->displayUrl() : - Avatar::defaultImage($avatar_size); + Avatar::defaultImage(AVATAR_PROFILE_SIZE); $this->element('meta', array('property' => 'og:image', 'content' => $avatarUrl)); $this->element('meta', array('property' => 'og:description', -- cgit v1.2.3-54-g00ecf