vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   profile field (https://vborg.vbsupport.ru/showthread.php?t=61387)

DiscussAnything 02-10-2004 01:27 AM

profile field
 
I added a custom profile field called zipcode which I wanna use to display weather specific to peoples location. I used the default 'custom profile fields' for this. So far so good, but how do I use this in the template? The customfield id is 7

is it something like this?

PHP Code:

$userinfo[profilefieldid=7


DiscussAnything 02-10-2004 01:30 AM

if this isn't possible, what query do i use to retrieve this from the db and add it? It's on the vbhome index, and it shouldn't be too hard right? My php isn't too good though. Can anyone help?

Andreas 02-10-2004 01:33 AM

PHP Code:

$bbuserinfo[field7

This will give you the contents of profile field id 7 for the current user .

DiscussAnything 02-10-2004 01:46 AM

that works excellently

danke shon :)

Andreas 02-10-2004 01:52 AM

Np m8, you're welcome :)

jugo 05-06-2006 09:45 PM

Reviving this post.... How would i get this info for members of a certain group.

peterska2 05-07-2006 12:22 AM

If the members who's profile is being viewed is a member of a usergroup where the code is to be visable use:

Code:

<if condition="$userinfo[usergroupid]=x">$userinfo[fieldy]</if>
where x is the usergroup id number for the group that you wish to display this code for, and y is the profile field number.

If the viewing member is to have permission to view the field regardless of who's profile use:
Code:

<if condition="$bbuserinfo[usergroupid]=x">$userinfo[fieldy]</if>
where x and y are as above.

If you want to do it in the postbit, then use
Code:

$post[fieldy]
inside the if instead.


All times are GMT. The time now is 01:06 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.00945 seconds
  • Memory Usage 1,722KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_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