Rolling your own theme



We have tried making theme creation in codoforum simple, fast & easy .

Follow these steps to completely revamp codoforum

Giving birth to the theme

  • Think of a cool new name for your theme
  • Copy paste the blue theme folder in codoforum/sites/default/themes

Example. I want to create a new theme , lets name it : greenBeauty

So, i will copy paste the folder
codoforum/sites/default/themes/blue to
codoforum/sites/default/themes/greenBeauty


them list

Note: From now on, greenBeauty will be used as theme.

Selecting your new theme

Now, you want your theme to be enabled in the codoforum . You can do that by logging into the backend->Global settings

Select your new theme in the dropdown avilable in that page .

Customize your theme

Open the file codoforum/sites/default/themes/greenBeauty/less/colors.less

You will find all the colors used by codoforum in that file . You can edit these colors , and see the effect by reloading the page . You do not have to worry about cache or less compilation , as it is automatically done by codoforum .

Example.

I want to give a green background color to greenBeauty theme .

@bodyBgColor: green;

Or, i want to give a background image

@bodyBg: url('url-to-my-image.png');

If you do not want to edit each and every color , you can customize 90% of the theme by only editing the most important colors . You will see that in colors.less , there is section created like this:

/*------------- START MAIN COLORS -------------*/

... some color definitions ...

/*------------- END MAIN COLORS -------------*/

If you edit only this section, it is more than enough to completely modify the theme .

Now, give some fuel to your imagination and make codoforum more beautiful.


Above section only dealt with changing the looks of the theme , but sometimes you want to edit the html for more specific customizations. To do that copy the default theme which is a parent which will give you a lot more control.

You will find all the html defined as templates (using Smarty) in the templates folder .

© CODOFORUM 2023. All Rights Reserved.