Footer modification

Footer modification

by James Brown -
Number of replies: 3

Hi Moodlers,

I have downloaded and installed a theme which has been working fine but I want to modify a bit of the footer.

Shown below are the relevant portions of the html source (using view source from the browser) when moodle is opened,

----

<div id="footer">

</p><div class="mylink">
<a href="http://www.MoodleTemplates.com">
Moodle Template
</a>
<a href="http://www.LearnNewSkills.com">New Skills International</a>
</div><div class="sitelink"><a title="Moodle" href="http://moodle.org/"><img style="width:100px;height:30px" src="pix/moodlelogo.gif" alt="moodlelogo" /></a></div><div class="logininfo">You are not logged in. (<a  href="http://www.emaths.school.nz/enter/login/index.php">Login</a>)</div><!-- <p><div class="homelink"><a  href="/course/view.php?id=">  </a></div></p> -->
<p>
<!-- <<a href="http://validator.w3.org/check?verbose=1&amp;ss=1&amp;uri=http%3A%2F%2Fwww.emaths.school.nz%2Fenter%2F"><img src="http://www.emaths.school.nz/enter/theme/vertical_blend/xhtml_1_0.gif" alt="XHTML Validator" /></a>
<a href="http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.emaths.school.nz%2Fenter%2F&amp;warning=1&amp;profile=css2&amp;usermedium=all"><img src="http://www.emaths.school.nz/enter/theme/vertical_blend/css.gif" alt="CSS Validator" /></a>
<a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&amp;url1=http%3A%2F%2Fwww.emaths.school.nz%2Fenter%2F"><img src="http://www.emaths.school.nz/enter/theme/vertical_blend/section_508.gif" alt="Section 508 Validator" /></a> -->
</p>
</div>
</div>
</body>
</html>

----

Shown below is the complete source of "footer.html" under that theme

----

</div> <!-- end div containerContent -->
<!-- START OF FOOTER -->
<?php global $CFG, $COURSE; ?>
<div id="footer">
<?php
if (function_exists('page_doc_link')) {
echo '<p class="helplink">';
echo page_doc_link(get_string('moodledocslink'));
echo '</p>';
if ($home) {echo $GLOBALS['THEME']->footers; }

if($home) {
echo $homelink;
}
echo $loggedinas;


?>
<!-- <p><div class="homelink"><a <?php echo $CFG->frametarget ?> href="<?php $CFG->wwwroot ?>/course/view.php?id=<?php $COURSE->id ?>"> <?php $COURSE->shortname ?> </a></div></p> -->
<p>
<!-- <<a href="http://validator.w3.org/check?verbose=1&amp;ss=1&amp;uri=<?php echo urlencode(qualified_me()) ?>"><img src="<?php echo "$CFG->themewww/$CFG->theme" ?>/xhtml_1_0.gif" alt="XHTML Validator" /></a>
<a href="http://jigsaw.w3.org/css-validator/validator?uri=<?php echo urlencode(qualified_me()) ?>&amp;warning=1&amp;profile=css2&amp;usermedium=all"><img src="<?php echo "$CFG->themewww/$CFG->theme" ?>/css.gif" alt="CSS Validator" /></a>
<a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&amp;url1=<?php echo urlencode(qualified_me()) ?>"><img src="<?php echo "$CFG->themewww/$CFG->theme" ?>/section_508.gif" alt="Section 508 Validator" /></a> -->
</p>
</div>
</div>
</body>
</html>

----

Basically I am keen to take away the following

----

<a href="http://www.MoodleTemplates.com">
Moodle Template
</a>
<a href="http://www.LearnNewSkills.com">New Skiils International</a>

----

or modify them into my own links.  Any help would be highly appreciated.

Cheers
James

Average of ratings: -
In reply to James Brown

Re: Footer modification

by andy101 andy101 -

Im looking for an answer as well.

How to edit or delele Moodle logo in 2.02?

There is no footer.html as compared to 1.9 version

Anyone can advise?

In reply to andy101 andy101

Re: Footer modification

by Diane Villemure -

These are the steps I used in Moodle 2.0.2 to subsitute Moodle's logo and sitelink to http://moodle.org to that of my logo and home site.

Step 1

Rename your site logo to moodlelogo.gif and upload it to the moodle/pix folder. This is will rewrite the original moodlelogo.gif with your own logo image.

Step 2

Modify lines 501 & 502 of moodle/lib/outputrenderers.php from:

'<a title="Moodle" href="http://moodle.org/">' .
'<img style="width:100px;height:30px" src="' . $this->pix_url('moodlelogo') . '" alt="moodlelogo" /></a></div>';

TO

'<a title="Your Site Name" href="http://yoursiteurl/">' .
'<img style="width:100px;height:30px" src="' . $this->pix_url('moodlelogo') . '" alt="Your site logo" /></a></div>';

Note that "width:100px;height:30px" was the size of the original moodlelogo.gif. You will need to specify the exact width and height of the new moodlelogo.gif that corresponds to your site's logo image.

If you want the sitelink to open in a new browser, than line 501 becomes:

'<a title="Your Site Name" href="http://yoursiteurl/" Xonclick="this.target=\'_blank\'">' .

**PLEASE NOTE**   You wil have to redo these steps everytime you upgrade.

In reply to Diane Villemure

Re: Footer modification

by Diane Villemure -

I tried to delete the X in front of onclick but when I submit it, the X reappears in front of "onclick". This must be some precautionary measure. Do not put X in front of onclick.