XF 1.1 Custom User Fields in XenForo 1.1

One of the most requested features for XenForo 1.1 has been the ability to define custom fields for your users. Here's a first look at the user field system we've built.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
One question, with customized profile fields I can I export the database tablesyou add those new fields? such as having an excel tabal all the people whofilled the city's profile?
 
The custom profile field options look great. May want to add a bit of text describing what will be the phrase and what will be the translation (thinking the check boxes here).
 
I probably should take a look around before asking this but are we able to control who can and can't use custom user fields?
 
One question, with customized profile fields I can I export the database tablesyou add those new fields? such as having an excel tabal all the people whofilled the city's profile?
if you filtered your query with something like
WHERE field_id = 'users_city'

it would then should a list of all users and their answer to the profile field of City
 
That ability is not in XenForo 1.1, but may come in the future.
I am guessing we need to do a callback if we want to do cascading profile fields?

i.e. something like,
Profile field Country,
If user chooses 'Canada'
then profile field state / province
would limit users choice to only Canadian provinces.
 
Will it be possible to have an option to choose what custom user fields might make it to mini-stats .xml file? or which custom field? This would be super handy for the chat network.
 
Will it be possible to have an option to choose what custom user fields might make it to mini-stats .xml file? or which custom field? This would be super handy for the chat network.
Right now we don't support that. It's certainly something we'd consider for the future though.
 
is it possible to make the Field updated by a time or a Button in the ACP to update all the members field all together

let say I want to make a castum filed that will show in which year = Year one
then I want to make it after while Year Tow . "Variables"
and it will be so much good if this will be in user title as well ..... I am in the Second Year ... after 2 years .. I am in the 4th year ...

something like that will be great
 
Maybe a suggestion for xf > 1.1

we've seen everywhere a php callback, why not here too?*scnr* (=> "sorry, could not resist" because kier did't know what scnr means)

e.g.=> dynamic drop down...

If you have a table with fields, which should be selectable by user as profile field...

I know it would be possible with own columns in user table + extending dw + ............ but with an dynamic profile field it would be IMO much easier to make something like:
table : cars
Code:
car_id  | name | manufacturer
1        | A6      | audi

create callback:
PHP:
class Car_Profilefield extends ProfileField{

/** placed in profilefield
*//
public static function validateField($name, $value){
if ($name, in_array($this->getFields()){
return true;
}
}

public static function getFields(){
$db = XFA::get('db');
return $db->........................
}

protected $_type = 'select';
protected $_outputTemplate = 'foo';

Then you only need to set the callback class and that's it....
All selectable values are coming from the class and the admin don't need to change them manual in the acp....

SOrry if it's already available,... haven't seen it anywhere in the video
 
Is there a way to lets say Mask Username to display certain profile fields like I have First/Last Name, and I if they are filled in I would like it to display that instead of their username, if they are blank then it'd show the username like default?
 
Is there a way to lets say Mask Username to display certain profile fields like I have First/Last Name, and I if they are filled in I would like it to display that instead of their username, if they are blank then it'd show the username like default?
You'd need an addon for that.
 
I figured that... Thanks James any idea where I can do this? As in point me to a direction?
Well you'd need to override the {xen:helper username} and <xen:username /> functions to display the first and last names instead of the username. You'd also need to replace all instances of {$user.username} with the 2 custom fields for the first and last names.

(In case you hadn't guessed, it'd have to be custom-coded :D)
 
Of course I figured this, thanks again James. Sounds simple enough to someone who knows what their doing of course =).
 

Very happy with this feature. I especially like the use of $value, as I have used it to select an icon depending on what you picked (see picture). I also didn't want to display the field name, only the icon, so I made the text transparent for that field via extras.css, maybe there is a better way to do it. I was also able to use a css sprite, so that all possible icons come from one image. One thing I noticed is that what it substitutes for $value is the Text part (the right side value), not the Value part (left side value), which is the opposite of what I was expecting.

userfield.webp
 
I have not moved over to XenForo yet, just have the licenses. Can anyone tell me if I can limit who gets to use the custom fields. My competitors actually try to market on my forum and I will need to try and prevent that.
 
Top Bottom