creating image based themes

creating image based themes

بذریعہ David Barnett -
جوابات کی تعداد: 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


درجہ بندی کا اوسط: -
David Barnett کے جواب میں

Re: creating image based themes

بذریعہ Martin Dougiamas -
Core developers کی تصویر Documentation writers کی تصویر Moodle HQ کی تصویر Particularly helpful Moodlers کی تصویر Plugin developers کی تصویر 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
David Barnett کے جواب میں

Re: creating image based themes

بذریعہ 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.

Alan Chambers کے جواب میں

Re: creating image based themes

بذریعہ Martin Dougiamas -
Core developers کی تصویر Documentation writers کی تصویر Moodle HQ کی تصویر Particularly helpful Moodlers کی تصویر Plugin developers کی تصویر 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
Martin Dougiamas کے جواب میں

designer logo for moodle

بذریعہ 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.

 

منسلکہ moodle_header.png
Michael Henley کے جواب میں

Re: designer logo for moodle

بذریعہ Martin Dougiamas -
Core developers کی تصویر Documentation writers کی تصویر Moodle HQ کی تصویر Particularly helpful Moodlers کی تصویر Plugin developers کی تصویر 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). مسکراہٹ
Martin Dougiamas کے جواب میں

Re: designer logo for moodle

بذریعہ 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

Martin Dougiamas کے جواب میں

Re: creating image based themes

بذریعہ 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

Charil Ferrell کے جواب میں

Re: creating image based themes

بذریعہ 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\" >" ;
?>