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)
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>
<?php
return true;
}
if ($CURRENT_SYSTEM_VIEWTYPE != "") {
}
}
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)) {
}
return true;
}
if (!isset($CONFIG->view_types) || !is_array($CONFIG->view_types)) {
return false;
}
return in_array(
$viewtype, $CONFIG->view_types);
}
return false;
}
return false;
}
return true;
}
}
}
}
}
if (!isset($CONFIG->allowed_ajax_views)) {
$CONFIG->allowed_ajax_views = array();
}
$CONFIG->allowed_ajax_views[
$view] =
true;
if ($cacheable) {
}
}
}
if (isset($CONFIG->allowed_ajax_views[
$view])) {
unset($CONFIG->allowed_ajax_views[
$view]);
}
}
}
}
}
}
}
}
}
} else {
}
}
} else {
}
$vars[
'page_shell'] = $page_shell;
}
'links' => array(),
'metas' => array(),
);
} else {
}
'http-equiv' => 'Content-Type',
'content' => 'text/html; charset=utf-8',
);
'name' => 'description',
);
$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',
);
'rel' => 'icon',
);
'rel' => 'icon',
'sizes' => '16x16 32x32 48x48 64x64 128x128',
'type' => 'image/svg+xml',
);
'rel' => 'icon',
'sizes' => '16x16',
'type' => 'image/png',
);
'rel' => 'icon',
'sizes' => '32x32',
'type' => 'image/png',
);
'rel' => 'icon',
'sizes' => '64x64',
'type' => 'image/png',
);
'rel' => 'icon',
'sizes' => '128x128',
'type' => 'image/png',
);
if (isset($autofeed) && $autofeed == true) {
if (substr_count(
$url,
'?')) {
} else {
}
'rel' => 'alternative',
'type' => 'application/rss+xml',
'title' => 'RSS',
);
}
}
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['layout'] = $layout_name;
} else {
}
}
$vars[
'name'] = $menu_name;
if (isset($CONFIG->menus[$menu_name])) {
$menu = $CONFIG->menus[$menu_name];
} else {
}
} else {
}
}
if (!isset(
$vars[
'class'])) {
$vars[
'class'] =
'elgg-menu-content';
}
}
if (preg_match(
'~<[a-z]~',
$text)) {
} else {
}
}
if (!isset(
$vars[
'rel']) && !isset(
$vars[
'is_trusted'])) {
$vars[
'is_trusted'] =
true;
}
} else {
}
}
if (!$entity || !($entity instanceof
ElggEntity)) {
return false;
}
$autofeed = true;
'full_view' => true,
);
} else {
);
}
}
}
} else {
}
if (
$vars[
'full_view']) {
}
}
}
if (!$entity || !($entity instanceof
ElggEntity)) {
return false;
}
}
}
}
}
}
$autofeed = true;
'full_view' => true,
);
$view = $annotation->view;
}
$name = $annotation->name;
return false;
}
} else {
}
}
}
}
'items' => $entities,
'list_class' => 'elgg-list-entity',
'full_view' => true,
'pagination' => true,
'list_type' => $list_type,
'list_type_toggle' => false,
'limit' => null,
);
} else {
'items' => $entities,
'list_type' => $list_type,
'list_type_toggle' => $list_type_toggle,
'list_class' => 'elgg-list-entity',
);
}
$vars[
"pagination"] =
false;
}
if (
$vars[
'list_type'] !=
'list') {
} else {
}
}
'offset' => null,
'limit' => null,
'list_class' => 'elgg-list-annotation elgg-annotation-list',
'full_view' => true,
'offset_key' => 'annoff',
);
$vars[
"pagination"] =
false;
}
}
return false;
}
array(
'entity' => $entity,
)
);
}
}
}
return elgg_view(
'output/friendlytime', array(
'time' => $time));
}
return false;
}
$vars[
'show_add_form'] = $add_comment;
} else {
}
}
}
}
return '';
}
$view = $item->getView();
return '';
}
$object = $item->getObjectEntity();
return '';
}
}
'action' => $CONFIG->wwwroot . "action/$action",
);
$form_class =
'elgg-form-' . preg_replace(
'/[^a-z0-9]/i',
'-',
$action);
} else {
}
}
}
}
'value' => $tag_data,
));
}
$type = $item->getType();
if (in_array(
$type, $CONFIG->entity_types)) {
}
else if (
$type ==
'annotation') {
}
else if (
$type ==
'river') {
}
return '';
}
}
}
$entities =
$user->getFriends(array(
'limit' => 0));
} else {
$entities = array();
}
$collections[
$key]->entities = $entities;
}
}
return elgg_view(
'core/friends/collections', array(
'collections' => $collections));
}
if (is_callable($function_name)) {
$CONFIG->template_handler = $function_name;
return true;
}
return false;
}
}
static $autoload_registered;
if (!$autoload_registered) {
$autoload_registered = true;
}
if (preg_match(
'~[\.-]min\.~',
$params[
'view'])) {
return;
}
}
} elseif (
$type ==
'css') {
$cssmin = new CSSMin();
}
}
}
}
if (isset($autofeed) && $autofeed == true) {
if (substr_count(
$url,
'?')) {
} else {
}
'name' => 'rss',
));
}
}
header(
'X-Frame-Options: SAMEORIGIN');
}
if ($location === "/var/www/views/") {
}
}
elgg_register_js(
'require',
'/vendors/requirejs/require-2.1.10.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');
'src' => '/vendors/jquery/jquery.form.min.js',
'deps' => array('jquery'),
'exports' => 'jQuery.fn.ajaxForm',
));
$view_path = $CONFIG->viewpath;
$viewtype_dirs = scandir($view_path);
}
}
if (!isset($CONFIG->icon_sizes)) {
'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),
);
}
}