Beispiel #1
0
<?php

/**
 * Elgg topbar
 * The standard elgg top toolbar
 */
// Elgg logo
echo elgg_view_menu('topbar', array('sort_by' => 'priority', array('elgg-menu-hz')));
// elgg tools menu
// need to echo this empty view for backward compatibility.
echo elgg_view_deprecated("navigation/topbar_tools", array(), "Extend the topbar menus or the page/elements/topbar view directly", 1.8);
Beispiel #2
0
<?php

echo elgg_view_deprecated('footer/analytics', array(), "Extend page/elements/foot instead", 1.8);
$js = elgg_get_loaded_js('footer');
foreach ($js as $script) {
    ?>
	<script src="<?php 
    echo htmlspecialchars($script, ENT_QUOTES, 'UTF-8');
    ?>
"></script>
<?php 
}
$deps = _elgg_services()->amdConfig->getDependencies();
?>

<script>
require(<?php 
echo json_encode($deps, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
?>
);
</script>
Beispiel #3
0
<?php

/**
 * Used to show plugin settings for both users and admins.
 *
 * @package Elgg.Core
 * @subpackage Plugins
 */
$plugin = $vars['entity'];
$plugin_id = $plugin->getID();
$user_guid = elgg_extract('user_guid', $vars, elgg_get_logged_in_user_guid());
// Do we want to show admin settings or user settings
$type = elgg_extract('type', $vars, '');
if ($type != 'user') {
    $type = '';
}
if (elgg_view_exists("plugins/{$plugin_id}/{$type}settings")) {
    echo elgg_view("plugins/{$plugin_id}/{$type}settings", $vars);
} else {
    echo elgg_view_deprecated("{$type}settings/{$plugin_id}/edit", $vars, "Use the view plugins/{$plugin_id}/{$type}settings", 1.8);
}
echo '<div class="elgg-foot">';
echo elgg_view('input/hidden', array('name' => 'plugin_id', 'value' => $plugin_id));
echo elgg_view('input/hidden', array('name' => 'user_guid', 'value' => $user_guid));
echo elgg_view('input/submit', array('value' => elgg_echo('save')));
echo '</div>';
?>
	<!--[if gt IE 8]>
		<link rel="stylesheet" href="<?php 
echo $ie_url;
?>
" />
	<![endif]-->
	<!--[if IE 8]>
		<link rel="stylesheet" href="<?php 
echo $ie8_url;
?>
" />
	<![endif]-->
	<!--[if IE 7]>
		<link rel="stylesheet" href="<?php 
echo $ie7_url;
?>
" />
	<![endif]-->

	<script><?php 
echo $elgg_init;
?>
</script>
<?php 
foreach ($js as $url) {
    echo elgg_format_element('script', array('src' => $url));
}
echo elgg_view_deprecated('page/elements/shortcut_icon', array(), "Use the 'head', 'page' plugin hook.", 1.9);
echo elgg_view_deprecated('metatags', array(), "Use the 'head', 'page' plugin hook.", 1.8);
Beispiel #5
0
// refresh token 3 times during its lifetime (in microseconds 1000 * 1/3)
elgg.security.interval = <?php 
echo (int) _elgg_services()->actions->getActionTokenTimeout() * 333;
?>
;
elgg.config.language = '<?php 
echo empty($CONFIG->language) ? 'en' : $CONFIG->language;
?>
';

!function () {
	define('elgg', ['jquery', 'languages/' + elgg.get_language()], function($, translations) {
		elgg.add_translation(elgg.get_language(), translations);

		$(function() {
			elgg.trigger_hook('init', 'system');
			elgg.trigger_hook('ready', 'system');
		});

		return elgg;
	});
}();

require(['elgg']); // Forces the define() function to always run

<?php 
echo elgg_view_deprecated('js/initialise_elgg', array(), "Use the view js/elgg.", 1.8);
?>

elgg.trigger_hook('boot', 'system');
Beispiel #6
0
<?php

// don't show content for default widgets
if (elgg_in_context('default_widgets')) {
    return;
}
$widget = elgg_extract('entity', $vars);
if (!elgg_instanceof($widget, 'object', 'widget')) {
    return;
}
$handler = $widget->handler;
if (elgg_view_exists("widgets/{$handler}/content")) {
    echo elgg_view("widgets/{$handler}/content", $vars);
} else {
    echo elgg_view_deprecated("widgets/{$handler}/view", $vars, "Widgets use content as the display view", '1.8');
}
Beispiel #7
0
<?php

/**
 * Members index
 *
 * @uses $vars['page'] The URL segment after members/
 */
if (elgg_view_exists('members/nav')) {
    // legacy non-bundled plugin
    $suggestion = "Instead use the (members:config, tabs) plugin hook to register tabs.";
    $vars = array('selected' => $vars['page']);
    $filter = elgg_view_deprecated('members/nav', $vars, $suggestion, 1.9);
} else {
    $tabs = elgg_trigger_plugin_hook('members:config', 'tabs', null, array());
    foreach ($tabs as $type => $values) {
        $tabs[$type]['selected'] = $vars['page'] == $type;
    }
    $filter = elgg_view('navigation/tabs', array('tabs' => $tabs));
}
$params = array('options' => array('type' => 'user', 'full_view' => false));
$content = elgg_trigger_plugin_hook('members:list', $vars['page'], $params, null);
if ($content === null) {
    forward('', '404');
}
$title = elgg_echo("members:title:{$vars['page']}");
$params = array('content' => $content, 'sidebar' => elgg_view('members/sidebar'), 'title' => $title, 'filter' => $filter);
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);