function fbconnect_profile_install in Facebook Connect 5
@file Implementation of hook_install().
File
- modules/
fbconnect_profile/ fbconnect_profile.install, line 7 - Implementation of hook_install().
Code
function fbconnect_profile_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE `fbconnect_profile` (\n `uid` int(10) unsigned NOT NULL default '0',\n `name` varchar(60) NOT NULL default '',\n `religion` varchar(255) NOT NULL default '',\n `birthday` varchar(30) NOT NULL default '',\n `sex` varchar(10) NOT NULL default '',\n `relationship_status` varchar(30) NOT NULL default '',\n `political` varchar(50) NOT NULL default '',\n `activities` text,\n `interests` text,\n `music` text,\n `tv` text,\n `movies` text,\n `books` text,\n `quotes` text,\n `about_me` text,\n `affiliations` mediumtext,\n `current_location` text,\n `hometown_location` text,\n `meeting_sex` text,\n `meeting_for` text,\n PRIMARY KEY (`uid`)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */");
}
$facebook_fields = array(
'name' => t('Facebook name'),
'affiliations' => t('Affiliations'),
'religion' => t('Religious Views'),
'birthday' => t('Birthday'),
'sex' => t('Sex'),
'about_me' => t('About me'),
'hometown_location' => t('Hometown location'),
'current_location' => t('Current location'),
'meeting_sex' => t('Meeting sex'),
'meeting_for' => t('Meeting for'),
'relationship_status' => t('Relationship status'),
'political' => t('Political'),
'activities' => t('Activities'),
'interests' => t('Interests'),
'music' => t('Favourite Music'),
'tv' => t('Favourite TV'),
'movies' => t('Favourite Films'),
'books' => t('Favourite Books'),
'quotes' => t('Favourite Quotations'),
);
variable_set('facebook_user_fields', $facebook_fields);
}