Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)

CB 2.0.3 Template CSS Overrides

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
10 years 3 weeks ago #253784 by nant
CB 2.0.3 Template CSS Overrides was created by nant
Our CB 2.0 Tutorials - 31 - CB Template CSS Overrides
video:

www.youtube.com/playlist?list=PLp0puRITgC7PuyzPsMUECDI46VE7IFSAX

makes use of this example template plugin:


File Attachment:

File Name: example.zip
File Size:167 KB
Attachments:
The following user(s) said Thank You: Coffeymate, securialert, autobahn

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

10 years 2 weeks ago #254369 by tjohns92109
Replied by tjohns92109 on topic CB 2.0.3 Template CSS Overrides
Appreciate the help there. I actually have no problem with the CSS. I've just overridden any styles I needed to change in my main template CSS file. I wanted to make changes to the default.php file in order to include a module position inside the user list. Would I just copy the default.php file from the default template into the example template folder and alter that?

Actually, I just tried it myself and it doesn't seem to make a difference when I make changes to the default.php file that I copied over.

Back to my original question... I'm guessing it's not safe to make changes to default.php file inside the default template folder?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48609
  • Thanks: 8300
  • Karma: 1446
10 years 2 weeks ago - 10 years 2 weeks ago #254376 by krileon
Replied by krileon on topic CB 2.0.3 Template CSS Overrides
No, you can't just copy default.php over. First the filename it self needs to be changed. For example if your template is the example template it'd become example.php. Next inside of the PHP file the classes have the template name in them for example "CBProfileView_html_default", which would become "CBProfileView_html_example".

I highly highly suggest leaving the PHP file alone. Anytime we make fixes to it you will not have those fixes and will likely be posting why XYZ doesn't work or why you're missing ABC feature and chances will be high it's because your template PHP file does not have the changes. For example next CB release is making some fixes to the template PHP file. If you supplied your own you would not have these fixes.


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: 10 years 2 weeks ago by krileon.

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

10 years 2 weeks ago #254384 by tjohns92109
Replied by tjohns92109 on topic CB 2.0.3 Template CSS Overrides
That's good info. Thanks!

That's probably also the explanation to why the custom template I created didn't work.

I'll probably take your advice for now and not touch the php file. If I really need to add code to it, I'll just put it in an include and leave a note for myself to re-add the include statement when I update CB.

Thanks again.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48609
  • Thanks: 8300
  • Karma: 1446
10 years 2 weeks ago #254400 by krileon
Replied by krileon on topic CB 2.0.3 Template CSS Overrides
Depending on what you're changing you could do an include of the default template then extend the default template PHP classes. No idea how well that'd work, but could minimize how much code you have to replace. So for example if you only want to change 1 of the functions out of all the classes then an extend would be the best approach so it's only possible for that single function to go out of date. Then on upgrade it's just a matter of comparing the two functions.


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.

10 years 2 weeks ago #254405 by tjohns92109
Replied by tjohns92109 on topic CB 2.0.3 Template CSS Overrides
Also a great idea (if I end up needing to do it).

Thanks again!

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

Moderators: beatnantkrileon
Powered by Kunena Forum