From: Henry S. <kel...@ph...> - 2009-08-03 15:47:40
|
Author: Kellanved Date: Mon Aug 3 16:46:56 2009 New Revision: 9916 Log: #48985 Modified: branches/phpBB-3_0_0/phpBB/develop/create_schema_files.php branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html branches/phpBB-3_0_0/phpBB/includes/acp/acp_profile.php branches/phpBB-3_0_0/phpBB/install/database_update.php branches/phpBB-3_0_0/phpBB/install/schemas/firebird_schema.sql (contents, props changed) branches/phpBB-3_0_0/phpBB/install/schemas/mssql_schema.sql (contents, props changed) branches/phpBB-3_0_0/phpBB/install/schemas/mysql_40_schema.sql (contents, props changed) branches/phpBB-3_0_0/phpBB/install/schemas/mysql_41_schema.sql (contents, props changed) branches/phpBB-3_0_0/phpBB/install/schemas/oracle_schema.sql (contents, props changed) branches/phpBB-3_0_0/phpBB/install/schemas/postgres_schema.sql (contents, props changed) branches/phpBB-3_0_0/phpBB/install/schemas/sqlite_schema.sql (contents, props changed) branches/phpBB-3_0_0/phpBB/language/en/acp/profile.php branches/phpBB-3_0_0/phpBB/viewtopic.php Modified: branches/phpBB-3_0_0/phpBB/develop/create_schema_files.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/develop/create_schema_files.php (original) --- branches/phpBB-3_0_0/phpBB/develop/create_schema_files.php Mon Aug 3 16:46:56 2009 *************** *** 1408,1413 **** --- 1408,1414 ---- 'field_validation' => array('VCHAR_UNI:20', ''), 'field_required' => array('BOOL', 0), 'field_show_on_reg' => array('BOOL', 0), + 'field_show_on_vt' => array('BOOL', 0), 'field_show_profile' => array('BOOL', 0), 'field_hide' => array('BOOL', 0), 'field_no_view' => array('BOOL', 0), Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original) --- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Mon Aug 3 16:46:56 2009 *************** *** 258,266 **** </li> <li>[Feature] Display version check on ACP main page.</li> <li>[Feature] Ability to copy permissions from one forum to several other forums.</li> <li>[Feature] Fallback options for missing language files. (Bug #38575 - Patch by EXreaction)</li> </ul> - <a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3> <ul> --- 258,266 ---- </li> <li>[Feature] Display version check on ACP main page.</li> <li>[Feature] Ability to copy permissions from one forum to several other forums.</li> + <li>[Feature] Ability to control the display of custom profile fields on viewtopic (Bug #48985).</li> <li>[Feature] Fallback options for missing language files. (Bug #38575 - Patch by EXreaction)</li> </ul> <a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3> <ul> Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_profile.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/acp/acp_profile.php (original) --- branches/phpBB-3_0_0/phpBB/includes/acp/acp_profile.php Mon Aug 3 16:46:56 2009 *************** *** 369,374 **** --- 369,375 ---- 'field_show_profile'=> 0, 'field_no_view' => 0, 'field_show_on_reg' => 0, + 'field_show_on_vt' => 0, 'lang_name' => utf8_normalize_nfc(request_var('field_ident', '', true)), 'lang_explain' => '', 'lang_default_value'=> '') *************** *** 379,385 **** // $exclude contains the data we gather in each step $exclude = array( ! 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_required', 'field_hide', 'field_show_profile', 'field_no_view'), 2 => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'), 3 => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options') ); --- 380,386 ---- // $exclude contains the data we gather in each step $exclude = array( ! 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_vt', 'field_required', 'field_hide', 'field_show_profile', 'field_no_view'), 2 => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'), 3 => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options') ); *************** *** 405,410 **** --- 406,412 ---- $visibility_ary = array( 'field_required', 'field_show_on_reg', + 'field_show_on_vt', 'field_show_profile', 'field_hide', ); *************** *** 721,726 **** --- 723,729 ---- 'S_STEP_ONE' => true, 'S_FIELD_REQUIRED' => ($cp->vars['field_required']) ? true : false, 'S_SHOW_ON_REG' => ($cp->vars['field_show_on_reg']) ? true : false, + 'S_SHOW_ON_VT' => ($cp->vars['field_show_on_vt']) ? true : false, 'S_FIELD_HIDE' => ($cp->vars['field_hide']) ? true : false, 'S_SHOW_PROFILE' => ($cp->vars['field_show_profile']) ? true : false, 'S_FIELD_NO_VIEW' => ($cp->vars['field_no_view']) ? true : false, *************** *** 1036,1041 **** --- 1039,1045 ---- 'field_validation' => $cp->vars['field_validation'], 'field_required' => $cp->vars['field_required'], 'field_show_on_reg' => $cp->vars['field_show_on_reg'], + 'field_show_on_vt' => $cp->vars['field_show_on_vt'], 'field_hide' => $cp->vars['field_hide'], 'field_show_profile' => $cp->vars['field_show_profile'], 'field_no_view' => $cp->vars['field_no_view'] Modified: branches/phpBB-3_0_0/phpBB/install/database_update.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/database_update.php (original) --- branches/phpBB-3_0_0/phpBB/install/database_update.php Mon Aug 3 16:46:56 2009 *************** *** 704,709 **** --- 704,712 ---- REPORTS_TABLE => array( 'pm_id' => array('UINT', 0), ), + PROFILE_FIELDS_TABLE => array( + 'field_show_on_vt' => array('BOOL', 0), + ), ), 'change_columns' => array( USERS_TABLE => array( Modified: branches/phpBB-3_0_0/phpBB/install/schemas/firebird_schema.sql ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/schemas/firebird_schema.sql (original) --- branches/phpBB-3_0_0/phpBB/install/schemas/firebird_schema.sql Mon Aug 3 16:46:56 2009 *************** *** 790,795 **** --- 790,796 ---- field_validation VARCHAR(20) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, field_required INTEGER DEFAULT 0 NOT NULL, field_show_on_reg INTEGER DEFAULT 0 NOT NULL, + field_show_on_vt INTEGER DEFAULT 0 NOT NULL, field_show_profile INTEGER DEFAULT 0 NOT NULL, field_hide INTEGER DEFAULT 0 NOT NULL, field_no_view INTEGER DEFAULT 0 NOT NULL, *************** *** 1370,1376 **** 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, ! user_new INTEGER DEFAULT 1 NOT NULL );; ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);; --- 1371,1379 ---- 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, ! user_new INTEGER DEFAULT 1 NOT NULL, ! user_reminded INTEGER DEFAULT 0 NOT NULL, ! user_reminded_time INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);; Propchange: branches/phpBB-3_0_0/phpBB/install/schemas/firebird_schema.sql ------------------------------------------------------------------------------ *** svn:eol-style (original) --- svn:eol-style Mon Aug 3 16:46:56 2009 *************** *** 1 **** ! native --- 1 ---- ! LF Modified: branches/phpBB-3_0_0/phpBB/install/schemas/mssql_schema.sql ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/schemas/mssql_schema.sql (original) --- branches/phpBB-3_0_0/phpBB/install/schemas/mssql_schema.sql Mon Aug 3 16:46:56 2009 *************** *** 948,953 **** --- 948,954 ---- [field_validation] [varchar] (20) DEFAULT ('') NOT NULL , [field_required] [int] DEFAULT (0) NOT NULL , [field_show_on_reg] [int] DEFAULT (0) NOT NULL , + [field_show_on_vt] [int] DEFAULT (0) NOT NULL , [field_show_profile] [int] DEFAULT (0) NOT NULL , [field_hide] [int] DEFAULT (0) NOT NULL , [field_no_view] [int] DEFAULT (0) NOT NULL , *************** *** 1645,1651 **** [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , [user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL , [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL , ! [user_new] [int] DEFAULT (1) NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO --- 1646,1654 ---- [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , [user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL , [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL , ! [user_new] [int] DEFAULT (1) NOT NULL , ! [user_reminded] [int] DEFAULT (0) NOT NULL , ! [user_reminded_time] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO Propchange: branches/phpBB-3_0_0/phpBB/install/schemas/mssql_schema.sql ------------------------------------------------------------------------------ *** svn:eol-style (original) --- svn:eol-style Mon Aug 3 16:46:56 2009 *************** *** 1 **** ! native --- 1 ---- ! LF Modified: branches/phpBB-3_0_0/phpBB/install/schemas/mysql_40_schema.sql ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/schemas/mysql_40_schema.sql (original) --- branches/phpBB-3_0_0/phpBB/install/schemas/mysql_40_schema.sql Mon Aug 3 16:46:56 2009 *************** *** 554,559 **** --- 554,560 ---- field_validation varbinary(60) DEFAULT '' NOT NULL, field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, *************** *** 971,976 **** --- 972,979 ---- user_newpasswd varbinary(120) DEFAULT '' NOT NULL, user_form_salt varbinary(96) DEFAULT '' NOT NULL, user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_reminded tinyint(4) DEFAULT '0' NOT NULL, + user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id), KEY user_birthday (user_birthday), KEY user_email_hash (user_email_hash), Propchange: branches/phpBB-3_0_0/phpBB/install/schemas/mysql_40_schema.sql ------------------------------------------------------------------------------ *** svn:eol-style (original) --- svn:eol-style Mon Aug 3 16:46:56 2009 *************** *** 1 **** ! native --- 1 ---- ! LF Modified: branches/phpBB-3_0_0/phpBB/install/schemas/mysql_41_schema.sql ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/schemas/mysql_41_schema.sql (original) --- branches/phpBB-3_0_0/phpBB/install/schemas/mysql_41_schema.sql Mon Aug 3 16:46:56 2009 *************** *** 554,559 **** --- 554,560 ---- field_validation varchar(20) DEFAULT '' NOT NULL, field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, *************** *** 971,976 **** --- 972,979 ---- user_newpasswd varchar(40) DEFAULT '' NOT NULL, user_form_salt varchar(32) DEFAULT '' NOT NULL, user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_reminded tinyint(4) DEFAULT '0' NOT NULL, + user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (user_id), KEY user_birthday (user_birthday), KEY user_email_hash (user_email_hash), Propchange: branches/phpBB-3_0_0/phpBB/install/schemas/mysql_41_schema.sql ------------------------------------------------------------------------------ *** svn:eol-style (original) --- svn:eol-style Mon Aug 3 16:46:56 2009 *************** *** 1 **** ! native --- 1 ---- ! LF Modified: branches/phpBB-3_0_0/phpBB/install/schemas/oracle_schema.sql ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/schemas/oracle_schema.sql (original) --- branches/phpBB-3_0_0/phpBB/install/schemas/oracle_schema.sql Mon Aug 3 16:46:56 2009 *************** *** 1060,1065 **** --- 1060,1066 ---- field_validation varchar2(60) DEFAULT '' , field_required number(1) DEFAULT '0' NOT NULL, field_show_on_reg number(1) DEFAULT '0' NOT NULL, + field_show_on_vt number(1) DEFAULT '0' NOT NULL, field_show_profile number(1) DEFAULT '0' NOT NULL, field_hide number(1) DEFAULT '0' NOT NULL, field_no_view number(1) DEFAULT '0' NOT NULL, *************** *** 1791,1796 **** --- 1792,1799 ---- user_newpasswd varchar2(120) DEFAULT '' , user_form_salt varchar2(96) DEFAULT '' , user_new number(1) DEFAULT '1' NOT NULL, + user_reminded number(4) DEFAULT '0' NOT NULL, + user_reminded_time number(11) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id), CONSTRAINT u_phpbb_username_clean UNIQUE (username_clean) ) Propchange: branches/phpBB-3_0_0/phpBB/install/schemas/oracle_schema.sql ------------------------------------------------------------------------------ *** svn:eol-style (original) --- svn:eol-style Mon Aug 3 16:46:56 2009 *************** *** 1 **** ! native --- 1 ---- ! LF Modified: branches/phpBB-3_0_0/phpBB/install/schemas/postgres_schema.sql ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/schemas/postgres_schema.sql (original) --- branches/phpBB-3_0_0/phpBB/install/schemas/postgres_schema.sql Mon Aug 3 16:46:56 2009 *************** *** 741,746 **** --- 741,747 ---- field_validation varchar(20) DEFAULT '' NOT NULL, field_required INT2 DEFAULT '0' NOT NULL CHECK (field_required >= 0), field_show_on_reg INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_reg >= 0), + field_show_on_vt INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_vt >= 0), field_show_profile INT2 DEFAULT '0' NOT NULL CHECK (field_show_profile >= 0), field_hide INT2 DEFAULT '0' NOT NULL CHECK (field_hide >= 0), field_no_view INT2 DEFAULT '0' NOT NULL CHECK (field_no_view >= 0), *************** *** 1234,1239 **** --- 1235,1242 ---- user_newpasswd varchar(40) DEFAULT '' NOT NULL, user_form_salt varchar(32) DEFAULT '' NOT NULL, user_new INT2 DEFAULT '1' NOT NULL CHECK (user_new >= 0), + user_reminded INT2 DEFAULT '0' NOT NULL, + user_reminded_time INT4 DEFAULT '0' NOT NULL CHECK (user_reminded_time >= 0), PRIMARY KEY (user_id) ); Propchange: branches/phpBB-3_0_0/phpBB/install/schemas/postgres_schema.sql ------------------------------------------------------------------------------ *** svn:eol-style (original) --- svn:eol-style Mon Aug 3 16:46:56 2009 *************** *** 1 **** ! native --- 1 ---- ! LF Modified: branches/phpBB-3_0_0/phpBB/install/schemas/sqlite_schema.sql ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/schemas/sqlite_schema.sql (original) --- branches/phpBB-3_0_0/phpBB/install/schemas/sqlite_schema.sql Mon Aug 3 16:46:56 2009 *************** *** 537,542 **** --- 537,543 ---- field_validation varchar(20) NOT NULL DEFAULT '', field_required INTEGER UNSIGNED NOT NULL DEFAULT '0', field_show_on_reg INTEGER UNSIGNED NOT NULL DEFAULT '0', + field_show_on_vt INTEGER UNSIGNED NOT NULL DEFAULT '0', field_show_profile INTEGER UNSIGNED NOT NULL DEFAULT '0', field_hide INTEGER UNSIGNED NOT NULL DEFAULT '0', field_no_view INTEGER UNSIGNED NOT NULL DEFAULT '0', *************** *** 940,946 **** user_actkey varchar(32) NOT NULL DEFAULT '', user_newpasswd varchar(40) NOT NULL DEFAULT '', user_form_salt varchar(32) NOT NULL DEFAULT '', ! user_new INTEGER UNSIGNED NOT NULL DEFAULT '1' ); CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday); --- 941,949 ---- user_actkey varchar(32) NOT NULL DEFAULT '', user_newpasswd varchar(40) NOT NULL DEFAULT '', user_form_salt varchar(32) NOT NULL DEFAULT '', ! user_new INTEGER UNSIGNED NOT NULL DEFAULT '1', ! user_reminded tinyint(4) NOT NULL DEFAULT '0', ! user_reminded_time INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday); Propchange: branches/phpBB-3_0_0/phpBB/install/schemas/sqlite_schema.sql ------------------------------------------------------------------------------ *** svn:eol-style (original) --- svn:eol-style Mon Aug 3 16:46:56 2009 *************** *** 1 **** ! native --- 1 ---- ! LF Modified: branches/phpBB-3_0_0/phpBB/language/en/acp/profile.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/language/en/acp/profile.php (original) --- branches/phpBB-3_0_0/phpBB/language/en/acp/profile.php Mon Aug 3 16:46:56 2009 *************** *** 66,71 **** --- 66,73 ---- 'DISPLAY_AT_PROFILE_EXPLAIN' => 'The user is able to change this profile field within the user control panel.', 'DISPLAY_AT_REGISTER' => 'Display on registration screen', 'DISPLAY_AT_REGISTER_EXPLAIN' => 'If this option is enabled, the field will be displayed on registration.', + 'DISPLAY_ON_VT' => 'Display on viewtopic screen', + 'DISPLAY_ON_VT_EXPLAIN' => 'If this option is enabled, the field will be displayed in the mini-profile on the topic screen.', 'DISPLAY_PROFILE_FIELD' => 'Publicly display profile field', 'DISPLAY_PROFILE_FIELD_EXPLAIN' => 'The profile field will be shown in all locations allowed within the load settings. Setting this to ânoâ will hide the field from topic pages, profiles and the memberlist.', 'DROPDOWN_ENTRIES_EXPLAIN' => 'Enter your options now, every option in one line.', Modified: branches/phpBB-3_0_0/phpBB/viewtopic.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/viewtopic.php (original) --- branches/phpBB-3_0_0/phpBB/viewtopic.php Mon Aug 3 16:46:56 2009 *************** *** 1179,1185 **** $cp = new custom_profile(); // Grab all profile fields from users in id cache for later use - similar to the poster cache ! $profile_fields_cache = $cp->generate_profile_fields_template('grab', $id_cache); } // Generate online information for user --- 1179,1200 ---- $cp = new custom_profile(); // Grab all profile fields from users in id cache for later use - similar to the poster cache ! $profile_fields_tmp = $cp->generate_profile_fields_template('grab', $id_cache); ! ! // filter out fields not to be displayed on viewtopic. Yes, it's a hack, but this shouldn't break any MODs. ! $profile_fields_cache = array(); ! foreach ($profile_fields_tmp as $profile_user_id => $profile_fields) ! { ! $profile_fields_cache[$profile_user_id] = array(); ! foreach ($profile_fields as $used_ident => $profile_field) ! { ! if ($profile_field['data']['field_show_on_vt']) ! { ! $profile_fields_cache[$profile_user_id][$used_ident] = $profile_field; ! } ! } ! } ! unset($profile_fields_tmp); } // Generate online information for user |