Moodle 2.0 - Footer Customisation

Moodle 2.0 - Footer Customisation

by Manish Verma -
Number of replies: 27

Hi,

While there is an option to customise footer from specific theme setting area, it appears to be limited to footnote on the right side bottom. Earlier some modifications could be done by editing lib/moodlelib.php if I remember correctly (moodle 1.9.x and earlier) but there appear to be some modifications in that file. How can a full footer customisation be done, say for "Splash" theme as an example. I have not yet come across separate files for header and footer.

Manish.

(Edited by Mary Evans - original submission Thursday, 23 September 2010, 09:46 AM)

Average of ratings: -
In reply to Manish Verma

Re: Footer Customisation - Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Manish,

There aren't any header.html and footer.html files in Moodle 2.0, everything is combined into one php layout file. If you look in Base theme's layout folder you will see frontpage.php, general.php and embedded.php, these in turn are listed in Base theme's config,php, much the same as they are listed in the config.php for the Splash theme created for Moodle 2.0.

To make changes to the footer then, you do this in the layout files.

I hope this answer's your question?

Mary
In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

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

I want to replace the moodle footer logo and  link

Anyone can advise?

In reply to andy101 andy101

Re: Footer Customisation - Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Andy,

Header and Footer have been replaced by a group of layout pages which you will find in your theme's layout directory.

Before making any changes to your theme you need to enable Theme Designer Mode in Settings > Site Administration > Appearance >Themes > Theme settings > Theme Designer Mode (put tick in check box) and then save settings and go back to Home page and refresh the browser.

To stop the Logo from displaying in the footer of the page look in the layout folder of your theme and find frontpage.php and general.php and make the following changes to both...delete or comment out the highlighted line.

<!-- START OF FOOTER -->
<?php if ($hasfooter) { ?>
<div id="page-footer" class="clearfix">
<p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
<?php
echo $OUTPUT->login_info();
// echo $OUTPUT->home_link();
echo $OUTPUT->standard_footer_html();
?>
</div>
<?php } ?>
</div>

The // are comment symbols used in PHP so adding these infront of the lin of cod stops them from being written onto the page.

HTH

Mary

 

Average of ratings: Useful (4)
In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by andy101 andy101 -

Thank you, Mary Evans.

Had managed to do that earlier after figuring out the whole day.

If only I had post earlier, then would not have spent so much time on this.

Anyway your reply would be very helpful to many newbies like me

Cheers

 

 

 

In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by Robert McLaughlin -

Hi Mary

Great that was driving me mad!!
can you tell me how to now remove the Docs for this page link? I know it is something in this line
<p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
<?php

Regards

Rab

In reply to Robert McLaughlin

Re: Footer Customisation - Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

In Moodle 2.0 you should have the following line of code...

<?php
echo $OUTPUT->login_info();
echo $OUTPUT->home_link(); <<< This is the line you need to delete
echo $OUTPUT->standard_footer_html();
?>

HTH

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by Anish Kanojia -

Hey Mary...

That was a great help. Could u tellme how to add copyright/licence info and my logo in the footer.. thanx in advance.

In reply to Anish Kanojia

Re: Footer Customisation - Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

This all depends on which theme you are using, but generally you can add something like this...

Example: using frontpage.php as an example footer...

<div id="page-footer">

<p class="copyright" style="text-align:center;">Copyright &copy; XYZ Company 2011 - All Rights Reserved</p>

        <p class="helplink">
        <?php echo page_doc_link(get_string('moodledocslink')) ?>
        </p>

        <?php
        echo $OUTPUT->login_info();
        echo $OUTPUT->home_link();
        echo $OUTPUT->standard_footer_html();
        ?>
    </div>
</div>
<?php echo $OUTPUT->standard_end_of_body_html() ?>
</body>
</html>

HTH

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by Anish Kanojia -

thnx for the reply Mary ...i use the splash theme ..and your eg worked for me  , what about the logo ..how and where to modify the code for it ?

In reply to Anish Kanojia

Re: Footer Customisation - Moodle 2.0

by Big Faced Boy -

Yes indeed, how would you go about changing the logo/link to your own? This was easily done in previous versions but I can't work it out at all in moodle 2 and I've seen lots of people asking about it but none of the replies I've read have helped me much.

In reply to Big Faced Boy

Re: Footer Customisation - Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

First delete the line highlighted below...

<?php echo $OUTPUT->login_info();
echo $OUTPUT->home_link();
echo $OUTPUT->standard_footer_html();
?>

Then add this line...

<?php echo $OUTPUT->login_info(); ?>
<a href="url of site to link to" title="Title of link" ><img src="path to logo image"  alt=" Logo" /></a>
<?php echo $OUTPUT->standard_footer_html(); ?>

HTH

Mary

In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by Steve Anderson -

Hello Mary,

After following the above instructions I'm getting an error. Here's the code:

<?php echo $OUTPUT->login_info();
<a href="http://www.hmhetraining.com/moodle/" title="CClogo_HorizNoTag" >
<img src="http://www.hmhetraining.com/moodle/theme/overlay/pix/CClogo_HorizNoTag.png" alt=" Logo" /></a>
echo $OUTPUT->standard_footer_html(); ?>

