MyBB Community Forums

Full Version: Associate small pictures to profile fields
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Say we have lists of options:

Choose the brand of your graphics card:
Matrox
MSI
Powercolor
Sapphire
Other

Choose your country
Country1
Country2
Country3

etc

How do we associate little images to it, so that when users choose an option, an image appears on postbit?
You would have to alter the postbit template. Make sure you have an image with the same title for each option somewhere in your image folder then add something like this in your postbit (replace X with the actual FID of the profile field):

<img src="{$mybb->settings['bburl']}/images/userfields/gfxcard/{$post['fidX']}.png" alt="{$post['fidX']}" />
Excellent! Does it allow complex characters like "Ä" or "É"?
Depends on if you can use those characters in file names. I've never tried it Wink
I just created one file with complex characters in the server, so I presume it works! Thanks a lot!

It wouldn't be a bad idea to have this as a core feature, many use it for the gender, country, etc.

Smile
Resurrecting this one to pose a challenge. Smile

Suppose you want that image to be clickable and when you click it, you get a list of all members who have that image/field...

Tricky, hm?

...I 'm having a look at the table "mybb_profilefields", but can't make head or tail of how will a query be pulled out of it when I click the image.
Anyone?