Skip to Content Skip to Menu

images show in userlist when there are no images uploaded

  • qneal78710
  • qneal78710
  • OFFLINE
  • Posts: 111
  • Thanks: 11
  • Karma: 0
1 month 3 weeks ago #339307 by qneal78710
cb_education_logo and cb_work_logo are showing on my "table list" when users search for schools and no image has been uploaded.
Notice in the image I have uploaded that when users don't show start and end dates, there is no image displayed. I expect the same thing for images for schools and workplaces, but there is an image for both of those fields.
I have looked at Pending Default and Empty Default and they are set to "no image", so to me that just means that no image should be displayed if there is no image uploaded.

What do I have to do so that when a user does not upload an image, then a default image is not shown. This should be easy but I'm quite unsure.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 month 2 weeks ago #339320 by krileon
There's a default image as part of the display. It's actually just a font icon. It's a part of the PROFILE_EDUCATION_SCHOOL_DISPLAY language string which formats how education rows are displayed in its field group. You can either override the language string and remove the logo behavior or you can edit the education field group and change its row display HTML to whatever you like.


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.

  • qneal78710
  • qneal78710
  • OFFLINE
  • Posts: 111
  • Thanks: 11
  • Karma: 0
1 month 2 weeks ago - 1 month 2 weeks ago #339331 by qneal78710
You can either override the language string and remove the logo behavior or you can edit the education field group and change its row display HTML to whatever you like.

I'm aware it's a link to a default image, the problem is that I want it to act just like the cb_education_start and cb_education_end fields....if the field is not edited, then it won't show. The problem is that if there is no uploaded image, I don't want any image shown....how do I do that exactly?

 "edit the education field group and change its row display HTML to whatever you like" => would doing this remove the default image? Is so, how? I'm only concerned with making the default image work like the start and end fields....if it's not populated then it doesn't show at all, but the school name shows is there is a school name populated

Oh, I think I may know what you are talking about:
[cb:if cb_education_school!=""]<div class="row no-gutters"><div class="col-3 text-center">[cb:if cb_education_logo=""]<span class="fa fa-university fa-4x"></span>[/cb:if][cb:if cb_education_logo!=""]<img src="[cb_education_logo]" alt="" class="img-fluid cbImgPict cbFullPict" style="max-height: 72px;" />[/cb:if]</div><div class="col-9 pl-1"><strong>[cb:userfield field="cb_education_school" /]</strong> [cb:if cb_education_graduated="1"]<span class="fa fa-graduation-cap"></span>[/cb:if][cb:if cb_education_start!="" and cb_education_start!="0000-00-00" or cb_education_end!="" and cb_education_end!="0000-00-00"]<div class="text-small">[cb:if cb_education_start="" or cb_education_start="0000-00-00"]Class of [/cb:if][cb:userfield field="cb_education_start" /][cb:if cb_education_start!="" and cb_education_start!="0000-00-00" and cb_education_end!="" and cb_education_end!="0000-00-00"] - [/cb:if][cb:if cb_education_end="" or cb_education_end="0000-00-00"] - Present[/cb:if][cb:userfield field="cb_education_end" /]</div>[/cb:if][cb:if cb_education_description!=""]<div class="text-small text-muted">[cb:userfield field="cb_education_description" /]</div>[/cb:if]</div></div>[/cb:if]

Here it is:
So you're saying if the logo exist then show, if no logo! the it points to the default picture, but this still doesn't work like the "start" and "end" fields. 


[cb:if cb_education_logo=""]<span class="fa fa-university fa-4x"></span>[/cb:if]
[cb:if cb_education_logo!=""]<img src="[cb_education_logo]" alt="" class="img-fluid cbImgPict cbFullPict" style="max-height: 72px;" />[/cb:if]</div>
<div class="col-9 pl-1">

cb_education_start
[cb:if cb_education_school!=""]<div class="row no-gutters"><div class="col-3 text-center">[cb:if cb_education_logo=""]<span class="fa fa-university fa-4x"></span>[/cb:if][cb:if cb_education_logo!=""]<img src="[cb_education_logo]" alt="" class="img-fluid cbImgPict cbFullPict" style="max-height: 72px;" />[/cb:if]</div><div class="col-9 pl-1"><strong>[cb:userfield field="cb_education_school" /]</strong> [cb:if cb_education_graduated="1"]<span class="fa fa-graduation-cap"></span>[/cb:if][cb:if cb_education_start!="" and cb_education_start!="0000-00-00" or cb_education_end!="" and cb_education_end!="0000-00-00"]<div class="text-small">[cb:if cb_education_start="" or cb_education_start="0000-00-00"]Class of [/cb:if][cb:userfield field="cb_education_start" /][cb:if cb_education_start!="" and cb_education_start!="0000-00-00" and cb_education_end!="" and cb_education_end!="0000-00-00"] - [/cb:if][cb:if cb_education_end="" or cb_education_end="0000-00-00"] - Present[/cb:if][cb:userfield field="cb_education_end" /]</div>[/cb:if][cb:if cb_education_description!=""]<div class="text-small text-muted">[cb:userfield field="cb_education_description" /]</div>[/cb:if]</div></div>[/cb:if]

So you're saying if the logo exist then show, if no logo! the it points to the default picture, but this still doesn't work like the "start" and "end" fields. 

Here is the "cb_education_start" code from what I can see 

[cb:if cb_education_start!="" and cb_education_start!="0000-00-00" or cb_education_end!="" and cb_education_end!="0000-00-00"]<div class="text-small">[cb:if cb_education_start="" or cb_education_start="0000-00-00"]Class of [/cb:if][cb:userfield field="cb_education_start" /][cb:if cb_education_start!="" and cb_education_start!="0000-00-00" and cb_education_end!="" and cb_education_end!="0000-00-00"] - [/cb:if][cb:if cb_education_end="" or cb_education_end="0000-00-00"] - Present[/cb:if]

Judging by this part of the code, it's not showing me what i'm looking for....if user does not choose a start date => then show nothing?

So I'm kinda baffeled as to what code to put in place for images not uploaded to show "nothing" just like the cb_education_start....but I will try a few things out in the over ride and see what happens

 
Last edit: 1 month 2 weeks ago by qneal78710.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 month 2 weeks ago #339338 by krileon
If there's no logo uploaded it fallbacks to a font icon. The reason for this is lets say they've 1 row with a logo and 1 row without then their displays will be out of alignment and look strange. The fallback prevents that weird UI. If you don't want that behavior just get rid of the below HTML.
Code:
<span class="fa fa-university fa-4x"></span>


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.

Moderators: beatnantkrileon
Powered by Kunena Forum