vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Custom Profile Fields not appearing in 3.7 (https://vborg.vbsupport.ru/showthread.php?t=170042)

GameWizard 02-09-2008 11:32 AM

Custom Profile Fields not appearing in 3.7
 
Either I'm missing something, or something has changed since 3.7.

I am attempting to make some changes to my memberinfo template, which includes showing some profile fields. Here's the code which I use:

Code:

<if condition="$post[field10]">$post[field10]</if>
I am almost positive the code above is correct, however it doesn't work at all.

I also tried this:

Code:

<if condition="$vbulletin->userinfo[field10]">$post[field10]</if>
This time it actually does detect the "if" conditional, however, the $post[field10] doesn't actually show anything. And I do actually have the field filled in my usercp, and the ID is correct.

Any comments would be appreciated.

cheesegrits 02-09-2008 05:04 PM

I'm not sure why you'd be expecting profile fields to be in a $post array on the profile page. Just use $userinfo['field10'].

Remember that what works in one template may not work in another. In this case, you may have used $post['field10'] in something like a postbit, called via showthread.php ... because showthread.php sets up that $post[] array to include all kinds of useful information sepcific to a given post. But MEMBERINFO is called from profile.php, which knows nothing about forum posts, and doesn't set up a $post[] array.

-- hugh

GameWizard 02-09-2008 08:26 PM

It worked, thanks. I was struggling with this for a while and had tried just about every type of variable except $userinfo, the closest one I had used was $user. But in any case, well said, and thank you.


All times are GMT. The time now is 09:03 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.00906 seconds
  • Memory Usage 1,711KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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