summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2010-09-25 08:46:16 +0000
committerfisharebest <fisharebest@gmail.com>2010-09-25 08:46:16 +0000
commit06fabd4903f8958da80813e76873a3f5caee1e3e (patch)
tree043497a9973ccdd2ea5cf550ba002c3b8ba7eb5a
parentf6340eb98d5c783fb8edd8ab7b8703f334107ff6 (diff)
downloadwebtrees-06fabd4903f8958da80813e76873a3f5caee1e3e.tar.gz
webtrees-06fabd4903f8958da80813e76873a3f5caee1e3e.tar.bz2
webtrees-06fabd4903f8958da80813e76873a3f5caee1e3e.zip
Tidy up header menu code
-rw-r--r--includes/classes/class_menubar.php66
-rw-r--r--themes/clouds/header.php141
-rw-r--r--themes/colors/header.php178
-rw-r--r--themes/fab/header.php9
-rw-r--r--themes/minimal/header.php94
-rw-r--r--themes/webtrees/header.php87
-rw-r--r--themes/xenea/header.php123
7 files changed, 246 insertions, 452 deletions
diff --git a/includes/classes/class_menubar.php b/includes/classes/class_menubar.php
index b373a6a63d..714c16d2ef 100644
--- a/includes/classes/class_menubar.php
+++ b/includes/classes/class_menubar.php
@@ -87,7 +87,7 @@ class MenuBar {
$showLayout = ($PEDIGREE_LAYOUT) ? 1 : 0;
if (!WT_USER_ID) {
- return new Menu('', '', '');
+ return null;
}
//-- main menu
@@ -169,19 +169,9 @@ class MenuBar {
global $PEDIGREE_FULL_DETAILS, $PEDIGREE_LAYOUT;
global $controller;
- $style = "top";
- if ($rootid) $style = "sub";
- if (isset($controller)) {
- if (!$rootid) {
- if (isset($controller->pid)) $rootid = $controller->pid;
- if (isset($controller->rootid)) $rootid = $controller->rootid;
- }
- }
-
if ($TEXT_DIRECTION=="rtl") $ff="_rtl"; else $ff="";
if (!empty($SEARCH_SPIDER)) {
- $menu = new Menu("", "", "");
- return $menu;
+ return null;
}
$showFull = ($PEDIGREE_FULL_DETAILS) ? 1 : 0;
@@ -190,17 +180,9 @@ class MenuBar {
//-- main charts menu item
$link = "pedigree.php?ged=".WT_GEDCOM."&show_full={$showFull}&talloffset={$showLayout}";
if ($rootid) $link .= "&rootid={$rootid}";
- if ($style=="sub") {
- $menu = new Menu(i18n::translate('Charts'), encode_url($link));
- $menu->addIcon('charts');
- $menu->addClass("submenuitem$ff", "submenuitem_hover$ff", "submenu$ff", "", "icon_small_pedigree");
- }
- else {
- // top menubar
- $menu = new Menu(i18n::translate('Charts'), encode_url($link), "down");
- $menu->addIcon('charts');
- $menu->addClass("menuitem$ff", "menuitem_hover$ff", "submenu$ff", "icon_large_pedigree");
- }
+ $menu = new Menu(i18n::translate('Charts'), encode_url($link), "down");
+ $menu->addIcon('charts');
+ $menu->addClass("menuitem$ff", "menuitem_hover$ff", "submenu$ff", "icon_large_pedigree");
// Build a sortable list of submenu items and then sort it in localized name order
$menuList = array();
@@ -611,9 +593,8 @@ class MenuBar {
if ($TEXT_DIRECTION=="rtl") $ff="_rtl"; else $ff="";
if ((!file_exists(WT_ROOT.'calendar.php')) || (!empty($SEARCH_SPIDER))) {
$menu = new Menu("", "", "");
-// $menu->print_menu = null;
return $menu;
- }
+ }
//-- main calendar menu item
$menu = new Menu(i18n::translate('Calendar'), encode_url('calendar.php?ged='.WT_GEDCOM), "down");
$menu->addIcon('calendar');
@@ -645,7 +626,7 @@ class MenuBar {
$active_reports=WT_Module::getActiveReports();
if ($SEARCH_SPIDER || !$active_reports) {
- return new Menu('', '', '');
+ return null;
}
if ($TEXT_DIRECTION=="rtl") {
@@ -667,22 +648,6 @@ class MenuBar {
}
/**
- * get the optional site-specific menu
- * @return Menu the menu item
- */
- public static function getOptionalMenu() {
- global $TEXT_DIRECTION, $WT_IMAGES, $SEARCH_SPIDER;
-
- if ($TEXT_DIRECTION=="rtl") $ff="_rtl"; else $ff="";
- if (!file_exists(WT_ROOT.'includes/extras/optional_menu.php') || !empty($SEARCH_SPIDER)) {
- $menu = new Menu("", "", "");
- return $menu;
- }
- require WT_ROOT.'includes/extras/optional_menu.php';
- return $menu;
- }
-
- /**
* get the search menu
* @return Menu the menu item
*/
@@ -691,9 +656,8 @@ class MenuBar {
if ($TEXT_DIRECTION=="rtl") $ff="_rtl"; else $ff="";
if ((!file_exists(WT_ROOT.'search.php')) || (!empty($SEARCH_SPIDER))) {
- $menu = new Menu("", "", "");
- return $menu;
- }
+ return null;
+ }
//-- main search menu item
$menu = new Menu(i18n::translate('Search'), encode_url('search.php?ged='.WT_GEDCOM), "down");
$menu->addIcon('search');
@@ -758,10 +722,8 @@ class MenuBar {
if ($TEXT_DIRECTION=="rtl") $ff="_rtl"; else $ff="";
if (!empty($SEARCH_SPIDER)) {
- $menu = new Menu("", "", "");
-// $menu->print_menu = null;
- return $menu;
- }
+ return null;
+ }
//-- main help menu item
$menu = new Menu(i18n::translate('Help'), "#", "down");
$menu->addIcon('menu_help');
@@ -845,7 +807,7 @@ class MenuBar {
}
return $menu;
} else {
- return new Menu('', '');
+ return null;
}
}
/**
@@ -899,7 +861,7 @@ class MenuBar {
if (count($menu->submenus)>1) {
return $menu;
} else {
- return new Menu('', '');
+ return null;
}
}
/**
@@ -1019,5 +981,3 @@ class MenuBar {
return $menu;
}
}
-
-?>
diff --git a/themes/clouds/header.php b/themes/clouds/header.php
index c51cd26c73..d9f681aedd 100644
--- a/themes/clouds/header.php
+++ b/themes/clouds/header.php
@@ -7,7 +7,7 @@
*
* Derived from PhpGedView Cloudy theme
* Original author w.a. bastein http://genealogy.bastein.biz
- * Copyright (C) 2010 PGV Development Team. All rights reserved.
+ * Copyright (C) 2010 PGV Development Team. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ if ($TEXT_DIRECTION=='ltr') {
echo
'<!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" ', i18n::html_markup(), '>',
+ '<html xmlns="http://www.w3.org/1999/xhtml" ', i18n::html_markup(), '>',
'<head>',
'<title>', htmlspecialchars($title), '</title>',
'<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />';
@@ -98,16 +98,13 @@ if ($use_alternate_styles && $BROWSERTYPE != "other") { ?>
if ((!empty($rtl_stylesheet))&&($TEXT_DIRECTION=="rtl")) {?>
<link rel="stylesheet" href="<?php echo $rtl_stylesheet; ?>" type="text/css" media="all" />
<?php }
- echo
- '</head><body id="body" ', $bodyOnLoad, '>';
+ echo '</head><body id="body" ', $bodyOnLoad, '>';
flush(); // Allow the browser to start fetching external stylesheets, javascript, etc.
?>
<!-- begin header section -->
<?php if ($view!='simple') {
-
- echo '<div id="rapcontainer">',
- '<div id="header" class="', $TEXT_DIRECTION, '">';
+ echo '<div id="rapcontainer"><div id="header" class="', $TEXT_DIRECTION, '">';
?>
<table class="header" style="background:url('<?php echo WT_THEME_DIR; ?>images/clouds.gif')" >
<?php
@@ -116,15 +113,15 @@ flush(); // Allow the browser to start fetching external stylesheets, javascript
'<div class="title">';
print_gedcom_title_link(TRUE);
-if(empty($SEARCH_SPIDER)) {
+if (empty($SEARCH_SPIDER)) {
echo '<td valign="middle" align="center">',
'<div class="blanco" style="COLOR: #6699ff;" >';
- print_user_links();
+ print_user_links();
echo '</div>',
'</td>',
'<td align="', $TEXT_DIRECTION=="ltr"?"left":"right", '" valign="middle" >';
- ?>
- <div style="white-space: normal;" align="<?php echo $TEXT_DIRECTION=="rtl"?"left":"right" ?>">
+?>
+ <div style="white-space: normal;" align="<?php echo $TEXT_DIRECTION=="rtl"?"left":"right" ?>">
<?php
echo '<form action="search.php" method="post">',
'<input type="hidden" name="action" value="general" />',
@@ -134,111 +131,77 @@ if(empty($SEARCH_SPIDER)) {
'</form>',
'</div>';
}
- echo '</td>',
- '</tr>',
- '</table>',
- '</div>';
+ echo '</td></tr></table></div>';
?>
<!-- end header section -->
<!-- begin menu section -->
<?php
-$menubar = new MenuBar();
echo '<table id="toplinks">',
'<tr>',
'<td class="toplinks_left">',
'<table align="', $TEXT_DIRECTION=="ltr"?"left":"right", '">',
'<tr>';
- $menu = $menubar->getGedcomMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getGedcomMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getMyPageMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getMyPageMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getChartsMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getChartsMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getListsMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getListsMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getCalendarMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getCalendarMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getReportsMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getReportsMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getSearchMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getSearchMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getOptionalMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
- }
- $menus = $menubar->getModuleMenus();
- foreach($menus as $m=>$menu) {
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menus=MenuBar::getModuleMenus();
+ foreach ($menus as $menu) {
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
}
- $menu = $menubar->getHelpMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getHelpMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- echo '</tr>',
- '</table>',
- '</td>';
+ echo '</tr></table></td>';
- if (empty($SEARCH_SPIDER)) {
+ if (empty($SEARCH_SPIDER)) {
echo '<td class="toplinks_right">';
echo '<div style="float:', WT_CSS_REVERSE_ALIGN, ';"><ul class="makeMenu">';
- echo MenuBar::getFavoritesMenu()->getMenuAsList();
+ echo MenuBar::getFavoritesMenu()->getMenuAsList();
global $ALLOW_THEME_DROPDOWN;
echo ' | ', MenuBar::getLanguageMenu()->getMenuAsList();
if ($ALLOW_THEME_DROPDOWN && get_site_setting('ALLOW_USER_THEMES')) {
echo ' | ', MenuBar::getThemeMenu()->getMenuAsList();
}
- echo '</ul>',
- '</div>',
- '</td>';
- }
- echo '</tr>',
- '</table>';
+ echo '</ul></div></td>';
+ }
+ echo '</tr></table>';
}
?>
<!-- end menu section -->
diff --git a/themes/colors/header.php b/themes/colors/header.php
index e255d9c58f..912b4a76ec 100644
--- a/themes/colors/header.php
+++ b/themes/colors/header.php
@@ -46,7 +46,7 @@ if ($TEXT_DIRECTION=='ltr') {
echo
'<!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" ', i18n::html_markup(), '>',
+ '<html xmlns="http://www.w3.org/1999/xhtml" ', i18n::html_markup(), '>',
'<head>',
'<title>', htmlspecialchars($title), '</title>',
'<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />';
@@ -108,16 +108,15 @@ flush(); // Allow the browser to start fetching external stylesheets, javascript
<!-- begin header section -->
<?php
if ($view!='simple') {
- echo '<div id="header" class="', $TEXT_DIRECTION, '">',
- '<table class="header">',
- '<tr>',
- '<td align="', $TEXT_DIRECTION=="ltr"?"left":"right", '" valign="middle" >',
- '<div class="title">';
- print_gedcom_title_link(TRUE);
- echo '</div>',
- '</td>',
- '<td>';
- if(empty($SEARCH_SPIDER)) {
+ echo
+ '<div id="header" class="', $TEXT_DIRECTION, '">',
+ '<table class="header">',
+ '<tr>',
+ '<td align="', $TEXT_DIRECTION=="ltr"?"left":"right", '" valign="middle" >',
+ '<div class="title">';
+ print_gedcom_title_link(TRUE);
+ echo '</div></td><td>';
+ if (empty($SEARCH_SPIDER)) {
echo '<div style="float:', WT_CSS_REVERSE_ALIGN, ';"><ul class="makeMenu">';
if (WT_USER_ID) {
echo
@@ -138,124 +137,87 @@ if ($view!='simple') {
echo '<li><a class="icon_color" href="', $LOGIN_URL, '?url=', WT_SCRIPT_PATH, WT_SCRIPT_NAME, decode_url(normalize_query_string($QUERY_STRING.'&amp;ged='.WT_GEDCOM)), '">', i18n::translate('Login'), '</a></li>';
}
}
- echo '<span class="link"> | ', MenuBar::getFavoritesMenu()->getMenuAsList();
- echo ' | ', MenuBar::getLanguageMenu()->getMenuAsList();
- global $ALLOW_THEME_DROPDOWN;
- if ($ALLOW_THEME_DROPDOWN && get_site_setting('ALLOW_USER_THEMES')) {
- echo ' | ', MenuBar::getThemeMenu()->getMenuAsList();
- }
+ echo '<span class="link"> | ', MenuBar::getFavoritesMenu()->getMenuAsList();
+ echo ' | ', MenuBar::getLanguageMenu()->getMenuAsList();
+ global $ALLOW_THEME_DROPDOWN;
+ if ($ALLOW_THEME_DROPDOWN && get_site_setting('ALLOW_USER_THEMES')) {
+ echo ' | ', MenuBar::getThemeMenu()->getMenuAsList();
+ }
echo
'</span> | <form style="display:inline;" action="search.php" method="get">',
'<input type="hidden" name="action" value="general" />',
'<input type="hidden" name="topsearch" value="yes" />',
'<input type="text" name="query" size="15" value="', i18n::translate('Search'), '" onfocus="if (this.value==\'', i18n::translate('Search'), '\') this.value=\'\'; focusHandler();" onblur="if (this.value==\'\') this.value=\'', i18n::translate('Search'), '\';" />',
- '<input type="image" src="', WT_THEME_DIR, 'images/go.gif', '" align="top" alt="', i18n::translate('Search'), '" title="', i18n::translate('Search'), '" />',
+ '<input type="image" src="', WT_THEME_DIR, 'images/go.gif', '" align="top" alt="', i18n::translate('Search'), '" title="', i18n::translate('Search'), '" />',
'</form>',
'</ui></div>';
- }
+ }
- echo '</td>',
- '</tr>',
- '</table>',
- '</div>';
+ echo '</td></tr></table></div>';
?>
<!--end header section -->
<!--begin menu section -->
<?php
-
-$menubar = new MenuBar();
-echo '<table id="toplinks">',
- '<tr>',
- '<td class="toplinks_left">',
- '<table align="', $TEXT_DIRECTION=="ltr"?"left":"right", '">',
- '<tr>';
- $menu = $menubar->getGedcomMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
- }
- $menu = $menubar->getMyPageMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ echo
+ '<table id="toplinks"><tr><td class="toplinks_left">',
+ '<table align="', $TEXT_DIRECTION=="ltr"?"left":"right", '">',
+ '<tr>';
+ $menu=MenuBar::getGedcomMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getChartsMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getMyPageMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getListsMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getChartsMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getCalendarMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getListsMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getReportsMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getCalendarMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getSearchMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getReportsMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getOptionalMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
+ $menu=MenuBar::getSearchMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menus = $menubar->getModuleMenus();
- foreach($menus as $m=>$menu) {
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
- }
+ $menus=MenuBar::getModuleMenus();
+ foreach ($menus as $m=>$menu) {
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getHelpMenu();
- if($menu->link != "") {
- echo "<td>";
- $menu->addLabel("", "none");
- $menu->printMenu();
- echo "</td>";
}
-
-echo '</tr>',
- '</table>',
- '</td>';
- if(empty($SEARCH_SPIDER)) {
- echo '<td class="toplinks_right">',
- '<div align="', $TEXT_DIRECTION=="rtl"?"left":"right", '">';
- echo color_theme_dropdown();
- echo '</div>',
- '</td>';
- }
- echo '</tr>',
- '</table>';
-} ?>
+ $menu=MenuBar::getHelpMenu();
+ if ($menu) {
+ $menu->addLabel('', 'none');
+ echo '<td>', $menu->getMenu(), '</td>';
+ }
+ echo '</tr></table></td>';
+ if (empty($SEARCH_SPIDER)) {
+ echo '<td class="toplinks_right"><div align="', $TEXT_DIRECTION=="rtl"?"left":"right", '">';
+ echo color_theme_dropdown();
+ echo '</div></td>';
+ }
+ echo '</tr></table>';
+}
+?>
<!-- end menu section -->
<!-- begin content section -->
<div id="content">
-
diff --git a/themes/fab/header.php b/themes/fab/header.php
index a98e357ee9..8c3a0c6fee 100644
--- a/themes/fab/header.php
+++ b/themes/fab/header.php
@@ -42,7 +42,7 @@ if ($TEXT_DIRECTION=='ltr') {
echo
'<!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" ', i18n::html_markup(), '>',
+ '<html xmlns="http://www.w3.org/1999/xhtml" ', i18n::html_markup(), '>',
'<head>',
'<title>', htmlspecialchars($title), '</title>',
'<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">',
@@ -77,8 +77,8 @@ echo
<?php
if ($use_alternate_styles && $BROWSERTYPE != "other") { ?>
- <link type="text/css" href="<?php echo WT_THEME_DIR?>jquery/jquery-ui_theme.css" rel="Stylesheet" />
-<?php }?>
+ <link type="text/css" href="<?php echo WT_THEME_DIR?>jquery/jquery-ui_theme.css" rel="Stylesheet" />
+<?php } ?>
<link rel="stylesheet" href="<?php echo $THEME_DIR.$BROWSERTYPE; ?>.css" type="text/css" media="all" />
@@ -146,7 +146,6 @@ if ($view!='simple') {
MenuBar::getCalendarMenu(),
MenuBar::getReportsMenu(),
MenuBar::getSearchMenu(),
- MenuBar::getOptionalMenu(),
MenuBar::getHelpMenu()
);
foreach (MenuBar::getModuleMenus() as $menu) {
@@ -161,7 +160,7 @@ if ($view!='simple') {
// Print the menu bar
echo '<div id="topMenu"><ul class="makeMenu">';
foreach ($menu_items as $n=>$menu) {
- if ($menu && $menu->link) {
+ if ($menu) {
if ($n>0) {
echo ' | ';
}
diff --git a/themes/minimal/header.php b/themes/minimal/header.php
index 0f5b317a75..f592e72247 100644
--- a/themes/minimal/header.php
+++ b/themes/minimal/header.php
@@ -119,96 +119,60 @@ if (!defined('WT_WEBTREES')) {
</tr>
</table>
<!-- begin toplinks menu section -->
-
-<?php $menubar = new MenuBar();?>
<table width="100%" border="1" cellspacing="0">
<tr>
<?php
- $menu = $menubar->getGedcomMenu();
- if ($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->addIcon(null);
- $menu->printMenu();
- print "</td>";
- }
-
- $menu = $menubar->getMyPageMenu();
- if ($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
+ $menu=MenuBar::getGedcomMenu();
+ if ($menu) {
$menu->addIcon(null);
- $menu->printMenu();
- print "</td>";
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
-
- $menu = $menubar->getChartsMenu();
- if ($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
+ $menu=MenuBar::getMyPageMenu();
+ if ($menu) {
$menu->addIcon(null);
- $menu->printMenu();
- print "</td>";
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
-
- $menu = $menubar->getListsMenu();
- if ($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
+ $menu=MenuBar::getChartsMenu();
+ if ($menu) {
$menu->addIcon(null);
- $menu->printMenu();
- print "</td>";
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
-
- $menu = $menubar->getCalendarMenu();
- if ($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
+ $menu=MenuBar::getListsMenu();
+ if ($menu) {
$menu->addIcon(null);
- $menu->printMenu();
- print "</td>";
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
-
- $menu = $menubar->getReportsMenu();
- if ($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
+ $menu=MenuBar::getCalendarMenu();
+ if ($menu) {
$menu->addIcon(null);
- $menu->printMenu();
- print "</td>";
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
-
- $menu = $menubar->getSearchMenu();
- if ($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
+ $menu=MenuBar::getReportsMenu();
+ if ($menu) {
$menu->addIcon(null);
- $menu->printMenu();
- print "</td>";
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
-
- $menu = $menubar->getOptionalMenu();
- if ($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
+ $menu=MenuBar::getSearchMenu();
+ if ($menu) {
$menu->addIcon(null);
- $menu->printMenu();
- print "</td>";
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
-
- $menus = $menubar->getModuleMenus();
- foreach($menus as $m=>$menu) {
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
+ $menus=MenuBar::getModuleMenus();
+ foreach ($menus as $menu) {
+ if ($menu) {
$menu->addIcon(null);
- $menu->printMenu();
- print "\t</td>\n";
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
}
-
- $menu = $menubar->getHelpMenu();
- if ($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
+ $menu=MenuBar::getHelpMenu();
+ if ($menu) {
$menu->addIcon(null);
- $menu->printMenu();
- print "</td>";
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
?>
</tr>
</table>
-<img src="<?php print $WT_IMAGES["hline"]; ?>" width="100%" height="3" alt="" />
+<img src="<?php echo $WT_IMAGES["hline"]; ?>" width="100%" height="3" alt="" />
</div>
<?php } ?>
<!-- end toplinks menu section -->
diff --git a/themes/webtrees/header.php b/themes/webtrees/header.php
index 07314f972c..4024c439c6 100644
--- a/themes/webtrees/header.php
+++ b/themes/webtrees/header.php
@@ -34,7 +34,7 @@ if (!defined('WT_WEBTREES')) {
echo
'<!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" ', i18n::html_markup(), '>',
+ '<html xmlns="http://www.w3.org/1999/xhtml" ', i18n::html_markup(), '>',
'<head>',
'<title>', htmlspecialchars($title), '</title>',
'<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />',
@@ -137,77 +137,48 @@ if ($view!='simple') {
echo '</td>',
'</tr>',
'</table>';
- $menubar = new MenuBar();
echo '<div>',
'<img src="', $WT_IMAGES["hline"], '" width="100%" height="3" alt="" />',
'<table id="topMenu">',
'<tr>';
- $menu = $menubar->getGedcomMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getGedcomMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->printMenu(), '</td>';
}
- $menu = $menubar->getMyPageMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getMyPageMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->printMenu(), '</td>';
}
- $menu = $menubar->getChartsMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getChartsMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->printMenu(), '</td>';
}
- $menu = $menubar->getListsMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getListsMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->printMenu(), '</td>';
}
- $menu = $menubar->getCalendarMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getCalendarMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->printMenu(), '</td>';
}
- $menu = $menubar->getReportsMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getReportsMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->printMenu(), '</td>';
}
-
- $menu = $menubar->getSearchMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
- }
-
- $menu = $menubar->getOptionalMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getSearchMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->printMenu(), '</td>';
}
-
- $menus = $menubar->getModuleMenus();
- foreach($menus as $m=>$menu) {
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menus=MenuBar::getModuleMenus();
+ foreach ($menus as $m=>$menu) {
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->printMenu(), '</td>';
}
}
-
- $menu = $menubar->getHelpMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getHelpMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->printMenu(), '</td>';
}
echo '</tr>',
'</table>',
diff --git a/themes/xenea/header.php b/themes/xenea/header.php
index 7172362d0a..a8c7e99d93 100644
--- a/themes/xenea/header.php
+++ b/themes/xenea/header.php
@@ -91,9 +91,9 @@ $displayDate=timestamp_to_gedcom_date(client_time())->Display(false, $DATE_FORMA
<?php if ($view!='simple') {?>
<div id="header" class="<?php echo $TEXT_DIRECTION; ?>">
<table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="#003399">
- <tr>
- <td>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-image:url('<?php
+ <tr>
+ <td>
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-image:url('<?php
if ($TEXT_DIRECTION=="ltr") {
echo WT_THEME_DIR,"images/cabeza.jpg'); ";
echo "background-position:left top; ";
@@ -102,7 +102,7 @@ $displayDate=timestamp_to_gedcom_date(client_time())->Display(false, $DATE_FORMA
echo "background-position:right top; ";
}
?>background-repeat:repeat-y; height:40px;">
- <tr>
+ <tr>
<td width="10"><img src="<?php echo WT_THEME_DIR; ?>images/pixel.gif" width="1" height="1" alt="" /></td>
<td valign="middle"><font color="#FFFFFF" size="5" face="Verdana, Arial, Helvetica, sans-serif">
<?php echo PrintReady($GEDCOM_TITLE, true); ?>
@@ -118,11 +118,11 @@ $displayDate=timestamp_to_gedcom_date(client_time())->Display(false, $DATE_FORMA
</td>
<td width="10"><img src="<?php echo WT_THEME_DIR; ?>images/pixel.gif" width="1" height="1" alt="" /></td>
<?php } ?>
- </tr></table>
+ </tr></table>
<?php if (empty($SEARCH_SPIDER)) { ?>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#84beff" style="background-image:url('<?php echo WT_THEME_DIR; ?>images/barra.gif');">
- <tr>
- <td width="10" height="40"><img src="<?php echo WT_THEME_DIR; ?>images/pixel.gif" width="1" height="18" alt="" /></td>
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#84beff" style="background-image:url('<?php echo WT_THEME_DIR; ?>images/barra.gif');">
+ <tr>
+ <td width="10" height="40"><img src="<?php echo WT_THEME_DIR; ?>images/pixel.gif" width="1" height="18" alt="" /></td>
<td width="115"><div id="favtheme" align="<?php echo $TEXT_DIRECTION=="rtl"?"right":"left" ?>" class="blanco"><?php print_theme_dropdown(1); ?><?php print_favorite_selector(1); ?></div></td>
<td><div align="center"><?php print_user_links(); ?></div></td>
<td width="120" align="<?php echo $TEXT_DIRECTION=="rtl"?"left":"right" ?>" >
@@ -130,97 +130,72 @@ $displayDate=timestamp_to_gedcom_date(client_time())->Display(false, $DATE_FORMA
<div id="favdate" class="blanco" align="right" ><?php echo $displayDate; ?></div>
</td>
<td width="10"><img src="<?php echo WT_THEME_DIR; ?>images/pixel.gif" width="1" height="1" alt="" /></td></tr></table>
- <?php }
-$menubar = new MenuBar(); ?>
+ <?php } ?>
<!-- Begin Toplinks menu section" -->
<table width="100%" border="0" cellspacing="0" cellpadding="4" bgcolor="#FFFFFF" style="border: 1px solid #84beff">
- <tr>
- <td>
- <div align="center">
- <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
- <tr>
+ <tr>
+ <td>
+ <div align="center">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
+ <tr>
<td width="10">
&nbsp;
</td>
<?php
- $menu = $menubar->getGedcomMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getGedcomMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getMyPageMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getMyPageMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getChartsMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getChartsMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getListsMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getListsMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getCalendarMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getCalendarMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getReportsMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getReportsMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getSearchMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getSearchMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
- $menu = $menubar->getOptionalMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
- }
- $menus = $menubar->getModuleMenus();
- foreach($menus as $m=>$menu) {
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menus=MenuBar::getModuleMenus();
+ foreach ($menus as $menu) {
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
}
- $menu = $menubar->getHelpMenu();
- if($menu->link != "") {
- print "\t<td width=\"7%\" valign=\"top\">\n";
- $menu->printMenu();
- print "\t</td>\n";
+ $menu=MenuBar::getHelpMenu();
+ if ($menu) {
+ echo '<td width="7%" valign="top">', $menu->getMenu(), '</td>';
}
?>
<td width="10">
&nbsp;
</td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
</table>
</td></tr></table>
-<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-image:url('<?php print WT_THEME_DIR; ?>images/sombra.gif'); height:4px;">
+<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-image:url('<?php echo WT_THEME_DIR; ?>images/sombra.gif'); height:4px;">
<tr>
- <td><img src="<?php print WT_THEME_DIR; ?>images/pixel.gif" width="1" height="1" alt="" /></td>
+ <td><img src="<?php echo WT_THEME_DIR; ?>images/pixel.gif" width="1" height="1" alt="" /></td>
</tr>
</table>
<br />