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

I accidentally deleted all of the default identities.

Discussion in 'XenForo Questions and Support' started by Mutt, Jan 7, 2012.

  1. Mutt

    Mutt Well-Known Member

    I accidentally deleted all of the default identities. I knew Xen had an identities section so I deleted all the custom fields I had that would overlap them. it wasn't until i was finished that I realized Xen1.1 now handled identities in the custom fields sections. anyone have any advice on how to put them back or should I just manually do them 1 at a time?
     
  2. Mutt

    Mutt Well-Known Member

    i'm doing a fresh local install to see if I can grab what I need out of the local phpmyadmin
     
  3. Mutt

    Mutt Well-Known Member

    i doubt anyone else will ever need it, but here's the SQL to insert the default identities back into the system

    Code:
    INSERT INTO `xf_user_field` (`field_id`, `display_group`, `display_order`, `field_type`, `field_choices`, `match_type`, `match_regex`, `match_callback_class`, `match_callback_method`, `max_length`, `required`, `show_registration`, `user_editable`, `viewable_profile`, `viewable_message`, `display_template`) VALUES
    ('aim', 'contact', 10, 'textbox', '', 'regex', '^[a-zA-Z0-9@. ]+$', '', '', 80, 0, 0, 'yes', 1, 0, ''),
    ('facebook', 'contact', 70, 'textbox', '', 'callback', '', 'XenForo_Helper_UserField', 'verifyFacebook', 0, 0, 0, 'yes', 1, 0, ''),
    ('gtalk', 'contact', 60, 'textbox', '', 'none', '', '', '', 0, 0, 0, 'yes', 1, 0, ''),
    ('icq', 'contact', 30, 'textbox', '', 'number', '', '', '', 0, 0, 0, 'yes', 1, 0, ''),
    ('msn', 'contact', 20, 'textbox', '', 'email', '', '', '', 0, 0, 0, 'yes', 1, 0, ''),
    ('skype', 'contact', 50, 'textbox', '', 'regex', '^[a-zA-Z0-9-_.,]{3,30}$', '', '', 30, 0, 0, 'yes', 1, 0, ''),
    ('twitter', 'contact', 80, 'textbox', '', 'callback', '', 'XenForo_Helper_UserField', 'verifyTwitter', 0, 0, 0, 'yes', 1, 0, ''),
    ('yahoo', 'contact', 40, 'textbox', '', 'none', '', '', '', 0, 0, 0, 'yes', 1, 0, '');
    and then this to fix the phrases
    Code:
    INSERT INTO `xf_phrase` (`phrase_id`, `language_id`, `title`, `phrase_text`, `global_cache`, `addon_id`, `version_id`, `version_string`) VALUES
    (1, 0, 'user_field_gtalk', 'Google Talk', 1, '', 0, ''),
    (2, 0, 'user_field_gtalk_desc', '', 0, '', 0, ''),
    (3, 0, 'user_field_aim', 'AIM', 1, '', 0, ''),
    (4, 0, 'user_field_aim_desc', '', 0, '', 0, ''),
    (5, 0, 'user_field_icq', 'ICQ', 1, '', 0, ''),
    (6, 0, 'user_field_icq_desc', '', 0, '', 0, ''),
    (7, 0, 'user_field_msn', 'Windows Live', 1, '', 0, ''),
    (8, 0, 'user_field_msn_desc', '', 0, '', 0, ''),
    (9, 0, 'user_field_skype', 'Skype', 1, '', 0, ''),
    (10, 0, 'user_field_skype_desc', '', 0, '', 0, ''),
    (11, 0, 'user_field_yahoo', 'Yahoo! Messenger', 1, '', 0, ''),
    (12, 0, 'user_field_yahoo_desc', '', 0, '', 0, ''),
    (13, 0, 'user_field_facebook', 'Facebook', 1, '', 0, ''),
    (14, 0, 'user_field_facebook_desc', '', 0, '', 0, ''),
    (15, 0, 'user_field_twitter', 'Twitter', 1, '', 0, ''),
    (16, 0, 'user_field_twitter_desc', '', 0, '', 0, '');
     
    INSERT INTO `xf_phrase_compiled` (`language_id`, `title`, `phrase_text`) VALUES
    (0, 'user_field_aim', 'AIM'),
    (0, 'user_field_aim_desc', ''),
    (0, 'user_field_facebook', 'Facebook'),
    (0, 'user_field_facebook_desc', ''),
    (0, 'user_field_gtalk', 'Google Talk'),
    (0, 'user_field_gtalk_desc', ''),
    (0, 'user_field_icq', 'ICQ'),
    (0, 'user_field_icq_desc', ''),
    (0, 'user_field_msn', 'Windows Live'),
    (0, 'user_field_msn_desc', ''),
    (0, 'user_field_skype', 'Skype'),
    (0, 'user_field_skype_desc', ''),
    (0, 'user_field_twitter', 'Twitter'),
    (0, 'user_field_twitter_desc', ''),
    (0, 'user_field_yahoo', 'Yahoo! Messenger'),
    (0, 'user_field_yahoo_desc', ''),
    (1, 'user_field_aim', 'AIM'),
    (1, 'user_field_aim_desc', ''),
    (1, 'user_field_facebook', 'Facebook'),
    (1, 'user_field_facebook_desc', ''),
    (1, 'user_field_gtalk', 'Google Talk'),
    (1, 'user_field_gtalk_desc', ''),
    (1, 'user_field_icq', 'ICQ'),
    (1, 'user_field_icq_desc', ''),
    (1, 'user_field_msn', 'Windows Live'),
    (1, 'user_field_msn_desc', ''),
    (1, 'user_field_skype', 'Skype'),
    (1, 'user_field_skype_desc', ''),
    (1, 'user_field_twitter', 'Twitter'),
    (1, 'user_field_twitter_desc', ''),
    (1, 'user_field_yahoo', 'Yahoo! Messenger'),
    (1, 'user_field_yahoo_desc', '');


    but i'm not sure what to do w/ phrase map
     
  4. Mutt

    Mutt Well-Known Member

    i did this for the phrase map which would have just auto made new phrase map ID numbers.

    am I going to be ok or did I just break things? I know I should have grabbed the settings from the first SQL & manually re-entered them but I didn't realize importing the phases would be so much.

    Code:
    INSERT INTO `xf_phrase_map` (`language_id`, `title`, `phrase_id`) VALUES
    (0, 'user_field_aim', 3),
    (0, 'user_field_aim_desc', 4),
    (0, 'user_field_facebook', 13),
    (0, 'user_field_facebook_desc', 14),
    (0, 'user_field_gtalk', 1),
    (0, 'user_field_gtalk_desc', 2),
    (0, 'user_field_icq', 5),
    (0, 'user_field_icq_desc', 6),
    (0, 'user_field_msn', 7),
    (0, 'user_field_msn_desc', 8),
    (0, 'user_field_skype', 9),
    (0, 'user_field_skype_desc', 10),
    (0, 'user_field_twitter', 15),
    (0, 'user_field_twitter_desc', 16),
    (0, 'user_field_yahoo', 11),
    (0, 'user_field_yahoo_desc', 12),
    (1, 'user_field_aim', 3),
    (1, 'user_field_aim_desc', 4),
    (1, 'user_field_facebook', 13),
    (1, 'user_field_facebook_desc', 14),
    (1, 'user_field_gtalk', 1),
    (1, 'user_field_gtalk_desc', 2),
    (1, 'user_field_icq', 5),
    (1, 'user_field_icq_desc', 6),
    (1, 'user_field_msn', 7),
    (1, 'user_field_msn_desc', 8),
    (1, 'user_field_skype', 9),
    (1, 'user_field_skype_desc', 10),
    (1, 'user_field_twitter', 15),
    (1, 'user_field_twitter_desc', 16),
    (1, 'user_field_yahoo', 11),
    (1, 'user_field_yahoo_desc', 12);
     

Share This Page