From 45b2059cd86ca790213fbce6ef247f569db247ae Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 27 Dec 2010 12:08:55 -0800 Subject: [PATCH] better layout for single-bookmark page --- plugins/Bookmark/BookmarkPlugin.php | 20 ++++++++++++++------ plugins/Bookmark/showbookmark.php | 16 ++++++++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/plugins/Bookmark/BookmarkPlugin.php b/plugins/Bookmark/BookmarkPlugin.php index 8fa73abc61..64e7bf8bb1 100644 --- a/plugins/Bookmark/BookmarkPlugin.php +++ b/plugins/Bookmark/BookmarkPlugin.php @@ -224,11 +224,16 @@ class BookmarkPlugin extends Plugin $att = $atts[0]; - $out->elementStart('h3'); - $out->element('a', - array('href' => $att->url), - $nb->title); - $out->elementEnd('h3'); + // XXX: only show the bookmark URL for non-single-page stuff + + if ($out instanceof ShowbookmarkAction) { + } else { + $out->elementStart('h3'); + $out->element('a', + array('href' => $att->url), + $nb->title); + $out->elementEnd('h3'); + } $out->elementStart('ul', array('class' => 'bookmark_tags')); @@ -267,7 +272,10 @@ class BookmarkPlugin extends Plugin array('class' => 'bookmark_description'), $nb->description); - $nli->showNoticeAttachments(); + if (common_config('attachments', 'show_thumbs')) { + $al = new InlineAttachmentList($notice, $out); + $al->show(); + } $out->elementStart('p', array('style' => 'float: left')); diff --git a/plugins/Bookmark/showbookmark.php b/plugins/Bookmark/showbookmark.php index a547de09f0..07dec5a98c 100644 --- a/plugins/Bookmark/showbookmark.php +++ b/plugins/Bookmark/showbookmark.php @@ -113,4 +113,20 @@ class ShowbookmarkAction extends ShownoticeAction return true; } + + function title() + { + return sprintf(_('%s\'s bookmark for "%s"'), + $this->user->nickname, + $this->bookmark->title); + } + + function showPageTitle() + { + $this->elementStart('h1'); + $this->element('a', + array('href' => $this->bookmark->url), + $this->bookmark->title); + $this->elementEnd('h1'); + } }