You are here

function theme_beautytips_styles in BeautyTips 6

See jQuery.bt.js for descriptions of defaults Returns an array of default settings to be sent to the beautytips plugin

1 theme call to theme_beautytips_styles()
beautytips_add_beautytips in ./beautytips.module
This is the API. Call this function to add beautytips. See README.txt for more info.

File

./beautytips.module, line 193
Provides API for adding beautytips to pages. Adds Beautytips settings page and provides some built in functionality.

Code

function theme_beautytips_styles() {
  $style = variable_get('beautytips_styles', 'default');
  $bt_defaults = array();

  // The default style isn't necessarily needed here.
  switch ($style) {
    case 'default':
      $bt_defaults = array(
        'cssStyles' => array(),
      );
      break;
    case 'netflix':
      $bt_defaults = array(
        'positions' => array(
          0 => 'right',
          1 => 'left',
        ),
        'fill' => '#FFF',
        'padding' => 5,
        //'shadow' => TRUE,  //Reimplement later

        //'shadowBlur' => 12,
        'strokeStyle' => '#B9090B',
        'spikeLength' => 50,
        'spikeGirth' => 60,
        'cornerRadius' => 10,
        'centerPointY' => 0.1,
        'overlap' => -8,
        'cssStyles' => array(
          'fontSize' => '12px',
          'fontFamily' => 'arial,helvetica,sans-serif',
        ),
      );
      break;
    case 'facebook':
      $bt_defaults = array(
        'fill' => '#F7F7F7',
        'padding' => 8,
        'strokeStyle' => '#B7B7B7',
        'cornerRadius' => 0,
        'cssStyles' => array(
          'fontFamily' => '"lucida grande",tahoma,verdana,arial,sans-serif',
          'fontSize' => '11px',
        ),
      );
      break;
    case 'transparent':
      $bt_defaults = array(
        'fill' => 'rgba(0, 0, 0, .8)',
        'padding' => 20,
        'strokeStyle' => '#CC0',
        'strokeWidth' => 3,
        'spikeLength' => 40,
        'spikeGirth' => 40,
        'cornerRadius' => 40,
        'cssStyles' => array(
          'color' => '#FFF',
          'fontWeight' => 'bold',
        ),
      );
      break;
    case 'big_green':
      $bt_defaults = array(
        'fill' => '#00FF4E',
        'padding' => 20,
        'strokeWidth' => 0,
        'spikeLength' => 40,
        'spikeGirth' => 40,
        'cornerRadius' => 15,
        'cssStyles' => array(
          'fontFamily' => '"lucida grande",tahoma,verdana,arial,sans-serif',
          'fontSize' => '14px',
        ),
      );
      break;
    case 'google_maps':
      $bt_defaults = array(
        'positions' => array(
          0 => 'top',
          1 => 'bottom',
        ),
        'fill' => '#FFF',
        'padding' => 15,
        'strokeStyle' => '#ABABAB',
        'strokeWidth' => 1,
        'spikeLength' => 65,
        'spikeGirth' => 40,
        'cornerRadius' => 25,
        'centerPointX' => 0.9,
        'cssStyles' => array(),
      );
      break;
  }
  $bt_defaults['list'] = array_keys($bt_defaults);
  if (isset($bt_defaults['cssStyles'])) {
    $bt_defaults['css_list'] = array_keys($bt_defaults['cssStyles']);
  }
  return $bt_defaults;
}