diff options
-rw-r--r-- | thumbnail.php | 10 | ||||
-rw-r--r-- | views/default/river/object/album/create.php | 7 |
2 files changed, 12 insertions, 5 deletions
diff --git a/thumbnail.php b/thumbnail.php index b4c745ae2..fe8ca8bab 100644 --- a/thumbnail.php +++ b/thumbnail.php @@ -13,15 +13,17 @@ // Get file thumbnail size
$size = get_input('size','small');
- if ($size != 'small') {
+ if ($size != 'small' && $size != 'thumb') {
$size = 'large';
}
// Get file entity
if ($file = get_entity($file_guid)) {
- if ($file->getSubtype() == "image") {
+ if ($file->getSubtype() == "image") {
// Get file thumbnail
- if ($size == "small") {
+ if ($size === "thumb") {
+ $thumbfile = $file->thumbnail;
+ } else if ($size === "small") {
$thumbfile = $file->smallthumb;
} else {
$thumbfile = $file->largethumb;
@@ -48,4 +50,4 @@ header("Content-type: image");
echo $contents;
exit;
-?>
\ No newline at end of file +?>
diff --git a/views/default/river/object/album/create.php b/views/default/river/object/album/create.php index fcc87277d..300062b5a 100644 --- a/views/default/river/object/album/create.php +++ b/views/default/river/object/album/create.php @@ -7,6 +7,11 @@ if (function_exists('add_to_river')) { // Elgg 1.5 $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
$string = sprintf(elgg_echo("album:river:created"),$url) . " ";
$string .= "<a href=\"" . $album->getURL() . "\">" . $album->title . "</a>";
+
+ if ($album->cover) {
+ $string .= "<div class=\"river_content\"> <img src=\"" . $CONFIG->wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" border="0" class="tidypics_album_cover" alt="thumbnail"/>' . "</div>";
+ }
+
} else { // Elgg 1.2
$statement = $vars['statement'];
$performed_by = $statement->getSubject();
@@ -19,4 +24,4 @@ if (function_exists('add_to_river')) { // Elgg 1.5 echo $string;
-?>
\ No newline at end of file +?>
|