Adding a logo to the home page footer

Adding a logo to the home page footer

Peter Ruthven-Stuart -
回帖数:4
Plugin developers的头像
How can I add a logo to the footer so it only appears on the home page?

My moodle site is here:
http://moodle.petesweb.org/

I used the 'standard white' theme as a template, and have changed the footer.html file to read as follows:

<!-- START OF FOOTER -->
<center>
<hr size="1" noshade="noshade" />
<p class="logininfo"><?php echo $loggedinas ?></p>
<p class="homelink"><?php echo $homelink ?></p>
<a href="http://www.fun.ac.jp/" target="_blank"><img src='<?php echo "$CFG->wwwroot/theme/$CFG->theme/FUN-logo.jpg" ?>' alt="FUN logo" height="56" width="250" border="0"></a>
</body>
</html>

With this code, my university logo appears at the bottom of every page. I only want it to appear at the bottom of the top page in the same was as the moodle logo. Any ideas? Your help will be much appreciated.

By the way, I'm not a programmer, but am willing to experiment; i.e. cut and paste.
回复Peter Ruthven-Stuart

Re: Adding a logo to the footer

Martin Dougiamas -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像
Add this:

<?php  if ($course == 'home') {  ?>
          <img src="blah.jpg">
<?php  }  ?>
回复Martin Dougiamas

Re: Adding a logo to the footer

Peter Ruthven-Stuart -
Plugin developers的头像
Martin, thanks for that. However, now my logo does not even appear on the home page.

This is what the 'footer.html' now looks like:

<!-- START OF FOOTER -->
<center>
<hr size="1" noshade="noshade" />
<p class="logininfo"><?php echo $loggedinas ?></p>
<p class="homelink"><?php echo $homelink ?></p>
<?php if ($course == 'home') { ?>
<img src='" alt="FUN logo" height="56" width="250" border="0">
<?php } ?>
</body>
</html>

I have a feeling that I should be changing the word 'home' in
($course == 'home')
to something else? I've tried various alternatives, but with no luck. blush
回复Peter Ruthven-Stuart

Re: Adding a logo to the footer

Martin Dougiamas -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像
Sorry, my mistake (should have checked the code!)   Use this instead:

<?php  if (!empty($homepage)) {  ?>
          <img src="blah.jpg">
<?php  }  ?>