/** * List owned groups */ function groups_handle_owned_page() { $db_prefix = elgg_get_config('dbprefix'); $page_owner = elgg_get_page_owner_entity(); if ($page_owner->guid == elgg_get_logged_in_user_guid()) { $title = elgg_echo('groups:owned'); } else { $title = elgg_echo('groups:owned:user', array($page_owner->name)); } elgg_push_breadcrumb($title); if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) { elgg_register_title_button(); } $dbprefix = elgg_get_config('dbprefix'); $options = array('type' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), 'joins' => array("JOIN {$dbprefix}groups_entity ge ON e.guid = ge.guid"), 'order_by' => 'ge.name ASC', 'full_view' => false, 'no_results' => elgg_echo('groups:none')); $options['joins'] = array("JOIN {$db_prefix}groups_entity ge ON e.guid = ge.guid"); $options['order_by'] = 'ge.name asc'; $options['wheres'] = array("NOT EXISTS ( SELECT 1 FROM {$db_prefix}entity_relationships WHERE guid_one = e.guid AND relationship = '" . AU_SUBGROUPS_RELATIONSHIP . "' )"); $content = elgg_list_entities($options); $sidebar = ''; $display_sidebar = elgg_get_plugin_setting('display_featured', 'au_subgroups'); if ($display_sidebar == 'yes') { $sidebar = elgg_view('groups/sidebar/featured'); } $params = array('content' => $content, 'title' => $title, 'sidebar' => $sidebar, 'filter' => ''); $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); }
/** * Returns content for the "newest" page * * @param string $hook "members:list" * @param string $type "newest" * @param string|null $returnvalue list content (null if not set) * @param array $params array with key "options" * @return string */ function members_list_newest($hook, $type, $returnvalue, $params) { if ($returnvalue !== null) { return; } return elgg_list_entities($params['options']); }
/** * Get images for display on front page * * @param int number of images * @param int (optional) guid of owner * @return string of html for display * * To use with the custom index plugin, use something like this: if (is_plugin_enabled('tidypics')) { ?> <!-- display latest photos --> <div class="index_box"> <h2><a href="<?php echo $vars['url']; ?>pg/photos/world/"><?php echo elgg_echo("tidypics:mostrecent"); ?></a></h2> <div class="contentWrapper"> <?php echo tp_get_latest_photos(5); ?> </div> </div> <?php } ?> * Good luck */ function tp_get_latest_photos($num_images, $owner_guid = 0, $context = 'front') { $prev_context = get_context(); set_context($context); $image_html = elgg_list_entities(array('type' => 'object', 'subtype' => 'image', 'owner_guid' => $owner_guid, 'limit' => $num_images, 'full_view' => false, 'pagination' => false)); set_context($prev_context); return $image_html; }
/** * Get albums for display on front page * * @param int number of albums * @param array (optional) array of container_guids * @param string (optional) context of view to display * @return string of html for display */ function tp_get_latest_albums($num_albums, array $container_guids = NULL, $context = 'front') { $prev_context = elgg_get_context(); elgg_set_context($context); $image_html = elgg_list_entities(array('type' => 'object', 'subtype' => 'album', 'container_guids' => $container_guids, 'limit' => $num_albums, 'full_view' => false, 'pagination' => false)); elgg_set_context($prev_context); return $image_html; }
/** * List owned groups */ function groups_handle_owned_page() { $page_owner = elgg_get_page_owner_entity(); $title = elgg_echo('groups:owned'); elgg_push_breadcrumb($title); $content = elgg_list_entities(array('type' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), 'full_view' => false)); $params = array('content' => $content, 'title' => $title, 'filter' => ''); $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); }
/** * List all groups */ function groups_handle_all_page() { $display_subgroups = elgg_get_plugin_setting('display_subgroups', 'au_subgroups'); $db_prefix = elgg_get_config('dbprefix'); // all groups doesn't get link to self elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('groups')); if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) { elgg_register_title_button(); } $selected_tab = get_input('filter', 'newest'); switch ($selected_tab) { case 'popular': $options = array('type' => 'group', 'relationship' => 'member', 'inverse_relationship' => false, 'full_view' => false); if ($display_subgroups != 'yes') { $options['wheres'] = array("NOT EXISTS ( SELECT 1 FROM {$db_prefix}entity_relationships WHERE guid_one = e.guid AND relationship = '" . AU_SUBGROUPS_RELATIONSHIP . "' )"); } $content = elgg_list_entities_from_relationship_count($options); if (!$content) { $content = elgg_echo('groups:none'); } break; case 'discussion': $content = elgg_list_entities(array('type' => 'object', 'subtype' => 'groupforumtopic', 'order_by' => 'e.last_action desc', 'limit' => 40, 'full_view' => false)); if (!$content) { $content = elgg_echo('discussion:none'); } break; case 'featured': $content = elgg_list_entities_from_metadata(array('type' => 'group', 'metadata_name' => 'featured_group', 'metadata_value' => 'yes', 'full_view' => false)); if (!$content) { $content = elgg_echo('groups:nofeatured'); } break; case 'newest': default: $options = array('type' => 'group', 'full_view' => false); if ($display_subgroups != 'yes') { $options['wheres'] = array("NOT EXISTS ( SELECT 1 FROM {$db_prefix}entity_relationships WHERE guid_one = e.guid AND relationship = '" . AU_SUBGROUPS_RELATIONSHIP . "' )"); } $content = elgg_list_entities($options); if (!$content) { $content = elgg_echo('groups:none'); } break; } $filter = elgg_view('groups/group_sort_menu', array('selected' => $selected_tab)); // $sidebar = elgg_view('groups/sidebar/find'); // $sidebar .= elgg_view('groups/sidebar/featured'); $params = array('content' => $content, 'sidebar' => $sidebar, 'filter' => $filter); $body = elgg_view_layout('content', $params); echo elgg_view_page(elgg_echo('groups:all'), $body); }
/** * Get page components to list a user's or all izap-videos. * * @param integer $container_guid * * @return array array of content for rendering video list * * @version 5.0 */ function izap_video_get_page_content_list($container_guid = NULL) { $return = array(); $return['filter_context'] = $container_guid ? 'mine' : 'all'; $options = array('type' => 'object', 'subtype' => GLOBAL_IZAP_VIDEOS_SUBTYPE, 'full_view' => false, 'no_results' => elgg_echo('izap-videos:none')); $url_id = elgg_get_logged_in_user_guid(); $current_user = elgg_get_logged_in_user_entity(); if ($container_guid) { $url_id = $container_guid; // access check for closed groups izap_group_gatekeeper(); $options['container_guid'] = $container_guid; $container = get_entity($container_guid); $return['title'] = elgg_echo('izap-videos:title:user_videos', array($container->name)); $crumbs_title = $container->name; elgg_push_breadcrumb($crumbs_title); if ($current_user && $container_guid == $current_user->guid) { $return['filter_context'] = 'mine'; } else { if (elgg_instanceof($container, 'group')) { $return['filter'] = false; } else { // do not show button or select a tab when viewing someone else's posts $return['filter_context'] = 'none'; } } } else { $return['filter_context'] = 'all'; $return['title'] = elgg_echo('izap-videos:title:all_videos'); elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('izap-videos')); } if (elgg_is_logged_in()) { $title = 'Add New Video'; } $url = GLOBAL_IZAP_VIDEOS_PAGEHANDLER . '/add/'; if (izap_is_onserver_enabled_izap_videos() == 'yes') { $url .= $url_id . '/onserver'; } elseif (izap_is_onserver_enabled_izap_videos() == 'youtube') { $url .= $url_id . '/youtube'; } elseif (izap_is_offserver_enabled_izap_videos() == 'yes') { $url .= $url_id . '/offserver'; } else { $url .= $url_id . '/offserver'; } elgg_register_menu_item('title', array('name' => elgg_get_friendly_title($title), 'href' => $url, 'text' => $title, 'link_class' => 'elgg-button elgg-button-action')); $return['content'] = elgg_list_entities($options); return $return; }
/** * List owned groups */ function groups_handle_owned_page() { $page_owner = elgg_get_page_owner_entity(); if ($page_owner->guid == elgg_get_logged_in_user_guid()) { $title = elgg_echo('groups:owned'); } else { $title = elgg_echo('groups:owned:user', array($page_owner->name)); } elgg_push_breadcrumb($title); elgg_register_title_button(); $content = elgg_list_entities(array('type' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), 'full_view' => false, 'no_results' => elgg_echo('groups:none'))); $params = array('content' => $content, 'title' => $title, 'filter' => ''); $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); }
function list_subgroups($group, $options = array()) { if ($group instanceof ElggGroup) { $defaults = array('full_view' => false, 'pagination' => true); $options = array_merge($defaults, $options); $options['type'] = 'group'; $options['container_guid'] = $group->guid; elgg_push_context('subgroups'); $list = elgg_list_entities($options); elgg_pop_context(); return $list; } else { return ""; } }
/** * List discussion topics in a group * * @param int $guid Group entity GUID */ function discussion_handle_list_page($guid) { elgg_set_page_owner_guid($guid); elgg_group_gatekeeper(); $group = get_entity($guid); if (!elgg_instanceof($group, 'group')) { forward('', '404'); } elgg_push_breadcrumb($group->name); elgg_register_title_button(); $title = elgg_echo('item:object:groupforumtopic'); $options = array('type' => 'object', 'subtype' => 'groupforumtopic', 'limit' => 20, 'order_by' => 'e.last_action desc', 'container_guid' => $guid, 'full_view' => false, 'no_results' => elgg_echo('discussion:none')); $content = elgg_list_entities($options); $params = array('content' => $content, 'title' => $title, 'filter' => ''); $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); }
/** * List discussion topics in a trip * * @param int $guid trip entity GUID */ function discussion_handle_list_page($guid) { elgg_set_page_owner_guid($guid); elgg_trip_gatekeeper(); $trip = get_entity($guid); if (!elgg_instanceof($trip, 'trip')) { forward('', '404'); } elgg_push_breadcrumb($trip->name, $trip->getURL()); elgg_push_breadcrumb(elgg_echo('item:object:tripforumtopic')); elgg_register_title_button(); $title = elgg_echo('item:object:tripforumtopic'); $options = array('type' => 'object', 'subtype' => 'tripforumtopic', 'limit' => max(20, elgg_get_config('default_limit')), 'order_by' => 'e.last_action desc', 'container_guid' => $guid, 'full_view' => false, 'no_results' => elgg_echo('discussion:none'), 'preload_owners' => true); $content = elgg_list_entities($options); $params = array('content' => $content, 'title' => $title, 'sidebar' => elgg_view('discussion/sidebar'), 'filter' => ''); $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); }
/** * List owned groups */ function groups_handle_owned_page() { $page_owner = elgg_get_page_owner_entity(); if ($page_owner->guid == elgg_get_logged_in_user_guid()) { $title = elgg_echo('groups:owned'); } else { $title = elgg_echo('groups:owned:user', array($page_owner->name)); } elgg_push_breadcrumb($title); if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) { elgg_register_title_button(); } $dbprefix = elgg_get_config('dbprefix'); $content = elgg_list_entities(array('type' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), 'joins' => array("JOIN {$dbprefix}groups_entity ge ON e.guid = ge.guid"), 'order_by' => 'ge.name ASC', 'full_view' => false, 'no_results' => elgg_echo('groups:none'), 'distinct' => false)); $params = array('content' => $content, 'title' => $title, 'filter' => ''); $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); }
function blog_get_posts_php($context, $limit = 30, $offset = 0, $group_guid, $username) { if (!$username) { $user = elgg_get_logged_in_user_entity(); } else { $user = get_user_by_username($username); if (!$user) { throw new InvalidParameterException('registration:usernamenotvalid'); } } if ($context == "all") { $params = array('types' => 'object', 'subtypes' => 'blog', 'limit' => $limit, 'full_view' => FALSE, 'no_results' => elgg_echo('blog:noblogs')); echo elgg_list_entities($params); } if ($context == "mine" || $context == "user") { $params = array('types' => 'object', 'subtypes' => 'blog', 'owner_guid' => $user->guid, 'limit' => $limit, 'full_view' => FALSE, 'no_results' => elgg_echo('blog:noblogs')); echo elgg_list_entities($params); } }
/** * Get page components to list all chats the user is participating. * * @return array */ function chat_all($container_guid = null) { elgg_register_title_button(); $user_guid = elgg_get_logged_in_user_guid(); if ($container_guid == $user_guid) { // Chats started by the user $params['filter_context'] = 'mine'; $chats = elgg_list_entities(array('type' => 'object', 'subtype' => 'chat', 'limit' => 10, 'pagination' => true, 'full_view' => false, 'container_guid' => $user_guid)); } else { // All chats that the user is participating $chats = elgg_list_entities_from_relationship(array('type' => 'object', 'subtype' => 'chat', 'relationship' => 'member', 'relationship_guid' => $user_guid, 'inverse_relationship' => false, 'limit' => 10, 'pagination' => true, 'full_view' => false)); } if (empty($chats)) { $chats = elgg_echo('chat:none'); } $params['title'] = elgg_echo('chat'); $params['content'] = $chats; return $params; }
/** * List owned groups */ function groups_handle_owned_page() { $page_owner = elgg_get_page_owner_entity(); if ($page_owner->guid == elgg_get_logged_in_user_guid()) { $title = elgg_echo('groups:owned'); } else { $title = elgg_echo('groups:owned:user', array($page_owner->name)); } elgg_push_breadcrumb($title); if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) { elgg_register_title_button(); } $content = elgg_list_entities(array('type' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), 'full_view' => false)); if (!$content) { $content = elgg_echo('groups:none'); } $params = array('content' => $content, 'title' => $title, 'filter' => ''); $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); }
/** * List discussion topics in a group * * @param int $guid Group entity GUID */ function discussion_handle_list_page($guid) { elgg_set_page_owner_guid($guid); $group = get_entity($guid); if (!$group) { register_error(elgg_echo('group:notfound')); forward(); } elgg_push_breadcrumb($group->name); group_gatekeeper(); $title = elgg_echo('item:object:groupforumtopic'); $options = array('type' => 'object', 'subtype' => 'groupforumtopic', 'limit' => 20, 'order_by' => 'e.last_action desc', 'container_guid' => $guid, 'full_view' => false); $content = elgg_list_entities($options); $params = array('content' => $content, 'title' => $title, 'filter' => ''); if (!$group->canWriteToContainer()) { $params['buttons'] = ''; } $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); }
function show_members_php($context, $limit = 30, $offset = 0, $username) { if (!$username) { $user = elgg_get_logged_in_user_entity(); } else { $user = get_user_by_username($username); if (!$user) { throw new InvalidParameterException('registration:usernamenotvalid'); } } if ($context == "newest") { $params = array('types' => 'user', 'limit' => $limit, 'full_view' => FALSE); $latest_member = elgg_get_entities($params); echo elgg_list_entities($params); } if ($context == "popular") { $params = array('types' => 'user', 'relationship' => 'friend', 'inverse_relationship' => false); echo elgg_list_entities_from_relationship_count($params); } if ($context == "online") { echo get_online_users(); } }
/** * Serve pages related to group requests * * @param array $page The URL segments */ function group_requests_page_handler($page) { if (!isset($page[0])) { $page[0] = 'add'; } $params = array('filter' => false); switch ($page[0]) { case 'all': admin_gatekeeper(); $requests = elgg_list_entities(array('type' => 'object', 'subtype' => \Groups\Requests\Request::SUBTYPE, 'no_results' => elgg_echo('group_requests:none'))); $params['title'] = elgg_echo('group_requests:requests'); $params['content'] = $requests; break; case 'add': default: gatekeeper(); $params['title'] = elgg_echo('group_requests:request'); $params['content'] = elgg_view_form('groups/request', array(), array('user_guid' => elgg_get_logged_in_user_guid())); break; } $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); }
/** * Get page components to list a user's or all blogs. * * @param int $container_guid The GUID of the page owner or NULL for all blogs * @return array */ function timeline_get_page_content_list($container_guid = NULL) { $return = array(); $return['filter_context'] = $container_guid ? 'mine' : 'all'; $options = array('type' => 'object', 'subtype' => 'blog', 'full_view' => false, 'no_results' => elgg_echo('blog:none')); $current_user = elgg_get_logged_in_user_entity(); if ($container_guid) { // access check for closed groups elgg_group_gatekeeper(); $options['container_guid'] = $container_guid; $container = get_entity($container_guid); if (!$container) { } $return['title'] = elgg_echo('blog:title:user_blogs', array($container->name)); $crumbs_title = $container->name; elgg_push_breadcrumb($crumbs_title); if ($current_user && $container_guid == $current_user->guid) { $return['filter_context'] = 'mine'; } else { if (elgg_instanceof($container, 'group')) { $return['filter'] = false; } else { // do not show button or select a tab when viewing someone else's posts $return['filter_context'] = 'none'; } } } else { $return['filter_context'] = 'all'; $return['title'] = elgg_echo('blog:title:all_blogs'); elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('blog:blogs')); } elgg_register_title_button(); $return['content'] = elgg_list_entities($options); return $return; }
<?php /** * Elgg videos plugin everyone page * Author : Sarath C | Team Webgalli * Team Webgalli | Elgg developers and consultants * Mail : webgalli@gmail.com * Web : http://webgalli.com | http://plugingalaxy.com * Skype : 'team.webgalli' or 'drsanupmoideen' * @package Elgg-videos * Plugin info : Upload/ Embed videos. Save uploaded videos in youtube and save your bandwidth and server space * Licence : GNU2 * Copyright : Team Webgalli 2011-2015 */ elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('videos')); elgg_register_title_button(); $offset = (int) get_input('offset', 0); $content = elgg_list_entities(array('type' => 'object', 'subtype' => 'videos', 'limit' => 10, 'offset' => $offset, 'full_view' => false, 'view_toggle_type' => false)); $title = elgg_echo('videos:everyone'); $body = elgg_view_layout('content', array('filter_context' => 'all', 'content' => $content, 'title' => $title, 'sidebar' => elgg_view('videos/sidebar'))); echo elgg_view_page($title, $body);
/** * Returns a list of entities by relationship count * * @see elgg_get_entities_from_relationship_count() * * @param array $options Options array * * @return string * @since 1.8.0 */ function elgg_list_entities_from_relationship_count($options) { return elgg_list_entities($options, 'elgg_get_entities_from_relationship_count'); }
<?php namespace Elgg\Roles\UI; echo elgg_list_entities(array('types' => 'object', 'subtypes' => 'role', 'limit' => 0));
/** * Returns a list of entities filtered by provided metadata. * * @see elgg_get_entities_from_metadata * * @param array $options Options array * * @return array * @since 1.7.0 */ function elgg_list_entities_from_metadata($options) { return elgg_list_entities($options, 'elgg_get_entities_from_metadata'); }
/** * List entities from an annotation calculation. * * @see elgg_get_entities_from_annotation_calculation() * * @param array $options An options array. * * @return string */ function elgg_list_entities_from_annotation_calculation($options) { $defaults = array('calculation' => 'sum', 'order_by' => 'annotation_calculation desc'); $options = array_merge($defaults, $options); return elgg_list_entities($options, 'elgg_get_entities_from_annotation_calculation'); }
} if ($topic == "mine") { $interests = rijkshuisstijl_get_interests($user); if ($interests) { $options['container_guids'] = $interests; } } else { $topic = (int) $topic; if ($topic) { $options['container_guid'] = $topic; } } $category = get_input('category', null); if ($category) { $tags = get_metastring_id("tags"); $juris = get_metastring_id("juris"); if ($tags && $juris) { $options['joins'] = "LEFT JOIN elgg_metadata md ON e.guid = md.entity_guid AND md.name_id = {$tags} AND md.value_id = {$juris}"; switch ($category) { case "news": $options['wheres'] = "md.value_id IS NULL"; break; case "jurisprudence": $options['wheres'] = "md.value_id IS NOT NULL"; break; } } } $title = elgg_echo('news'); $body = elgg_view_layout('content', array('title' => '', 'filter' => '', 'content' => elgg_view('news/pages/all', array('entities' => elgg_list_entities($options))))); echo elgg_view_page($title, $body);
<?php /** * Group pages * * @package ElggPages */ $group = elgg_get_page_owner_entity(); if ($group->pages_enable == "no") { return true; } $all_link = elgg_view('output/url', array('href' => "pages/group/{$group->guid}/all", 'text' => elgg_echo('link:view:all'))); elgg_push_context('widgets'); $options = array('type' => 'object', 'subtype' => 'page_top', 'container_guid' => elgg_get_page_owner_guid(), 'limit' => 6, 'full_view' => false, 'pagination' => false); $content = elgg_list_entities($options); elgg_pop_context(); if (!$content) { $content = '<p>' . elgg_echo('pages:none') . '</p>'; } $new_link = elgg_view('output/url', array('href' => "pages/add/{$group->guid}", 'text' => elgg_echo('pages:add'))); echo elgg_view('groups/profile/module', array('title' => elgg_echo('pages:group'), 'content' => $content, 'all_link' => $all_link, 'add_link' => $new_link));
<?php $page_owner = elgg_get_page_owner_entity(); if ($page_owner->guid == elgg_get_logged_in_user_guid()) { $title = elgg_echo('groups:owned'); } else { $title = elgg_echo('groups:owned:user', array($page_owner->name)); } elgg_push_breadcrumb($title); if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) { elgg_register_title_button(); } $dbprefix = elgg_get_config('dbprefix'); $content = elgg_list_entities(array('type' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), 'joins' => array("JOIN {$dbprefix}groups_entity ge ON e.guid = ge.guid"), 'order_by' => 'ge.name ASC', 'full_view' => false, 'no_results' => elgg_echo('groups:none'), 'distinct' => false)); $params = array('content' => $content, 'title' => $title, 'filter' => ''); $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body);
* Shows the overview page of the FFD Cafe * * @package theme_ffd */ elgg_push_context("cafe"); if (elgg_is_logged_in() && can_write_to_container()) { $add = elgg_view_form('theme_ffd/cafe', array('name' => 'cafe', 'action' => 'action/cafe/save'), array('collapsable' => true)); } else { $add = ""; } $options = array('type' => 'object', 'subtype' => 'cafe', 'order_by' => 'last_action DESC', 'full_view' => false); $owner = get_input('owner'); if ($owner) { $owner = get_user_by_username($owner); } if ($owner) { $options['owner_guid'] = $owner->guid; $filter_context = 'mine'; } else { $filter_context = 'all'; } $purpose = get_input('purpose'); if (in_array($purpose, array('search', 'share', 'experience'))) { $options['metadata_name_value_pairs'] = array(array('name' => 'purpose', 'value' => $purpose)); $getter = 'elgg_get_entities_from_metadata'; } else { $getter = 'elgg_get_entities'; } $output .= elgg_list_entities($options, $getter); $body = elgg_view_layout('content', array('header' => $add, 'content' => $output, 'filter_context' => $filter_context)); echo elgg_view_page(elgg_echo('pinboard'), $body);
$icon = elgg_view_entity_icon($owner, "small"); } $text = elgg_view("output/url", array("href" => $entity_url, "text" => $entity->title)); $text .= "<br />"; $text .= "<a href='" . $owner->getURL() . "'>" . $owner->name . "</a>"; if ($show_timestamp) { $text .= " <span class='elgg-quiet'>" . elgg_view_friendly_time($entity->time_created) . "</span>"; } $result .= elgg_view_image_block($icon, $text); } $result .= "</li>"; } $result .= "</ul>"; } } else { $result = elgg_list_entities($options); } if (empty($result)) { $result = elgg_echo("notfound"); } elseif ($widget->show_search_link == "yes" && !empty($widget->tags) && elgg_is_active_plugin("search")) { $tags = $widget->tags; if (elgg_is_active_plugin("search_advanced")) { $tags_text = $tags; } else { $tags = string_to_tag_array($tags); $tags_text = $tags[0]; } $search_postfix = ""; if (count($content_type) == 1) { $search_postfix = "&entity_subtype=" . $content_type[0] . "&entity_type=object&search_type=entities"; }
<?php /** * User wire post widget display view */ $widget = elgg_extract('entity', $vars); $content = elgg_list_entities(['type' => 'object', 'subtype' => 'thewire', 'container_guid' => $widget->owner_guid, 'limit' => $widget->num_display, 'pagination' => false]); if (empty($content)) { echo elgg_echo('thewire:noposts'); return; } echo $content; $more_link = elgg_view('output/url', ['href' => "thewire/owner/" . $widget->getOwnerEntity()->username, 'text' => elgg_echo('thewire:moreposts'), 'is_trusted' => true]); echo "<div class=\"elgg-widget-more\">{$more_link}</div>";