mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 11:44:08 +02:00
[ticket/12115] Also port user interests to profile fields
PHPBB3-12115
This commit is contained in:
@@ -906,8 +906,6 @@ if (!$get_info)
|
||||
array('user_inactive_reason', '', 'phpbb_inactive_reason'),
|
||||
array('user_inactive_time', '', 'phpbb_inactive_time'),
|
||||
|
||||
array('user_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')),
|
||||
array('user_occ', 'users.user_occ', array('function1' => 'phpbb_set_encoding')),
|
||||
array('user_website', 'users.user_website', 'validate_website'),
|
||||
array('user_jabber', '', ''),
|
||||
array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')),
|
||||
@@ -964,6 +962,7 @@ if (!$get_info)
|
||||
|
||||
array('user_id', 'users.user_id', 'phpbb_user_id'),
|
||||
array('pf_phpbb_occupation', 'users.user_occ', array('function1' => 'phpbb_set_encoding')),
|
||||
array('pf_phpbb_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')),
|
||||
|
||||
'where' => 'users.user_id <> -1',
|
||||
),
|
||||
|
@@ -947,6 +947,7 @@ END;;
|
||||
# Table: 'phpbb_profile_fields_data'
|
||||
CREATE TABLE phpbb_profile_fields_data (
|
||||
user_id INTEGER DEFAULT 0 NOT NULL,
|
||||
pf_phpbb_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
|
||||
pf_phpbb_occupation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
@@ -1424,7 +1425,6 @@ CREATE TABLE phpbb_users (
|
||||
user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
|
||||
user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
user_newpasswd VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
|
@@ -1154,6 +1154,7 @@ GO
|
||||
*/
|
||||
CREATE TABLE [phpbb_profile_fields_data] (
|
||||
[user_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[pf_phpbb_interests] [varchar] (4000) DEFAULT ('') NOT NULL ,
|
||||
[pf_phpbb_occupation] [varchar] (4000) DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
@@ -1740,7 +1741,6 @@ CREATE TABLE [phpbb_users] (
|
||||
[user_msnm] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[user_jabber] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[user_website] [varchar] (200) DEFAULT ('') NOT NULL ,
|
||||
[user_interests] [varchar] (4000) DEFAULT ('') NOT NULL ,
|
||||
[user_actkey] [varchar] (32) DEFAULT ('') NOT NULL ,
|
||||
[user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL ,
|
||||
[user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL ,
|
||||
|
@@ -672,6 +672,7 @@ CREATE TABLE phpbb_profile_fields (
|
||||
# Table: 'phpbb_profile_fields_data'
|
||||
CREATE TABLE phpbb_profile_fields_data (
|
||||
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
pf_phpbb_interests blob NOT NULL,
|
||||
pf_phpbb_occupation blob NOT NULL,
|
||||
PRIMARY KEY (user_id)
|
||||
);
|
||||
@@ -1033,7 +1034,6 @@ CREATE TABLE phpbb_users (
|
||||
user_msnm blob NOT NULL,
|
||||
user_jabber blob NOT NULL,
|
||||
user_website blob NOT NULL,
|
||||
user_interests blob NOT NULL,
|
||||
user_actkey varbinary(32) DEFAULT '' NOT NULL,
|
||||
user_newpasswd varbinary(120) DEFAULT '' NOT NULL,
|
||||
user_form_salt varbinary(96) DEFAULT '' NOT NULL,
|
||||
|
@@ -672,6 +672,7 @@ CREATE TABLE phpbb_profile_fields (
|
||||
# Table: 'phpbb_profile_fields_data'
|
||||
CREATE TABLE phpbb_profile_fields_data (
|
||||
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
pf_phpbb_interests text NOT NULL,
|
||||
pf_phpbb_occupation text NOT NULL,
|
||||
PRIMARY KEY (user_id)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
@@ -1033,7 +1034,6 @@ CREATE TABLE phpbb_users (
|
||||
user_msnm varchar(255) DEFAULT '' NOT NULL,
|
||||
user_jabber varchar(255) DEFAULT '' NOT NULL,
|
||||
user_website varchar(200) DEFAULT '' NOT NULL,
|
||||
user_interests text NOT NULL,
|
||||
user_actkey varchar(32) DEFAULT '' NOT NULL,
|
||||
user_newpasswd varchar(40) DEFAULT '' NOT NULL,
|
||||
user_form_salt varchar(32) DEFAULT '' NOT NULL,
|
||||
|
@@ -1265,6 +1265,7 @@ END;
|
||||
*/
|
||||
CREATE TABLE phpbb_profile_fields_data (
|
||||
user_id number(8) DEFAULT '0' NOT NULL,
|
||||
pf_phpbb_interests clob DEFAULT '' ,
|
||||
pf_phpbb_occupation clob DEFAULT '' ,
|
||||
CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id)
|
||||
)
|
||||
@@ -1857,7 +1858,6 @@ CREATE TABLE phpbb_users (
|
||||
user_msnm varchar2(765) DEFAULT '' ,
|
||||
user_jabber varchar2(765) DEFAULT '' ,
|
||||
user_website varchar2(600) DEFAULT '' ,
|
||||
user_interests clob DEFAULT '' ,
|
||||
user_actkey varchar2(32) DEFAULT '' ,
|
||||
user_newpasswd varchar2(120) DEFAULT '' ,
|
||||
user_form_salt varchar2(96) DEFAULT '' ,
|
||||
|
@@ -882,6 +882,7 @@ CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order)
|
||||
*/
|
||||
CREATE TABLE phpbb_profile_fields_data (
|
||||
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
|
||||
pf_phpbb_interests varchar(4000) DEFAULT '' NOT NULL,
|
||||
pf_phpbb_occupation varchar(4000) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (user_id)
|
||||
);
|
||||
@@ -1305,7 +1306,6 @@ CREATE TABLE phpbb_users (
|
||||
user_msnm varchar(255) DEFAULT '' NOT NULL,
|
||||
user_jabber varchar(255) DEFAULT '' NOT NULL,
|
||||
user_website varchar(200) DEFAULT '' NOT NULL,
|
||||
user_interests varchar(4000) DEFAULT '' NOT NULL,
|
||||
user_actkey varchar(32) DEFAULT '' NOT NULL,
|
||||
user_newpasswd varchar(40) DEFAULT '' NOT NULL,
|
||||
user_form_salt varchar(32) DEFAULT '' NOT NULL,
|
||||
|
@@ -467,10 +467,10 @@ INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id,
|
||||
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48);
|
||||
|
||||
# -- Users / Anonymous user
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_interests, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', 0);
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', 0);
|
||||
|
||||
# -- username: Admin password: admin (change this or remove it once everything is working!)
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_interests, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
|
||||
# -- Groups
|
||||
INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5);
|
||||
@@ -788,7 +788,8 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm');
|
||||
|
||||
# Add default profile fields
|
||||
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 1, 0, 0, 1, 1);
|
||||
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 1, 0, 0, 1, 1);
|
||||
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 1, 0, 0, 1, 2);
|
||||
|
||||
# User Notification Options (for first user)
|
||||
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, '');
|
||||
|
@@ -652,6 +652,7 @@ CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order)
|
||||
# Table: 'phpbb_profile_fields_data'
|
||||
CREATE TABLE phpbb_profile_fields_data (
|
||||
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
pf_phpbb_interests text(65535) NOT NULL DEFAULT '',
|
||||
pf_phpbb_occupation text(65535) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (user_id)
|
||||
);
|
||||
@@ -1004,7 +1005,6 @@ CREATE TABLE phpbb_users (
|
||||
user_msnm varchar(255) NOT NULL DEFAULT '',
|
||||
user_jabber varchar(255) NOT NULL DEFAULT '',
|
||||
user_website varchar(200) NOT NULL DEFAULT '',
|
||||
user_interests text(65535) NOT NULL DEFAULT '',
|
||||
user_actkey varchar(32) NOT NULL DEFAULT '',
|
||||
user_newpasswd varchar(40) NOT NULL DEFAULT '',
|
||||
user_form_salt varchar(32) NOT NULL DEFAULT '',
|
||||
|
Reference in New Issue
Block a user