aboutsummaryrefslogtreecommitdiff
path: root/video.theme.inc
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2010-12-05 12:52:20 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2010-12-05 12:52:20 +0000
commit973537f36c8f33473a00190aa64fc30b82d94c04 (patch)
tree2c2f99a3bd254b145453fab186fdc824d34a260f /video.theme.inc
parent07e453e2ff2f66017eb49cc0374aa1531805a043 (diff)
downloadvideo-973537f36c8f33473a00190aa64fc30b82d94c04.tar.gz
video-973537f36c8f33473a00190aa64fc30b82d94c04.tar.bz2
Removing all files
Diffstat (limited to 'video.theme.inc')
-rw-r--r--video.theme.inc111
1 files changed, 0 insertions, 111 deletions
diff --git a/video.theme.inc b/video.theme.inc
deleted file mode 100644
index f76edc9..0000000
--- a/video.theme.inc
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-//$Id$
-/**
- *
- * @file
- * Theme functions for the video module.
- *
- */
-
-function theme_video_thumbnails($variables) {
- $file = $variables['file'];
- $alt = $variables['alt'];
- $title = $variables['title'];
- $attributes = $variables['attributes'];
- $getsize = $variables['getsize'];
-
- $file = (array)$file;
- // return $file['filepath'];
- if (!is_file($file['filepath'])) {
- return '<!-- File not found: '. $file['filepath'] .' -->';
- }
-
- if ($getsize) {
- // Use cached width and height if available.
- if (!empty($file['data']['width']) && !empty($file['data']['height'])) {
- $attributes['width'] = $file['data']['width'];
- $attributes['height'] = $file['data']['height'];
- }
- // Otherwise pull the width and height from the file.
- elseif (list($width, $height, $type, $image_attributes) = @getimagesize($file['filepath'])) {
- $attributes['width'] = $width;
- $attributes['height'] = $height;
- }
- }
-
- if (!empty($title)) {
- $attributes['title'] = $title;
- }
-
- // Alt text should be added even if it is an empty string.
- $attributes['alt'] = $alt;
-
- // Add a timestamp to the URL to ensure it is immediately updated after editing.
- $query_string = '';
- if (isset($file['timestamp'])) {
- $query_character = (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE && variable_get('clean_url', '0') == '0') ? '&' : '?';
- $query_string = $query_character . $file['timestamp'];
- }
-
- $url = file_create_url($file['filepath']) . $query_string;
- $attributes['src'] = $url;
- $attributes = drupal_attributes($attributes);
- return '<span></span><img '. $attributes .' />';
-}
-
-function theme_video_widget_preview($item) {
- return theme('filefield_widget_preview', $item);
-}
-
-function theme_video_widget_video_thumb($item = NULL) {
- return '<div class="video-thumb">' . theme('video_image', $item, '', '', '', FALSE) . '</div>';
-}
-
-/**
- * @defgroup "Theme Callbacks"
- * @{
- * @see uploadfield_theme().
- */
-function theme_video_image($file, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE, $imagecache = FALSE) {
- $file = (array)$file;
- //if this is imagecache skip this as the file might not be created yet
- if (!$imagecache && !is_file($file['filepath'])) {
- return '<!-- File not found: '. str_replace("--", "-", $file['filepath']) .'" -->';
- }
-
- if ($getsize && $imagecache && ($image = image_get_info($file['filepath']))) {
- $attributes['width'] = $image['width'];
- $attributes['height'] = $image['height'];
- }
- elseif ($getsize) {
- // Use cached width and height if available.
- if (!empty($file['data']['width']) && !empty($file['data']['height'])) {
- $attributes['width'] = $file['data']['width'];
- $attributes['height'] = $file['data']['height'];
- }
- // Otherwise pull the width and height from the file.
- elseif (list($width, $height, $type, $image_attributes) = @getimagesize($file['filepath'])) {
- $attributes['width'] = $width;
- $attributes['height'] = $height;
- }
- }
-
- if (!empty($title)) {
- $attributes['title'] = $title;
- }
-
- // Alt text should be added even if it is an empty string.
- $attributes['alt'] = $alt;
-
- // Add a timestamp to the URL to ensure it is immediately updated after editing.
- $query_string = '';
- if (isset($file['timestamp'])) {
- $query_character = (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE && variable_get('clean_url', '0') == '0') ? '&' : '?';
- $query_string = $query_character . $file['timestamp'];
- }
-
- $url = file_create_url($file['filepath']) . $query_string;
- $attributes['src'] = $url;
- $attributes = drupal_attributes($attributes);
- return '<img '. $attributes .' />';
-} \ No newline at end of file