]> git.mjollnir.org Git - moodle.git/commitdiff
Improved Standard Logo theme now actually uses the standard logo. ;-)
authormoodler <moodler>
Sat, 22 May 2004 08:53:22 +0000 (08:53 +0000)
committermoodler <moodler>
Sat, 22 May 2004 08:53:22 +0000 (08:53 +0000)
Replacing the logo is as easy as dropping a logo.jpg in the Moodle
home directory OR in the site files

theme/standardlogo/README.html [new file with mode: 0644]
theme/standardlogo/header.html
theme/standardlogo/logo.jpg

diff --git a/theme/standardlogo/README.html b/theme/standardlogo/README.html
new file mode 100644 (file)
index 0000000..1431b76
--- /dev/null
@@ -0,0 +1,13 @@
+<H2>Standard Logo Theme</h2>
+
+<p>To add your own homepage logo to this theme, you can simply:</p>
+
+<ol>
+<li>upload a file called logo.jpg in your Site Files (look on the home page),
+
+    <p>OR</p></li>
+
+<li>put a file called logo.jpg in the main Moodle directory (using FTP, for example).</li>
+
+</ol>
+
index 5d5ada73925d8a966b8af1bc1fcdda080ce83423..8dbe42201925ec24f21e2b1b488808406848c2cf 100644 (file)
 
 <?php if ($home) {  // This is what gets printed on the home page only  ?>
 
-  <table width="100%" cellpadding="10" cellspacing="0" border="0" class="headerhome">
+<?php if (file_exists("$CFG->dirroot/logo.jpg")) {
+          $standardlogo = "$CFG->wwwroot/logo.jpg";
+      } else if (file_exists("$CFG->dataroot/1/logo.jpg")) {
+          if (empty($CFG->slasharguments)) {
+              $standardlogo = "$CFG->wwwroot/file.php?file=/1/logo.jpg";
+          } else {
+              $standardlogo = "$CFG->wwwroot/file.php/1/logo.jpg";
+          }
+      } else {
+          $standardlogo = "$CFG->wwwroot/theme/$CFG->theme/logo.jpg";
+      }
+?>
+
+  <table width="100%" cellpadding="0" cellspacing="0" border="0" class="headerhome">
     <tr>
       <td valign="top" class="headerhomemain"><img 
-          border="0" src="<?php echo "$CFG->wwwroot/theme/$CFG->theme/logo.jpg" ?>"></td>
+          border="0" src="<?php echo $standardlogo ?>"></td>
       <td align="right" valign="top" class="headerhomemenu"><?php echo $menu ?></td>
     </tr>
   </table>
index d3eae131a8292e1163a2898f790eda8c6951bf7f..78dfa9f520b3183dd59d224e324fe40825160da9 100755 (executable)
Binary files a/theme/standardlogo/logo.jpg and b/theme/standardlogo/logo.jpg differ