Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

CB substitution issue

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 228
  • Thanks: 29
  • Karma: 11
6 years 8 months ago #303084 by bascherz
CB substitution issue was created by bascherz
This is a rather minor thing, but it's still got me stumped (this kind of thing drives me nuts).

I am trying to do this:
Code:
[cb:if avatar =""]<img src="xxx">[/cb:if]
so I can display my own choice of avatar. But it doesn't seem to work.

I've also tried this with the same result. An image file called nophoto_n.png seems to show up when the database has nothing in the avatar field for a user.
Code:
[cb:if avatar includes "nophoto"]<img src="xxx">[/cb:if]

Just exactly what value WILL the avatar field contain if the user hasn't selected one? What's the trick to this?

Thanks in advance.

Bruce S - Vienna, VA

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 8 months ago #303122 by krileon
Replied by krileon on topic CB substitution issue
Shouldn't be necessary to do that to have your own defaults. Edit your avatar field then under Parameters > Image Display adjust the "Pending Default" and "Empty Default" parameters as needed. Place your custom images in the below folder for them to be available in the dropdown.

/components/com_comprofiler/plugin/templates/default/images/avatar

The avatar field is never truly empty as we output the URL to the image when using raw substitutions so it'll point to the default pending or empty as needed.


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.

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 228
  • Thanks: 29
  • Karma: 11
6 years 8 months ago #303270 by bascherz
Replied by bascherz on topic CB substitution issue
Works for me as far as what to display. But what I was after was a way to find out if it was empty or not.

Bruce S - Vienna, VA

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 8 months ago #303286 by krileon
Replied by krileon on topic CB substitution issue
You'd have to IF substitution condition against nophoto. Below topic shows example of how to do this with gender based defaults.

www.joomlapolis.com/forum/153-professional-member-support/234170-solved-assigned-profile-avatars-are-overriding-uploaded-images#283670


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