aboutsummaryrefslogtreecommitdiff
path: root/views/default/page_elements
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-16 20:41:31 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-16 20:41:31 +0000
commit70b08afa64465f4d3457ba6e1c4cc2df1dd2069b (patch)
tree251d2559ea516ae4e23395dab4b083d079b65d24 /views/default/page_elements
parentc66831fa5138a277a9729174caf14c7eb323fb07 (diff)
downloadelgg-70b08afa64465f4d3457ba6e1c4cc2df1dd2069b.tar.gz
elgg-70b08afa64465f4d3457ba6e1c4cc2df1dd2069b.tar.bz2
More views cleanup.
git-svn-id: http://code.elgg.org/elgg/trunk@3556 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page_elements')
-rw-r--r--views/default/page_elements/contentwrapper.php18
-rw-r--r--views/default/page_elements/elgg_topbar.php59
-rw-r--r--views/default/page_elements/footer.php33
-rw-r--r--views/default/page_elements/header.php103
-rw-r--r--views/default/page_elements/header_contents.php21
-rw-r--r--views/default/page_elements/owner_block.php189
-rw-r--r--views/default/page_elements/spotlight.php35
-rw-r--r--views/default/page_elements/title.php83
8 files changed, 268 insertions, 273 deletions
diff --git a/views/default/page_elements/contentwrapper.php b/views/default/page_elements/contentwrapper.php
index 2cb001b05..81b7b5c7c 100644
--- a/views/default/page_elements/contentwrapper.php
+++ b/views/default/page_elements/contentwrapper.php
@@ -1,11 +1,23 @@
+<?php
+/**
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The URL to display
+ *
+ */
+?>
<div class="contentWrapper<?php
- if (isset($vars['subclass'])) echo ' ' . $vars['subclass'];
+ if (isset($vars['subclass'])) {
+ echo ' ' . $vars['subclass'];
+ }
?>">
<?php
-
echo $vars['body'];
-
?>
</div> \ No newline at end of file
diff --git a/views/default/page_elements/elgg_topbar.php b/views/default/page_elements/elgg_topbar.php
index 46314f2ad..b9609910c 100644
--- a/views/default/page_elements/elgg_topbar.php
+++ b/views/default/page_elements/elgg_topbar.php
@@ -1,19 +1,18 @@
<?php
-
- /**
- * Elgg top toolbar
- * The standard elgg top toolbar
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- */
+/**
+ * Elgg top toolbar
+ * The standard elgg top toolbar
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
?>
<?php
- if (isloggedin()) {
+ if (isloggedin()) {
?>
<div id="elgg_topbar">
@@ -21,41 +20,40 @@
<div id="elgg_topbar_container_left">
<div class="toolbarimages">
<a href="http://www.elgg.org" target="_blank"><img src="<?php echo $vars['url']; ?>_graphics/elgg_toolbar_logo.gif" /></a>
-
+
<a href="<?php echo $_SESSION['user']->getURL(); ?>"><img class="user_mini_avatar" src="<?php echo $_SESSION['user']->getIcon('topbar'); ?>" /></a>
-
+
</div>
<div class="toolbarlinks">
<a href="<?php echo $vars['url']; ?>pg/dashboard/" class="pagelinks"><?php echo elgg_echo('dashboard'); ?></a>
</div>
- <?php
+ <?php
- echo elgg_view("navigation/topbar_tools");
+ echo elgg_view("navigation/topbar_tools");
- ?>
-
-
- <div class="toolbarlinks2">
+ ?>
+
+ <div class="toolbarlinks2">
<?php
//allow people to extend this top menu
echo elgg_view('elgg_topbar/extend', $vars);
?>
-
+
<a href="<?php echo $vars['url']; ?>pg/settings/" class="usersettings"><?php echo elgg_echo('settings'); ?></a>
-
+
<?php
-
+
// The administration link is for admin or site admin users only
- if ($vars['user']->admin || $vars['user']->siteadmin) {
-
+ if ($vars['user']->admin || $vars['user']->siteadmin) {
+
?>
-
+
<a href="<?php echo $vars['url']; ?>pg/admin/" class="usersettings"><?php echo elgg_echo("admin"); ?></a>
-
+
<?php
-
+
}
-
+
?>
</div>
@@ -79,5 +77,4 @@
<div class="clearfloat"></div>
<?php
- }
-?> \ No newline at end of file
+ } \ No newline at end of file
diff --git a/views/default/page_elements/footer.php b/views/default/page_elements/footer.php
index 0679a988e..31c62a76e 100644
--- a/views/default/page_elements/footer.php
+++ b/views/default/page_elements/footer.php
@@ -1,18 +1,17 @@
<?php
+/**
+ * Elgg footer
+ * The standard HTML footer that displays across the site
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
- /**
- * Elgg footer
- * The standard HTML footer that displays across the site
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- */
-
- // get the tools menu
- //$menu = get_register('menu');
+// get the tools menu
+//$menu = get_register('menu');
?>
@@ -24,7 +23,7 @@
<td width="210" height="50">
</td>
-
+
<td width="748" height="50" align="right">
<p class="footer_toolbar_links">
<?php
@@ -33,17 +32,17 @@
</p>
</td>
</tr>
-
+
<tr>
<td width="210" height="28">
<a href="http://www.elgg.org" target="_blank">
<img src="<?php echo $vars['url']; ?>_graphics/powered_by_elgg_badge_drk_bckgnd.gif" border="0" />
</a>
</td>
-
+
<td width="748" height="28" align="right">
<p class="footer_legal_links"><small>
- Powered by Elgg, the leading open source social networking platform
+ Powered by Elgg, the leading open source social networking platform
</small>
</p>
</td>
diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php
index 5235ed740..48073654c 100644
--- a/views/default/page_elements/header.php
+++ b/views/default/page_elements/header.php
@@ -1,54 +1,53 @@
<?php
+/**
+ * Elgg pageshell
+ * The standard HTML header that displays across the site
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['config'] The site configuration settings, imported
+ * @uses $vars['title'] The page title
+ * @uses $vars['body'] The main content of the page
+ * @uses $vars['messages'] A 2d array of various message registers, passed from system_messages()
+ */
+
+// Set title
+if (empty($vars['title'])) {
+ $title = $vars['config']->sitename;
+} else if (empty($vars['config']->sitename)) {
+ $title = $vars['title'];
+} else {
+ $title = $vars['config']->sitename . ": " . $vars['title'];
+}
+
+global $autofeed;
+if (isset($autofeed) && $autofeed == true) {
+ $url = $url2 = full_url();
+ if (substr_count($url,'?')) {
+ $url .= "&view=rss";
+ } else {
+ $url .= "?view=rss";
+ }
+ if (substr_count($url2,'?')) {
+ $url2 .= "&view=odd";
+ } else {
+ $url2 .= "?view=opendd";
+ }
+ $feedref = <<<END
- /**
- * Elgg pageshell
- * The standard HTML header that displays across the site
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['config'] The site configuration settings, imported
- * @uses $vars['title'] The page title
- * @uses $vars['body'] The main content of the page
- * @uses $vars['messages'] A 2d array of various message registers, passed from system_messages()
- */
-
- // Set title
- if (empty($vars['title'])) {
- $title = $vars['config']->sitename;
- } else if (empty($vars['config']->sitename)) {
- $title = $vars['title'];
- } else {
- $title = $vars['config']->sitename . ": " . $vars['title'];
- }
-
- global $autofeed;
- if (isset($autofeed) && $autofeed == true) {
- $url = $url2 = full_url();
- if (substr_count($url,'?')) {
- $url .= "&view=rss";
- } else {
- $url .= "?view=rss";
- }
- if (substr_count($url2,'?')) {
- $url2 .= "&view=odd";
- } else {
- $url2 .= "?view=opendd";
- }
- $feedref = <<<END
-
<link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
<link rel="alternate" type="application/odd+xml" title="OpenDD" href="{$url2}" />
-
+
END;
- } else {
- $feedref = "";
- }
-
- $version = get_version();
- $release = get_version(true);
+} else {
+ $feedref = "";
+}
+
+$version = get_version();
+$release = get_version(true);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -58,7 +57,7 @@ END;
<meta name="ElggVersion" content="<?php echo $version; ?>" />
<title><?php echo $title; ?></title>
- <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.form.js"></script>
<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>
@@ -74,14 +73,14 @@ END;
?>
<!-- include the default css file -->
<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" />
-
- <?php
+
+ <?php
echo $feedref;
- echo elgg_view('metatags',$vars);
+ echo elgg_view('metatags',$vars);
?>
<script type="text/javascript">
- jQuery(document).ready(function($) {
- });
+ jQuery(document).ready(function($) {
+ });
</script>
</head>
diff --git a/views/default/page_elements/header_contents.php b/views/default/page_elements/header_contents.php
index 2786a720e..ac47d8962 100644
--- a/views/default/page_elements/header_contents.php
+++ b/views/default/page_elements/header_contents.php
@@ -1,17 +1,14 @@
<?php
+/**
+ * Elgg header contents
+ * This file holds the header output that a user will see
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ **/
- /**
- * Elgg header contents
- * This file holds the header output that a user will see
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- **/
-
?>
<div id="page_container">
diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php
index 535d1b064..46397c4c2 100644
--- a/views/default/page_elements/owner_block.php
+++ b/views/default/page_elements/owner_block.php
@@ -1,100 +1,95 @@
<?php
+/**
+ * Elgg owner block
+ * Displays page ownership information
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
+
+$contents = "";
+
+// Is there a page owner?
+$owner = page_owner_entity();
+// if (!$owner && isloggedin()) $owner = $_SESSION['user'];
+if ($owner instanceof ElggEntity) {
+ $icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny'));
+ if ($owner instanceof ElggUser || $owner instanceof ElggGroup) {
+ //$info = $owner->name;
+ $info = '<a href="' . $owner->getURL() . '">' . $owner->name . '</a>';
+ }
+ $display = "<div id=\"owner_block_icon\">" . $icon . "</div>";
+ $display .= "<div id=\"owner_block_content\">" . $info . "</div><div class=\"clearfloat ownerblockline\"></div>";
+
+ if ($owner->briefdescription) {
+ $desc = $owner->briefdescription;
+ $display .= "<div id=\"owner_block_desc\">" . $desc . "</div>";
+ }
+
+ $contents .= $display;
+}
+
+// Are there feeds to display?
+global $autofeed;
+
+if (isset($autofeed) && $autofeed == true) {
+ $url = $url2 = full_url();
+ if (substr_count($url,'?')) {
+ $url .= "&view=rss";
+ } else {
+ $url .= "?view=rss";
+ }
+ //if (substr_count($url2,'?')) {
+ // $url2 .= "&view=odd";
+ //} else {
+ // $url2 .= "?view=opendd";
+ //}
+ $label = elgg_echo('feed:rss');
+ //$label2 = elgg_echo('feed:odd');
+ $contents .= <<<END
+
+<div id="owner_block_rss_feed"><a href="{$url}" rel="nofollow">{$label}</a></div>
- /**
- * Elgg owner block
- * Displays page ownership information
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- */
-
- $contents = "";
-
- // Is there a page owner?
- $owner = page_owner_entity();
- // if (!$owner && isloggedin()) $owner = $_SESSION['user'];
- if ($owner instanceof ElggEntity) {
- $icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny'));
- if ($owner instanceof ElggUser || $owner instanceof ElggGroup) {
- //$info = $owner->name;
- $info = '<a href="' . $owner->getURL() . '">' . $owner->name . '</a>';
- }
- $display = "<div id=\"owner_block_icon\">" . $icon . "</div>";
- $display .= "<div id=\"owner_block_content\">" . $info . "</div><div class=\"clearfloat ownerblockline\"></div>";
-
- if ($owner->briefdescription) {
- $desc = $owner->briefdescription;
- $display .= "<div id=\"owner_block_desc\">" . $desc . "</div>";
- }
-
- $contents .= $display;
- }
-
- // Are there feeds to display?
- global $autofeed;
-
- if (isset($autofeed) && $autofeed == true) {
- $url = $url2 = full_url();
- if (substr_count($url,'?')) {
- $url .= "&view=rss";
- } else {
- $url .= "?view=rss";
- }
- //if (substr_count($url2,'?')) {
- // $url2 .= "&view=odd";
- //} else {
- // $url2 .= "?view=opendd";
- //}
- $label = elgg_echo('feed:rss');
- //$label2 = elgg_echo('feed:odd');
- $contents .= <<<END
-
- <div id="owner_block_rss_feed"><a href="{$url}" rel="nofollow">{$label}</a></div>
-
END;
- }
-
- //the follow are for logged in users only
- if(isloggedin()){
-
- //is the bookmark plugin installed?
- if(is_plugin_enabled('bookmarks')){
-
- $label3 = elgg_echo('bookmarks:this');
- $contents .= "<div id=\"owner_block_bookmark_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label3}</a></div>";
-
- }
-
- //report this button
- if (is_plugin_enabled('reportedcontent'))
- {
- $label4 = elgg_echo('reportedcontent:report');
- $contents .= "<div id=\"owner_block_report_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label4}</a></div>";
- }
-
- }
-
-
- $contents .= elgg_view('owner_block/extend');
-
- // Have we been asked to inject any content? If so, display it
- if (isset($vars['content']))
- $contents .= $vars['content'];
-
- // Initialise the submenu
- $submenu = get_submenu(); // elgg_view('canvas_header/submenu');
- if (!empty($submenu))
- $contents .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
-
- if (!empty($contents)) {
- echo "<div id=\"owner_block\">";
- echo $contents;
- echo "</div><div id=\"owner_block_bottom\"></div>";
- }
-
-?> \ No newline at end of file
+}
+
+//the follow are for logged in users only
+if(isloggedin()){
+
+ //is the bookmark plugin installed?
+ if(is_plugin_enabled('bookmarks')){
+
+ $label3 = elgg_echo('bookmarks:this');
+ $contents .= "<div id=\"owner_block_bookmark_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label3}</a></div>";
+
+ }
+
+ //report this button
+ if (is_plugin_enabled('reportedcontent'))
+ {
+ $label4 = elgg_echo('reportedcontent:report');
+ $contents .= "<div id=\"owner_block_report_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label4}</a></div>";
+ }
+
+}
+
+
+$contents .= elgg_view('owner_block/extend');
+
+// Have we been asked to inject any content? If so, display it
+if (isset($vars['content']))
+ $contents .= $vars['content'];
+
+// Initialise the submenu
+$submenu = get_submenu(); // elgg_view('canvas_header/submenu');
+if (!empty($submenu))
+ $contents .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
+
+if (!empty($contents)) {
+ echo "<div id=\"owner_block\">";
+ echo $contents;
+ echo "</div><div id=\"owner_block_bottom\"></div>";
+} \ No newline at end of file
diff --git a/views/default/page_elements/spotlight.php b/views/default/page_elements/spotlight.php
index 5b5a90ac7..670e0e4c5 100644
--- a/views/default/page_elements/spotlight.php
+++ b/views/default/page_elements/spotlight.php
@@ -1,20 +1,19 @@
<?php
-
- /**
- * Elgg spotlight
- * The spotlight area that displays across the site
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- */
+/**
+ * Elgg spotlight
+ * The spotlight area that displays across the site
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
?>
<div id="layout_spotlight">
<div id="wrapper_spotlight">
-
+
<div class="collapsable_box no_space_after">
<div class="collapsable_box_header">
<?php
@@ -22,15 +21,15 @@
$closed = false;
if ($_SESSION['user'] instanceof ElggUser) {
if ($_SESSION['user']->spotlightclosed) {
-
+
$closed = true;
-
+
}
}
if ($closed) {
?>
<a href="javascript:void(0);" class="toggle_box_contents" onClick="$.post('<?php echo $vars['url']; ?>action/user/spotlight?closed=false')">+</a>
-<?php
+<?php
} else {
?>
<a href="javascript:void(0);" class="toggle_box_contents" onClick="$.post('<?php echo $vars['url']; ?>action/user/spotlight?closed=true')">-</a>
@@ -50,13 +49,9 @@
} else {
echo elgg_view("spotlight/default");
}
-
-
-
-
?>
</div><!-- /.collapsable_box_content -->
</div><!-- /.collapsable_box -->
-
+
</div><!-- /#wrapper_spotlight -->
</div><!-- /#layout_spotlight --> \ No newline at end of file
diff --git a/views/default/page_elements/title.php b/views/default/page_elements/title.php
index 173672cb3..5123c14a7 100644
--- a/views/default/page_elements/title.php
+++ b/views/default/page_elements/title.php
@@ -1,46 +1,47 @@
<?php
-
- /**
- * Elgg title element
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['title'] The page title
- */
-
- $page_owner = page_owner();
- $page_owner_user = get_entity($page_owner);
-
- $submenu = get_submenu(); // elgg_view('canvas_header/submenu');
- if (!empty($submenu)) $submenu = "<ul>" . $submenu . "</ul>";
-
- if (($_SESSION['guid']) && ($page_owner && $page_owner_user->guid != $_SESSION['user']->getGUID())) {
- $info = "<h2>" . $vars['title'] . "</h2>";
- if($page_owner_user instanceOf ElggGroup) {
- $display = "<div id=\"content_area_group_title\">" . $info . "</div>";
- } else {
- $display = "<div id=\"content_area_user_title\">" . $info . "</div>";
- }
- if (!empty($submenu) && $vars['submenu'] == true)
- $display .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
+/**
+ * Elgg title element
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['title'] The page title
+ */
+
+$page_owner = page_owner();
+$page_owner_user = get_entity($page_owner);
+
+$submenu = get_submenu(); // elgg_view('canvas_header/submenu');
+if (!empty($submenu)) {
+ $submenu = "<ul>" . $submenu . "</ul>";
+}
+
+if (($_SESSION['guid']) && ($page_owner && $page_owner_user->guid != $_SESSION['user']->getGUID())) {
+ $info = "<h2>" . $vars['title'] . "</h2>";
+ if($page_owner_user instanceOf ElggGroup) {
+ $display = "<div id=\"content_area_group_title\">" . $info . "</div>";
} else {
- $info = "<h2>" . $vars['title'] . "</h2>";
- if($page_owner_user instanceOf ElggGroup) {
- $display = "<div id=\"content_area_group_title\">" . $info . "</div>";
- } else {
- $display = "<div id=\"content_area_user_title\">" . $info . "</div>";
- }
- if (!empty($submenu) && $vars['submenu'] == true)
- $display .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
+ $display = "<div id=\"content_area_user_title\">" . $info . "</div>";
}
+ if (!empty($submenu) && $vars['submenu'] == true) {
+ // plugins can extend this to add menu options
+ $display .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>";
+ }
+} else {
+ $info = "<h2>" . $vars['title'] . "</h2>";
+ if($page_owner_user instanceOf ElggGroup) {
+ $display = "<div id=\"content_area_group_title\">" . $info . "</div>";
+ } else {
+ $display = "<div id=\"content_area_user_title\">" . $info . "</div>";
+ }
+ if (!empty($submenu) && $vars['submenu'] == true) {
+ // plugins can extend this to add menu options
+ $display .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>";
+ }
+}
- //print to screen
- echo $display;
-
-
-
-?> \ No newline at end of file
+//print to screen
+echo $display; \ No newline at end of file