Show avatar elsewhere on site

3 years 3 months ago #322381 by jeroen aalders
Show avatar elsewhere on site was created by jeroen aalders
I am trying to show the user's avatar next to self-made CB menu, so that it displays the default image (when the user hasn't uploaded the avatar) and shows the user's avatar (when uploaded) but I get stuck in finding the right html code line. Please help. Thanks!

Please Log in to join the conversation.

3 years 3 months ago #322404 by krileon
Replied by krileon on topic Show avatar elsewhere on site
Use substitutions for that in a CB Content Module or anywhere that supports Joomla content plugins using CB Content Bot. See the below tutorial for substitution usage information.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb

Examples as follows.

Full Size
[cb:userfield field="avatar" /]

Thumbnail with Link
[cb:userfield field="avatar" reason="list" /]


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 to join the conversation.

3 years 1 month ago #323987 by jeroen aalders
Replied by jeroen aalders on topic Show avatar elsewhere on site
I wish to show it on a Widgetkit menu item. Currently, I have the html that is showing the default image hardcoded, so that it shows either default avatar image or uploaded avatar depending on the user. But I wish to add for example [cb:userfield field="avatar" reason="list" /] here. How to add in/substitute the html code like below?

<img src="images/comprofiler/cb_freedomimage_760_5a105ac1b4265.png" style="width: 30px; height:30px; padding-top: 3px;"><span style="color: #FFF;"> Your Profile</span>

Please Log in to join the conversation.

3 years 1 month ago #323999 by krileon
Replied by krileon on topic Show avatar elsewhere on site
The location you're adding your HTML to needs to support Joomla content plugins or you will not be able to use substitutions there.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.289 seconds

Facebook Twitter LinkedIn