<?php\r
/**\r
- * HTML5 header\r
- * The standard HTML5 header that displays across the site\r
+ * Elgg pageshell\r
+ * The standard HTML header that displays across the site\r
*\r
* @package Elgg\r
* @subpackage Core\r
* @author Curverider Ltd\r
* @link http://elgg.org/\r
*\r
+ * @uses $vars['config'] The site configuration settings, imported\r
+ * @uses $vars['title'] The page title\r
+ * @uses $vars['body'] The main content of the page\r
*/\r
\r
+// Set title\r
+if (empty($vars['title'])) {\r
+ $title = $vars['config']->sitename;\r
+} else if (empty($vars['config']->sitename)) {\r
+ $title = $vars['title'];\r
+} else {\r
+ $title = $vars['config']->sitename . ": " . $vars['title'];\r
+}\r
+\r
+global $autofeed;\r
+if (isset($autofeed) && $autofeed == true) {\r
+ $url = $url2 = full_url();\r
+ if (substr_count($url,'?')) {\r
+ $url .= "&view=rss";\r
+ } else {\r
+ $url .= "?view=rss";\r
+ }\r
+ if (substr_count($url2,'?')) {\r
+ $url2 .= "&view=odd";\r
+ } else {\r
+ $url2 .= "?view=opendd";\r
+ }\r
+ $feedref = <<<END\r
+\r
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />\r
+ <link rel="alternate" type="application/odd+xml" title="OpenDD" href="{$url2}" />\r
+\r
+END;\r
+} else {\r
+ $feedref = "";\r
+}\r
+\r
// we won't trust server configuration but specify utf-8\r
header('Content-type: text/html; charset=utf-8');\r
\r
+$version = get_version();\r
+$release = get_version(true);\r
?>\r
-\r
<!doctype html>\r
<html>\r
-<?php echo elgg_view('page_elements/head', $vars); ?>\r
-<body>
\ No newline at end of file
+<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+ <meta name="ElggRelease" content="<?php echo $release; ?>" />\r
+ <meta name="ElggVersion" content="<?php echo $version; ?>" />\r
+ <title><?php echo $title; ?></title>\r
+ \r
+ <!-- include the default css file -->\r
+ <link rel="stylesheet" href="<?php echo $vars['url']; ?>_css/css.css?lastcache=<?php echo $vars['config']->lastcache; ?>&viewtype=<?php echo $vars['view']; ?>" type="text/css" />\r
+\r
+ <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-1.3.2.min.js"></script>\r
+ <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-ui-1.7.2.custom.min.js"></script>\r
+ <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.form.js"></script>\r
+ <script type="text/javascript" src="<?php echo $vars['url']; ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&js=initialise_elgg&viewtype=<?php echo $vars['view']; ?>"></script>\r
+ \r
+<?php\r
+ global $pickerinuse;\r
+ if (isset($pickerinuse) && $pickerinuse == true) {\r
+?>\r
+ <!-- only needed on pages where we have friends collections and/or the friends picker -->\r
+ <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.easing.1.3.packed.js"></script>\r
+ <script type="text/javascript" src="<?php echo $vars['url']; ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&js=friendsPickerv1&viewtype=<?php echo $vars['view']; ?>"></script>\r
+<?php\r
+ }\r
+?>\r
+\r
+ <?php\r
+ echo $feedref;\r
+ echo elgg_view('metatags',$vars);\r
+ ?>\r
+</head>\r
+\r
+<body>\r