Skip to Content Skip to Menu

[SOLVED] Change CB 2.0 template colours

  • autobahn
  • autobahn
  • ONLINE
  • Posts: 202
  • Thanks: 38
  • Karma: 4
9 years 11 months ago - 9 years 11 months ago #253340 by autobahn
[SOLVED] Change CB 2.0 template colours was created by autobahn
The default CB 2.0 template colours look dire with our website colour scheme so I would like to create a new template changing only the colours (OK, so maybe the icon image files as well).

I've searched the archives and believe that I start by copying the default template folder and renaming it to something like 'ourcolours'.

In default.xml the line

<filename plugin="default">default.php</filename>

obviously needs to change so is it sufficient to change it to

<filename plugin="ourcolours">default.php</filename>


Then hopefully it will just be a matter of changing the colours in the .css files, zipping everything into a single file and installing it as a plugin.

Or am I being too simplistic?
Last edit: 9 years 11 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48502
  • Thanks: 8285
  • Karma: 1444
9 years 11 months ago #253366 by krileon
Replied by krileon on topic Change CB 2.0 template colours
You need CB 2.0.3 to make this easy. With 2.0.3 your template only needs 3 files.

override.css
index.html
template_name.xml

You'd put all your styling changes in override.css and everything else will be inherited. Ensure your selctors are strong enough in override.css to override template.css and you'll have whatever styling changes you're wanting with minimal coding. I believe a tutorial at some point is planned to describe this usage.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • autobahn
  • autobahn
  • ONLINE
  • Posts: 202
  • Thanks: 38
  • Karma: 4
9 years 11 months ago #253392 by autobahn
Replied by autobahn on topic Change CB 2.0 template colours
I have CB 2.0.3 so I can try what you suggest with override.css etc. Can I take it that:
  1. override.css and template_name.xml go into the default template folder
  2. template_name.xml can be a renamed copy of default.xml with the <filename> line changed to <filename plugin="template_name">default.php</filename>

How do I ensure my selectors are strong enough in override.css to override template.css? I can find my way round CSS but I'm not an expert in the finer points.

Thank you

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48502
  • Thanks: 8285
  • Karma: 1444
9 years 11 months ago - 9 years 11 months ago #253430 by krileon
Replied by krileon on topic Change CB 2.0 template colours
You need to make your own CB template entirely. Your template would consist of those 3 files. It should be installed through CB > Plugin Management and then selected as your template within CB > Configuration > User Profile. Nick will be providing a tutorial soon to help with this.

How do I ensure my selectors are strong enough in override.css to override template.css? I can find my way round CSS but I'm not an expert in the finer points.

Ensure the selects have more weight. This is done by adding more selectors or by load order. Since override.css loads after template.css as long as the selectors match 1:1 the override.css styling should always apply.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 9 years 11 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • autobahn
  • autobahn
  • ONLINE
  • Posts: 202
  • Thanks: 38
  • Karma: 4
9 years 11 months ago #253804 by autobahn
Replied by autobahn on topic Change CB 2.0 template colours
Trying to keep things simple I copied the plugins/templates/default folder to a new folder called abscb then

1. I made some colour changes in abscb/bootstrap.css

2. abscb/default.php was renamed to abscb/abscb.php

3. abscb/default.xml was renamed to abscb/abscb.xml

4. the xml file was edited as follows:
<name>Default</name> changed to <name>ABSCB</name>
<filename plugin="default">default.php</filename> changed to <filename plugin="abscb">abscb.php</filename>

All the files in the abscb folder were zipped up and the zip file installed as a CB plugin (no errors).

However, if I look at a frontend CB page (e.g new registration) I get no output, just the 'Powered by Community Builder' line.

I have turned maximum error reporting on and Joomla debug but I can't see any errors.

There must be something wrong with the XML but I have nothing to compare it against.

I haven't tried using override.css since that also involves chnaging an XML file and I'm in uncharted waters with XML.

I appreciate any help you can give me, and I'm sure I'm not the only novice trying to do this.

Thank you

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
Moderators: beatnantkrileon
Powered by Kunena Forum