You are here

function lightbox2_theme in Lightbox2 6

Same name and namespace in other branches
  1. 8 lightbox2.module \lightbox2_theme()
  2. 7.2 lightbox2.module \lightbox2_theme()
  3. 7 lightbox2.module \lightbox2_theme()

Implementation of hook_theme().

File

./lightbox2.module, line 912
Enables the use of lightbox2 which places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths.

Code

function lightbox2_theme() {
  $theme = array(
    'lightbox2_image' => array(
      'arguments' => array(
        'path' => NULL,
        'alt' => '',
        'title' => '',
        'attributes' => array(),
      ),
      'file' => 'lightbox2.formatter.inc',
    ),
    // Emfield theme functions.
    'lightbox2_emimage' => array(
      'arguments' => array(
        'field' => NULL,
        'item' => NULL,
        'formatter' => NULL,
        'node' => NULL,
        'args' => array(),
      ),
      'file' => 'lightbox2.formatter.inc',
    ),
    'lightbox2_formatter_emimage' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'lightbox2.formatter.inc',
    ),
    'lightbox2_formatter_emimage_lightbox2' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'lightbox2.formatter.inc',
      'function' => 'theme_lightbox2_formatter_emimage',
    ),
    'lightbox2_formatter_emimage_lightshow2' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'lightbox2.formatter.inc',
      'function' => 'theme_lightbox2_formatter_emimage',
    ),
    'lightbox2_formatter_emimage_lightframe2' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'lightbox2.formatter.inc',
      'function' => 'theme_lightbox2_formatter_emimage',
    ),
    'lightbox2_formatter_emvideo_lightvideo' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'lightbox2.formatter.inc',
    ),
    'lightbox2_emvideo' => array(
      'arguments' => array(
        'field' => NULL,
        'item' => NULL,
        'formatter' => NULL,
        'node' => NULL,
      ),
      'file' => 'lightbox2.formatter.inc',
    ),
    // Filefield theme functions.
    'lightbox2_formatter_filefield_lightframe' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'lightbox2.formatter.inc',
    ),
    'lightbox2_file_formatter_lightbox2_iframe' => array(
      'arguments' => array(
        'file' => NULL,
        'field' => NULL,
        'file_formatter_settings' => NULL,
      ),
      'file' => 'lightbox2.formatter.inc',
    ),
    // Global imagecache + imagefield theme functions.
    'lightbox2_formatter_imagefield' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'lightbox2.formatter.inc',
    ),
    'imagefield_image_imagecache_lightbox2' => array(
      'arguments' => array(
        'view_preset' => NULL,
        'field_name' => NULL,
        'item' => NULL,
        'node' => NULL,
        'rel' => 'lightbox',
        'args' => array(),
      ),
      'file' => 'lightbox2.formatter.inc',
    ),
  );

  // Additional imagecache + imagefield theme functions, by preset.
  if (module_exists("imagecache")) {
    $options = variable_get('lightbox2_image_formatter_options', array());
    if (!empty($options)) {
      foreach ($options as $o) {
        $id = 'lightbox2_formatter_' . _lightbox2_get_formatter_id($o);
        $theme[$id] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
      }
    }
    else {
      $theme['lightbox2_formatter_imagefield__lightframe2__original__node'] = array(
        'arguments' => array(
          'element' => NULL,
        ),
        'function' => 'theme_lightbox2_formatter_imagefield',
        'file' => 'lightbox2.formatter.inc',
      );
      $theme['lightbox2_formatter_imagefield__lightframe2__link__node'] = array(
        'arguments' => array(
          'element' => NULL,
        ),
        'function' => 'theme_lightbox2_formatter_imagefield',
        'file' => 'lightbox2.formatter.inc',
      );
      foreach (imagecache_presets() as $src) {
        $theme['lightbox2_formatter_imagefield__lightbox2__' . $src['presetname'] . '__original'] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        $theme['lightbox2_formatter_imagefield__lightbox2_compact__' . $src['presetname'] . '__original'] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        $theme['lightbox2_formatter_imagefield__lightshow2__' . $src['presetname'] . '__original'] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        $theme['lightbox2_formatter_imagefield__lightshow2_compact__' . $src['presetname'] . '__original'] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        $theme['lightbox2_formatter_imagefield__lightbox2__original__' . $src['presetname']] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        $theme['lightbox2_formatter_imagefield__lightbox2_compact__original__' . $src['presetname']] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        $theme['lightbox2_formatter_imagefield__lightshow2__original__' . $src['presetname']] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        $theme['lightbox2_formatter_imagefield__lightshow2_compact__original__' . $src['presetname']] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        $theme['lightbox2_formatter_imagefield__lightframe2__' . $src['presetname'] . '__node'] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        $theme['lightbox2_formatter_imagefield__lightbox2__link__' . $src['presetname']] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        $theme['lightbox2_formatter_imagefield__lightshow2__link__' . $src['presetname']] = array(
          'arguments' => array(
            'element' => NULL,
          ),
          'function' => 'theme_lightbox2_formatter_imagefield',
          'file' => 'lightbox2.formatter.inc',
        );
        foreach (imagecache_presets() as $dest) {
          $theme['lightbox2_formatter_imagefield__lightbox2__' . $src['presetname'] . '__' . $dest['presetname']] = array(
            'arguments' => array(
              'element' => NULL,
            ),
            'function' => 'theme_lightbox2_formatter_imagefield',
            'file' => 'lightbox2.formatter.inc',
          );
          $theme['lightbox2_formatter_imagefield__lightbox2_compact__' . $src['presetname'] . '__' . $dest['presetname']] = array(
            'arguments' => array(
              'element' => NULL,
            ),
            'function' => 'theme_lightbox2_formatter_imagefield',
            'file' => 'lightbox2.formatter.inc',
          );
          $theme['lightbox2_formatter_imagefield__lightshow2__' . $src['presetname'] . '__' . $dest['presetname']] = array(
            'arguments' => array(
              'element' => NULL,
            ),
            'function' => 'theme_lightbox2_formatter_imagefield',
            'file' => 'lightbox2.formatter.inc',
          );
          $theme['lightbox2_formatter_imagefield__lightshow2_compact__' . $src['presetname'] . '__' . $dest['presetname']] = array(
            'arguments' => array(
              'element' => NULL,
            ),
            'function' => 'theme_lightbox2_formatter_imagefield',
            'file' => 'lightbox2.formatter.inc',
          );
        }
      }
    }
  }

  // Additional Insert theme functions.
  if (module_exists('insert')) {

    // Theme functions in lightbox2.insert.inc.
    $theme['lightbox2_insert_image'] = array(
      'arguments' => array(
        'item' => NULL,
        'widget' => NULL,
        'type' => NULL,
        'image_preset_name' => NULL,
        'link_preset_name' => NULL,
      ),
      'template' => 'lightbox2-insert-image',
      'file' => 'lightbox2.insert.inc',
    );
  }
  return $theme;
}