]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
getIcon() override for object/video returns a generic icon if size == tiny.
authorBrett Profitt <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 9 Jun 2010 15:35:38 +0000 (15:35 +0000)
committerBrett Profitt <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 9 Jun 2010 15:35:38 +0000 (15:35 +0000)
git-svn-id: http://code.elgg.org@6421 36083f99-b078-4883-b0ff-0f9b5a30f544

graphics/video_icon_tiny.png [new file with mode: 0644]
start.php

diff --git a/graphics/video_icon_tiny.png b/graphics/video_icon_tiny.png
new file mode 100644 (file)
index 0000000..1157694
Binary files /dev/null and b/graphics/video_icon_tiny.png differ
index bd772b067ab45dffc1951c0bc62287c2f7ac7ff8..93d011dae687a47b1798c89bc08c34ca6ea8569c 100644 (file)
--- a/start.php
+++ b/start.php
@@ -248,6 +248,13 @@ function videolist_embed_get_items($hook, $type, $value, $params) {
  * @param string $size Not used yet.  Not sure if possible.
  */
 function videolist_get_entity_icon_url(ElggEntity $entity, $size = 'medium') {
+
+       // tiny thumbnails are too small to be useful, so give a generic video icon
+       if ($size == 'tiny') {
+               global $CONFIG;
+               return "{$CONFIG->url}mod/videolist/graphics/video_icon_tiny.png";
+       }
+
        return $entity->thumbnail;
 }