From: martin <martin>
Date: Mon, 23 Sep 2002 15:42:22 +0000 (+0000)
Subject: Newly formatted header.html files in themes ... still works the same
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=83e9a09e3475a8ec9715921ddaf39c0bed596d9b;p=moodle.git

Newly formatted header.html files in themes ... still works the same
just might be easier to edit now.  index.php uses new set_config function
---

diff --git a/theme/index.php b/theme/index.php
index 9eac783043..ec0986ca00 100644
--- a/theme/index.php
+++ b/theme/index.php
@@ -40,7 +40,7 @@
                  "<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> -> $strchoosetheme");
 
     if ($choose) {
-        if (set_field("config", "value", $choose, "name", "theme")) {
+        if (set_config("theme", $choose)) {
             print_heading(get_string("themesaved"));
             print_continue("$CFG->wwwroot");
             print_footer();
diff --git a/theme/standard/header.html b/theme/standard/header.html
index 6c76df3091..89497488d3 100644
--- a/theme/standard/header.html
+++ b/theme/standard/header.html
@@ -8,27 +8,45 @@
 <? include("$CFG->javascript"); ?>
 </HEAD>
 
-<BODY <? if ($focus) { echo "onLoad=setfocus()"; } ?> bgcolor="<?=$THEME->body ?>" link="#000066" vlink="#222288">
-
-<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
-<TR><TD ALIGN=LEFT VALIGN=TOP>
-<?  if ($heading) { ?>
-    <FONT FACE="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif" SIZE=4><B><?=$heading?></B></FONT>
-<?  } ?>
-</TD><TD ALIGN=RIGHT VALIGN=TOP>
-<?  if ($button) {
-        echo "$button";
-    } ?>
-</TD></TR></TABLE>
-
-<?  if ($navigation) { ?>
-    <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>
-    <TR><TD BGCOLOR="<?=$THEME->cellheading?>">
-    <FONT FACE="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif" SIZE=2><B>
-<?  print_navigation("$navigation"); ?>
-    </B></FONT></TD></TR></TABLE>
-    <IMG SRC="<?=$CFG->wwwroot?>/pix/spacer.gif" ALT="" HEIGHT=5 WIDTH=1><BR>
-<?  } else if ($heading) { ?>
-    <HR SIZE=1 NOSHADE>
-<?  } ?>
+<BODY <? if ($focus) { echo "onLoad=setfocus()"; } echo " bgcolor=\"$THEME->body\">"; ?>
+
+<? if ($home) {  // This is what gets printed on the home page only  ?>
+
+     <TABLE WIDTH=100% CELLPADDING=10 CELLSPACING=0 BORDER=0>
+       <TR>
+         <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=4><B><?=$heading?></B></FONT></TD>
+         <TD ALIGN=RIGHT VALIGN=TOP><?=$button ?></TD>
+       </TR>
+     </TABLE>
+
+
+<? } else if ($heading) {  // This is what gets printed on any other page with a heading ?>
+
+     <TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
+       <TR>
+         <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=4><B><?=$heading?></B></FONT></TD>
+         <TD ALIGN=RIGHT VALIGN=TOP><?=$button ?></TD>
+       </TR>
+     </TABLE>
+
+<? } ?>
+
+
+<? if ($navigation) { // This is the navigation table with breadcrumbs  ?>
+
+     <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>
+       <TR>
+         <TD BGCOLOR="<?=$THEME->cellheading?>">
+           <FONT SIZE=2><B><? print_navigation("$navigation"); ?></B></FONT>
+         </TD>
+       </TR>
+     </TABLE>
+     <IMG SRC="<?=$CFG->wwwroot?>/pix/spacer.gif" ALT="" HEIGHT=5 WIDTH=1><BR>
+
+<? } else if ($heading) { // If no navigation, but a heading, then print a line  ?>
+
+     <HR SIZE=1 NOSHADE>
+
+<? } ?>
+
 <!-- END OF HEADER -->
diff --git a/theme/standardblue/header.html b/theme/standardblue/header.html
index 58a7c57858..39ab1588ef 100644
--- a/theme/standardblue/header.html
+++ b/theme/standardblue/header.html
@@ -8,27 +8,45 @@
 <? include("$CFG->javascript"); ?>
 </HEAD>
 
-<BODY <? if ($focus) { echo "onLoad=setfocus()"; } ?> bgcolor="<?=$THEME->body ?>" link="#000066" vlink="#222288">
-
-<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
-<TR><TD ALIGN=LEFT VALIGN=TOP>
-<?  if ($heading) { ?>
-    <FONT FACE="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif" SIZE=4><B><?=$heading?></B></FONT>
-<?  } ?>
-</TD><TD ALIGN=RIGHT VALIGN=TOP>
-<?  if ($button) {
-        echo "$button";
-    } ?>
-</TD></TR></TABLE>
-
-<?  if ($navigation) { ?>
-    <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>
-    <TR><TD BGCOLOR="<?=$THEME->cellheading?>">
-    <FONT FACE="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif" SIZE=2><B>
-<?  print_navigation("$navigation"); ?>
-    </B></FONT></TD></TR></TABLE>
-    <IMG SRC="<?=$CFG->wwwroot?>/pix/spacer.gif" ALT="" HEIGHT=5 WIDTH=1><BR>
-<?  } else if ($heading) { ?>
-    <HR SIZE=1 NOSHADE>
-<?  } ?>
+<BODY <? if ($focus) { echo "onLoad=setfocus()"; } echo " bgcolor=\"$THEME->body\">"; ?>
+
+<? if ($home) {  // This is what gets printed on the home page only  ?>
+
+     <TABLE WIDTH=100% CELLPADDING=10 CELLSPACING=0 BORDER=0>
+       <TR>
+         <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=4><B><?=$heading?></B></FONT></TD>
+         <TD ALIGN=RIGHT VALIGN=TOP><?=$button ?></TD>
+       </TR>
+     </TABLE>
+
+
+<? } else if ($heading) {  // This is what gets printed on any other page with a heading ?>
+
+     <TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
+       <TR>
+         <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=4><B><?=$heading?></B></FONT></TD>
+         <TD ALIGN=RIGHT VALIGN=TOP><?=$button ?></TD>
+       </TR>
+     </TABLE>
+
+<? } ?>
+
+
+<? if ($navigation) { // This is the navigation table with breadcrumbs  ?>
+
+     <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>
+       <TR>
+         <TD BGCOLOR="<?=$THEME->cellheading?>">
+           <FONT SIZE=2><B><? print_navigation("$navigation"); ?></B></FONT>
+         </TD>
+       </TR>
+     </TABLE>
+     <IMG SRC="<?=$CFG->wwwroot?>/pix/spacer.gif" ALT="" HEIGHT=5 WIDTH=1><BR>
+
+<? } else if ($heading) { // If no navigation, but a heading, then print a line  ?>
+
+     <HR SIZE=1 NOSHADE>
+
+<? } ?>
+
 <!-- END OF HEADER -->
diff --git a/theme/standardgreen/header.html b/theme/standardgreen/header.html
index 58a7c57858..d566255c4c 100644
--- a/theme/standardgreen/header.html
+++ b/theme/standardgreen/header.html
@@ -4,31 +4,49 @@
 <META NAME="keywords" CONTENT="Moodle, <?=$title ?> ">
 <?=$meta ?>
 <LINK REL="stylesheet" HREF="<?=$styles ?>">
-<LINK REL="SHORTCUT ICON" HREF="<?=$CFG->wwwroot?>/theme/standardblue/favicon.ico">
+<LINK REL="SHORTCUT ICON" HREF="<?=$CFG->wwwroot?>/theme/standardgreen/favicon.ico">
 <? include("$CFG->javascript"); ?>
 </HEAD>
 
-<BODY <? if ($focus) { echo "onLoad=setfocus()"; } ?> bgcolor="<?=$THEME->body ?>" link="#000066" vlink="#222288">
-
-<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
-<TR><TD ALIGN=LEFT VALIGN=TOP>
-<?  if ($heading) { ?>
-    <FONT FACE="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif" SIZE=4><B><?=$heading?></B></FONT>
-<?  } ?>
-</TD><TD ALIGN=RIGHT VALIGN=TOP>
-<?  if ($button) {
-        echo "$button";
-    } ?>
-</TD></TR></TABLE>
-
-<?  if ($navigation) { ?>
-    <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>
-    <TR><TD BGCOLOR="<?=$THEME->cellheading?>">
-    <FONT FACE="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif" SIZE=2><B>
-<?  print_navigation("$navigation"); ?>
-    </B></FONT></TD></TR></TABLE>
-    <IMG SRC="<?=$CFG->wwwroot?>/pix/spacer.gif" ALT="" HEIGHT=5 WIDTH=1><BR>
-<?  } else if ($heading) { ?>
-    <HR SIZE=1 NOSHADE>
-<?  } ?>
+<BODY <? if ($focus) { echo "onLoad=setfocus()"; } echo " bgcolor=\"$THEME->body\">"; ?>
+
+<? if ($home) {  // This is what gets printed on the home page only  ?>
+
+     <TABLE WIDTH=100% CELLPADDING=10 CELLSPACING=0 BORDER=0>
+       <TR>
+         <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=4><B><?=$heading?></B></FONT></TD>
+         <TD ALIGN=RIGHT VALIGN=TOP><?=$button ?></TD>
+       </TR>
+     </TABLE>
+
+
+<? } else if ($heading) {  // This is what gets printed on any other page with a heading ?>
+
+     <TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
+       <TR>
+         <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=4><B><?=$heading?></B></FONT></TD>
+         <TD ALIGN=RIGHT VALIGN=TOP><?=$button ?></TD>
+       </TR>
+     </TABLE>
+
+<? } ?>
+
+
+<? if ($navigation) { // This is the navigation table with breadcrumbs  ?>
+
+     <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>
+       <TR>
+         <TD BGCOLOR="<?=$THEME->cellheading?>">
+           <FONT SIZE=2><B><? print_navigation("$navigation"); ?></B></FONT>
+         </TD>
+       </TR>
+     </TABLE>
+     <IMG SRC="<?=$CFG->wwwroot?>/pix/spacer.gif" ALT="" HEIGHT=5 WIDTH=1><BR>
+
+<? } else if ($heading) { // If no navigation, but a heading, then print a line  ?>
+
+     <HR SIZE=1 NOSHADE>
+
+<? } ?>
+
 <!-- END OF HEADER -->
diff --git a/theme/standardred/header.html b/theme/standardred/header.html
index 58a7c57858..e250dcad1a 100644
--- a/theme/standardred/header.html
+++ b/theme/standardred/header.html
@@ -4,31 +4,49 @@
 <META NAME="keywords" CONTENT="Moodle, <?=$title ?> ">
 <?=$meta ?>
 <LINK REL="stylesheet" HREF="<?=$styles ?>">
-<LINK REL="SHORTCUT ICON" HREF="<?=$CFG->wwwroot?>/theme/standardblue/favicon.ico">
+<LINK REL="SHORTCUT ICON" HREF="<?=$CFG->wwwroot?>/theme/standardred/favicon.ico">
 <? include("$CFG->javascript"); ?>
 </HEAD>
 
-<BODY <? if ($focus) { echo "onLoad=setfocus()"; } ?> bgcolor="<?=$THEME->body ?>" link="#000066" vlink="#222288">
-
-<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
-<TR><TD ALIGN=LEFT VALIGN=TOP>
-<?  if ($heading) { ?>
-    <FONT FACE="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif" SIZE=4><B><?=$heading?></B></FONT>
-<?  } ?>
-</TD><TD ALIGN=RIGHT VALIGN=TOP>
-<?  if ($button) {
-        echo "$button";
-    } ?>
-</TD></TR></TABLE>
-
-<?  if ($navigation) { ?>
-    <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>
-    <TR><TD BGCOLOR="<?=$THEME->cellheading?>">
-    <FONT FACE="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif" SIZE=2><B>
-<?  print_navigation("$navigation"); ?>
-    </B></FONT></TD></TR></TABLE>
-    <IMG SRC="<?=$CFG->wwwroot?>/pix/spacer.gif" ALT="" HEIGHT=5 WIDTH=1><BR>
-<?  } else if ($heading) { ?>
-    <HR SIZE=1 NOSHADE>
-<?  } ?>
+<BODY <? if ($focus) { echo "onLoad=setfocus()"; } echo " bgcolor=\"$THEME->body\">"; ?>
+
+<? if ($home) {  // This is what gets printed on the home page only  ?>
+
+     <TABLE WIDTH=100% CELLPADDING=10 CELLSPACING=0 BORDER=0>
+       <TR>
+         <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=4><B><?=$heading?></B></FONT></TD>
+         <TD ALIGN=RIGHT VALIGN=TOP><?=$button ?></TD>
+       </TR>
+     </TABLE>
+
+
+<? } else if ($heading) {  // This is what gets printed on any other page with a heading ?>
+
+     <TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
+       <TR>
+         <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=4><B><?=$heading?></B></FONT></TD>
+         <TD ALIGN=RIGHT VALIGN=TOP><?=$button ?></TD>
+       </TR>
+     </TABLE>
+
+<? } ?>
+
+
+<? if ($navigation) { // This is the navigation table with breadcrumbs  ?>
+
+     <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>
+       <TR>
+         <TD BGCOLOR="<?=$THEME->cellheading?>">
+           <FONT SIZE=2><B><? print_navigation("$navigation"); ?></B></FONT>
+         </TD>
+       </TR>
+     </TABLE>
+     <IMG SRC="<?=$CFG->wwwroot?>/pix/spacer.gif" ALT="" HEIGHT=5 WIDTH=1><BR>
+
+<? } else if ($heading) { // If no navigation, but a heading, then print a line  ?>
+
+     <HR SIZE=1 NOSHADE>
+
+<? } ?>
+
 <!-- END OF HEADER -->