install.sql 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. --
  2. -- Table structure for table `bx_facebook_accounts`
  3. --
  4. CREATE TABLE `[db_prefix]accounts` (
  5. `id_profile` int(10) unsigned NOT NULL,
  6. `fb_profile` bigint(20) NOT NULL,
  7. PRIMARY KEY (`id_profile`),
  8. KEY `fb_profile` (`fb_profile`)
  9. ) ENGINE=MyISAM;
  10. INSERT INTO `sys_email_templates` (`Name`, `Subject`, `Body`, `Desc`, `LangID`) VALUES
  11. ('t_fb_connect_password_generated', 'You have been generated a new password', '<html><head></head><body style="font: 12px Verdana; color:#000000">\r\n<p><b>Hello <NickName></b>, You have been generated a new password - <b><NewPassword></b></p>\r\n\r\n<p></p>\r\n\r\n<p>---</p>\r\nBest regards, <SiteName> \r\n<p style="font: bold 10px Verdana; color:red">!!!Auto-generated e-mail, please, do not reply!!!</p></body></html>', 'Facebook connect password generated', 0);
  12. --
  13. -- Dumping data for table `sys_objects_auths`
  14. --
  15. INSERT INTO
  16. `sys_objects_auths`
  17. (`Title`, `Link`)
  18. VALUES
  19. ('_bx_facebook', 'modules/?r=facebook_connect/login_form');
  20. --
  21. -- `sys_alerts_handlers` ;
  22. --
  23. INSERT INTO
  24. `sys_alerts_handlers`
  25. SET
  26. `name` = 'bx_facebook_connect',
  27. `class` = 'BxFaceBookConnectAlerts',
  28. `file` = 'modules/boonex/facebook_connect/classes/BxFaceBookConnectAlerts.php';
  29. SET @iHandlerId := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_facebook_connect');
  30. --
  31. -- `sys_alerts` ;
  32. --
  33. INSERT INTO
  34. `sys_alerts`
  35. SET
  36. `unit` = 'profile',
  37. `action` = 'logout',
  38. `handler_id` = @iHandlerId;
  39. INSERT INTO
  40. `sys_alerts`
  41. SET
  42. `unit` = 'profile',
  43. `action` = 'join',
  44. `handler_id` = @iHandlerId;
  45. INSERT INTO
  46. `sys_alerts`
  47. SET
  48. `unit` = 'profile',
  49. `action` = 'delete',
  50. `handler_id` = @iHandlerId;
  51. --
  52. -- need for compatibility with old style login, will need remove it in a feature version
  53. --
  54. ALTER TABLE `Profiles` ADD `FacebookProfile` VARCHAR(32) NOT NULL;
  55. ALTER TABLE `Profiles` ADD INDEX (`FacebookProfile`) ;
  56. --
  57. -- `sys_options_cats` ;
  58. --
  59. SET @iMaxOrder = (SELECT `menu_order` + 1 FROM `sys_options_cats` ORDER BY `menu_order` DESC LIMIT 1);
  60. INSERT INTO `sys_options_cats` (`name`, `menu_order`) VALUES ('Facebook connect', @iMaxOrder);
  61. SET @iKategId = (SELECT LAST_INSERT_ID());
  62. --
  63. -- Dumping data for table `sys_options`;
  64. --
  65. INSERT INTO
  66. `sys_options`
  67. SET
  68. `Name` = 'bx_facebook_connect_api_key',
  69. `kateg` = @iKategId,
  70. `desc` = 'Facebook API Key',
  71. `Type` = 'digit',
  72. `VALUE` = '',
  73. `order_in_kateg` = 1;
  74. INSERT INTO
  75. `sys_options`
  76. SET
  77. `Name` = 'bx_facebook_connect_secret',
  78. `kateg` = @iKategId,
  79. `desc` = 'Facebook App Secret',
  80. `Type` = 'digit',
  81. `VALUE` = '',
  82. `order_in_kateg` = 2;
  83. INSERT INTO
  84. `sys_options`
  85. SET
  86. `Name` = 'bx_facebook_connect_redirect_page',
  87. `kateg` = @iKategId,
  88. `desc` = 'Redirect page after first sign in',
  89. `Type` = 'select',
  90. `VALUE` = 'join',
  91. `AvailableValues` = 'join,pedit,avatar,member,index',
  92. `order_in_kateg` = 3;
  93. INSERT INTO
  94. `sys_options`
  95. SET
  96. `Name` = 'bx_facebook_connect_auto_friends',
  97. `kateg` = @iKategId,
  98. `desc` = 'Auto-friend members if they are already friends on Facebook',
  99. `Type` = 'checkbox',
  100. `VALUE` = 'on',
  101. `order_in_kateg` = 4;
  102. --
  103. -- `sys_menu_admin`;
  104. --
  105. INSERT INTO
  106. `sys_menu_admin`
  107. SET
  108. `name` = 'Facebook connect',
  109. `title` = '_bx_facebook',
  110. `url` = '{siteUrl}modules/?r=facebook_connect/administration/',
  111. `description` = 'Managing the \'facebook connect\' settings',
  112. `icon` = 'modules/boonex/facebook_connect/|facebook-icon_little.png',
  113. `parent_id` = 2;
  114. --
  115. -- permalink
  116. --
  117. INSERT INTO
  118. `sys_permalinks`
  119. SET
  120. `standard` = 'modules/?r=facebook_connect/',
  121. `permalink` = 'm/facebook_connect/',
  122. `check` = 'bx_facebook_connect_permalinks';
  123. --
  124. -- settings
  125. --
  126. INSERT INTO
  127. `sys_options`
  128. (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`)
  129. VALUES
  130. ('bx_facebook_connect_permalinks', 'on', 26, 'Enable friendly permalinks in facebook connect', 'checkbox', '', '', '0', '');
  131. UPDATE `sys_profile_fields` SET `Max` = 500 WHERE `Name` = 'NickName' LIMIT 1;