Log in

View Full Version : vB Custom Profile Fields


Twilkey
03-02-2008, 01:09 AM
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.)
$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
$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
$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:
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.

Dismounted
03-16-2008, 08:53 AM
Please post the whole PHP file you're using and the exact error you're receiving (incl. line numbers, etc.).