vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How Do I Call A Field? (https://vborg.vbsupport.ru/showthread.php?t=166567)

Hex_legend 12-31-2007 08:16 PM

How Do I Call A Field?
 
How do you call a field to show on the profile from what they entered on their edit details page?

Zaiaku 12-31-2007 08:25 PM

Use this:
<if condition="$post['fieldXX']">$post[fieldXX]</if>

Replace XX with the profile field number

Hex_legend 12-31-2007 08:30 PM

I have put that into the script and nothing is working.

www.projekttalk.com/index.php

user - test
Pass - test


Anyone?


I am using Field 2, which has the Location inside.

Zaiaku 12-31-2007 08:33 PM

Sorry for not being more precise. That the code you use in a template.

Use code:
<if condition="$post['field2']">$post[field2]</if>

Hex_legend 12-31-2007 08:36 PM

Thanks Zaiaku,

I understand what you meant on the first post and I did replace the X's with field2, but it's just not pulling the data.

This is VB3.7 (Beta 3) in the Memberinfo template

Zaiaku 12-31-2007 08:40 PM

Sorry my mistake I was thinking postbit not memberinfo

<if condition="$userinfo[field13]">$userinfo[field2]</if>

Hex_legend 12-31-2007 08:42 PM

Does the first Field13 need to be changed to 2 as well?

Zaiaku 12-31-2007 08:47 PM

Yes sorry about that.

Hex_legend 12-31-2007 08:49 PM

You are a star, worked a treat!

One last question regarding this...

How do I do it so that if no data is entered, it will say "No information"

Zaiaku 12-31-2007 08:55 PM

Use this:
<if condition="$userinfo[field2]">$userinfo[field2]<else />No Infomation</if>


All times are GMT. The time now is 08:07 PM.

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.00961 seconds
  • Memory Usage 1,727KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete