From da90ff55725a9118ce6111ab2b6371650bf78ade Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 12 Feb 2011 22:41:25 +0000 Subject: a mostly completed port of JHU/APL wire plugin to 1.8 git-svn-id: http://code.elgg.org/elgg/trunk@8183 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/thewire/views/default/object/thewire.php | 106 ++++++++++++--------------- 1 file changed, 45 insertions(+), 61 deletions(-) (limited to 'mod/thewire/views/default/object') diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php index d15454815..603870153 100644 --- a/mod/thewire/views/default/object/thewire.php +++ b/mod/thewire/views/default/object/thewire.php @@ -1,69 +1,53 @@ getOwnerEntity()->name; +$full = elgg_get_array_value('full', $vars, FALSE); +$post = elgg_get_array_value('entity', $vars, FALSE); - //if the note is a reply, we need some more info - $note_url = ''; - $note_owner = elgg_echo("thewire:notedeleted"); -?> -
-
+if (!$post) { + return true; +} + +// make compatible with posts created with original Curverider plugin +$thread_id = $post->wire_thread; +if (!$thread_id) { + $post->wire_thread = $post->guid; +} -
- $vars['entity']->getOwnerEntity(), 'size' => 'tiny')); - ?> -
+$owner = $post->getOwnerEntity(); -
- - - canEdit()) { - echo "" . elgg_view("output/confirmlink",array( - 'href' => "action/thewire/delete?thewirepost=" . $vars['entity']->getGUID(), - 'text' => elgg_echo('delete'), - 'confirm' => elgg_echo('deleteconfirm'), - )) . ""; - } - ?> -
+$owner_icon = elgg_view_entity_icon($owner, 'tiny'); +$owner_link = elgg_view('output/url', array( + 'href' => "pg/thewire/owner/$owner->username", + 'text' => $owner->name, +)); +$author_text = elgg_echo('blog:author_by_line', array($owner_link)); +$date = elgg_view_friendly_time($post->time_created); - -
-
- $post, + 'handler' => 'thewire', +)); + +$subtitle = "$author_text $date"; + +// do not show the metadata and controls in widget view +if (elgg_in_context('widgets')) { + $metadata = ''; } -?> \ No newline at end of file + +$params = array( + 'entity' => $post, + 'metadata' => $metadata, + 'subtitle' => $subtitle, + 'content' => thewire_filter($post->description), + 'tags' => false, +); +$list_body = elgg_view('layout/objects/list/body', $params); + +echo elgg_view_image_block($owner_icon, $list_body); -- cgit v1.2.3