You are here

function rate_rate_templates in Rate 7

Same name and namespace in other branches
  1. 8.2 rate.module \rate_rate_templates()
  2. 6.2 rate.module \rate_rate_templates()

Implements hook_rate_templates().

File

./rate.module, line 885
Rate module

Code

function rate_rate_templates() {
  $templates = array();
  $templates['thumbs_up'] = new stdClass();
  $templates['thumbs_up']->value_type = 'points';
  $templates['thumbs_up']->options = array(
    array(
      1,
      'up',
    ),
  );
  $templates['thumbs_up']->theme = 'rate_template_thumbs_up';
  $templates['thumbs_up']->css = drupal_get_path('module', 'rate') . '/templates/thumbs-up/thumbs-up.css';
  $templates['thumbs_up']->customizable = FALSE;
  $templates['thumbs_up']->translate = TRUE;
  $templates['thumbs_up']->template_title = t('Thumbs up');
  $templates['thumbs_up_down'] = new stdClass();
  $templates['thumbs_up_down']->value_type = 'points';
  $templates['thumbs_up_down']->options = array(
    array(
      1,
      'up',
    ),
    array(
      -1,
      'down',
    ),
  );
  $templates['thumbs_up_down']->theme = 'rate_template_thumbs_up_down';
  $templates['thumbs_up_down']->css = drupal_get_path('module', 'rate') . '/templates/thumbs-up-down/thumbs-up-down.css';
  $templates['thumbs_up_down']->customizable = FALSE;
  $templates['thumbs_up_down']->translate = TRUE;
  $templates['thumbs_up_down']->template_title = t('Thumbs up / down');
  $templates['number_up_down'] = new stdClass();
  $templates['number_up_down']->value_type = 'points';
  $templates['number_up_down']->options = array(
    array(
      1,
      '+1',
    ),
    array(
      -1,
      '-1',
    ),
  );
  $templates['number_up_down']->theme = 'rate_template_number_up_down';
  $templates['number_up_down']->css = drupal_get_path('module', 'rate') . '/templates/number-up-down/number-up-down.css';
  $templates['number_up_down']->customizable = FALSE;
  $templates['number_up_down']->translate = TRUE;
  $templates['number_up_down']->template_title = t('Number up / down');
  $templates['fivestar'] = new stdClass();
  $templates['fivestar']->value_type = 'percent';
  $templates['fivestar']->options = array(
    array(
      0,
      '1',
    ),
    array(
      25,
      '2',
    ),
    array(
      50,
      '3',
    ),
    array(
      75,
      '4',
    ),
    array(
      100,
      '5',
    ),
  );
  $templates['fivestar']->theme = 'rate_template_fivestar';
  $templates['fivestar']->css = drupal_get_path('module', 'rate') . '/templates/fivestar/fivestar.css';
  $templates['fivestar']->js = drupal_get_path('module', 'rate') . '/templates/fivestar/fivestar.js';
  $templates['fivestar']->customizable = TRUE;
  $templates['fivestar']->translate = FALSE;
  $templates['fivestar']->template_title = t('Fivestar');
  $templates['emotion'] = new stdClass();
  $templates['emotion']->value_type = 'option';
  $templates['emotion']->options = array(
    array(
      1,
      'funny',
    ),
    array(
      2,
      'mad',
    ),
    array(
      3,
      'angry',
    ),
  );
  $templates['emotion']->theme = 'rate_template_emotion';
  $templates['emotion']->css = drupal_get_path('module', 'rate') . '/templates/emotion/emotion.css';
  $templates['emotion']->customizable = TRUE;
  $templates['emotion']->translate = TRUE;
  $templates['emotion']->template_title = t('Emotion');
  $templates['yesno'] = new stdClass();
  $templates['yesno']->value_type = 'option';
  $templates['yesno']->options = array(
    array(
      1,
      'yes',
    ),
    array(
      2,
      'no',
    ),
  );
  $templates['yesno']->theme = 'rate_template_yesno';
  $templates['yesno']->css = drupal_get_path('module', 'rate') . '/templates/yesno/yesno.css';
  $templates['yesno']->customizable = TRUE;
  $templates['yesno']->translate = TRUE;
  $templates['yesno']->template_title = t('Yes / no');
  return $templates;
}