• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Adding new display groups to the userfields

xf_phantom

Well-known member
#1
How to do this?

i've extended the userfield model and datawriter, added it to the enum field in the database, but what's the best way to put this into an addon?
e.g. i can't just use this query

Code:
ALTER TABLE  `xf_user_field` CHANGE  `display_group`  `display_group` ENUM
(  'personal',  'contact',  'preferences',  'test1', 'test2' )
CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT  'personal';
because it would add test1 and test2 but remove e.g. all other custom enum values.
 

Jake Bunce

XenForo moderator
Staff member
#2
Hmm, an enumerated type like that isn't really made to be extended. It's probably better to create a new field for your custom categories, and implement them separately from the default categories.

Ideally the devs should create a proper category system for user fields.
 

xf_phantom

Well-known member
#3
It's probably better to create a new field for your custom categories, and implement them separately from the default categories.
hm?
Sorry, not sure how you mean this. I can't add a new userfield with a new display location (display_group) without changing the db structure.