Elgg  Version 1.9
/root/Elgg/engine/lib/views.php

Convenience function for generating a form from a view in a standard location.This function assumes that the body of the form is located at "forms/$action" and sets the action by default to "action/$action". Automatically wraps the forms/$action view with a <form> tag and inserts the anti-csrf security tokens.

This automatically appends elgg-form-action-name to the form's class. It replaces any slashes with dashes (blog/save becomes elgg-form-blog-save)

echo elgg_view_form('login');

This would assume a "login" form body to be at "forms/login" and would set the action of the form to "http://yoursite.com/action/login".

If elgg_view('forms/login') is: <input type="text" name="username"> <input type="password" name="password">

Then elgg_view_form('login') generates: <form action="http://yoursite.com/action/login" method="post"> ...security tokens... <input type="text" name="username"> <input type="password" name="password"> </form>

Parameters
string$actionThe name of the action. An action name does not include the leading "action/". For example, "login" is an action name.
array$form_vars$vars environment passed to the "input/form" view
array$body_vars$vars environment passed to the "forms/$action" view
Returns
string The complete form
<?php
function elgg_set_viewtype($viewtype = "") {
$CURRENT_SYSTEM_VIEWTYPE = $viewtype;
return true;
}
function elgg_get_viewtype() {
if ($CURRENT_SYSTEM_VIEWTYPE != "") {
}
$viewtype = get_input('view', '', false);
return $viewtype;
}
if (isset($CONFIG->view) && _elgg_is_valid_viewtype($CONFIG->view)) {
return $CONFIG->view;
}
return 'default';
}
if (!isset($CONFIG->view_types) || !is_array($CONFIG->view_types)) {
$CONFIG->view_types = array();
}
if (!in_array($viewtype, $CONFIG->view_types)) {
$CONFIG->view_types[] = $viewtype;
}
return true;
}
if (!isset($CONFIG->view_types) || !is_array($CONFIG->view_types)) {
return false;
}
return in_array($viewtype, $CONFIG->view_types);
}
if (!is_string($viewtype) || $viewtype === '') {
return false;
}
if (preg_match('/\W/', $viewtype)) {
return false;
}
return true;
}
_elgg_services()->views->registerViewtypeFallback($viewtype);
}
return _elgg_services()->views->doesViewtypeFallback($viewtype);
}
}
}
function elgg_register_external_view($view, $cacheable = false) {
if (!isset($CONFIG->allowed_ajax_views)) {
$CONFIG->allowed_ajax_views = array();
}
$CONFIG->allowed_ajax_views[$view] = true;
if ($cacheable) {
_elgg_services()->views->registerCacheableView($view);
}
}
return _elgg_services()->views->isCacheableView($view);
}
if (isset($CONFIG->allowed_ajax_views[$view])) {
unset($CONFIG->allowed_ajax_views[$view]);
}
}
return _elgg_services()->views->getViewLocation($view, $viewtype);
}
function elgg_set_view_location($view, $location, $viewtype = '') {
_elgg_services()->views->setViewLocation($view, $location, $viewtype);
}
function elgg_view_exists($view, $viewtype = '', $recurse = true) {
return _elgg_services()->views->viewExists($view, $viewtype, $recurse);
}
function elgg_view($view, $vars = array(), $bypass = false, $ignored = false, $viewtype = '') {
return _elgg_services()->views->renderView($view, $vars, $bypass, $viewtype);
}
function elgg_view_deprecated($view, array $vars, $suggestion, $version) {
return _elgg_services()->views->renderDeprecatedView($view, $vars, $suggestion, $version);
}
function elgg_extend_view($view, $view_extension, $priority = 501, $viewtype = '') {
_elgg_services()->views->extendView($view, $view_extension, $priority, $viewtype);
}
function elgg_unextend_view($view, $view_extension) {
return _elgg_services()->views->unextendView($view, $view_extension);
}
function elgg_view_page($title, $body, $page_shell = 'default', $vars = array()) {
$params = array();
$params['identifier'] = _elgg_services()->request->getFirstUrlSegment();
$params['segments'] = _elgg_services()->request->getUrlSegments();
array_shift($params['segments']);
$page_shell = elgg_trigger_plugin_hook('shell', 'page', $params, $page_shell);
$messages = null;
if (count_messages()) {
// get messages - try for errors first
$messages = system_messages(null, "error");
if (count($messages["error"]) == 0) {
// no errors so grab rest of messages
} else {
// we have errors - clear out remaining messages
system_messages(null, "");
}
}
$vars['title'] = $title;
$vars['body'] = $body;
$vars['sysmessages'] = $messages;
// head has keys 'title', 'metas', 'links'
$vars['head'] = elgg_trigger_plugin_hook('head', 'page', $vars, $head_params);
$vars = elgg_trigger_plugin_hook('output:before', 'page', null, $vars);
// check for deprecated view
if ($page_shell == 'default' && elgg_view_exists('pageshells/pageshell')) {
elgg_deprecated_notice("pageshells/pageshell is deprecated by page/$page_shell", 1.8);
$output = elgg_view('pageshells/pageshell', $vars);
} else {
$output = elgg_view("page/$page_shell", $vars);
}
$vars['page_shell'] = $page_shell;
// Allow plugins to modify the output
return elgg_trigger_plugin_hook('output', 'page', $vars, $output);
}
$params = array(
'links' => array(),
'metas' => array(),
);
if (empty($title)) {
$params['title'] = elgg_get_config('sitename');
} else {
$params['title'] = $title . ' : ' . elgg_get_config('sitename');
}
$params['metas'][] = array(
'http-equiv' => 'Content-Type',
'content' => 'text/html; charset=utf-8',
);
$params['metas'][] = array(
'name' => 'description',
'content' => elgg_get_config('sitedescription')
);
// https://developer.chrome.com/multidevice/android/installtohomescreen
$data['metas'][] = array(
'name' => 'viewport',
'content' => 'width=device-width',
);
$data['metas'][] = array(
'name' => 'mobile-web-app-capable',
'content' => 'yes',
);
$data['metas'][] = array(
'name' => 'apple-mobile-web-app-capable',
'content' => 'yes',
);
$data['links'][] = array(
'rel' => 'apple-touch-icon',
'href' => elgg_normalize_url('_graphics/favicon-128.png'),
);
// favicons
$params['links'][] = array(
'rel' => 'icon',
'href' => elgg_normalize_url('_graphics/favicon.ico'),
);
$params['links'][] = array(
'rel' => 'icon',
'sizes' => '16x16 32x32 48x48 64x64 128x128',
'type' => 'image/svg+xml',
'href' => elgg_normalize_url('_graphics/favicon.svg'),
);
$params['links'][] = array(
'rel' => 'icon',
'sizes' => '16x16',
'type' => 'image/png',
'href' => elgg_normalize_url('_graphics/favicon-16.png'),
);
$params['links'][] = array(
'rel' => 'icon',
'sizes' => '32x32',
'type' => 'image/png',
'href' => elgg_normalize_url('_graphics/favicon-32.png'),
);
$params['links'][] = array(
'rel' => 'icon',
'sizes' => '64x64',
'type' => 'image/png',
'href' => elgg_normalize_url('_graphics/favicon-64.png'),
);
$params['links'][] = array(
'rel' => 'icon',
'sizes' => '128x128',
'type' => 'image/png',
'href' => elgg_normalize_url('_graphics/favicon-128.png'),
);
// RSS feed link
global $autofeed;
if (isset($autofeed) && $autofeed == true) {
if (substr_count($url,'?')) {
$url .= "&view=rss";
} else {
$url .= "?view=rss";
}
$params['links'][] = array(
'rel' => 'alternative',
'type' => 'application/rss+xml',
'title' => 'RSS',
'href' => elgg_format_url($url),
);
}
return $params;
}
function elgg_view_layout($layout_name, $vars = array()) {
$params = array();
$params['identifier'] = _elgg_services()->request->getFirstUrlSegment();
$params['segments'] = _elgg_services()->request->getUrlSegments();
array_shift($params['segments']);
$layout_name = elgg_trigger_plugin_hook('layout', 'page', $params, $layout_name);
if (is_string($vars) || $vars === null) {
elgg_deprecated_notice("The use of unlimited optional string arguments in elgg_view_layout() was deprecated in favor of an options array", 1.8);
$arg = 1;
$param_array = array();
while ($arg < func_num_args()) {
$param_array['area' . $arg] = func_get_arg($arg);
$arg++;
}
} else {
$param_array = $vars;
}
$param_array['layout'] = $layout_name;
$params = elgg_trigger_plugin_hook('output:before', 'layout', null, $param_array);
// check deprecated location
if (elgg_view_exists("canvas/layouts/$layout_name")) {
elgg_deprecated_notice("canvas/layouts/$layout_name is deprecated by page/layouts/$layout_name", 1.8);
$output = elgg_view("canvas/layouts/$layout_name", $params);
} elseif (elgg_view_exists("page/layouts/$layout_name")) {
$output = elgg_view("page/layouts/$layout_name", $params);
} else {
$output = elgg_view("page/layouts/default", $params);
}
return elgg_trigger_plugin_hook('output:after', 'layout', $params, $output);
}
function elgg_view_menu($menu_name, array $vars = array()) {
$vars['name'] = $menu_name;
$sort_by = elgg_extract('sort_by', $vars, 'text');
if (isset($CONFIG->menus[$menu_name])) {
$menu = $CONFIG->menus[$menu_name];
} else {
$menu = array();
}
// Give plugins a chance to add menu items just before creation.
// This supports dynamic menus (example: user_hover).
$menu = elgg_trigger_plugin_hook('register', "menu:$menu_name", $vars, $menu);
$vars['menu'] = $builder->getMenu($sort_by);
$vars['selected_item'] = $builder->getSelected();
// Let plugins modify the menu
$vars['menu'] = elgg_trigger_plugin_hook('prepare', "menu:$menu_name", $vars, $vars['menu']);
if (elgg_view_exists("navigation/menu/$menu_name")) {
return elgg_view("navigation/menu/$menu_name", $vars);
} else {
return elgg_view("navigation/menu/default", $vars);
}
}
function elgg_view_menu_item(ElggMenuItem $item, array $vars = array()) {
if (!isset($vars['class'])) {
$vars['class'] = 'elgg-menu-content';
}
$vars = array_merge($item->getValues(), $vars);
if ($item->getLinkClass()) {
$vars['class'] .= ' ' . $item->getLinkClass();
}
if ($item->getHref() === false) {
$text = $item->getText();
// if contains elements, don't wrap
if (preg_match('~<[a-z]~', $text)) {
return $text;
} else {
return elgg_format_element('span', array('class' => 'elgg-non-link'), $text);
}
}
if (!isset($vars['rel']) && !isset($vars['is_trusted'])) {
$vars['is_trusted'] = true;
}
if ($item->getConfirmText()) {
$vars['confirm'] = $item->getConfirmText();
return elgg_view('output/confirmlink', $vars);
} else {
unset($vars['confirm']);
}
return elgg_view('output/url', $vars);
}
function elgg_view_entity(ElggEntity $entity, $vars = array(), $bypass = false, $debug = false) {
// No point continuing if entity is null
if (!$entity || !($entity instanceof ElggEntity)) {
return false;
}
global $autofeed;
$autofeed = true;
$defaults = array(
'full_view' => true,
);
if (is_array($vars)) {
$vars = array_merge($defaults, $vars);
} else {
elgg_deprecated_notice("Update your use of elgg_view_entity()", 1.8);
$vars = array(
'full_view' => $vars,
);
}
$vars['entity'] = $entity;
// if this entity has a view defined, use it
$view = $entity->view;
if (is_string($view)) {
return elgg_view($view, $vars, $bypass, $debug);
}
$entity_type = $entity->getType();
$subtype = $entity->getSubtype();
if (empty($subtype)) {
$subtype = 'default';
}
$contents = '';
if (elgg_view_exists("$entity_type/$subtype")) {
$contents = elgg_view("$entity_type/$subtype", $vars, $bypass, $debug);
} else {
$contents = elgg_view("$entity_type/default", $vars, $bypass, $debug);
}
// Marcus Povey 20090616 : Speculative and low impact approach for fixing #964
if ($vars['full_view']) {
if ($annotations) {
}
}
return $contents;
}
function elgg_view_entity_icon(ElggEntity $entity, $size = 'medium', $vars = array()) {
// No point continuing if entity is null
if (!$entity || !($entity instanceof ElggEntity)) {
return false;
}
$vars['entity'] = $entity;
$vars['size'] = $size;
$entity_type = $entity->getType();
$subtype = $entity->getSubtype();
if (empty($subtype)) {
$subtype = 'default';
}
$contents = '';
if (elgg_view_exists("icon/$entity_type/$subtype")) {
$contents = elgg_view("icon/$entity_type/$subtype", $vars);
}
if (empty($contents)) {
$contents = elgg_view("icon/$entity_type/default", $vars);
}
if (empty($contents)) {
$contents = elgg_view("icon/default", $vars);
}
return $contents;
}
function elgg_view_annotation(ElggAnnotation $annotation, array $vars = array(), $bypass = false, $debug = false) {
global $autofeed;
$autofeed = true;
$defaults = array(
'full_view' => true,
);
$vars = array_merge($defaults, $vars);
$vars['annotation'] = $annotation;
// @todo setting the view on an annotation is not advertised anywhere
// do we want to keep this?
$view = $annotation->view;
if (is_string($view)) {
return elgg_view($view, $vars, $bypass, $debug);
}
$name = $annotation->name;
if (empty($name)) {
return false;
}
if (elgg_view_exists("annotation/$name")) {
return elgg_view("annotation/$name", $vars, $bypass, $debug);
} else {
return elgg_view("annotation/default", $vars, $bypass, $debug);
}
}
function elgg_view_entity_list($entities, $vars = array(), $offset = 0, $limit = 10, $full_view = true,
$list_type_toggle = true, $pagination = true) {
if (!is_int($offset)) {
$offset = (int)get_input('offset', 0);
}
// list type can be passed as request parameter
$list_type = get_input('list_type', 'list');
if (get_input('listtype')) {
elgg_deprecated_notice("'listtype' has been deprecated by 'list_type' for lists", 1.8);
$list_type = get_input('listtype');
}
if (is_array($vars)) {
// new function
$defaults = array(
'items' => $entities,
'list_class' => 'elgg-list-entity',
'full_view' => true,
'pagination' => true,
'list_type' => $list_type,
'list_type_toggle' => false,
'offset' => $offset,
'limit' => null,
);
$vars = array_merge($defaults, $vars);
} else {
// old function parameters
elgg_deprecated_notice("Please update your use of elgg_view_entity_list()", 1.8);
$vars = array(
'items' => $entities,
'count' => (int) $vars, // the old count parameter
'offset' => $offset,
'limit' => (int) $limit,
'full_view' => $full_view,
'pagination' => $pagination,
'list_type' => $list_type,
'list_type_toggle' => $list_type_toggle,
'list_class' => 'elgg-list-entity',
);
}
if (!$vars["limit"] && !$vars["offset"]) {
// no need for pagination if listing is unlimited
$vars["pagination"] = false;
}
if ($vars['list_type'] != 'list') {
return elgg_view('page/components/gallery', $vars);
} else {
return elgg_view('page/components/list', $vars);
}
}
function elgg_view_annotation_list($annotations, array $vars = array()) {
$defaults = array(
'items' => $annotations,
'offset' => null,
'limit' => null,
'list_class' => 'elgg-list-annotation elgg-annotation-list', // @todo remove elgg-annotation-list in Elgg 1.9
'full_view' => true,
'offset_key' => 'annoff',
);
$vars = array_merge($defaults, $vars);
if (!$vars["limit"] && !$vars["offset"]) {
// no need for pagination if listing is unlimited
$vars["pagination"] = false;
}
return elgg_view('page/components/list', $vars);
}
if (!($entity instanceof ElggEntity)) {
return false;
}
$entity_type = $entity->getType();
$annotations = elgg_trigger_plugin_hook('entity:annotate', $entity_type,
array(
'entity' => $entity,
'full_view' => $full_view,
)
);
return $annotations;
}
function elgg_view_title($title, $vars = array()) {
if (!is_array($vars)) {
elgg_deprecated_notice('setting $submenu in elgg_view_title() is deprecated', 1.8);
$vars = array('submenu' => $vars);
}
$vars['title'] = $title;
return elgg_view('page/elements/title', $vars);
}
function elgg_view_friendly_time($time) {
return elgg_view('output/friendlytime', array('time' => $time));
}
function elgg_view_comments($entity, $add_comment = true, array $vars = array()) {
if (!($entity instanceof ElggEntity)) {
return false;
}
$vars['entity'] = $entity;
$vars['show_add_form'] = $add_comment;
$vars['class'] = elgg_extract('class', $vars, "{$entity->getSubtype()}-comments");
$output = elgg_trigger_plugin_hook('comments', $entity->getType(), $vars, false);
if ($output) {
return $output;
} else {
return elgg_view('page/elements/comments', $vars);
}
}
function elgg_view_image_block($image, $body, $vars = array()) {
$vars['image'] = $image;
$vars['body'] = $body;
return elgg_view('page/components/image_block', $vars);
}
function elgg_view_module($type, $title, $body, array $vars = array()) {
$vars['type'] = $type;
$vars['class'] = elgg_extract('class', $vars, '');
$vars['title'] = $title;
$vars['body'] = $body;
return elgg_view('page/components/module', $vars);
}
function elgg_view_river_item($item, array $vars = array()) {
if (!($item instanceof ElggRiverItem)) {
return '';
}
// checking default viewtype since some viewtypes do not have unique views per item (rss)
$view = $item->getView();
if (!$view || !elgg_view_exists($view, 'default')) {
return '';
}
$subject = $item->getSubjectEntity();
$object = $item->getObjectEntity();
if (!$subject || !$object) {
// subject is disabled or subject/object deleted
return '';
}
// @todo this needs to be cleaned up
// Don't hide objects in closed groups that a user can see.
// see https://github.com/elgg/elgg/issues/4789
// else {
// // hide based on object's container
// $visibility = Elgg_GroupItemVisibility::factory($object->container_guid);
// if ($visibility->shouldHideItems) {
// return '';
// }
// }
$vars['item'] = $item;
return elgg_view('river/item', $vars);
}
function elgg_view_form($action, $form_vars = array(), $body_vars = array()) {
$defaults = array(
'action' => $CONFIG->wwwroot . "action/$action",
'body' => elgg_view("forms/$action", $body_vars)
);
$form_class = 'elgg-form-' . preg_replace('/[^a-z0-9]/i', '-', $action);
// append elgg-form class to any class options set
if (isset($form_vars['class'])) {
$form_vars['class'] = $form_vars['class'] . " $form_class";
} else {
$form_vars['class'] = $form_class;
}
$form_vars = array_merge($defaults, $form_vars);
$form_vars['action_name'] = $action;
return elgg_view('input/form', $form_vars);
}
function elgg_view_tagcloud(array $options = array()) {
$type = $subtype = '';
if (isset($options['type'])) {
$type = $options['type'];
}
if (isset($options['subtype'])) {
$subtype = $options['subtype'];
}
$tag_data = elgg_get_tags($options);
return elgg_view("output/tagcloud", array(
'value' => $tag_data,
'type' => $type,
'subtype' => $subtype,
));
}
function elgg_view_list_item($item, array $vars = array()) {
$type = $item->getType();
if (in_array($type, $CONFIG->entity_types)) {
return elgg_view_entity($item, $vars);
} else if ($type == 'annotation') {
return elgg_view_annotation($item, $vars);
} else if ($type == 'river') {
return elgg_view_river_item($item, $vars);
}
return '';
}
function elgg_view_icon($name, $class = '') {
if ($class === true) {
elgg_deprecated_notice("Using a boolean to float the icon is deprecated. Use the class float.", 1.9);
$class = 'float';
}
$icon_class = array("elgg-icon-$name" , $class);
return elgg_view("output/icon", array("class" => $icon_class));
}
if ($user) {
$entities = $user->getFriends(array('limit' => 0));
} else {
$entities = array();
}
foreach ($collections as $key => $collection) {
$collections[$key]->members = get_members_of_access_collection($collection->id, true);
$collections[$key]->entities = $entities;
}
}
return elgg_view('core/friends/collections', array('collections' => $collections));
}
function set_template_handler($function_name) {
if (is_callable($function_name)) {
$CONFIG->template_handler = $function_name;
return true;
}
return false;
}
function autoregister_views($view_base, $folder, $base_location_path, $viewtype) {
return _elgg_services()->views->autoregisterViews($view_base, $folder, $base_location_path, $viewtype);
}
static $autoload_registered;
if (!$autoload_registered) {
$path = elgg_get_root_path() . 'vendors/minify/lib';
elgg_get_class_loader()->addFallback($path);
$autoload_registered = true;
}
if (preg_match('~[\.-]min\.~', $params['view'])) {
// bypass minification
return;
}
if ($type == 'js') {
if (elgg_get_config('simplecache_minify_js')) {
return JSMin::minify($content);
}
} elseif ($type == 'css') {
if (elgg_get_config('simplecache_minify_css')) {
$cssmin = new CSSMin();
return $cssmin->run($content);
}
}
}
function _elgg_views_amd($hook, $type, $content, $params) {
return $filter->filter($params['view'], $content);
}
global $autofeed;
if (isset($autofeed) && $autofeed == true) {
if (substr_count($url, '?')) {
$url .= "&view=rss";
} else {
$url .= "?view=rss";
}
elgg_register_menu_item('extras', array(
'name' => 'rss',
'text' => elgg_view_icon('rss'),
'href' => $url,
'title' => elgg_echo('feed:rss'),
));
}
}
header('X-Frame-Options: SAMEORIGIN');
}
$location = elgg_get_view_location('page_elements/contentwrapper');
if ($location === "/var/www/views/") {
elgg_extend_view('page_elements/contentwrapper', 'page/elements/wrapper');
}
}
function elgg_views_boot() {
elgg_register_js('elgg.require_config', elgg_get_simplecache_url('js', 'elgg/require_config'), 'head');
elgg_register_js('require', '/vendors/requirejs/require-2.1.10.min.js', 'head');
elgg_register_js('jquery', '/vendors/jquery/jquery-1.11.0.min.js', 'head');
elgg_register_js('jquery-migrate', '/vendors/jquery/jquery-migrate-1.2.1.min.js', 'head');
elgg_register_js('jquery-ui', '/vendors/jquery/jquery-ui-1.10.4.min.js', 'head');
// this is the only lib that isn't required to be loaded sync in head
elgg_define_js('jquery.form', array(
'src' => '/vendors/jquery/jquery.form.min.js',
'deps' => array('jquery'),
'exports' => 'jQuery.fn.ajaxForm',
));
$elgg_js_url = elgg_get_simplecache_url('js', 'elgg');
elgg_register_js('elgg', $elgg_js_url, 'head');
elgg_load_js('elgg.require_config');
elgg_load_js('require');
elgg_load_js('jquery');
elgg_load_js('jquery-migrate');
elgg_load_js('jquery-ui');
elgg_load_js('elgg');
$lightbox_js_url = elgg_get_simplecache_url('js', 'lightbox');
elgg_register_js('lightbox', $lightbox_js_url);
elgg_register_css('lightbox', 'vendors/jquery/colorbox/theme/colorbox.css');
$elgg_css_url = elgg_get_simplecache_url('css', 'elgg');
elgg_register_css('elgg', $elgg_css_url);
elgg_load_css('elgg');
elgg_register_ajax_view('js/languages');
elgg_register_plugin_hook_handler('simplecache:generate', 'js', '_elgg_views_amd');
elgg_register_plugin_hook_handler('simplecache:generate', 'css', '_elgg_views_minify');
elgg_register_plugin_hook_handler('simplecache:generate', 'js', '_elgg_views_minify');
elgg_register_plugin_hook_handler('output:before', 'layout', 'elgg_views_add_rss_link');
elgg_register_plugin_hook_handler('output:before', 'page', '_elgg_views_send_header_x_frame_options');
// discover the core viewtypes
// @todo the cache is loaded in load_plugins() but we need to know viewtypes earlier
$view_path = $CONFIG->viewpath;
$viewtype_dirs = scandir($view_path);
foreach ($viewtype_dirs as $viewtype) {
if (_elgg_is_valid_viewtype($viewtype) && is_dir($view_path . $viewtype)) {
}
}
// set default icon sizes - can be overridden in settings.php or with plugin
if (!isset($CONFIG->icon_sizes)) {
$icon_sizes = array(
'topbar' => array('w' => 16, 'h' => 16, 'square' => true, 'upscale' => true),
'tiny' => array('w' => 25, 'h' => 25, 'square' => true, 'upscale' => true),
'small' => array('w' => 40, 'h' => 40, 'square' => true, 'upscale' => true),
'medium' => array('w' => 100, 'h' => 100, 'square' => true, 'upscale' => true),
'large' => array('w' => 200, 'h' => 200, 'square' => false, 'upscale' => false),
'master' => array('w' => 550, 'h' => 550, 'square' => false, 'upscale' => false),
);
elgg_set_config('icon_sizes', $icon_sizes);
}
}
elgg_register_event_handler('boot', 'system', 'elgg_views_boot');
elgg_register_event_handler('init', 'system', 'elgg_views_handle_deprecated_views');