/** * Page handler for embeds * * @param array $page */ function embed_page_handler($page) { $params = array('output' => '', 'status' => 0, 'system_messages' => array('error' => array(), 'success' => array())); $container_guid = get_input('container_guid'); if ($container_guid && get_entity($container_guid)) { elgg_set_page_owner_guid($container_guid); } switch ($page[0]) { default: case 'tab': $default_tab = elgg_is_active_plugin('file') ? 'file' : 'content_items'; $embed_tab = elgg_extract(1, $page, $default_tab); $title = elgg_echo("embed:embed"); $filter = elgg_view('embed/filter', array('filter_context' => $embed_tab)); $view = "embed/tab/{$embed_tab}"; if (elgg_view_exists($view)) { $content = elgg_view($view); } else { $embed_tab = elgg_get_config('embed_tab'); if ($embed_tab instanceof \ElggMenuItem) { $view = $embed_tab->getData('view'); $options = $embed_tab->getData('options'); if ($view) { $content = elgg_view($view); } else { if ($options) { $content = elgg_view('embed/get_list', array('options' => $options)); } } } } if (empty($content)) { $content = elgg_autop(elgg_echo('embed:section:invalid')); } $params['output'] = elgg_view_layout('one_column', array('title' => $title, 'content' => $filter . $content, 'class' => 'embed-wrapper')); break; } $system_messages = system_messages(NULL, ""); if (isset($system_messages['success'])) { $params['system_messages']['success'] = $system_messages['success']; } if (isset($system_messages['error'])) { $params['system_messages']['error'] = $system_messages['error']; $params['status'] = -1; } // We do not want to serve this page via non-xhr requests if (!elgg_is_xhr()) { register_error(elgg_echo('embed:error:non_xhr_request')); return false; } echo json_encode($params); exit; }
/** * Create paragraphs from text with line spacing * * @param string $string The string * @return string * @deprecated 1.9 Use elgg_autop instead **/ function autop($string) { elgg_deprecated_notice('autop has been deprecated in favor of elgg_autop', '1.9'); return elgg_autop($string); }
* * @package Elgg.Core.Plugin * @subpackage UserValidationByEmail.Administration */ $limit = get_input('limit', 10); $offset = get_input('offset', 0); // can't use elgg_list_entities() and friends because we don't use the default view for users. $ia = elgg_set_ignore_access(TRUE); $hidden_entities = access_get_show_hidden_status(); access_show_hidden_entities(TRUE); $options = array('type' => 'user', 'wheres' => uservalidationbyemail_get_unvalidated_users_sql_where(), 'limit' => $limit, 'offset' => $offset, 'count' => TRUE); $count = elgg_get_entities($options); if (!$count) { access_show_hidden_entities($hidden_entities); elgg_set_ignore_access($ia); echo elgg_autop(elgg_echo('uservalidationbyemail:admin:no_unvalidated_users')); return TRUE; } $options['count'] = FALSE; $users = elgg_get_entities($options); access_show_hidden_entities($hidden_entities); elgg_set_ignore_access($ia); // setup pagination $pagination = elgg_view('navigation/pagination', array('base_url' => 'admin/users/unvalidated', 'offset' => $offset, 'count' => $count, 'limit' => $limit)); $bulk_actions_checkbox = '<label><input type="checkbox" id="uservalidationbyemail-checkall" />' . elgg_echo('uservalidationbyemail:check_all') . '</label>'; $validate = elgg_view('output/url', array('href' => 'action/uservalidationbyemail/validate/', 'text' => elgg_echo('uservalidationbyemail:admin:validate'), 'title' => elgg_echo('uservalidationbyemail:confirm_validate_checked'), 'class' => 'uservalidationbyemail-submit', 'is_action' => true, 'is_trusted' => true)); $resend_email = elgg_view('output/url', array('href' => 'action/uservalidationbyemail/resend_validation/', 'text' => elgg_echo('uservalidationbyemail:admin:resend_validation'), 'title' => elgg_echo('uservalidationbyemail:confirm_resend_validation_checked'), 'class' => 'uservalidationbyemail-submit', 'is_action' => true, 'is_trusted' => true)); $delete = elgg_view('output/url', array('href' => 'action/uservalidationbyemail/delete/', 'text' => elgg_echo('uservalidationbyemail:admin:delete'), 'title' => elgg_echo('uservalidationbyemail:confirm_delete_checked'), 'class' => 'uservalidationbyemail-submit', 'is_action' => true, 'is_trusted' => true)); $bulk_actions = <<<___END \t<ul class="elgg-menu elgg-menu-general elgg-menu-hz float-alt"> \t\t<li>{$resend_email}</li><li>{$validate}</li><li>{$delete}</li>
$screenshots = elgg_view('object/plugin_project/screenshots', array('entity' => $project)); $stable_downloads = elgg_view('object/plugin_project/release_table', array('entity' => $project, 'stable' => true)); ?> <h4> <?php echo elgg_view('output/text', array('value' => $project->summary)); ?> </h4> <?php $image = elgg_view_entity_icon($project_owner, 'tiny'); $author_link = elgg_view('output/url', array('href' => "/plugins/developer/{$project_owner->username}", 'text' => $project_owner->name, 'encode_text' => TRUE)); $tags = elgg_view('output/tags', array('value' => $project->tags)); $by_author = elgg_echo('plugins:author:byline', array($author_link)); $last_updated = elgg_echo('plugins:last:updated', array($updated)); $body = <<<DETAILS \t<div class="elgg-subtext">{$by_author}</div> \t<div class="elgg-subtext">{$last_updated}</div> DETAILS; echo elgg_view_image_block($image, $body); echo $screenshots; echo $stable_downloads; ?> <div class="elgg-output"> <?php echo elgg_autop($project->description); ?> </div>
$body .= '<thead>'; $body .= '<tr>'; foreach ($header as $h) { $body .= '<th>' . $h . '</th>'; } $body .= '</tr>'; $body .= '</thead>'; $body .= '<tbody>'; foreach ($report as $record) { if ($record['__upload_users_status'] == 'complete') { $class = 'upload-users-success'; } else { $class = 'upload-users-error'; } $body .= "<tr class=\"{$class}\">"; foreach ($record as $k => $value) { if (is_array($value)) { $value = implode('<br />', $value); } $body .= '<td>' . elgg_autop($value) . '</td>'; } $body .= '</tr>'; } $body .= '</tbody>'; $body .= '</table>'; $body .= '</div>'; $body .= '<div class="elgg-foot mtl">'; $body .= elgg_view('output/url', array('text' => elgg_echo('upload_users:continue:download_report'), 'href' => "upload_users/report?guid={$file->guid}", 'class' => 'elgg-button elgg-button-action')); $body .= elgg_view('output/url', array('text' => elgg_echo('upload_users:delete'), 'href' => "action/upload_users/delete?guid={$file->guid}", 'is_action' => true, 'class' => 'elgg-button elgg-button-action')); $body .= '</div>'; echo elgg_view_module('aside', $title, $body, array('class' => 'mam'));
<?php /** * No results from search */ echo elgg_autop(elgg_echo('search:no_results'));
<?php /** * Install database page * * @uses $vars['failure'] Settings file exists but something went wrong */ if (isset($vars['failure']) && $vars['failure']) { echo elgg_autop(elgg_echo('install:database:error')); $vars['refresh'] = TRUE; $vars['advance'] = FALSE; echo elgg_view('install/nav', $vars); } else { echo elgg_autop(elgg_echo('install:database:instructions')); $vars['type'] = 'database'; $url = current_page_url(); $form_vars = array('action' => $url, 'disable_security' => TRUE); echo elgg_view_form('install/template', $form_vars, $vars); }
<?php /** * Install welcome page */ echo elgg_autop(elgg_echo('install:welcome:instructions')); echo elgg_view('install/nav', $vars);
echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:search_types_menu_format:info')); echo elgg_format_element('label', [], elgg_echo('search_advanced:settings:combine_search_results')); echo elgg_view('input/dropdown', ['name' => 'params[combine_search_results]', 'options_values' => $combine_search_results_options, 'value' => $plugin->combine_search_results, 'class' => 'mls']); echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:combine_search_results:info')); echo elgg_format_element('label', [], elgg_echo('search_advanced:settings:search_with_loader')); echo elgg_view('input/dropdown', ['name' => 'params[search_with_loader]', 'options_values' => $noyes_options, 'value' => $plugin->search_with_loader, 'class' => 'mls']); echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:search_with_loader:info')); // search hooks settings echo elgg_format_element('label', [], elgg_echo('search_advanced:settings:search_hooks_enabled')); echo elgg_view('input/dropdown', ['name' => 'params[search_hooks_enabled]', 'options_values' => $yesno_options, 'value' => $plugin->search_hooks_enabled, 'class' => 'mls']); echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:search_hooks_enabled:info')); echo '<div class="mls plm mbm elgg-divide-left">'; echo elgg_format_element('label', [], elgg_echo('search_advanced:settings:enable_multi_tag')); echo elgg_view('input/dropdown', ['name' => 'params[enable_multi_tag]', 'options_values' => $noyes_options, 'value' => $plugin->enable_multi_tag, 'class' => 'mls']); echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:enable_multi_tag:info')); echo elgg_format_element('label', [], elgg_echo('search_advanced:settings:multi_tag_separator')); echo elgg_view('input/dropdown', ['name' => 'params[multi_tag_separator]', 'options_values' => $separator_options, 'value' => $plugin->multi_tag_separator, 'class' => 'mls']); echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:multi_tag_separator:info')); echo '</div>'; $body = ''; $body .= elgg_format_element('div', ['class' => 'elgg-admin-notices'], elgg_autop(elgg_echo('search_advanced:settings:profile_fields:disclaimer'))); if (elgg_is_active_plugin('groups')) { elgg_require_js('search_advanced/settings'); $tabs = array('tabs' => array(array('text' => elgg_echo('search_advanced:settings:profile_fields:user'), 'href' => '#', 'selected' => true), array('text' => elgg_echo('search_advanced:settings:profile_fields:group'), 'href' => '#')), 'class' => 'search-advanced-settings-tabs'); $body .= elgg_view('navigation/tabs', $tabs); } $body .= elgg_format_element('div', ['class' => 'search-advanced-settings-profile-fields'], elgg_view('search_advanced/settings/user_profile_fields', $vars)); if (elgg_is_active_plugin('groups')) { $body .= elgg_format_element('div', ['class' => 'search-advanced-settings-profile-fields hidden'], elgg_view('search_advanced/settings/group_profile_fields', $vars)); } echo elgg_view_module('inline', elgg_echo('search_advanced:settings:profile_fields'), $body);
if (!$id) { $id = add_metastring($string); } $map[$string] = $id; } $dbprefix = elgg_get_config('dbprefix'); $access = get_access_sql_suffix('e', $user->guid); $subtype_id = get_subtype_id('object', 'messages'); if (!$subtype_id) { $subtype_id = add_subtype('object', 'messages'); } $query = "SELECT COUNT(DISTINCT md.value_id) AS count\n\t\t\tFROM {$dbprefix}metadata md\n\t\t\tJOIN {$dbprefix}entities e ON e.guid = md.entity_guid\n\t\t\tJOIN {$dbprefix}metadata md2 ON md2.entity_guid = md.entity_guid AND md2.name_id = {$map['msgType']}\n\t\t\tWHERE e.type = 'object' AND e.subtype = {$subtype_id}\n\t\t\t\tAND md.name_id = {$map['msgHash']}\n\t\t\t\tAND md2.value_id = {$map[$message_type]}\n\t\t\t\tAND e.owner_guid = {$user->guid}\n\t\t\t\tAND {$access}"; $count = get_data($query); $count = $count[0]->count; if (!$count) { echo elgg_autop(elgg_echo('hj:inbox:nomessages')); return; } $query = "SELECT DISTINCT md.value_id\n\t\t\tFROM {$dbprefix}metadata md\n\t\t\tJOIN {$dbprefix}entities e ON e.guid = md.entity_guid\n\t\t\tJOIN {$dbprefix}metadata md2 ON md2.entity_guid = md.entity_guid AND md2.name_id = {$map['msgType']}\n\t\t\tWHERE e.type = 'object' AND e.subtype = {$subtype_id}\n\t\t\t\tAND md.name_id = {$map['msgHash']}\n\t\t\t\tAND md2.value_id = {$map[$message_type]}\n\t\t\t\tAND e.owner_guid = {$user->guid}\n\t\t\t\tAND {$access}\n\t\t\tORDER BY e.time_created DESC"; $hashes = get_data($query); $options = array('owner_guids' => $user->guid, 'order_by' => 'e.time_created DESC', 'limit' => 1); if ($read !== 'all') { $options['joins'][] = "JOIN {$dbprefix}metadata msg_readYet on e.guid = msg_readYet.entity_guid"; $options['wheres'][] = "msg_readYet.name_id='{$map['readYet']}' AND msg_readYet.value_id='{$read}'"; } if ($message_type !== 'all') { $options['joins'][] = "JOIN {$dbprefix}metadata msg_type on e.guid = msg_type.entity_guid"; $options['wheres'][] = "msg_type.name_id='{$map['msgType']}' AND msg_type.value_id='{$map[$message_type]}'"; } foreach ($hashes as $hash) { $tmp_options = $options;
<?php /** * Elgg exception * Displays a single exception * * @package Elgg * @subpackage Core * * @uses $vars['object'] An exception */ ?> <!-- <?php echo get_class($vars['object']); ?> : <?php echo elgg_autop($vars['object']->getMessage()); ?> <?php if (elgg_get_config('debug')) { echo print_r($vars['object'], true); } ?> -->
<?php namespace Elgg\Roles\UI; $role = elgg_extract('entity', $vars); if (!elgg_instanceof($role, 'object', 'role')) { $name = get_input('role'); $role = roles_get_role_by_name($name); } if (!elgg_instanceof($role, 'object', 'role')) { echo elgg_autop(elgg_echo(PLUGIN_ID . ':norole', array($name))); return; } echo elgg_view_title($role->title); echo '<br />'; $extends = $role->extends; if ($extends && !is_array($extends)) { $extends = array($extends); } if (count($extends)) { echo '<div class="roles-ui-extends">'; echo '<h3>' . elgg_echo(PLUGIN_ID . ':extends') . '</h3>'; echo '<ul class="elgg-list">'; foreach ($extends as $rname) { echo '<li>'; echo elgg_view('output/url', array('text' => $rname, 'href' => "admin/roles/permissions?role={$rname}")); echo '</li>'; } echo '</ul>'; echo '</div>'; }
<?php echo elgg_autop(elgg_echo('install:settings:instructions')); $vars['type'] = 'settings'; $url = current_page_url(); $form_vars = array('action' => $url, 'disable_security' => TRUE); echo elgg_view_form('install/template', $form_vars, $vars);
<?php /** * Reset user password form */ echo elgg_autop(elgg_echo('user:resetpassword:reset_password_confirm')); echo elgg_view('input/hidden', array('name' => 'u', 'value' => $vars['guid'])); echo elgg_view('input/hidden', array('name' => 'c', 'value' => $vars['code'])); echo elgg_view('input/submit', array('value' => elgg_echo('resetpassword')));
* @package Elgg * @subpackage Core * @author Curverider Ltd * @link http://elgg.org/ */ $title = $vars['entity']->title; $event_items = event_calendar_get_formatted_full_items($vars['entity']); $items = array(); foreach ($event_items as $item) { if (trim($item->value)) { $items[] = '<b>' . $item->title . '</b>: ' . $item->value; } } $description = '<p>' . implode('<br />', $items) . '</p>'; if ($vars['entity']->long_description) { $description .= '<p>' . elgg_autop($vars['entity']->long_description) . '</p>'; } else { $description .= '<p>' . $vars['entity']->description . '</p>'; } ?> <item> <guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?> </guid> <link><?php echo htmlspecialchars($vars['entity']->getURL()); ?> </link> <title><![CDATA[<?php
$action = current_page_url(); $action = elgg_http_remove_url_query_element($action, 'query'); $action = elgg_http_remove_url_query_element($action, 'simpletype'); $action = elgg_http_remove_url_query_element($action, 'limit'); $action = elgg_http_remove_url_query_element($action, 'offset'); echo elgg_view_form('embed/search_files', array('method' => 'get', 'disable_security' => true, 'action' => $action, 'class' => 'elgg-form-embed-search'), array('query' => $display_query, 'simpletype' => $simpletype)); $container_guids = array(elgg_get_logged_in_user_guid()); $page_owner = elgg_get_page_owner_entity(); if (elgg_instanceof($page_owner) && $page_owner->canWriteToContainer('object', 'file')) { $container_guids[] = $page_owner->guid; } $dbprefix = elgg_get_config('dbprefix'); $options = array('types' => 'object', 'subtypes' => 'file', 'limit' => $limit, 'offset' => $offset, 'container_guids' => $container_guids, 'joins' => array(), 'wheres' => array(), 'count' => true); if ($query) { $string = sanitize_string($display_query); $options['joins'][] = "JOIN {$dbprefix}objects_entity oe ON e.guid = oe.guid"; $options['wheres'][] = "oe.title LIKE '%{$string}%'"; } if ($simpletype) { $simpletype_id = add_metastring($simpletype); $md_name_id = add_metastring('simpletype'); $options['joins'][] = "JOIN {$dbprefix}metadata md ON e.guid = md.entity_guid AND md.name_id = {$md_name_id} AND md.value_id = {$simpletype_id}"; } $count = elgg_get_entities($options); if (!$count) { echo elgg_autop(elgg_echo('embed:tab:file:empty')); return; } $options['count'] = false; $files = elgg_get_entities($options); echo elgg_view('embed/list', array('items' => $files, 'count' => $count, 'limit' => $limit, 'offset' => $offset));
<?php /** * Elgg global system message list * Lists all system messages * * @package Elgg * @subpackage Core * * @uses $vars['object'] The array of message registers */ echo '<ul class="elgg-system-messages">'; // hidden li so we validate echo '<li class="hidden"></li>'; if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) { foreach ($vars['object'] as $type => $list) { foreach ($list as $message) { echo "<li class=\"elgg-message elgg-state-{$type}\">"; echo elgg_autop($message); echo '</li>'; } } } echo '</ul>';
/** * Create paragraphs from text with line spacing * * @param string $pee The string * @deprecated Use elgg_autop instead * @todo Add deprecation warning in 1.9 * * @return string **/ function autop($pee) { return elgg_autop($pee); }
<?php /** * Deletion of a Tidypics image by GUID provided (if image entry does not get properly displayed on site and delete button can not be reached) * * iionly@gmx.de */ elgg_require_js('tidypics/broken_images'); echo elgg_view_form('photos/admin/delete_image'); // broken images $title = elgg_echo('tidypics:utilities:broken_images'); $body = elgg_autop(elgg_echo('tidypics:utilities:broken_images:blurb')); $submit = elgg_view('input/submit', array('value' => elgg_echo('search'), 'id' => 'elgg-tidypics-broken-images')); $body .= <<<HTML \t<p> \t\t{$submit} \t</p> \t<div id="elgg-tidypics-broken-images-results"></div> HTML; echo elgg_view_module('inline', $title, $body);
// hidden li so we validate echo '<li class="hidden wb-invisible"></li>'; if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) { $num = 0; foreach ($vars['object'] as $type => $list) { if ($num == 0) { //alert-dismissible" role="alert">'; if ($type == 'error') { echo '<div class="alert alert-' . $type . ' clearfix" >'; //elgg-system-messages custom-message } else { echo '<div class="elgg-system-messages clearfix custom-message alert alert-' . $type . ' ">'; // } echo '<ul class="list-unstyled" >'; echo '<a class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></a>'; } foreach ($list as $message) { $num = $num + 1; echo '<li class="col-sm-11" onclick=" event.stopPropagation();">'; //this stops users from clicking system alert echo '<span role="alert">' . elgg_autop($message) . '</span>'; echo '</li>'; } } if ($num > 0) { echo '</ul>'; echo '</div>'; } } echo '</ul>';
<?php /** * Reset user password form */ $text = elgg_autop(elgg_echo('user:changepassword:change_password_confirm')); $password1_label = elgg_echo('user:password:label'); $password1 = elgg_view('input/password', array('name' => 'password1')); $password2_label = elgg_echo('user:password2:label'); $password2 = elgg_view('input/password', array('name' => 'password2')); $u = elgg_view('input/hidden', array('name' => 'u', 'value' => $vars['guid'])); $c = elgg_view('input/hidden', array('name' => 'c', 'value' => $vars['code'])); $submit = elgg_view('input/submit', array('value' => elgg_echo('changepassword'))); echo <<<HTML {$text} <div><label>{$password1_label}</label>{$password1}</div> <div><label>{$password2_label}</label>{$password2}</div> <div class="elgg-foot"> {$u} {$c} {$submit} </div> HTML ;
$action = current_page_url(); $action = elgg_http_remove_url_query_element($action, 'query'); $action = elgg_http_remove_url_query_element($action, 'subtype'); $action = elgg_http_remove_url_query_element($action, 'limit'); $action = elgg_http_remove_url_query_element($action, 'offset'); echo elgg_view_form('embed/search_content_items', array('method' => 'get', 'disable_security' => true, 'action' => $action, 'class' => 'elgg-form-embed-search'), array('query' => $display_query, 'subtype' => $subtype)); $container_guids = array(elgg_get_logged_in_user_guid()); $page_owner = elgg_get_page_owner_entity(); if (elgg_instanceof($page_owner) && $page_owner->canWriteToContainer('object', 'file')) { $container_guids[] = $page_owner->guid; } $subtypes = elgg_get_config('registered_entities'); $object_subtypes = elgg_extract('object', $subtypes, array()); if (!in_array($subtype, $object_subtypes)) { $subtype = $object_subtypes; } $dbprefix = elgg_get_config('dbprefix'); $options = array('types' => 'object', 'subtypes' => $subtype, 'limit' => $limit, 'offset' => $offset, 'container_guids' => $container_guids, 'joins' => array(), 'wheres' => array(), 'count' => true); if ($query) { $string = sanitize_string($display_query); $options['joins'][] = "JOIN {$dbprefix}objects_entity oe ON e.guid = oe.guid"; $options['wheres'][] = "oe.title LIKE '%{$string}%'"; } $count = elgg_get_entities($options); if (!$count) { echo elgg_autop(elgg_echo('embed:tab:content_items:empty')); return; } $options['count'] = false; $files = elgg_get_entities($options); echo elgg_view('embed/list', array('items' => $files, 'count' => $count, 'limit' => $limit, 'offset' => $offset));
<?php /** * Elgg display long text * Displays a large amount of text, with new lines converted to line breaks * * @package Elgg * @subpackage Core * * @uses $vars['value'] The text to display * @uses $vars['parse_urls'] Whether to turn urls into links. Default is true. * @uses $vars['class'] */ $class = 'elgg-output'; $additional_class = elgg_extract('class', $vars, ''); if ($additional_class) { $vars['class'] = "{$class} {$additional_class}"; } else { $vars['class'] = $class; } $parse_urls = elgg_extract('parse_urls', $vars, true); unset($vars['parse_urls']); $text = $vars['value']; unset($vars['value']); if ($parse_urls) { $text = parse_urls($text); } $text = filter_tags($text); $text = elgg_autop($text); $attributes = elgg_format_attributes($vars); echo "<div {$attributes}>{$text}</div>";
<?php /** * Front page main area - welcome and search */ ?> <div id="plugins_front_welcome"> <h2><?php echo elgg_echo('plugins:front:welcome'); ?> .</h2> <?php echo elgg_view('plugins/download_count'); ?> <h3><?php echo elgg_echo('plugins:front:intro:title'); ?> </h3> <div id="plugins_welcome_text"> <?php echo elgg_autop(elgg_echo('plugins:front:intro:text')); ?> </div> <?php if (elgg_is_logged_in()) { echo elgg_view('output/url', array('href' => '/plugins/new/project/' . elgg_get_logged_in_user_entity()->username, 'text' => elgg_echo('plugins:upload:new'), 'class' => 'elgg-button elgg-button-submit')); } ?> </div>
* Install requirements checking page * * @uses $vars['num_failures] Number of requirements failures * @uses $vars['num_warnings] Number of recommendation warnings */ if ($vars['num_failures'] != 0) { $instruct_text = elgg_echo('install:requirements:instructions:failure'); } elseif ($vars['num_warnings'] != 0) { $instruct_text = elgg_echo('install:requirements:instructions:warning'); } else { $instruct_text = elgg_echo('install:requirements:instructions:success'); } echo elgg_autop($instruct_text); $report = $vars['report']; foreach ($report as $category => $checks) { $title = elgg_echo("install:require:{$category}"); echo "<h3>{$title}</h3>"; echo "<ul class=\"elgg-require-{$category}\">"; foreach ($checks as $check) { echo "<li class=\"{$check['severity']}\">"; echo elgg_autop($check['message']); echo "</li>"; } echo "</ul>"; } $vars['refresh'] = true; // cannot advance to next step with a failure if ($vars['num_failures'] != 0) { $vars['advance'] = false; } echo elgg_view('install/nav', $vars);
<?php /** * Install completion page */ echo elgg_autop(elgg_echo('install:complete:instructions')); ?> <div class="elgg-install-nav"> <?php $url = elgg_get_site_url() . $vars['destination']; $text = elgg_echo('install:complete:gotosite'); echo "<a href=\"{$url}\">{$text}</a>"; ?> </div>
<?php /** * Add a new field to the set of custom profile fields */ $label_text = elgg_echo('profile:label'); $type_text = elgg_echo('profile:type'); $label_control = elgg_view('input/text', array('name' => 'label')); $type_control = elgg_view('input/select', array('name' => 'type', 'options_values' => array('text' => elgg_echo('profile:field:text'), 'longtext' => elgg_echo('profile:field:longtext'), 'tags' => elgg_echo('profile:field:tags'), 'url' => elgg_echo('profile:field:url'), 'email' => elgg_echo('profile:field:email'), 'location' => elgg_echo('profile:field:location'), 'date' => elgg_echo('profile:field:date')))); $submit_control = elgg_view('input/submit', array('name' => elgg_echo('add'), 'value' => elgg_echo('add'))); $formbody = <<<END \t\t<div>{$label_text}: {$label_control}</div> \t\t<div class="elgg-foot">{$type_text}: {$type_control} \t\t{$submit_control}</div> END; echo elgg_autop(elgg_echo('profile:explainchangefields')); echo $formbody;
<tbody> <?php foreach ($routes as $route) { $endpoint = $route['endpoint']; ?> <tr> <td> <strong> <?php echo $endpoint; ?> </strong> </td> <td> <?php echo elgg_autop($route['description']); if (!empty($route['parameters'])) { ?> <table class="elgg-table mtl mbl"> <thead> <tr> <th><?php echo elgg_echo('graph:param'); ?> </th> <th><?php echo elgg_echo('graph:type'); ?> </th> <th><?php echo elgg_echo('graph:required');
<?php /** * RSS object view * * @package Elgg * @subpackage Core */ $title = $vars['entity']->title; if (empty($title)) { $title = strip_tags($vars['entity']->description); $title = elgg_get_excerpt($title, 32); } $permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8'); $pubdate = date('r', $vars['entity']->getTimeCreated()); $description = elgg_autop($vars['entity']->description); $creator = elgg_view('page/components/creator', $vars); $georss = elgg_view('page/components/georss', $vars); $extension = elgg_view('extensions/item', $vars); $item = <<<__HTML <item> \t<guid isPermaLink="true">{$permalink}</guid> \t<pubDate>{$pubdate}</pubDate> \t<link>{$permalink}</link> \t<title><![CDATA[{$title}]]></title> \t<description><![CDATA[{$description}]]></description> \t{$creator}{$georss}{$extension} </item> __HTML; echo $item;
static function getBookmarks($a, $args, $c) { $user = elgg_get_logged_in_user_entity(); if ($user) { $options = ["relationship_guid" => $user->guid, "relationship" => "bookmarked", "offset" => (int) $args["offset"], "limit" => (int) $args["limit"]]; $total = elgg_get_entities_from_relationship(array_merge($options, ["count" => true])); foreach (elgg_get_entities_from_relationship($options) as $entity) { $entities[] = ["guid" => $entity->guid, "ownerGuid" => $entity->owner_guid, "title" => $entity->title, "type" => $entity->type, "description" => elgg_autop(filter_tags($entity->description)), "timeCreated" => date("c", $entity->time_created), "timeUpdated" => date("c", $entity->time_updated), "tags" => Helpers::renderTags($entity->tags)]; } } else { $total = 0; $entities = []; } return ["total" => $total, "entities" => $entities]; }