aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/object/album.php6
-rw-r--r--views/default/object/image.php2
-rw-r--r--views/default/tidypics/icon.php37
3 files changed, 6 insertions, 39 deletions
diff --git a/views/default/object/album.php b/views/default/object/album.php
index 3a5f5a975..ca28d1672 100644
--- a/views/default/object/album.php
+++ b/views/default/object/album.php
@@ -64,7 +64,11 @@
$info .= ", <a href=\"{$album->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
$info .= "</p>";
- $icon = "<a href=\"{$album->getURL()}\">" . elgg_view("tidypics/icon", array('album' => true, 'size' => 'small')) . "</a>";
+ //get album cover if one was set
+ if ($album->cover)
+ $icon = "<a href=\"{$album->getURL()}\">" . '<img src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" alt="thumbnail" /></a>';
+ else
+ $icon = "<a href=\"{$album->getURL()}\">" . '<img src="' . $vars['url'] . 'mod/tidypics/graphics/image_error_thumb.png" alt="new album"></a>';
echo elgg_view_listing($icon, $info);
}
diff --git a/views/default/object/image.php b/views/default/object/image.php
index 03ba12a02..d09b721f1 100644
--- a/views/default/object/image.php
+++ b/views/default/object/image.php
@@ -78,7 +78,7 @@ if ($photo_tags) {
if ($numcomments)
$info .= ", <a href=\"{$file->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
$info .= "</p>";
- $icon = "<a href=\"{$file->getURL()}\">" . elgg_view("tidypics/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid, 'size' => 'small')) . "</a>";
+ $icon = "<a href=\"{$file->getURL()}\">" . '<img src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $file_guid . '&size=thumb" alt="' . $title . '" /></a>';
echo elgg_view_listing($icon, $info);
}
diff --git a/views/default/tidypics/icon.php b/views/default/tidypics/icon.php
deleted file mode 100644
index c960bc00b..000000000
--- a/views/default/tidypics/icon.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
- /**
- * Elgg tidypic icon
- * Optionally you can specify a size.
- *
- */
-
- global $CONFIG;
-
-if($vars['album']){
- echo "<img src=\"{$CONFIG->wwwroot}mod/tidypics/graphics/icons/album.gif\" 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=\"{$vars['url']}action/tidypics/icon?file_guid={$vars['file_guid']}\" border=\"0\" />";
- else
- {
- if ($size == 'large')
- echo "<img src=\"{$CONFIG->wwwroot}mod/tidypics/graphics/icons/general_lrg.gif\" border=\"0\" />";
- else
- echo "<img src=\"{$CONFIG->wwwroot}mod/tidypics/graphics/icons/general.gif\" border=\"0\" />";
- }
-}
-?> \ No newline at end of file