Can you see anything out of place that would cause an error? 

Thanks in advance for any insight you can provide.

Steve

In reply to Steve Anderson

Re: Footer Customisation - Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

<?php echo $OUTPUT->login_info(); ?>
<a href="http://www.hmhetraining.com/moodle/" title="CClogo_HorizNoTag" >
<img src="<?php echo $OUTPUT->pix_url('CClogo_HorizNoTag','theme') ?>" alt=" Logo" /></a>
<?php echo $OUTPUT->standard_footer_html(); ?>

In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by Steve Anderson -

It works beautifully!

Thank you very much. It is sincerely appreciated.

In reply to Steve Anderson

Re: Footer Customisation - Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by Jonathan Herrera -

Hi

I try to quit the logo, in this moment in my moodle version 2.0 i have the standart theme but this dont have layout folder.

where can find or how to delete the moodle logo

 

best regards

In reply to Jonathan Herrera

Re: Footer Customisation - Moodle 2.0

by Miriam Laidlaw -
Picture of Plugin developers

Hello Jonathan,

If you mean the Moodle logo at the bottom, you will need to edit the CSS files of the theme you are working with and add/alter:

#page-footer .sitelink {
    display: none;
}

However, be careful if you are changing a core Moodle theme such as Standard. If you update your Moodle site, this will be overwritten. If you are making changes to a core theme, you are better off copying it, following the instructions here very carefully:

http://docs.moodle.org/dev/Themes_2.0_how_to_clone_a_Moodle_2.0_theme

Then working on changing only your copy.

In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by Muddasar Amin -

Hi, my logo in the footer is not shown (i.e. a "x" and 'alt' info is shown and link is working), this is my code. Could you please tell me what's wrong with it?

<img src="<?php echo $OUTPUT->pix_url('kdtech','theme') ?>"  alt="KD Tech" />

 

kdtech.png is image file name

In reply to Muddasar Amin

Re: Footer Customisation - Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

It should work if your image is in the following directory

yourmoodlesite/theme/yourthemename/pix/kdtech.png

you may also need to Purge all cache or enable Theme Designer Mode

Hope this helps?

Mary

In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by Muddasar Amin -

Hi Mary, it's working but keeping my image at yourmoodlesite/theme/yourthemename/kdtech.png . . .
btw thanks a lot 
May Allah bless you smile

In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by moaid hawadi -

I apreciate that 

I was search about how to do that 

so thank you so much 

In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by Albert Leatherman -

Hi Mary, I tried this with Evolve-D them and it almost worked, but the link is mymoodledomain.com/login/"http://www.thelinkIwanttouse.com", rather than just http://www.thelinkIwanttouse.com. Can you help? Below is the code I'm using. I just replaced moodlelogo.png with my own image. The new pic appears but the link is bad. Thanks.


<div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>

        <p class="helplink"><?php echo $OUTPUT->page_doc_link(); ?></p>

     <?php

        echo $html->footnote;

        echo $OUTPUT->login_info(); ?>

        <a href="http://www.thelinkIwanttouse.com" title=“The Link I Want to Use” ><img src="/pix/moodlelogo.png"  alt=" Logo" /></a>

        <?echo $OUTPUT->standard_footer_html();

        ?>

    </footer>


    <?php echo $OUTPUT->standard_end_of_body_html() ?>

In reply to Albert Leatherman

Re: Footer Customisation - Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

You cannot use a link written like you are trying to add with the login URL, because login is the main page that adds all the login form, and assumes you are logging on.

If your site uses a different page as a login area, then you have to set that up in the. admin settings specifically for that purpose.

After this all the Login links go direct to the address you specify in that Admin setting.

Do a Google search for "Alternative login page Moodle docs"

In reply to Albert Leatherman

Re: Footer Customisation - Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

 Ignore my last comment I got it wrong...see this as it may be a better fix since your PHP code was wrong...that's probably why the link was all wrong too.

You missed the php off this line...

 <?php echo $OUTPUT->standard_footer_html(); ?>

 

That should fix it!

Mary

In reply to Mary Evans

Re: Footer Customisation - Moodle 2.0

by Albert Leatherman -

Thanks a lot for noticing that. Your solution worked! So nice to have so much help on here.

In reply to Manish Verma

Re: Moodle 2.0 - Footer Customisation

by Raymon Akbar -
Picture of Testers

Dear All,

I've found the issue for this theme 'Splash' in IE browser, I don't know about this issue why only in this browser. On the bottom of footer, It will be show the background of page. Can you tell me about this issue? I tried to change value in .course and .dir-ltr classes, then the issue was disappear.

.course {
    /* padding-bottom:25px; */
    padding-bottom:0px
}

.dir-ltr,.mdl-left,.dir-rtl .mdl-right{
   /* margin-bottom:10px; */
    margin-bottom:0px;
    text-align:left;
}

I wonder, Can I change the code and It doesn't make another issue?

many thanks,
Raymon