Afterburner theme settings

Afterburner theme settings

by Scott Karren -
Number of replies: 6

I would like to play a bit with the Afterburner theme that is included in Moodle 2.1.3.  Are there any config settings for it to change colors, logos, etc?  or are they all contained withing the CSS files for the theme?  Is there any documentation on this specific theme?  I know some CSS but it sure would be nice to be able to read up on the specifics of this theme before diving in.  Of course, I learned to Moodle in the first place by diving in.

Scott Karren

Average of ratings: -
In reply to Scott Karren

Re: Afterburner theme settings

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Scott,

Afterburner does not appear to have a settings page itself, so any changes you wish to make to the theme would have to be made through the css files themselves.

The easiest way into doing something like this is to make use of a tool such as firebug for firefox to help identify the elements and the rules already applied. Make sure you have theme designer mode enabled (Settings>Site Admin>Appearance>Theme Settings) for firebug to tell you which file the rules are in as well as to see the changes you make without having to purge all caches each time.

Richard

Average of ratings:Useful (1)
In reply to Scott Karren

Re: Afterburner theme settings

by Mary Evans -

Hi Scott,

If you like playing with Moodle Themes then there is nothing stopping you converting the theme you have in Moodle 2.1 3 to the Afterburner version which has some custom setting like adding the logo and being able to add your own customised CSS.

If you go to THIS URL you will see a list of files in the Afterburner directory of Moodle. You can look at them individually and see the changes made. The files you will need to copy are:

config.php
layout/default.php
style/ afterburner_styles.css
lib.php
renderers.php
settings,php
lang/en/theme_afterburner.php

By copying these and replacing your existing files with these files will convert a simple theme into one which is interactive, and chaingable.

HTH

Mary

In reply to Mary Evans

Re: Afterburner theme settings

by Scott Karren -

Mary

Thank you for the help.  I did as you suggested and I am getting the following error message.

Fatal error: Call to undefined method theme_afterburner_core_renderer::main_content() in C:\inetpub\wwwroot\moodle\theme\afterburner\layout\default.php on line 83

It is pointing to this line <?php echo $OUTPUT->main_content() ?>

I am not sure what would be causing this, the error seems to be pointing to the core renderer for the theme and if that is the case I do not see anything about main_content in the renderers.php file.  Any help would be appreciated.

Scott Karren

In reply to Scott Karren

Re: Afterburner theme settings

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

hi Scott,

The coding changed slightly between 2.1 and 2.2 so that the line you see is correct for Moodle 2.2 but doesn't work if you are using 2.0/2.1. In that case you will need to change that line back to the previous format which was

                            <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>

The theme should then work correctly I believe

HTH

Richard

In reply to Scott Karren

Re: Afterburner theme settings

by Mary Evans -

Hi Scott...

The line Richard is talking about is in layout/default.php

Moodle 2.2 uses a different method...than Moodle 2.1...although you can use the old method in Moodle 2.2 you cannot use the new method in Moodle 2.1.

So just make sure you replace

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

with

<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>

HTH

Mary

In reply to Mary Evans

Re: Afterburner theme settings

by Scott Karren -

Richard and Mary,

That took care of it.  Thank you.

Scott