View Full Version : Image in custom profile fields?
Noslo
04-01-2012, 11:24 AM
Is it possible to choose images to appear as custom profile fields.
For example the question is
"What type of food do you like?"
They tick the chexbox of an image of Pizza and Burgers and those images appear on postbit?
Noslo
04-02-2012, 05:41 PM
Please can someone help me with this query? Thanks!
--------------- Added 1333402995 at 1333402995 ---------------
Oh come on guys?!
I think you can just use some template conditions around the image tags, like:
<vb:if condition="$post['fieldX'] & 1"><img src="pizza.gif"></vb:if>
<vb:if condition="$post['fieldX'] & 2"><img src="burger.gif"></vb:if>
<vb:if condition="$post['fieldX'] & 4"><img src="carrot.gif"></vb:if>
etc. (Of course you'd replace 'X' with the actual field number).
ETA: also note the values should go 1, 2, 4, 8, 16, 32, 64, etc.
Noslo
04-03-2012, 12:00 PM
Awesome thank you very much, this is exactly the kind of base I needed to work from :) Tyvm.
--------------- Added 1333470308 at 1333470308 ---------------
Sorry another question :)
So I've put all my tickboxes in, I've got about 26 of them. So what code what I put into say the postbit to make it display what I check as an image?
Noslo
04-05-2012, 11:00 AM
Please can somone answer the above? I really appreciate all your valuable help.
So the above didn't work for you? When you say you have 26 checkboxes, how did you create those? Did you create a custom profile field with 26 options?
Noslo
04-05-2012, 02:04 PM
Yes I create a custom profile field with 26 options. I'd like it to pull through any ticked box to the postbit and display as an image.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.