diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-06-14 20:37:08 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-06-14 20:37:08 +0000 |
commit | 2932918effa51f9689cabe38b758e44435d08e96 (patch) | |
tree | b3bfd26c62ea1350188dfc622b520eac482e6fdb | |
parent | 8f5aa6a87b15ecee226f46539b1400710c9c9047 (diff) | |
download | elgg-2932918effa51f9689cabe38b758e44435d08e96.tar.gz elgg-2932918effa51f9689cabe38b758e44435d08e96.tar.bz2 |
close to final version of river entries - commented out cover from image view and added option for album to show multiple photos
-rw-r--r-- | actions/upload.php | 6 | ||||
-rw-r--r-- | languages/en.php | 3 | ||||
-rw-r--r-- | views/default/river/object/album/create.php | 22 | ||||
-rw-r--r-- | views/default/river/object/image/create.php | 3 | ||||
-rw-r--r-- | views/default/tidypics/forms/admin.php | 26 |
5 files changed, 48 insertions, 12 deletions
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 = "<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>";
+
+ $album_river_view = get_plugin_setting('album_river_view', 'tidypics');
- 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>";
+ if ($album_river_view == "cover") {
+ 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 {
+
+ $string .= "<div class=\"river_content\">";
+
+ // 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 .= "<a href=\"" . $image->getURL() . "\"> <img src=\"" . $CONFIG->wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $image->guid . '&size=thumb" border="0" class="tidypics_album_cover" alt="thumbnail"/> </a>';
+ }
+ }
+
+ $string .= "</div>";
}
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 .= "<div class=\"river_content\">";
+
+/* // this adds the album cover to the river display
$string .= "<a href=\"" . $album->getURL() . "\"> <img src=\"" . $CONFIG->wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" border="0" class="tidypics_album_cover" alt="thumbnail"/> </a>';
+*/
$string .= "<a href=\"" . $image->getURL() . "\"> <img src=\"" . $CONFIG->wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $image->guid . '&size=thumb" border="0" class="tidypics_album_cover" alt="thumbnail"/> </a>';
$string .= "</div>";
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 .= "<p>" . elgg_echo('tidypics:settings:quota') . "<br />";
$form_body .= elgg_view("input/text",array('internalname' => 'params[quota]', 'value' => $quota)) . "</p>";
- // River options
- $river_view = $plugin->river_view;
- if (!$river_view) $river_view = '1';
- $form_body .= '<p>' . 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 .= '<p>' . 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 .= '</p>';
+
+ // River Album options
+ $album_river_view = $plugin->album_river_view;
+ if (!$album_river_view) $album_river_view = '1';
+ $form_body .= '<p>' . 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 .= '</p>';
|