Fixed the logo, and now logo.gif or logo.jpg can be used

This commit is contained in:
moodler
2005-05-13 13:48:12 +00:00
parent 6775b3b791
commit c38fd30fb4
4 changed files with 16 additions and 8 deletions
+2 -2
View File
@@ -3,11 +3,11 @@
<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),
<li>upload a file called logo.jpg or logo.gif 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>
<li>put a file called logo.jpg or logo.gif in the main Moodle directory (using FTP, for example).</li>
</ol>
+14 -6
View File
@@ -18,16 +18,24 @@
<div id="page">
<?php if ($home) { // This is what gets printed on the home page only
if (file_exists("$CFG->dirroot/logo.jpg")) {
$standardlogo = "$CFG->wwwroot/logo.jpg";
} else if (file_exists("$CFG->dataroot/1/logo.jpg")) {
if (file_exists($CFG->dirroot.'/logo.jpg')) {
$standardlogo = $CFG->wwwroot.'/logo.jpg';
} else if (file_exists($CFG->dirroot.'/logo.gif')) {
$standardlogo = $CFG->wwwroot.'/logo.gif';
} else if (file_exists($CFG->dataroot.'/1/logo.jpg')) {
if (empty($CFG->slasharguments)) {
$standardlogo = "$CFG->wwwroot/file.php?file=/1/logo.jpg";
$standardlogo = $CFG->wwwroot.'/file.php?file=/1/logo.jpg';
} else {
$standardlogo = "$CFG->wwwroot/file.php/1/logo.jpg";
$standardlogo = $CFG->wwwroot.'/file.php/1/logo.jpg';
}
} else if (file_exists($CFG->dataroot.'/1/logo.gif')) {
if (empty($CFG->slasharguments)) {
$standardlogo = $CFG->wwwroot.'/file.php?file=/1/logo.gif';
} else {
$standardlogo = $CFG->wwwroot.'/file.php/1/logo.gif';
}
} else {
$standardlogo = "$CFG->wwwroot/theme/$CFG->theme/logo.jpg";
$standardlogo = $CFG->wwwroot.'/theme/'.$CFG->theme.'/logo.gif';
}
?>
<div id="header-home">
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB