Problems with custom theme

Problems with custom theme

by Kathrin Bonfigt -
Number of replies: 8
Hi everyone,

its embarrassing but i just dont get it (maybe i should get some sleep)..

I m trying to create my own theme, so i did everything like its said in moodle docs: create a custom theme

i copied the standardwhite themefolder, deleted the gradient.css and jpg and created a new .css file. I changed the config to $THEME->sheets = array('gradients');

but when i choose the theme in moodle, it still looks like standard white and firebug says there s no styles than standard..

what did i miss?!

best regards
kathrin
Average of ratings: -
In reply to Kathrin Bonfigt

Re: Problems with custom theme

by Frank Ralf -
Hi Kathrin,

Did you rename your theme?

You might also have a look at Themes FAQ for further hints.

hth
Frank
In reply to Kathrin Bonfigt

Re: Problems with custom theme

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

Your problems can have occurred at various stages of your customisation.

I am assuming that you made a coppy of Formal White and called it kathrins_theme or something similar?

Then you created a new CSS file caling it kathrins_theme_styles.css (or whatever)

You then changes config.php and substituted you css file name for the one is it gradient?

if you did all this and uploaded all this new folder to your Moodle site...and you still can't see the changes...then there must be something you have not told us!

(apologies this answer is rushed as I'm running off to a meeting but will be back later.)

Hope some of this helps.

Mary




In reply to Mary Evans

Re: Problems with custom theme

by Kathrin Bonfigt -
Hi Mary,

thanks for your answer!

I just did everything again and now it worked...
Dont ask me why it didnt worked last time, i did everything the same..

cheers kathrin
In reply to Mary Evans

Re: Problems with custom theme

by Kathrin Bonfigt -
Hi again,

now i wanted to change the css file again, but is doesnt work again...

It seems that the webserver isnt refreshing or something! I installed the version 1.9.7 on my windows computer with the xampp lite.

when i change the css file in the server/moodle/theme/mytheme folder, its changed when i open it, but there s no change in the webbrowser!

any idea what i m doin wrong?

best regards
kathrin
In reply to Kathrin Bonfigt

Re: Problems with custom theme

by Frank Ralf -
Have you cleared your browser cache? You might use Web developer toolbar for Firefox to disable the cache while you work on your theme.

hth
Frank
In reply to Frank Ralf

Re: Problems with custom theme

by Kathrin Bonfigt -
Hi Frank,

yes i have the webdeveloper toolbar and deactivated the cache and still no changes..

the only way it works, when i copy the standardwhite folder, rename it, and make changes, then choose the new theme in the menu..allright i can see the changes,
but when i want to do some more, it stays how it is..
except i copy the new folder again, rename it and choose it from the menu..

so the config just gets changes in theme folder, but not in my new theme folder?

cheers
kathrin
In reply to Kathrin Bonfigt

Re: Problems with custom theme

by Frank Ralf -
Hi Kathrin,

Instead of making changes to existing CSS files (which will get you into trouble if there is an upgrade of the base theme) you should put all your CSS in a separate file. You will find some instructions here.

You should also watch out whether you are using a base theme or plug-in themes. Those might override your styles.

hth
Frank

PS
If that doesn't help just zip your theme files and post them here wink
In reply to Kathrin Bonfigt

Re: Problems with custom theme

by Alex Smith -

Hello Kathrin.

Just a thought. It isn't a Moodle caching issue is it?
Try resolving it by;

editing the php.ini file (found at server > php folder) from;

eaccelerator.enable = "1"
to
eaccelerator.enable = "0"

Then saving the php.ini and then stopping and restarting the apache/server (XAMPP).

Good luck.

Alex