aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/photos.php b/include/photos.php
index 0ac47f7ba..f52b08473 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -252,10 +252,24 @@ function photo_upload($channel, $observer, $args) {
$arr['item_thread_top'] = 1;
$arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $arr['mid'];
- if ($width_x_height)
- $tag = '[zmg=' . $width_x_height. ']';
- else
+ // We should also put a width_x_height on large photos. Left as an exercise for
+ // devs looking fo simple stuff to fix.
+
+ $larger = feature_enabled($channel['channel_id'],'large_photos');
+ if($larger) {
$tag = '[zmg]';
+ if($r2)
+ $smallest = 1;
+ else
+ $smallest = 0;
+ }
+ else {
+ if ($width_x_height)
+ $tag = '[zmg=' . $width_x_height. ']';
+ else
+ $tag = '[zmg]';
+ }
+
$arr['body'] = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']'
. $tag . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]'