Log in

View Full Version : How Does $customfields Work?


vb_guru
10-15-2004, 09:00 PM
I have moved $customfields around in the modifyprofile template within VB3 admin and then looked at the output on profile.php.

The thing that I do not understand is that it comes with its own formatting. For example I put $customfields[required] anywhere in the template and it comes out as showing the required custom fields for that user on the profile.php page. I then did a "view source within IE 6 and this $customfields[required] variable displays with tables and rows and columns.

Can someone explain to me where $customfields[required] is getting the formatting and how it is making a database call for just that user and putting that user's info in a nice table?

Thanks in advance.

Xenon
10-15-2004, 10:30 PM
well, its defined in profile.php

A hint for finding out the correct templates: You can turn on 'show template names in comments' setting from within your acp vBulletin options, it makes debugging a lot easier :)

vb_guru
10-16-2004, 02:06 AM
Hi Thanks for the reply. I found this in profile.php:

// Get Custom profile fields
$customfields = array();
fetch_profilefields(0);

However, I am not sure how this data from database to the .php page. Do the profilefields become contained in the array of the variable customfields? As you can see I am new to this.

Xenon
10-16-2004, 12:45 PM
you may want to take a look at fetch_profilefields()

it's defined in includes/functions_user.php :)