aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2010-08-04 23:09:57 +0000
committerCash Costello <cash.costello@gmail.com>2010-08-04 23:09:57 +0000
commit3838caed15ac73f81827829b6c094aae3c3f3539 (patch)
tree6a001f557221453dc1987a588f21b62b3010fff0 /views/default
parent1d3b83e6791b1e9e3386bb79937ef58240ba94ba (diff)
downloadelgg-3838caed15ac73f81827829b6c094aae3c3f3539.tar.gz
elgg-3838caed15ac73f81827829b6c094aae3c3f3539.tar.bz2
fixed bug where latest photos widget was trying to display 4 photos across instead of three - need a better long term solution
Diffstat (limited to 'views/default')
-rw-r--r--views/default/object/image.php2
-rw-r--r--views/default/tidypics/gallery.php8
-rw-r--r--views/default/widgets/latest_photos/view.php2
3 files changed, 8 insertions, 4 deletions
diff --git a/views/default/object/image.php b/views/default/object/image.php
index da3e257a1..8c1f23ec2 100644
--- a/views/default/object/image.php
+++ b/views/default/object/image.php
@@ -49,7 +49,7 @@ if (get_context() == "search") {
* front page view
*
****************************************************************/
-} else if (get_context() == "front") {
+} else if (get_context() == "front" || get_context() == "widget") {
// the front page view is a clickable thumbnail of the image
?>
<a href="<?php echo $image->getURL(); ?>">
diff --git a/views/default/tidypics/gallery.php b/views/default/tidypics/gallery.php
index 74aa34500..ba6f7b11d 100644
--- a/views/default/tidypics/gallery.php
+++ b/views/default/tidypics/gallery.php
@@ -4,8 +4,12 @@
*
*/
-// four albums across
-$num_wide = 4;
+if ($vars['context'] == 'widget') {
+ $num_wide = 3;
+} else {
+ // four albums across
+ $num_wide = 4;
+}
$context = $vars['context'];
$offset = $vars['offset'];
diff --git a/views/default/widgets/latest_photos/view.php b/views/default/widgets/latest_photos/view.php
index d6bc4a0df..108d070c9 100644
--- a/views/default/widgets/latest_photos/view.php
+++ b/views/default/widgets/latest_photos/view.php
@@ -9,7 +9,7 @@ if (!$number) {
}
echo '<div class="tidypics_widget_latest">';
-echo tp_get_latest_photos($number, page_owner());
+echo tp_get_latest_photos($number, page_owner(), 'widget');
echo '</div>';
?>