Using Colour Scheme specific Logo in Splash Theme

Using Colour Scheme specific Logo in Splash Theme

by Suranga Jayasena -
Number of replies: 2

Hi,

How can I use four different logo images for each colour scheme in Splash Theme?

Suranga

(I had raised this in an earlier thread, but no one seems to have noticed. So, I post it as a new topic.)

Average of ratings: -
In reply to Suranga Jayasena

Re: Using Colour Scheme specific Logo in Splash Theme

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

Hi Suranga,

Apologies for not responding to your earlier post.

If you put your new logos in the same location as the old ones, and call them the same name (rename the old ones first) then Splash should pick them up automatically. Just make sure you clear the Moodle cache too (Systems Administration>Development>Purge all caches)

Richard

Average of ratings: Useful (1)
In reply to Richard Oelmann

Re: Using Colour Scheme specific Logo in Splash Theme

by Suranga Jayasena -

Hi Richard,

It’s OK, it’s my mistake putting it in wrong place.

What you said did work. But, in fact what I wanted was slightly different. I wanted to keep the colour switch, and display a unique logo for that colour scheme, for example logored.jpg with red colour scheme and logoblue.jpg with blue colour scheme.

I tried to find relevant codes in general.php, settings.php and sl.css; but could not figure out how to do that. Then I tried an alternative trick by using the images, and it worked. I explain it below for the benefit of all.

Thanks

Suranga

** Here’s how to do that**

There are four images for background in pix folder named lbgv2.jpg, lbgv2blue.jpg, lbgv2green.jpg and lbgv2orange.jpg; edit these to have relevant logo images inside them and replace the original files in the ‘pix’ folder. (Note that lbgv2.jpg is for red colour scheme.)

Now you get the custom colour logo for each colour scheme. But, you see unnecessary text (your site name) over your logo image. That is because no logo image is defined for Logo in ‘appearnce>themes>Splash. Now, this is the trick. Create an empty png file (i.e. a transparent file with nothing in it), 230px wide and height of your choice (Location of your ‘Tag Line’ will depend on this height - try different heights and see, I use 160px). Place this file in the ‘pix’ folder and give its http link as the Logo in the settings page.

Purge your cache, .... it’s done.