[SOLVED] CB: How to make community counters invisible and create new ones

5 months 1 day ago - 4 months 1 week ago #304642 by erichburkhard
Am using the latest CB version. Is it somehow possible to implement the follwoing behaviour a) and b) ?:

a) The counter for registered community members shall be invisible for 'normal' registered users (see yellow mark)



My first idea was: Shall I remove the display of this text area in the .css file? (where exactly) Or what is the smartest way to achieve this?


b) Only in case the moderator logs into the frontend he shall be able to see in his profile:

- a counter field that shows all the registered members
- a counter field that shows all pending members
- a counter filed that shows all banned members

I think to introduce 3 physical fields which are only visible for moderators is not the problem....but how to implement the mentioned 'counter' feature (for status = registered / pending / banned) Can you help me?

Regards
Attachments:
5 months 1 day ago #304649 by krileon

a) The counter for registered community members shall be invisible for 'normal' registered users (see yellow mark)

Only way to hide that is with CSS. There's no parameter to toggle it off. The below CSS should work.

.cbUserListResultCount {
    display: none !important;
}

b) Only in case the moderator logs into the frontend he shall be able to see in his profile:

You'd need to use CB Query Field for this then put together the database query to query for that information. The below queries should help.


All Active Users
SELECT COUNT( DISTINCT u.`id` ) 
FROM `#__users` u
JOIN `#__comprofiler` ue 
ON ue.`id` = u.`id`
WHERE u.`block` = 0
AND ue.`banned` = 0
AND ue.`approved` = 1
AND ue.`confirmed` = 1

All Banned Users
SELECT COUNT( DISTINCT u.`id` ) 
FROM `#__users` u
JOIN `#__comprofiler` ue 
ON ue.`id` = u.`id`
WHERE u.`block` = 0
AND ue.`banned` = 1
AND ue.`approved` = 1
AND ue.`confirmed` = 1

All Pending Approval Users
SELECT COUNT( DISTINCT u.`id` ) 
FROM `#__users` u
JOIN `#__comprofiler` ue 
ON ue.`id` = u.`id`
WHERE u.`block` = 1
AND ue.`banned` = 0
AND ue.`approved` = 0
AND ue.`confirmed` = 1

All of those should work fine in CB Query Field.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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: erichburkhard, mikerotec
5 months 8 hours ago #304679 by erichburkhard
Thank you - I will try it - regards
4 months 3 weeks ago #304809 by erichburkhard
Hi - I had some difficulties to find the exact file location to implement this in order to 'disable' the CB community counter?

.cbUserListResultCount {
display: none !important;
}

I am using the prostar template….but I could not find the corresponding location in the corresponding template.css file....is there an other (CB) css file somewhere ?

Could you send me the file-path where to add / modify this string? Thanks

regards
4 months 3 weeks ago #304811 by krileon
You can use CBs built in CSS overrides to add CB specific CSS changes. See the below tutorial on how to use CBs CSS overrides.

www.joomlapolis.com/blog/kyle/18711-template-css-overrides-made-easy


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
4 months 1 week ago - 4 months 1 week ago #305132 by ernienet
I have customers who would also like that line removed, but I'm not sure I understand how this works.

I don't know what goes into the Key field and into the Text field. Screenshot attached



Thank you,
Ernie
Attachments:
Moderators: beatnantkrileon
Time to create page: 0.450 seconds
Facebook Twitter Google LinkedIn