aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-14 20:37:08 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-14 20:37:08 +0000
commit2932918effa51f9689cabe38b758e44435d08e96 (patch)
treeb3bfd26c62ea1350188dfc622b520eac482e6fdb /views
parent8f5aa6a87b15ecee226f46539b1400710c9c9047 (diff)
downloadelgg-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
Diffstat (limited to 'views')
-rw-r--r--views/default/river/object/album/create.php22
-rw-r--r--views/default/river/object/image/create.php3
-rw-r--r--views/default/tidypics/forms/admin.php26
3 files changed, 43 insertions, 8 deletions
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>';