[#3307] Assigning user group based on CB field value

12 years 2 months ago - 12 years 2 months ago #192908 by timberlineevents
Replied by timberlineevents on topic Re: Assigning user group based on CB field value

Field labels are styled by CB. For example the below CSS is from CBs default template, but you'll want to use Firebug for Firefox to inspect the label to see where its CSS is exactly and adjust as necessary.

IN: components/com_comprofiler/plugin/templates/default/template.css
ON: Line 109

.cbformdiv .cb_form_line label, form.cb_form .cb_form_line label, .cb_tab_content .cb_form_line label {
    display: block;
    float: left;
    font-weight: bold;
    vertical-align: top;
    width: 28%;
}


Well, I used firebug, is my right hand, and the css won’t work, because the divs of the layouts don’t let them.
This is the code I need to fix and can´t find:

<div class="cbPosLeft" style="width:49%;">
(portrait image)

<div class="cbPosMiddle" style="width:49%;">
(user status)

Should be something like:

<div class="cbPosLeft" style="width:40%;">
(Portrait image)

<div class="cbPosMiddle" style="width:60%;">
(User status)

tks
The topic has been locked.
12 years 2 months ago #192917 by krileon
Those are hardcoded as they're a part of the templates PHP file and its layout, which you can adjust below.

components/com_comprofiler/plugin/templates/default/default.php

Optionally you can just use CSS with !important tags such as the below example.
.cbPosLeft {
	width: 40% !important;
}

.cbPosMiddle {
	width: 60% !important;
}


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 topic has been locked.
12 years 2 months ago #192926 by timberlineevents
Replied by timberlineevents on topic Re: Assigning user group based on CB field value

krileon wrote: Those are hardcoded as they're a part of the templates PHP file and its layout, which you can adjust below.

components/com_comprofiler/plugin/templates/default/default.php


Been there

This is the default.php related code:

// Display "Left" tabs
if ( isset( $this->userViewTabs ) ) {
echo "\n\t\t\t<div class=\"cbPosLeft\" style=\"width:" . $this->wLeft . "%;\">";
echo $this->userViewTabs;
echo '</div>';
}
// Display "Middle" tabs (User Avatar/Image):
if ( isset( $this->userViewTabs ) ) {
echo "\n\t\t\t<div class=\"cbPosMiddle\" style=\"width:" . $this->wMiddle . "%;\">";
echo $this->userViewTabs;
echo '</div>';


and the percentage value is coming from a formula. Not sure how to avoid that value to set up a fixed value.

Optionally you can just use CSS with !important tags such as the below example.

.cbPosLeft {
	width: 40% !important;
}

.cbPosMiddle {
	width: 60% !important;
}



If you mean adding these lines to the template.css, I tried before and doesn´t work. That´s why I am trying to hack it.
The topic has been locked.
12 years 2 months ago #192929 by krileon

and the percentage value is coming from a formula. Not sure how to avoid that value to set up a fixed value.

Yes, it's calculated; just override it with static values.

If you mean adding these lines to the template.css, I tried before and doesn´t work. That´s why I am trying to hack it.

It should work just fine as the important tag will force it to override any inline styles. You need to ensure it's placed at the bottom of your Joomla template CSS file. Then very it's presence using Firebug. If you've site caching or browser caching present ensure you clear both then refresh the page.


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 topic has been locked.
12 years 2 months ago - 12 years 2 months ago #192931 by timberlineevents
Replied by timberlineevents on topic Re: Assigning user group based on CB field value

It should work just fine as the important tag will force it to override any inline styles. You need to ensure it's placed at the bottom of your Joomla template CSS file. Then very it's presence using Firebug. If you've site caching or browser caching present ensure you clear both then refresh the page.


that worked, tks.

i believed you where talking about the the CB template.css


timberlineevents wrote:

If there's an update on the ticket I'll post the update to the ticket. No, CB Blogs doesn't have triggers; yet (planned). For now the notifications are broken. Will be fixed with next release of course.


Do you have at list an idea of when is it going to be released??




Still has no answer for this...

i have to take a decision about usign it or not so...


Another one: I got rid of the menu tab, but how can I get rid of the “manage your blog” menu item in the profile for specific user groups?
The topic has been locked.
12 years 2 months ago #192969 by krileon

Do you have at list an idea of when is it going to be released??

Sometime in the next 2 weeks or so.

but how can I get rid of the “manage your blog” menu item in the profile for specific user groups?

You can't, it's off/on usage only as configured in CB Blogs configuration.


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 topic has been locked.
Moderators: beatnantkrileon
Time to create page: 0.184 seconds

Facebook Twitter LinkedIn