/[drupal]/contributions/modules/phpfreechat/phpfreechat.install
ViewVC logotype

Contents of /contributions/modules/phpfreechat/phpfreechat.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Fri Dec 7 20:22:30 2007 UTC (23 months, 3 weeks ago) by owahab
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +5 -3 lines
File MIME type: text/x-php
Merging from DRUPAL-5
1 <?php
2 // $Id: phpfreechat.install,v 1.2.4.5 2007/12/07 19:35:55 owahab Exp $
3
4 function phpfreechat_install() {
5 switch ($GLOBALS['db_type']) {
6 case 'mysql':
7 case 'mysqli':
8 db_query("CREATE TABLE {phpfreechat} (
9 nid INT(10) NOT NULL,
10 phpfreechat_enabled INT(1) NOT NULL,
11 phpfreechat_title VARCHAR(128) NOT NULL,
12 phpfreechat_channels VARCHAR(128) NOT NULL,
13 PRIMARY KEY(nid)
14 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
15 // Anyone want to support postgres here?
16 break;
17 }
18 // Notify of changes
19 drupal_set_message(t('phpFreeChat module was successfully installed with default options. To customize settings, please view the <a href="!settings">phpFreeChat settings page</a>.', array('!settings' => url('admin/settings/phpfreechat'))));
20 }
21
22 /**
23 * Implementation of hook_uninstall().
24 */
25 function phpfreechat_uninstall() {
26 switch ($GLOBALS['db_type']) {
27 case 'mysql':
28 case 'mysqli':
29 db_query('DROP TABLE {phpfreechat}');
30 // Anyone want to support postgres here?
31 break;
32 }
33
34 $settings = array('serverid','title','channels','frozen_nick','max_nick_len',
35 'max_text_len','refresh_delay','timeout','max_msg','connect_at_startup','start_minimized',
36 'height','width','shownotice','nickmarker','clock','openlinknewwindow','showwhosonline',
37 'showsmileys','btn_sh_whosonline','btn_sh_smileys','themepath','theme','language',
38 'output_encoding','container_type','server_script_path','server_script_url','client_script_path',
39 'client_script_url','jspath','xajaxpath','data_private_path','data_public_path',
40 'data_public_url','debug','debugxajax','prefix');
41
42 foreach ($settings as $setting) {
43 variable_del('phpfreechat_'.$setting);
44 }
45 require_once(drupal_get_path('module', 'phpfreechat') .'/phpfreechat.inc');
46 _phpfreechat_rm(file_check_location(PHPFREECHAT_DATA_DIR));
47 }
48
49 ?>

  ViewVC Help
Powered by ViewVC 1.1.2