Skip to Content Skip to Menu

Remove CB CSS from non-component pages

  • ZiksOmega
  • ZiksOmega
  • OFFLINE
  • Posts: 6
  • Thanks: 1
  • Karma: 0
2 years 5 months ago - 2 years 5 months ago #329318 by ZiksOmega
Hello,

i've overridden my login/logout module with a simple set of icons linked to main CB features' pages, and i do not need Bootstrap, FontAwesome and Template CSSs on my non-CB component pages, how can i prevent them to be loaded?

Thanks in advance
Last edit: 2 years 5 months ago by ZiksOmega.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
2 years 5 months ago #329333 by krileon
Replied by krileon on topic Remove CB CSS from non-component pages
If your login module is just links use a Custom or CB Content module and supply your HTML links there. CB Login Module always loads CBs template so I don't recommend placing it in a module position if you don't intended to use it for login via module.


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.

  • ZiksOmega
  • ZiksOmega
  • OFFLINE
  • Posts: 6
  • Thanks: 1
  • Karma: 0
2 years 5 months ago - 2 years 5 months ago #329338 by ZiksOmega
Replied by ZiksOmega on topic Remove CB CSS from non-component pages
The fact is i need some CB features, as an example to highlight new pms or connection requests.

Anyway nevermind, i found out how to do it.

I'm sharing the solution in case someone else needs it, and marking the current thread as solved:

File to be edited: /libraries/CBLib/CB/Legacy/LegacyComprofilerFunctions.php

Replace
Code:
$_CB_framework->document->addHeadStyleSheet( $livePath . '/' . $templateFile, \in_array( $templateFile, [ 'template.css', 'bootstrap.css', 'fontawesome.css' ], true ), $media );

with
Code:
$jinput = JFactory::getApplication()->input->get('option'); if (strpos($jinput,"com_comprofiler")){ $_CB_framework->document->addHeadStyleSheet( $livePath . '/' . $templateFile, \in_array( $templateFile, [ 'template.css', 'bootstrap.css', 'fontawesome.css' ], true ), $media ); }
Last edit: 2 years 5 months ago by ZiksOmega.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
2 years 5 months ago #329351 by krileon
Replied by krileon on topic Remove CB CSS from non-component pages
You will lose your core modification every single time you update CB. The CB Workflows module can output PM and connection notifications, but does not load CBs CSS. In the CB Workflows module the output of both are also a part of the modules layout so you can generate a custom layout override, which won't lose your changes on update, to output both however you like; by default both are just links.


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.
The following user(s) said Thank You: ZiksOmega

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

Moderators: beatnantkrileon
Powered by Kunena Forum