aboutsummaryrefslogtreecommitdiff
path: root/views/default/videolist/icon.php
diff options
context:
space:
mode:
authorDave Tosh <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-23 17:30:14 +0000
committerDave Tosh <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-23 17:30:14 +0000
commita161b38e65fa698133402f4fb23548242f494018 (patch)
treee75300111195f40f14c2389abddac65db9068da8 /views/default/videolist/icon.php
downloadelgg-a161b38e65fa698133402f4fb23548242f494018.tar.gz
elgg-a161b38e65fa698133402f4fb23548242f494018.tar.bz2
This videolist plugin shows real promise so we shall work on it for v1.8 then release it back to the community.
Diffstat (limited to 'views/default/videolist/icon.php')
-rw-r--r--views/default/videolist/icon.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/views/default/videolist/icon.php b/views/default/videolist/icon.php
new file mode 100644
index 000000000..1d25329ea
--- /dev/null
+++ b/views/default/videolist/icon.php
@@ -0,0 +1,41 @@
+<?php
+ /**
+ * Elgg tidypic icon
+ * Optionally you can specify a size.
+ *
+ * @package ElggFile
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+ global $CONFIG;
+
+if($vars['videolist']){
+ echo "<img src=\"{$CONFIG->wwwroot}mod/videolist/graphics/icons/Video_Icon.jpg\" border=\"0\" />";
+}
+else{
+
+ $mime = $vars['mimetype'];
+ if (isset($vars['thumbnail'])) {
+ $thumbnail = $vars['thumbnail'];
+ } else {
+ $thumbnail = false;
+ }
+
+ $size = $vars['size'];
+ if ($size != 'large') {
+ $size = 'small';
+ }
+
+ if ($thumbnail && strpos($mime, "image/")!==false)
+ echo "<img src=\"{$thumbnail}\" border=\"0\" />";
+ else
+ {
+ if ($size == 'large')
+ echo "<img src=\"{$thumbnail}\" border=\"0\" />";
+ else
+ echo "<img src=\"{$CONFIG->wwwroot}mod/videolist/graphics/icons/Video_Icon.jpg\" border=\"0\" />";
+ }
+}
+?>