function video_theme in Video 6.4
Same name and namespace in other branches
- 8.2 video.module \video_theme()
- 8 video.module \video_theme()
- 6.5 video.module \video_theme()
- 6 video.module \video_theme()
- 6.2 video.module \video_theme()
- 7.2 video.module \video_theme()
- 7 video.module \video_theme()
Implementation of hook_theme().
File
- ./
video.module, line 134 - video.module
Code
function video_theme() {
$theme = array();
$theme['video_thumbnails'] = array(
'arguments' => array(
'file' => NULL,
'alt' => '',
'title' => '',
'attributes' => NULL,
'getsize' => TRUE,
),
'file' => 'video.theme.inc',
);
$theme['video_widget_preview'] = array(
'arguments' => array(
'item' => TRUE,
),
'file' => 'video.theme.inc',
);
$theme['video_image'] = array(
'arguments' => array(
'file' => NULL,
'alt' => '',
'title' => '',
'attributes' => NULL,
'getsize' => TRUE,
'imagecache' => NULL,
),
'file' => 'video.theme.inc',
);
$theme['video_widget_video_thumb'] = array(
'arguments' => array(
'item' => TRUE,
),
'file' => 'video.theme.inc',
);
$theme['video_formatter_video_plain'] = array(
'arguments' => array(
'element' => NULL,
),
'file' => 'video_formatter.inc',
);
$theme['video_formatter_video_nodelink'] = array(
'arguments' => array(
'element' => NULL,
'imagecache' => NULL,
),
'file' => 'video_formatter.inc',
);
$theme['video_formatter_video_thumbnail'] = array(
'arguments' => array(
'element' => NULL,
'imagecache' => NULL,
),
'file' => 'video_formatter.inc',
);
$theme['video_formatter_video_nonodelink'] = array(
'arguments' => array(
'element' => NULL,
'imagecache' => NULL,
),
'file' => 'video_formatter.inc',
);
//$theme['video_formatter_video_colorbox'] = array(
// 'arguments' => array('element' => NULL, 'imagecache' => NULL),
// 'file' => 'video_formatter.inc',
//);
$theme['video_formatter_video_media_js'] = array(
'arguments' => array(
'element' => NULL,
),
'file' => 'video_formatter.inc',
);
$theme['video_encoding_failed'] = array(
'arguments' => array(),
'file' => 'video_formatter.inc',
);
$theme['video_inprogress'] = array(
'arguments' => array(),
'file' => 'video_formatter.inc',
);
$path = drupal_get_path('module', 'video') . '/theme';
//Lets setup our themes for our players
$players = video_video_players();
foreach ($players as $tpl => $value) {
$theme[$tpl] = array(
'arguments' => array(
'video' => NULL,
'node' => NULL,
'themed_output' => NULL,
),
//#843368 fix
// 'file' => 'video_formatter.inc',
'template' => str_replace('_', '-', $tpl),
'path' => $path,
);
}
//We need to add an flv theme buffer to allow users to override in their own module to add in extra parameters before
//calling our flv template file.
$theme['video_flv'] = array(
'arguments' => array(
'video' => NULL,
'node' => NULL,
),
'file' => 'video_formatter.inc',
);
$theme['video_html5'] = array(
'arguments' => array(
'video' => NULL,
'node' => NULL,
),
'file' => 'video_formatter.inc',
);
//setup our imagecache presets
if (module_exists('imagecache')) {
//we need formatters for each of our thumbnails.
//@todo create a function to check for our colorbox module and only add theme elements that could be used.
$thumb_types = array(
'video_nodelink',
'video_thumbnail',
'video_nonodelink',
);
//array('video_colorbox', 'video_nodelink');
foreach ($thumb_types as $types) {
foreach (imagecache_presets() as $preset) {
$theme['video_formatter_' . $preset['presetname'] . '__' . $types] = array(
'arguments' => array(
'element' => NULL,
),
'function' => 'theme_video_formatter_imagecache',
'file' => 'video_formatter.inc',
);
}
}
}
return $theme;
}