<?php
/**
 * @file
 * popsu_publications.features.inc
 */

/**
 * Implements hook_ctools_plugin_api().
 */
function popsu_publications_ctools_plugin_api() {
  list($module, $api) = func_get_args();
  if ($module == "context" && $api == "context") {
    return array("version" => "3");
  }
  list($module, $api) = func_get_args();
  if ($module == "field_group" && $api == "field_group") {
    return array("version" => "1");
  }
  list($module, $api) = func_get_args();
  if ($module == "page_manager" && $api == "pages_default") {
    return array("version" => "1");
  }
  list($module, $api) = func_get_args();
  if ($module == "strongarm" && $api == "strongarm") {
    return array("version" => "1");
  }
}

/**
 * Implements hook_views_api().
 */
function popsu_publications_views_api() {
  return array("version" => "3.0");
}

/**
 * Implements hook_image_default_styles().
 */
function popsu_publications_image_default_styles() {
  $styles = array();

  // Exported image style: popsu-publication-cover.
  $styles['popsu-publication-cover'] = array(
    'name' => 'popsu-publication-cover',
    'effects' => array(
      7 => array(
        'label' => 'Échelle',
        'help' => 'La mise à l\'échelle maintiendra les proportions originales de l\'image. Si une seule dimension est précisée, l\'autre dimension sera calculée automatiquement.',
        'effect callback' => 'image_scale_effect',
        'dimensions callback' => 'image_scale_dimensions',
        'form callback' => 'image_scale_form',
        'summary theme' => 'image_scale_summary',
        'module' => 'image',
        'name' => 'image_scale',
        'data' => array(
          'width' => '102',
          'height' => '',
          'upscale' => 1,
        ),
        'weight' => '1',
      ),
    ),
  );

  return $styles;
}

/**
 * Implements hook_node_info().
 */
function popsu_publications_node_info() {
  $items = array(
    'popsu_publication' => array(
      'name' => t('Publication'),
      'base' => 'node_content',
      'description' => t('Ce type de contenu permet de créer une publication.'),
      'has_title' => '1',
      'title_label' => t('Titre de la publication'),
      'help' => '',
    ),
  );
  return $items;
}
