vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Image in custom profile fields? (https://vborg.vbsupport.ru/showthread.php?t=280967)

Noslo 04-01-2012 11:24 AM

Image in custom profile fields?
 
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 [DATE]1333402995[/DATE] at [TIME]1333402995[/TIME] ---------------

Oh come on guys?!

kh99 04-02-2012 09:38 PM

I think you can just use some template conditions around the image tags, like:

Code:

<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 [DATE]1333470308[/DATE] at [TIME]1333470308[/TIME] ---------------

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.

kh99 04-05-2012 11:36 AM

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.


All times are GMT. The time now is 02:47 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01749 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete