From d5f0d44d4ddf33db2248ef0bdd44633d57c31683 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 8 Oct 2011 08:22:08 -0400 Subject: Fixes #3411 output/url now has a is_trusted parameter - defaults to false --- mod/file/views/default/object/file.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mod/file/views/default/object') diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php index 95e190d35..fbd585b8a 100644 --- a/mod/file/views/default/object/file.php +++ b/mod/file/views/default/object/file.php @@ -24,6 +24,7 @@ $body = elgg_view('output/longtext', array('value' => $file->description)); $owner_link = elgg_view('output/url', array( 'href' => "file/owner/$owner->username", 'text' => $owner->name, + 'is_trusted' => true, )); $author_text = elgg_echo('byline', array($owner_link)); @@ -39,6 +40,7 @@ if ($comments_count != 0) { $comments_link = elgg_view('output/url', array( 'href' => $file->getURL() . '#file-comments', 'text' => $text, + 'is_trusted' => true, )); } else { $comments_link = ''; -- cgit v1.2.3 From 3703a53134d6b167602cd40f31eb58bfefda9d0b Mon Sep 17 00:00:00 2001 From: cash Date: Mon, 24 Oct 2011 22:01:03 -0400 Subject: Fixes #3974 blog, bookmarks, file, and pages plugins consistent in integration with categories plugin --- mod/blog/views/default/forms/blog/save.php | 2 +- mod/blog/views/default/object/blog.php | 3 +-- mod/bookmarks/views/default/object/bookmarks.php | 2 +- mod/file/views/default/object/file.php | 2 +- mod/pages/views/default/forms/pages/edit.php | 2 +- mod/pages/views/default/object/page_top.php | 3 ++- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'mod/file/views/default/object') diff --git a/mod/blog/views/default/forms/blog/save.php b/mod/blog/views/default/forms/blog/save.php index 8246fdec3..a805541bd 100644 --- a/mod/blog/views/default/forms/blog/save.php +++ b/mod/blog/views/default/forms/blog/save.php @@ -104,7 +104,7 @@ $access_input = elgg_view('input/access', array( 'value' => $vars['access_id'] )); -$categories_input = elgg_view('categories', $vars); +$categories_input = elgg_view('input/categories', $vars); // hidden inputs $container_guid_input = elgg_view('input/hidden', array('name' => 'container_guid', 'value' => elgg_get_page_owner_guid())); diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index ab75bd09b..b51b769a2 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -52,8 +52,7 @@ $metadata = elgg_view_menu('entity', array( 'class' => 'elgg-menu-hz', )); -$subtitle = "

$author_text $date $comments_link

