You are here

mp3player.install in MP3 Player 7.2

Same filename and directory in other branches
  1. 8 mp3player.install
  2. 6.2 mp3player.install
  3. 6 mp3player.install

The install file for MP3 Player.

File

mp3player.install
View source
<?php

// $Id: mp3player.install,v 1.1.2.6 2009/07/19 16:24:04 starnox Exp $

/**
 * @file
 * The install file for MP3 Player.
 */

/**
 * Implementation of hook_install().
 */
function mp3player_install() {

  //Insert Default Player
  db_insert('mp3player_players')
    ->fields(array(
    'name' => 'Default',
    'autostart' => 'no',
    'loopaudio' => 'no',
    'animation' => 'yes',
    'remaining' => 'no',
    'noinfo' => 'no',
    'initialvolume' => '60',
    'buffer' => '5',
    'encode' => 'no',
    'rtl' => 'no',
    'width' => 290,
    'transparentpagebg' => 'no',
    'pagebg' => '',
    'bg' => 'E5E5E5',
    'leftbg' => 'CCCCCC',
    'lefticon' => '333333',
    'voltrack' => 'F2F2F2',
    'volslider' => '666666',
    'rightbg' => 'B4B4B4',
    'rightbghover' => '999999',
    'righticon' => '333333',
    'righticonhover' => 'FFFFFF',
    'loader' => '009900',
    'track' => 'FFFFFF',
    'tracker' => 'DDDDDD',
    'border' => 'CCCCCC',
    'skip' => '666666',
    'text' => '333333',
  ))
    ->execute();
}

/**
 * Implementation of hook_uninstall().
 */
function mp3player_uninstall() {
}

/**
 * implements hook_schema();
 * @return mixed
 */
function mp3player_schema() {
  $schema['mp3player_players'] = array(
    'fields' => array(
      'pid' => array(
        'description' => t('The primary identifier for an mp3 player.'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => t('The name of an mp3 player.'),
        'type' => 'varchar',
        'length' => 20,
        'not null' => TRUE,
        'default' => '',
      ),
      'autostart' => array(
        'description' => t('If the player should autostart or not.'),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => 'no',
      ),
      'loopaudio' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => 'no',
      ),
      'animation' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => 'yes',
      ),
      'remaining' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => 'no',
      ),
      'noinfo' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => 'no',
      ),
      'initialvolume' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => '60',
      ),
      'buffer' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => '5',
      ),
      'encode' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => 'no',
      ),
      'checkpolicy' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => 'no',
      ),
      'rtl' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => 'no',
      ),
      'width' => array(
        'description' => t(''),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 290,
      ),
      'transparentpagebg' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 3,
        'not null' => TRUE,
        'default' => 'no',
      ),
      'pagebg' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => FALSE,
        'default' => NULL,
      ),
      'bg' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => 'E5E5E5',
      ),
      'leftbg' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => 'CCCCCC',
      ),
      'lefticon' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => '333333',
      ),
      'voltrack' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => 'F2F2F2',
      ),
      'volslider' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => '666666',
      ),
      'rightbg' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => 'B4B4B4',
      ),
      'rightbghover' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => '999999',
      ),
      'righticon' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => '333333',
      ),
      'righticonhover' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => 'FFFFFF',
      ),
      'loader' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => '009900',
      ),
      'track' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => 'FFFFFF',
      ),
      'tracker' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => 'DDDDDD',
      ),
      'border' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => 'CCCCCC',
      ),
      'skip' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => '666666',
      ),
      'text' => array(
        'description' => t(''),
        'type' => 'varchar',
        'length' => 6,
        'not null' => TRUE,
        'default' => '333333',
      ),
    ),
    'primary key' => array(
      'pid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
mp3player_install Implementation of hook_install().
mp3player_schema implements hook_schema();
mp3player_uninstall Implementation of hook_uninstall().