vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   What extra code do I need to add? (https://vborg.vbsupport.ru/showthread.php?t=133098)

chris1979 12-03-2006 08:23 AM

What extra code do I need to add?
 
I have some custom fields set up for my site. For example, field6 is the member's real name.

If I type $post[field6] in the membersinfo template, their name appears.

With other templates I've tried this with, the name doesn't appear. It just leaves a blank space.

Is there some coding in membersinfo that I can copy into other templates? It's vital for my site that I can use the member's real name in different places.

What code do I need to add to the other files and/or templates?

Thanks,

Chris

peterska2 12-03-2006 09:51 AM

Code:

$userinfo[fieldx]
Used in memberinfo and some other places
Code:

$bbuserinfo[fieldx]
used if you want the logged in users info to show and not specific to where he is viewing
Code:

$post[fieldx]
used in postbit only

Hope this helps

chris1979 12-03-2006 11:38 AM

I have tried all three versions in my who's online template, and none of them work for me at the moment. :(

$post[fieldX] and $userinfo[fieldX] both show nothing and $bbuserinfo[fieldX] shows the data for the member viewing the page.

Any ideas?

kobescoresagain 12-03-2006 02:07 PM

I checked my postbit_legacy template where I have information from my custom field displayed at. I used $post[field5] for it. So that should work. I would recommend that you do a print_r on the $post array to see what is contained, it may be a possibility that you don't have that array avialable on that page currently.

chris1979 12-03-2006 02:34 PM

I want this to work on the who's online page. It already works on postbit.

Quote:

Originally Posted by kobescoresagain (Post 1130814)
I would recommend that you do a print_r on the $post array to see what is contained, it may be a possibility that you don't have that array avialable on that page currently.

What does that mean? What's a print_r?

chris1979 12-10-2006 08:35 AM

anyone know?


All times are GMT. The time now is 07:34 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.01096 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
  • (3)bbcode_code_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