Can I modify the Login page with CSS?

Can I modify the Login page with CSS?

by Arturs Polis -
Number of replies: 7

Since I have no access to the php and core data of our Moodle site - are there any possibilities to use CSS in order to modify the Login page (e.g. hiding items, changing colors, backgrounds? If yes - can you, please, give any info about the elements and extent of what is possible.

I am working on:
Moodle 2.9+
Aardvark 2.9.7

Average of ratings: -
In reply to Arturs Polis

Re: Can I modify the Login page with CSS?

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

Hi,

Yes it depends largely on what it is you want to do.

Since there is little you can change as there's not much you can do apart from add an image to the background. But that can be a faff as there is no means of adding a background image unless you are using the More theme.

Just tell me what you were thinking of doing?

Cheers

Mary

In reply to Mary Evans

Re: Can I modify the Login page with CSS?

by Arturs Polis -
Yes, changing the background is the primary wish.
As secondary wishes - removing the upper and lower bars...

So, for Aardverk theme - no way to change the background through CSS?
In reply to Arturs Polis

Re: Can I modify the Login page with CSS?

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

Ok...you could try this method.

STAGE ONE: 

  1. Download a copy of the Aardvark theme to your computer desktop.
    First making sure it is the same version that you are currently using.
  2. Unzip the Aardvark.zip file and then add your background image to the Aardvark pix folder.
    or one of the sub-folders where all the other images are save to.
    (make a note of the names of these images and also the directory they are added to.
  3. If you think you might like to add other images in future,
    then this is the time to add those images into your theme now.
  4. Once you are happy with this you need to compress this changed Aardvark theme into a new ZIP file
    ready to replace the one you have on your server.
  5. Most importantly please make a written copy of all the settings you have made in your site Aardvark settings page.

STAGE TWO: is to remove the old theme and install the new zip file so:

  1. Put your site in Maintenance Mode
  2. Change theme from Aardvark to Clean theme in Site Administration > Appearance > Themes > Theme selector
  3. Next go to Site Administration > Plugins > Plugins overview
  4. Find Aardvark theme and UN-INSTALL it and then follow the instructions Moodle gives you for each of the processes that it takes to do this. The last process deletes all the settings from the database that is why it important you that you make a copy of these before you start this process as there is no turning back once set to delete. It's not difficult to do and take about two or three minutes to do.
  5. Next you need to go to Site Administration > Plugins > Install plugins
  6. Now add your new ZIP file ( the one you made earlier) to the the upload area provided and follow instructions.
  7. Once you have done this you can Select your theme again from the Theme selector and then go to Aardvark settings and add all the colours and settings back using the list you made earlier.
  8. Last of all turn OFF Maintenance mode.

Then you are free to add the CSS for the Login page.

In fact if you are ever want to make changes to a theme it is easier modifying the theme before you install it, this way you can add images that you can use.

Hope this helps?

Mary

In reply to Mary Evans

Re: Can I modify the Login page with CSS?

by Arturs Polis -

Is this method to be used even when I want to upload a logo picture to theme/aardvark/pix directory?

In reply to Arturs Polis

Re: Can I modify the Login page with CSS?

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

No it was just a suggestion. If you have FTP access to your Moodle server then yes you can upload a logo to the Aardvark/pix directory.

In reply to Mary Evans

Re: Can I modify the Login page with CSS?

by Arturs Polis -

Another useful thing would be to hide the link to Dashboard (named Languages in this case) on the upper linkbar.