function video_install in Video 5
Same name and namespace in other branches
- 6.5 video.install \video_install()
- 6 video.install \video_install()
- 6.2 video.install \video_install()
- 6.3 video.install \video_install()
- 6.4 video.install \video_install()
- 7.2 video.install \video_install()
- 7 video.install \video_install()
File
- ./
video.install, line 4
Code
function video_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {video} (\n vid int(10) unsigned NOT NULL default '0',\n nid int(10) unsigned NOT NULL default '0',\n vtype varchar(32) NOT NULL default '',\n vidfile text NOT NULL default '',\n videox smallint(4) unsigned NOT NULL default '0',\n videoy smallint(4) unsigned NOT NULL default '0',\n size bigint(13) unsigned default NULL,\n download_counter int(10) unsigned NOT NULL default '0',\n play_counter int(10) unsigned NOT NULL default '0',\n video_bitrate int(10) unsigned default NULL,\n audio_bitrate int(10) unsigned default NULL,\n audio_sampling_rate int(10) unsigned default NULL,\n audio_channels enum('','5.1','stereo','mono') default NULL,\n playtime_seconds int(10) unsigned default NULL,\n download_folder varchar(255) NULL default NULL,\n disable_multidownload tinyint(1) unsigned NOT NULL default '0',\n use_play_folder tinyint(1) unsigned NOT NULL default '0',\n serialized_data text NULL default NULL,\n PRIMARY KEY (vid)\n ) TYPE=MyISAM COMMENT='size is in bytes' /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
db_query("CREATE TABLE {video} (\n vid integer NOT NULL default '0',\n nid integer NOT NULL default '0',\n vtype varchar(32) NOT NULL default '',\n vidfile text NOT NULL default '',\n videox smallint NOT NULL default '0',\n videoy smallint NOT NULL default '0',\n size bigint default NULL,\n download_counter integer NOT NULL default '0',\n play_counter integer NOT NULL default '0',\n video_bitrate integer default NULL,\n audio_bitrate integer default NULL,\n audio_sampling_rate integer default NULL,\n audio_channels varchar(10) default NULL,\n playtime_seconds integer default NULL,\n download_folder varchar(255) NULL default NULL,\n disable_multidownload smallint NOT NULL default '0',\n use_play_folder smallint NOT NULL default '0',\n serialized_data text NULL default NULL,\n PRIMARY KEY (vid)\n );");
}
// default values for some variables use for resolution stuff
variable_set('video_resolution_1_name', '4:3 - Television');
variable_set('video_resolution_1_value', '400x300');
variable_set('video_resolution_2_name', '16:9 - Widescreen');
variable_set('video_resolution_2_value', '400x226');
}