vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Echo user profile field in postbit (https://vborg.vbsupport.ru/showthread.php?t=231347)

YouBabble 12-27-2009 05:53 PM

Echo user profile field in postbit
 
In vBulletin 3.8, we could sort of echo or display one of the users' profile fields in the post bit by using this code:
Quote:

<a href="http://youtube.com/user/$post['field5']">
This would echo the custom profile field5 to complete the youtube channel url.

I need to know how to do the same thing in vBulletin 4.0. I have tried many things with no luck. Thanks!

Lynne 12-27-2009 06:03 PM

What have you tried? Have you seen this article on the new syntax - First Look at vBulletin 4 Template Variables?

Anseur 12-27-2009 06:24 PM

Just look at the default template, it already has profile field data in it with the fieldX format, just copy it's syntax changing the number.

mandingo 12-27-2009 10:42 PM

Got it:
HTML Code:

<vb:if condition="$post['field6']"><dd><a href="http://youtube.com/user/{vb:raw post.field6}">{vb:raw post.field6}'s Youtube Channel</a></dd></vb:if>
or:
HTML Code:

<vb:if condition="$post['field6']"><dd><a href="http://youtube.com/user/{vb:raw post.field6}">http://youtube.com/user/{vb:raw post.field6}</a></dd></vb:if>

YouBabble 12-28-2009 07:40 AM

Brilliant Mandingo and everyone else. Thanks for all your help!

claudib 01-03-2010 11:06 PM

Anyone know the code for putting out a profile field in a widget? ?Thanks


All times are GMT. The time now is 08:08 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.01016 seconds
  • Memory Usage 1,720KB
  • 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_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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