You are here

function asset_bonus_admin_mp3player in Asset 5

Same name and namespace in other branches
  1. 5.2 contrib/asset_bonus/asset_bonus.module \asset_bonus_admin_mp3player()
  2. 6 asset_bonus/asset_bonus.module \asset_bonus_admin_mp3player()
  3. 6 contrib/asset_bonus/asset_bonus.module \asset_bonus_admin_mp3player()
1 string reference to 'asset_bonus_admin_mp3player'
asset_bonus_menu in asset_bonus/asset_bonus.module

File

asset_bonus/asset_bonus.module, line 123

Code

function asset_bonus_admin_mp3player() {
  drupal_add_css('misc/farbtastic/farbtastic.css', 'module', 'all', FALSE);
  drupal_add_js('misc/farbtastic/farbtastic.js');
  drupal_add_css(drupal_get_path('module', 'asset_bonus') . '/asset_bonus.css');
  drupal_add_js(drupal_get_path('module', 'asset_bonus') . '/asset_bonus.js');
  $settings = array(
    'asset_bonus_swf' => base_path() . drupal_get_path('module', 'asset_bonus') . '/audioplayer/player.swf',
    'asset_bonus_test_mp3' => base_path() . drupal_get_path('module', 'asset_bonus') . '/audioplayer/test.mp3',
  );
  drupal_add_js($settings, 'setting');
  $colors = asset_bonus_mp3player_colors();
  $form['palette'] = array(
    '#type' => 'fieldset',
    '#title' => t('Color Palette'),
    '#attributes' => array(
      'id' => 'palette',
    ),
  );
  foreach ($colors as $key => $color) {
    $form['palette']['asset_bonus_mp3player_' . $key] = array(
      '#type' => 'textfield',
      '#title' => $color['title'],
      '#default_value' => variable_get('asset_bonus_mp3player_' . $key, $color['default']),
      '#size' => 8,
    );
  }
  $form[] = array(
    '#value' => '<div id="color-map">' . theme('image', drupal_get_path('module', 'asset_bonus') . '/audioplayer/map.gif') . '</div>',
  );
  $form[] = array(
    '#value' => '<div>Audio Player by:<br/>' . l(theme('image', drupal_get_path('module', 'asset_bonus') . '/audioplayer/logo.gif'), 'http://www.1pixelout.net/code/audio-player-wordpress-plugin/', array(), null, null, false, true) . '</div>',
  );
  return system_settings_form($form);
}