creating image based themes

creating image based themes

door David Barnett -
Aantal antwoorden: 8
What would be the best way to go about creating image based themes as opposed to just the standard colour options. I like the look of the color options but am curious about how it could be best done with images.

For example adding generic 'course banners' in the header, and graphical navigation areas to replace the existing text ones in the body of the page. (people, activities, etc.)

does anybody have any suggestions?

cheers,
Dave


Gemiddelde van de beoordelingen:  -
Als antwoord op David Barnett

Re: creating image based themes

door Martin Dougiamas -
Foto van Core developers Foto van Documentation writers Foto van Moodle HQ Foto van Particularly helpful Moodlers Foto van Plugin developers Foto van Testers
Header graphics would be relatively easy, just edit the header.html file and work it in around the PHP code. I know it's not as tidy in there as it could be ... the same header file controls the top of ALL moodle pages so there is some logic involved. Suggestions for making it easier welcomed. Still, shouldn't be too hard.

As for graphical navigation, er, no. You might be able to go some way towards a prettier look using the style sheet (eg graphical backgrounds on tables) but there's not very fine-grained control yet. Eventually there will be, though: http://bugs.moodle.com/bug.php?op=show&bugid=25

Actual graphical buttons are right out, unless you want to do some major hacking. Much more trouble than they're worth.

Cheers!
Martin
Gemiddelde van de beoordelingen:  -
Als antwoord op David Barnett

Re: creating image based themes

door Alan Chambers -

To create a background image for your Moodle website

In the file /themes/standard/header.html replace the body tag code (approx. line 11) with

<BODY <? if ($focus) { echo "setfocus()"; } echo " background=\"$THEME->background\" bgProperties=fixed>"; ?>

This gives a fixed background when the page is scrolled, which seems better than a normal background.

In the file /themes/standard/config.php add a variable

$THEME->background = "image.gif"; // Main page background image

All that remains to be done is to add the image.gif file to each of the directories/folders throughout Moodle.

Gemiddelde van de beoordelingen:  -
Als antwoord op Alan Chambers

Re: creating image based themes

door Martin Dougiamas -
Foto van Core developers Foto van Documentation writers Foto van Moodle HQ Foto van Particularly helpful Moodlers Foto van Plugin developers Foto van Testers
Thanks for posting, but that's not the best way to do it!

No need to put image.gif in every folder, and no need to create a new THEME variable!

Just put the image in your theme folder, then alter header.html as follows:

<BODY <? if ($focus) {echo "setfocus()"; } echo " background="$CFG->wwwroot/theme/mytheme/background.gif" bgProperties=fixed>"; ?>
Also, I'd recommend not altering the standard theme, but copying the "standard" directory to a new directory with your own name (eg mytheme), then editing that.

This will all be even easier in 1.0.7 when full CSS support is added.

Cheers,
Martin
Gemiddelde van de beoordelingen:  -
Als antwoord op Martin Dougiamas

designer logo for moodle

door Michael Henley -

Martin,

I am one of Alan Chambers IT VET students and I have designed a logo for your moodle site as a contribution to your efforts. We students at Duval are making good use of your impressive software.

 

Bijlage moodle_header.png
Gemiddelde van de beoordelingen:  -
Als antwoord op Michael Henley

Re: designer logo for moodle

door Martin Dougiamas -
Foto van Core developers Foto van Documentation writers Foto van Moodle HQ Foto van Particularly helpful Moodlers Foto van Plugin developers Foto van Testers
Many thanks, Michael. I'll put it on the front page for a day or so.

If you feel like making some more stuff, what might be good is a cool matching set of little icons (forums, resources etc). glimlach
Gemiddelde van de beoordelingen:  -
Als antwoord op Martin Dougiamas

Re: designer logo for moodle

door Fabio Serenelli -

...and what about using other openspurce CMS icons? like phpnuke or postnuke icons?

there a lot of free images in their communities... a lot of nice stuff and very well done!

Eh?! faBIO

Gemiddelde van de beoordelingen:  -
Als antwoord op Martin Dougiamas

Re: creating image based themes

door Charil Ferrell -

Martin,

After looking around to find the best way use the same settings in standardred with the exception in that I desire to put in my own background (bckgrnd7.jpg) I found this post, and so I thought I would give your suggestion a try. 

<BODY <? if ($focus) {echo "setfocus()"; } echo " background="$CFG->wwwroot/theme/mytheme/bckgrnd7.GIF" bgProperties=fixed>"; ?>

This is the result: 

Parse error: parse error, expecting `','' or `';'' in /home/lwbinet/public_html/moodle1/theme/mytheme/header.html on line 11.

I tried the change in format from .JPG to .GIF.  with the same result.  Any help would be appreciated.

Thank you in advance for any advise/suggestions.

Kaujoi

Gemiddelde van de beoordelingen:  -
Als antwoord op Charil Ferrell

Re: creating image based themes

door Lawrence Khoo -
That code has a couple of bugs in it, try using this one instead.

<body<?php
if ($focus) { echo " onload = setfocus()"; }
echo " background=\"$CFG->wwwroot/theme/$CFG->theme/top.jpg\" >" ;
?>


Gemiddelde van de beoordelingen:  -