"; -$subtitle .= $categories; +$subtitle = "$author_text $date $comments_link $categories"; // do not show the metadata and controls in widget view if (elgg_in_context('widgets')) { diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php index 784263232..bdd623bb5 100644 --- a/mod/bookmarks/views/default/object/bookmarks.php +++ b/mod/bookmarks/views/default/object/bookmarks.php @@ -50,7 +50,7 @@ $metadata = elgg_view_menu('entity', array( 'class' => 'elgg-menu-hz', )); -$subtitle = "$author_text $date $categories $comments_link"; +$subtitle = "$author_text $date $comments_link $categories"; // do not show the metadata and controls in widget view if (elgg_in_context('widgets')) { diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php index fbd585b8a..874d8fb07 100644 --- a/mod/file/views/default/object/file.php +++ b/mod/file/views/default/object/file.php @@ -53,7 +53,7 @@ $metadata = elgg_view_menu('entity', array( 'class' => 'elgg-menu-hz', )); -$subtitle = "$author_text $date $categories $comments_link"; +$subtitle = "$author_text $date $comments_link $categories"; // do not show the metadata and controls in widget view if (elgg_in_context('widgets')) { diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php index c29de1085..20737a121 100644 --- a/mod/pages/views/default/forms/pages/edit.php +++ b/mod/pages/views/default/forms/pages/edit.php @@ -24,7 +24,7 @@ foreach ($variables as $name => $type) { time_created); $editor_text = elgg_echo('pages:strapline', array($date, $editor_link)); $tags = elgg_view('output/tags', array('tags' => $page->tags)); +$categories = elgg_view('output/categories', $vars); $comments_count = $page->countComments(); //only display if there are commments @@ -67,7 +68,7 @@ $metadata = elgg_view_menu('entity', array( 'class' => 'elgg-menu-hz', )); -$subtitle = "$editor_text $categories $comments_link"; +$subtitle = "$editor_text $comments_link $categories"; // do not show the metadata and controls in widget view if (elgg_in_context('widgets') || $revision) { -- cgit v1.2.3 From 08910caa0a8750a449db6910bb28d0d1e758c615 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 25 Oct 2011 19:18:09 -0400 Subject: added new view for the full display of objects --- mod/blog/views/default/object/blog.php | 17 ++++----- mod/bookmarks/views/default/object/bookmarks.php | 18 ++++++---- mod/file/views/default/object/file.php | 23 ++++++------ mod/pages/views/default/object/page_top.php | 15 ++++---- views/default/object/elements/full.php | 45 ++++++++++++++++++++++++ 5 files changed, 81 insertions(+), 37 deletions(-) create mode 100644 views/default/object/elements/full.php (limited to 'mod/file/views/default/object') diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index b51b769a2..05ddf62c7 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -66,8 +66,6 @@ if ($full) { 'class' => 'blog-post', )); - $header = elgg_view_title($blog->title); - $params = array( 'entity' => $blog, 'title' => false, @@ -76,15 +74,14 @@ if ($full) { 'tags' => $tags, ); $params = $params + $vars; - $list_body = elgg_view('object/elements/summary', $params); + $summary = elgg_view('object/elements/summary', $params); - $blog_info = elgg_view_image_block($owner_icon, $list_body); - - echo << $blog->title, + 'summary' => $summary, + 'icon' => $owner_icon, + 'body' => $body, + )); } else { // brief view diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php index bdd623bb5..ba8029a54 100644 --- a/mod/bookmarks/views/default/object/bookmarks.php +++ b/mod/bookmarks/views/default/object/bookmarks.php @@ -58,7 +58,6 @@ if (elgg_in_context('widgets')) { } if ($full && !elgg_in_context('gallery')) { - $header = elgg_view_title($bookmark->title); $params = array( 'entity' => $bookmark, @@ -68,19 +67,24 @@ if ($full && !elgg_in_context('gallery')) { 'tags' => $tags, ); $params = $params + $vars; - $list_body = elgg_view('object/elements/summary', $params); - $bookmark_info = elgg_view_image_block($owner_icon, $list_body); + $summary = elgg_view('object/elements/summary', $params); $bookmark_icon = elgg_view_icon('push-pin-alt'); - echo << $bookmark_icon$link $description HTML; + echo elgg_view('object/elements/full', array( + 'entity' => $bookmark, + 'title' => $bookmark->title, + 'icon' => $owner_icon, + 'summary' => $summary, + 'body' => $body, + )); + } elseif (elgg_in_context('gallery')) { echo << @@ -124,4 +128,4 @@ HTML; $body = elgg_view('object/elements/summary', $params); echo elgg_view_image_block($owner_icon, $body); -} \ No newline at end of file +} diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php index 874d8fb07..81421133f 100644 --- a/mod/file/views/default/object/file.php +++ b/mod/file/views/default/object/file.php @@ -19,8 +19,6 @@ $excerpt = elgg_get_excerpt($file->description); $mime = $file->mimetype; $base_type = substr($mime, 0, strpos($mime,'/')); -$body = elgg_view('output/longtext', array('value' => $file->description)); - $owner_link = elgg_view('output/url', array( 'href' => "file/owner/$owner->username", 'text' => $owner->name, @@ -69,8 +67,6 @@ if ($full && !elgg_in_context('gallery')) { $extra = elgg_view("file/specialcontent/$base_type/default", $vars); } - $header = elgg_view_title($file->title); - $params = array( 'entity' => $file, 'title' => false, @@ -79,17 +75,18 @@ if ($full && !elgg_in_context('gallery')) { 'tags' => $tags, ); $params = $params + $vars; - $list_body = elgg_view('object/elements/summary', $params); + $summary = elgg_view('object/elements/summary', $params); - $file_info = elgg_view_image_block($file_icon, $list_body); + $text = elgg_view('output/longtext', array('value' => $file->description)); + $body = "$text $extra"; - echo << - $body - $extra - -HTML; + echo elgg_view('object/elements/full', array( + 'entity' => $file, + 'title' => false, + 'icon' => $file_icon, + 'summary' => $summary, + 'body' => $body, + )); } elseif (elgg_in_context('gallery')) { echo ' +HTML; -- cgit v1.2.3 From 508fe03a44dec3a275c19fe2c63ab63fd04c0880 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 1 Nov 2011 21:08:22 -0400 Subject: Fixes #4035 made the entity view pages consistent for blog, bookmarks, file, pages, and forum posts --- mod/blog/lib/blog.php | 1 - mod/blog/views/default/object/blog.php | 1 - mod/bookmarks/pages/bookmarks/view.php | 1 - mod/bookmarks/views/default/object/bookmarks.php | 1 - mod/file/views/default/object/file.php | 1 - mod/groups/views/default/object/groupforumtopic.php | 1 - mod/pages/views/default/object/page_top.php | 1 - views/default/object/elements/full.php | 10 +--------- 8 files changed, 1 insertion(+), 16 deletions(-) (limited to 'mod/file/views/default/object') diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 792f32c42..590547a8c 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -20,7 +20,6 @@ function blog_get_page_content_read($guid = NULL) { // no header or tabs for viewing an individual blog $return['filter'] = ''; - $return['header'] = ''; if (!elgg_instanceof($blog, 'object', 'blog')) { $return['content'] = elgg_echo('blog:error:post_not_found'); diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index 05ddf62c7..3525b3d48 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -77,7 +77,6 @@ if ($full) { $summary = elgg_view('object/elements/summary', $params); echo elgg_view('object/elements/full', array( - 'title' => $blog->title, 'summary' => $summary, 'icon' => $owner_icon, 'body' => $body, diff --git a/mod/bookmarks/pages/bookmarks/view.php b/mod/bookmarks/pages/bookmarks/view.php index 8e097b090..2439d2ee8 100644 --- a/mod/bookmarks/pages/bookmarks/view.php +++ b/mod/bookmarks/pages/bookmarks/view.php @@ -28,7 +28,6 @@ $body = elgg_view_layout('content', array( 'content' => $content, 'title' => $title, 'filter' => '', - 'header' => '', )); echo elgg_view_page($title, $body); diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php index ba8029a54..89a0d03e0 100644 --- a/mod/bookmarks/views/default/object/bookmarks.php +++ b/mod/bookmarks/views/default/object/bookmarks.php @@ -79,7 +79,6 @@ HTML; echo elgg_view('object/elements/full', array( 'entity' => $bookmark, - 'title' => $bookmark->title, 'icon' => $owner_icon, 'summary' => $summary, 'body' => $body, diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php index 81421133f..1db9863c9 100644 --- a/mod/file/views/default/object/file.php +++ b/mod/file/views/default/object/file.php @@ -69,7 +69,6 @@ if ($full && !elgg_in_context('gallery')) { $params = array( 'entity' => $file, - 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php index f3d5f96d5..a579d89a4 100644 --- a/mod/groups/views/default/object/groupforumtopic.php +++ b/mod/groups/views/default/object/groupforumtopic.php @@ -64,7 +64,6 @@ if ($full) { $params = array( 'entity' => $topic, - 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, diff --git a/mod/pages/views/default/object/page_top.php b/mod/pages/views/default/object/page_top.php index 0a1c33458..e78289f28 100644 --- a/mod/pages/views/default/object/page_top.php +++ b/mod/pages/views/default/object/page_top.php @@ -80,7 +80,6 @@ if ($full) { $params = array( 'entity' => $page, - 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, diff --git a/views/default/object/elements/full.php b/views/default/object/elements/full.php index 4a2991442..9b89f9706 100644 --- a/views/default/object/elements/full.php +++ b/views/default/object/elements/full.php @@ -2,8 +2,7 @@ /** * Object full rendering * - * Sample output - *

Title

+ * Sample output: *
*
*
@@ -12,14 +11,12 @@ *
* * @uses $vars['entity'] ElggEntity - * @uses $vars['title'] Title (false for no title) * @uses $vars['icon'] HTML for the content icon * @uses $vars['summary'] HTML for the content summary * @uses $vars['body'] HTML for the content body * @uses $vars['class'] Optional additional class for the content wrapper */ -$title = elgg_extract('title', $vars); $icon = elgg_extract('icon', $vars); $summary = elgg_extract('summary', $vars); $body = elgg_extract('body', $vars); @@ -30,14 +27,9 @@ if ($class) { $class = "elgg-content"; } -if ($title) { - $title = elgg_view_title($title); -} - $header = elgg_view_image_block($icon, $summary); echo << $header $body -- cgit v1.2.3