From: Cash Costello Date: Sun, 14 Jun 2009 20:37:08 +0000 (+0000) Subject: close to final version of river entries - commented out cover from image view and... X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=2932918effa51f9689cabe38b758e44435d08e96;p=lorea%2Felgg.git close to final version of river entries - commented out cover from image view and added option for album to show multiple photos --- diff --git a/actions/upload.php b/actions/upload.php index e7c78c178..2e33d67db 100644 --- a/actions/upload.php +++ b/actions/upload.php @@ -55,7 +55,7 @@ $not_uploaded = array(); $error_msgs = array(); - $river_view = get_plugin_setting('river_view', 'tidypics'); + $img_river_view = get_plugin_setting('img_river_view', 'tidypics'); $accepted_formats = array( 'image/jpeg', @@ -197,7 +197,7 @@ // update user/group size for checking quota $image_repo_size += $sent_file['size']; - if($river_view == "all") { + if($img_river_view == "all") { add_to_river('river/object/image/create', 'create', $file->getObjectOwnerGUID(), $file->getGUID()); } unset($file); // may not be needed but there seems to be a memory leak @@ -232,7 +232,7 @@ $album->new_album = TP_OLD_ALBUM; } - if(count($uploaded_images) && $river_view == "1") { + if(count($uploaded_images) && $img_river_view == "1") { if (function_exists('add_to_river')) { add_to_river('river/object/image/create', 'create', $file_for_river->getObjectOwnerGUID(), $file_for_river->getGUID()); } diff --git a/languages/en.php b/languages/en.php index c5f4dd99f..6aff28061 100644 --- a/languages/en.php +++ b/languages/en.php @@ -53,7 +53,8 @@ 'tidypics:settings:quota' => "User/Group Quota (MB) - 0 equals no quota", 'tidypics:settings:watermark' => "Enter text to appear in the watermark - ImageMagick Cmdline must be selected for the image library", 'tidypics:settings:im_path' => "Enter the path to your ImageMagick commands", - 'tidypics:settings:river_view' => "How many entries in river for each batch of uploaded images", + 'tidypics:settings:img_river_view' => "How many entries in river for each batch of uploaded images", + 'tidypics:settings:album_river_view' => "Show the album cover or a set of photos for new album", 'tidypics:settings:largesize' => "Primary image size", 'tidypics:settings:smallsize' => "Album view image size", 'tidypics:settings:thumbsize' => "Thumbnail image size", diff --git a/views/default/river/object/album/create.php b/views/default/river/object/album/create.php index 40f847c78..5f8b07965 100644 --- a/views/default/river/object/album/create.php +++ b/views/default/river/object/album/create.php @@ -6,9 +6,27 @@ $url = "getURL()}\">{$performed_by->name}"; $string = sprintf(elgg_echo("album:river:created"),$url) . " "; $string .= "getURL() . "\">" . $album->title . ""; + + $album_river_view = get_plugin_setting('album_river_view', 'tidypics'); - if ($album->cover) { - $string .= "
wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" border="0" class="tidypics_album_cover" alt="thumbnail"/>' . "
"; + if ($album_river_view == "cover") { + if ($album->cover) { + $string .= "
wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" border="0" class="tidypics_album_cover" alt="thumbnail"/>' . "
"; + } + } else { + + $string .= "
"; + + // display the simple image views. Uses: via 'object/image.php' + $images = get_entities("object", "image", $file_guid, 'time_created desc', 7); + + if (count($images)) { + foreach($images as $image){ + $string .= "getURL() . "\"> wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $image->guid . '&size=thumb" border="0" class="tidypics_album_cover" alt="thumbnail"/> '; + } + } + + $string .= "
"; } echo $string; diff --git a/views/default/river/object/image/create.php b/views/default/river/object/image/create.php index 09320080b..8f7a856ea 100644 --- a/views/default/river/object/image/create.php +++ b/views/default/river/object/image/create.php @@ -17,7 +17,10 @@ $string = sprintf(elgg_echo("image:river:created"),$performed_by->name, $image_link, $album_link); $string .= "
"; + +/* // this adds the album cover to the river display $string .= "getURL() . "\"> wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" border="0" class="tidypics_album_cover" alt="thumbnail"/> '; +*/ $string .= "getURL() . "\"> wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $image->guid . '&size=thumb" border="0" class="tidypics_album_cover" alt="thumbnail"/> '; $string .= "
"; diff --git a/views/default/tidypics/forms/admin.php b/views/default/tidypics/forms/admin.php index d2d676290..a67d320d5 100644 --- a/views/default/tidypics/forms/admin.php +++ b/views/default/tidypics/forms/admin.php @@ -71,18 +71,32 @@ $form_body .= "

" . elgg_echo('tidypics:settings:quota') . "
"; $form_body .= elgg_view("input/text",array('internalname' => 'params[quota]', 'value' => $quota)) . "

"; - // River options - $river_view = $plugin->river_view; - if (!$river_view) $river_view = '1'; - $form_body .= '

' . elgg_echo('tidypics:settings:river_view'); + // River Image options + $img_river_view = $plugin->img_river_view; + if (!$img_river_view) $img_river_view = '1'; + $form_body .= '

' . elgg_echo('tidypics:settings:img_river_view'); $form_body .= elgg_view('input/pulldown', array( - 'internalname' => 'params[river_view]', + 'internalname' => 'params[img_river_view]', 'options_values' => array( 'all' => 'all', '1' => '1', 'none' => 'none', ), - 'value' => $river_view + 'value' => $img_river_view + )); + $form_body .= '

'; + + // River Album options + $album_river_view = $plugin->album_river_view; + if (!$album_river_view) $album_river_view = '1'; + $form_body .= '

' . elgg_echo('tidypics:settings:album_river_view'); + $form_body .= elgg_view('input/pulldown', array( + 'internalname' => 'params[album_river_view]', + 'options_values' => array( + 'cover' => 'cover', + 'set' => 'set', + ), + 'value' => $album_river_view )); $form_body .= '

';