Help (please!) in finding where formatting of page elements is controlled...

Help (please!) in finding where formatting of page elements is controlled...

by Ian Usher -
Number of replies: 4

[I tried this in 'themes' but to no avail, so let's try again wink]

I am nearly ready to unleash my fairly customised Moodle on the world (well, half a dozen people anyway) but am struggling to accurately control some of the formatting of elements on the pages. Specifically I would like to know where (i.e. within which files) the HTML which accompanies the following elements is controlled:

  • the login / logout / Jump to section which appears at the head of the page
  • the Moodlelogo.gif section at the foot of a standard install

the first one in particular seems inconsistent - just try logging out, in and then out again of moodle.org and see the change in text sizes (happens for me in IE6 and Firefox 0.93)

Any help appreciated - I know formatting isn't everything but having it fairly locked down would help divert some of the criticism about style which I know is gonna come!

Average of ratings: -
In reply to Ian Usher

Re: Help (please!) in finding where formatting of page elements is controlled...

by David Scotson -
Have you looked at header.html and footer.html within the relevant theme directory? I think that's what you are looking for.

And note that these aren't simple HTML files, they have PHP in them which decides what gets displayed in which situations, e.g. the front page of some themes has a larger logo than 'inside' the courses.
In reply to David Scotson

Re: Help (please!) in finding where formatting of page elements is controlled...

by Ian Usher -

Yep!, have spent much time looking there and also looked in various files like weblip.php and changed little things in there, for example footer.html contains:

which comes out in the delivered HTML page as:

<p align="center"><a title="moodle 1.3.3 (2004052503)" href="http://moodle.org/" target="_blank"><br><img src="pix/moodlelogo.gif" border="0" height="30" width="100"></a></p>

similarly, in header.html there's:

<?php echo $menu ?>

which produces the Login / Logout / Course Navigation stuff which appears in the header. Using contextual CSS doesn't help, since <font> tags keep appearing and that scuppers the CSS...

In reply to Ian Usher

Re: Help (please!) in finding where formatting of page elements is controlled...

by David Scotson -

Maybe you need to be more specific in what you want to do:

For example, you want to change the Moodle logo in some way rather than just delete/replace it with something else?

The login link is specified as a font size larger than logout in the PHP with a font tag. I'm guessing that size difference might be intentional but if you really want to change it I think you might be able to overrule font tags by wrap it in a span or div with a class rule and doing something like:

.kludge font { styles go here}

where the styles will apply to any font tag within an element called kludge.

But if you really want to modify Moodle itself and move away from the mainstream of development (which I wouldn't recommend in any but the most pressing of situations) then I think you'll find the login text, including the font tags, in "index.php".

In reply to David Scotson

Re: Help (please!) in finding where formatting of page elements is controlled...

by N Hansen -
Ian seems to have figured out whatever it was he wanted to do, but I'm having a similar specific problem. I've created a new Moodle logo for my footer that is of a different size than the standard one. I want to change the height and width tags that accompany it. How do I do this? Thanks in advance.