MyBB Community Forums

Full Version: Image path as variable on user profile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?