MyBB Community Forums
[How To?] Image path as variable on user profile - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [How To?] Image path as variable on user profile (/thread-187127.html)



Image path as variable on user profile - smalfoy - 2015-12-14

Hi, I am trying to install This slideshow from Dynamic Drive on my member_profile. I have an external playlist which references paths to images. I want the user to be able to enter an url for an image on their profile, and have it show up on the member page as an image. I am having an issue, however, finding the right variable to put in.

This is the code.

{
 "playlist": [
  {
  "url": "img/img0.jpg",
  "caption": "Any caption here..."
  },
  {
  "url": "img/img1.jpg",
  "caption": "A cheetah"
  },
  {
  "url": "img/img2.jpg",
  "caption": "A sand cat kitten"
  },
  {
  "url": "img/img3.jpg",
  "caption": "Now some tigers"
  }
 ],

 "hold_time":5,
 "loops":2,
 "transition_time":1
}


I would like to pull the url from a custom field on the user's profile. So 
{$userfields['fid24']}

for instance. They would have pasted an image url ending in a file extension there like .jpg or .png or whatever.


But the variable is not working when I paste it like this (what my code looks like)

"url": {$userfields['fid24']}",

But it is not working. No images show up, it just breaks and loads forever.
Can anyone help?