HEX
Server: Apache
System: Linux dev.epsylon.net 3.10.0-1160.144.1.el7.tuxcare.els2.x86_64 #1 SMP Sun Feb 15 11:22:42 UTC 2026 x86_64
User: nexper (1054)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/nexper/public_html/sites/all/modules/node_gallery/node_gallery.module
<?php

/**
 * @file
 * Node Gallery module.
 */

/**
 * Implements hook_entity_info_alter().
 */
function node_gallery_entity_info_alter(&$entity_info) {
  $entity_info['file']['view modes']['node_gallery_file_display'] = array(
    'label' => t('Node Gallery File Display'),
    'custom settings' => FALSE,
  );
  $entity_info['file']['view modes']['node_gallery_file_thumbnail'] = array(
    'label' => t('Node Gallery File Thumbnail'),
    'custom settings' => FALSE,
  );
  $entity_info['file']['view modes']['node_gallery_file_cover'] = array(
    'label' => t('Node Gallery File Cover'),
    'custom settings' => FALSE,
  );
  $entity_info['node']['view modes']['node_gallery_node_thumbnail'] = array(
    'label' => t('Node Gallery Thumbnail'),
    'custom settings' => TRUE,
  );
}

/**
 * Implements hook_views_api().
 */
function node_gallery_views_api() {
  return array(
    'api' => 2.0,
    'path' => drupal_get_path('module', 'node_gallery') . '/includes/views',
  );
}

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

  $styles['node_gallery_display'] = array(
    'effects' => array(
      array(
        'name' => 'image_scale',
        'data' => array(
          'width' => '',
          'height' => 1500,
          'upscale' => 0,
        ),
        'weight' => 0,
      ),
      array(
        'name' => 'image_scale',
        'data' => array(
          'width' => 600,
          'height' => '',
          'upscale' => 0,
        ),
        'weight' => 1,
      ),
    ),
  );

  $styles['node_gallery_thumbnail'] = array(
    'effects' => array(
      array(
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => 150,
          'height' => 150,
        ),
        'weight' => 0,
      ),
    ),
  );

  return $styles;
}

/**
 * Implements hook_views_pre_render().
 *
 * @param object $view
 *   The view
 */
function node_gallery_views_pre_render(&$view) {
  if ($view->name == 'node_gallery_gallery_item_views' || $view->name == 'node_gallery_gallery_summaries') {
    drupal_add_css(drupal_get_path('module', 'node_gallery') . '/node_gallery.css');
  }
}