Elgg  Version 1.9
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') {
18  if (get_input('handler') != 'admin') {
19  elgg_deprecated_notice("admin plugins should route through 'admin'.", 1.8);
20  }
22  elgg_unregister_css('elgg');
23  echo elgg_view('page/admin', $vars);
24  return true;
25 }
26 
27 // render content before head so that JavaScript and CSS can be loaded. See #4032
28 
29 $messages = elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
30 
31 $header = elgg_view('page/elements/header', $vars);
32 $content = elgg_view('page/elements/body', $vars);
33 $footer = elgg_view('page/elements/footer', $vars);
34 
35 $body = <<<__BODY
36 <div class="elgg-page elgg-page-default">
37  <div class="elgg-page-messages">
38  $messages
39  </div>
40 __BODY;
41 
42 if (elgg_is_logged_in()) {
43  $topbar = elgg_view('page/elements/topbar', $vars);
44 
45  $body .= <<<__BODY
46  <div class="elgg-page-topbar">
47  <div class="elgg-inner">
48  $topbar
49  </div>
50  </div>
51 __BODY;
52 }
53 $body .= <<<__BODY
54  <div class="elgg-page-header">
55  <div class="elgg-inner">
56  $header
57  </div>
58  </div>
59  <div class="elgg-page-body">
60  <div class="elgg-inner">
61  $content
62  </div>
63  </div>
64  <div class="elgg-page-footer">
65  <div class="elgg-inner">
66  $footer
67  </div>
68  </div>
69 </div>
70 __BODY;
71 
72 $body .= elgg_view('page/elements/foot');
73 
74 $head = elgg_view('page/elements/head', $vars['head']);
75 
76 $params = array(
77  'head' => $head,
78  'body' => $body,
79 );
80 
81 if (isset($vars['body_attrs'])) {
82  $params['body_attrs'] = $vars['body_attrs'];
83 }
84 
85 echo elgg_view("page/elements/html", $params);
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
Definition: sessions.php:56
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
$header
Definition: default.php:31
$footer
Definition: default.php:33
fieldset div
Definition: admin.php:462
elgg_unregister_css($name)
Unregister a CSS file.
Definition: elgglib.php:241
$params
Definition: default.php:39
$content
Definition: default.php:32
if(elgg_get_context()== 'admin') $messages
Definition: default.php:29
elgg echo
Translates a string.
Definition: languages.js:43
elgg_get_context()
Get the current context.
Definition: pageowner.php:226
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Sends a notice about deprecated use of a function, view, etc.
Definition: elgglib.php:1171
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition: default.php:23
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$body
Definition: default.php:29
_elgg_admin_add_plugin_settings_menu()
Create the plugin settings page menu.
Definition: admin.php:452
$head
Definition: default.php:74