vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vB Custom Profile Fields (https://vborg.vbsupport.ru/showthread.php?t=171855)

Twilkey 03-02-2008 01:09 AM

vB Custom Profile Fields
 
I am working on some mods and I have used Google and searched these forums. I can't seem to find a solution. Anyway here is the base of what I am trying to do.

I need to pull the info from a profile field that a members enters. I am going to have a link in the members profile that other members can click and it will take them to a new page that will displays various info. In order to get the info, I need to be able to use the data that the member enters into the custom profile field.

So I need to know how to pull the info from the field such as $bbuserinfo['field5'].
Also, i have tried using the example, but as it is alone, it wont work.

EX. - I need the full version of this to work.
(Nevermind the $keyurl, unless your method of getting the field data to work will mess it up.)
PHP Code:

$url 'http://domain.com/index.php?variable=' $bbuserinfo['field5'] . "&start=0&end=5" $keyurl


Twilkey 03-06-2008 04:54 AM

Anything?

Dismounted 03-06-2008 05:12 AM

PHP Code:

$url 'http://domain.com/index.php?variable=' $vbulletin->userinfo['field5'] . "&start=0&end=5" $keyurl


Twilkey 03-07-2008 08:03 PM

I tried that and it didnt work.

Dismounted 03-08-2008 03:26 AM

Where are you putting the code, and where are you using the variable?

Twilkey 03-16-2008 05:56 AM

PHP Code:

    $url_gamelist 'http://haloapi.com/api/player/games/index.php?gamertag=' $vbulletin->userinfo['field5'] . "&start=0&end=5" $keyurl;

    
$rss_file_gamelist file_get_contents($url_gamelist);    
    
    
$xml_gamelist = new SimpleXMLElement($rss_file_gamelist); 


Dismounted 03-16-2008 06:16 AM

Where are you putting the code?

Twilkey 03-16-2008 06:22 AM

In a php file. I am using the custom vB page article. I have been messing with it and I can't seem to get it. I am trying to parse a xml file that required the field5 input and I have tried SimpleXML and I wouldn't parse the file cause it was returning as an HTML file, so I tried the PHP Tidy Extension. It seemed to actually go ahead with the parse, but now I am getting T_String errors and it seems to have a conflict with eval() so I cant fetch the template I need.

Dismounted 03-16-2008 06:39 AM

Add this code before it:
PHP Code:

die($vbulletin->userinfo['field5']); 

And open the page. If the page comes up blank, then you have a problem, if it displays the correct value, your other code is not working properly.

Twilkey 03-16-2008 06:48 AM

Yeah, the info is showing, so something in vB is making the script not work cause the script works standalone.


All times are GMT. The time now is 01:10 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.01009 seconds
  • Memory Usage 1,734KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete