vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Querying User Profile Fields (https://vborg.vbsupport.ru/showthread.php?t=119703)

TruthElixirX 06-26-2006 09:34 PM

Querying User Profile Fields
 
I need to pull information in a user profile field to a PHP script. This PHP script is going to be a dynamic image.

Code:

Header ("Content-type: image/png");
$img_handle = imageCreateFromPNG(profile field X);
$color = ImageColorAllocate ($img_handle, 100, 100, 100);
$ip = $_SERVER['REMOTE_ADDR'];
ImageString ($img_handle, 3, 10, 9,  "profile field X, profile field X);
ImagePng ($img_handle);
ImageDestroy ($img_handle);


Something like that would be the code I was using for the dynamic image thing. (I lifted that off of a tutorial, not how mine will work exactly).

Do you understand what I'm saying? I just need to learn how to use the profile fields in a non-native PHP document. >.<. Any help is much appreciated!

Marco van Herwaarden 06-28-2006 06:20 AM

I am not really sure i understand what information you are asking for.

Paul M 06-28-2006 06:51 AM

Unless you are including global.php in your script you will need to pull the sessionid from the users cookie, and then run an sql query to get the userid and userprofile field(s) you want.

TruthElixirX 06-28-2006 04:07 PM

@Marco, I'm still learning programming. I'm asking what array or variable contains user profile fields. I want to use the information contained in a user profile field in another php script.

@Paul M, I plan on including global.php and such.

Paul M 06-28-2006 04:43 PM

If you include global.php the the information is available to you as $vbulletin->userinfo['fieldx'];

TruthElixirX 06-28-2006 06:03 PM

Quote:

Originally Posted by Paul M
If you include global.php the the information is available to you as $vbulletin->userinfo['fieldx'];

Thanks! :D.


All times are GMT. The time now is 05:17 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.01942 seconds
  • Memory Usage 1,718KB
  • 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)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