Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

URL to CB Profile Picture/Avatar

11 years 6 months ago #225500 by Snuffleupagus
URL to CB Profile Picture/Avatar was created by Snuffleupagus
Hi There,

I am having a go at modifying the code of the reviews section of Mosets tree.

Currently, the username AND profile picture of the user is being handled by Mosets. This is a new feature of Mosets 3.0. Before upgrading it, I had it modified to link the users username to their CB profile and show their CB avatar next to their reviews.

I have limited php knowledge but with some hacking of the sub_reviews file (which generates the reviews) I've managed to get the username and indeed the avatar (which is by default a white square) to point to the users CB profile.

However, I am struggling some what with getting the CB avatar to show.

It appears that the Mosets coding handles the resizing of the of the avatar (non-elegant force resize).

All I want to know is, could you provide me with a basic URL to the avatar that I could insert into the reviews code of Mosets?

I had a look around in the CB Login module (which shows the avatar, obviously) and I found "$avatarUrl" but this naturally isn't going to work - I need an actual URL I could throw in that would hopefully pull the avatar.

Sorry if I don't explain myself clearly enough. I also appreciate this is a sloppy way of doing things but I am no coder and unfortunately no one has upgraded the Mosets plugin so I am stuck.

Thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225504 by krileon
Replied by krileon on topic URL to CB Profile Picture/Avatar
Please see the below tutorial on how to retrieve field data outside of CB.

www.allmysocials.com/directory/tutorials/item/235-obtaining-field-values-through-api

If CB API isn't loaded on the page you're viewing then please see the below tutorial on how to load it.

www.allmysocials.com/directory/tutorials/item/231-include-api-externally


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