Elgg  Version 2.3
default.php
Go to the documentation of this file.
1 <?php
15 // backward compatability support for plugins that are not using the new approach
16 // of routing through admin. See reportedcontent plugin for a simple example.
17 if (elgg_get_context() == 'admin' && elgg_is_admin_logged_in()) {
19  elgg_unregister_css('elgg');
20  echo elgg_view('page/admin', $vars);
21  return true;
22 }
23 
24 // render content before head so that JavaScript and CSS can be loaded. See #4032
25 
26 $messages = elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
27 
28 $header = elgg_view('page/elements/header', $vars);
29 $content = elgg_view('page/elements/body', $vars);
30 $footer = elgg_view('page/elements/footer', $vars);
31 
32 $body = <<<__BODY
33 <div class="elgg-page elgg-page-default">
34  <div class="elgg-page-messages">
35  $messages
36  </div>
37 __BODY;
38 
39 $body .= elgg_view('page/elements/topbar_wrapper', $vars);
40 
41 $body .= <<<__BODY
42  <div class="elgg-page-header">
43  <div class="elgg-inner">
44  $header
45  </div>
46  </div>
47  <div class="elgg-page-body">
48  <div class="elgg-inner">
49  $content
50  </div>
51  </div>
52  <div class="elgg-page-footer">
53  <div class="elgg-inner">
54  $footer
55  </div>
56  </div>
57 </div>
58 __BODY;
59 
60 $body .= elgg_view('page/elements/foot');
61 
62 $head = elgg_view('page/elements/head', $vars['head']);
63 
64 $params = array(
65  'head' => $head,
66  'body' => $body,
67 );
68 
69 if (isset($vars['body_attrs'])) {
70  $params['body_attrs'] = $vars['body_attrs'];
71 }
72 
73 echo elgg_view("page/elements/html", $params);
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
Definition: sessions.php:60
$header
Definition: default.php:28
$footer
Definition: default.php:30
elgg_unregister_css($name)
Unregister a CSS file.
Definition: elgglib.php:283
$params
Definition: default.php:39
$content
Definition: default.php:29
fieldset div
Definition: admin.css.php:485
elgg echo
Translates a string.
Definition: languages.js:48
elgg_get_context()
Get the current context.
Definition: pageowner.php:204
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:336
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition: default.php:24
if(elgg_get_context()== 'admin'&&elgg_is_admin_logged_in()) $messages
Definition: default.php:26
$body
Definition: default.php:29
_elgg_admin_add_plugin_settings_menu()
Create the plugin settings page menu.
Definition: admin.php:464
$head
Definition: default.php:62