Footer replacement: Difference between revisions
No edit summary |
Frank Ralf (talk | contribs) No edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
This is an example of how to change the footer for a Moodle site. It is a draft. | |||
The goal is to replace the Mooldle logo and web address with your own address. | |||
I started by using the StandardGreen theme. I copied the /theme/standardgreen folder and renamed the folder Anisa_1. I then went to the theme/anisa_1 folder. | |||
Open the footer.html file. | Open the '''footer.html''' file. | ||
Replace this line | Replace this line | ||
<code php> | |||
<?php echo $home ?> | <?php echo $home ?> | ||
</code> | |||
with your web address, like so... | with your web address, like so... | ||
<code php> | |||
<?php echo "www.fundacionanisa.org" ?> | <?php echo "www.fundacionanisa.org" ?> | ||
</code> | |||
Save the file and check it with your browser. | Save the file and check it with your browser. | ||
Line 21: | Line 25: | ||
Well, after a Google and a visit to a How-To on basic HTML i see that this will give us an underlined web address | Well, after a Google and a visit to a How-To on basic HTML i see that this will give us an underlined web address | ||
<a href="http://www.fundacionanisa.org/">Fundación Anisa, A.C.</a> | <nowiki><a href="http://www.fundacionanisa.org/">Fundación Anisa, A.C.</a></nowiki> | ||
Now, if i can just figure out how to get my icon/image in this position and use it as a link, just like the Moodle icon was... | Now, if i can just figure out how to get my icon/image in this position and use it as a link, just like the Moodle icon was... | ||
Line 27: | Line 31: | ||
After some more experimentation, i got this to work... | After some more experimentation, i got this to work... | ||
<code php> | |||
<?php echo $loggedinas ?> | <?php echo $loggedinas ?> | ||
<a href="http://www.fundacionanisa.org/"><img src=http: | <a href="http://www.fundacionanisa.org/"><img src="http://www.fundacionanisa.org/moodle_anisa/file.php/1/anisa_logo_small.jpg"></a> | ||
</code> | |||
which | '''Note''': the ''anisa_logo_small.jpg'' was placed in the Front Page site file folder (which is always "1"). | ||
Now I have a "small" logo at the bottom and has a link to the web page as well. Yippee! | |||
The text must be a little different for 1.9.3. | |||
Replace | |||
<code php>echo $homelink;</code> | |||
with | |||
<code php> | |||
echo '<a href="http://www.fundacionanisa.org/"><img src="http://www.fundacionanisa.org/moodle_anisa/file.php/1/anisa_logo_small.jpg"></a>'; | |||
</code> | |||
Once the footer.html and/or header.html looks good, you are ready to select the new theme via the site administration block>appearances>themes>themes selector. Find your new theme and select it. | |||
==See also== | |||
[[Theme basics]] |
Latest revision as of 18:04, 12 May 2010
This is an example of how to change the footer for a Moodle site. It is a draft.
The goal is to replace the Mooldle logo and web address with your own address.
I started by using the StandardGreen theme. I copied the /theme/standardgreen folder and renamed the folder Anisa_1. I then went to the theme/anisa_1 folder.
Open the footer.html file.
Replace this line
<?php echo $home ?>
with your web address, like so...
<?php echo "www.fundacionanisa.org" ?>
Save the file and check it with your browser.
Perhaps someone more familiar with how this thing works could add the code so that the address shows up as a regular web link.
Well, after a Google and a visit to a How-To on basic HTML i see that this will give us an underlined web address
<a href="http://www.fundacionanisa.org/">Fundación Anisa, A.C.</a>
Now, if i can just figure out how to get my icon/image in this position and use it as a link, just like the Moodle icon was...
After some more experimentation, i got this to work...
<?php echo $loggedinas ?>
<a href="http://www.fundacionanisa.org/"><img src="http://www.fundacionanisa.org/moodle_anisa/file.php/1/anisa_logo_small.jpg"></a>
Note: the anisa_logo_small.jpg was placed in the Front Page site file folder (which is always "1").
Now I have a "small" logo at the bottom and has a link to the web page as well. Yippee!
The text must be a little different for 1.9.3.
Replace
echo $homelink;
with
echo '<a href="http://www.fundacionanisa.org/"><img src="http://www.fundacionanisa.org/moodle_anisa/file.php/1/anisa_logo_small.jpg"></a>';
Once the footer.html and/or header.html looks good, you are ready to select the new theme via the site administration block>appearances>themes>themes selector. Find your new theme and select it.