MyBB Community Forums

Full Version: Images from Custom PF's...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What i was wondering was possible, is if i had a profile field with check boxes, and people selected more than one option, and i wanted them to show up in the post bits as an image for each thing selected....

Ive tried it with :

<img src="http://homefrontuk.site40.net/achievements/{$post['fid35']}.jpg" height="30" width="30">

Which works fine with single items selected in the postbit, but doesnt show anything when multiple options are checked.

Would i have to do the options single? or is it possible for the images to show up for the multiple selected items?
When ive looked at the code through the website, after choosing my options, it comes back as though its looking for

<img src="http://homefrontuk.site40.net/achievements/historian%0Aarchivist%0Amercy%0Apistolwhipped%0Agivehimthestick.jpg" height="30" width="30">

Is there anyway to be able to make it, so it seperates them to individual images?
1) It is possible, and...
2) I can tell you (generally) how to do it.

You need to put the multiple selections into a php array, then access the array data to build the postbit image code.

I'm also interested in knowing exactly how, hopefully someone will come along and teach us. Smile
Thanks!

Hopefully someone will be able to help some more! Smile
  • Who knows how to 'grab and use' an array from a multi-select custom profile field?
Thanks