Jump to content


Adding Custom Profile Fields


1 reply to this topic

#1 pre

  • Members
  • 47 posts
  • United States

Posted 12 March 2007 - 12:33 AM

Hi DKC,

I had once asked you about adding a Class Year in the Joined column on the phpbb and you had found this download for me.

Quote

OK I think this is what you need for the "Class Year" mod...

http://www.phpbbhack...m/download/6664
It has listed in the install instructions that you have to do the following:

#
#-----[ SQL ]-------
#
# If you do not wish to manually execute this query, or you do not know how to execute it,
# you can place goodies/db_installer.php into your root directory and run that.
#
CREATE TABLE `phpbb_profile_fields` (
`field_id` MEDIUMINT( 8 ) UNSIGNED NOT NULL AUTO_INCREMENT,
`field_name` VARCHAR( 255 ) NOT NULL ,
`field_description` VARCHAR( 255 ) NULL ,
`field_type` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '0',
`text_field_default` VARCHAR( 255 ) NULL ,
`text_field_maxlen` INT UNSIGNED NOT NULL DEFAULT '255',
`text_area_default` TEXT NULL ,
`text_area_maxlen` INT UNSIGNED NOT NULL DEFAULT '1024',
`radio_button_default` VARCHAR( 255 ) NULL ,
`radio_button_values` TEXT NULL ,
`checkbox_default` TEXT NULL ,
`checkbox_values` TEXT NULL ,
`is_required` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '0',
`users_can_view` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '1',
`view_in_profile` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '1',
`profile_location` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '2',
`view_in_memberlist` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '0',
`view_in_topic` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '0',
`topic_location` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '1',
`linkify` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (field_id),
INDEX ( `field_type` ) ,
UNIQUE (`field_name`)
);
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('collapse_fields', '0');
#

There is apparently a bug in the goodies_db_installer so how do I do the above manually? I'm looking at putting this on my test site.

#2 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 12 March 2007 - 08:45 AM

Easy, just paste the queries into phpMyAdmin and run them.

1. Navigate to the database you want to alter.
2. Click the "SQL" tab.
3. Paste the query into the textarea.
4. Click "Go".

If there are errors in the query then phpMyAdmin should tell you what they are.

As always, you should make a full database backup before you modify anything.


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users