diff options
Diffstat (limited to 'application/views')
-rw-r--r-- | application/views/file/fragments/thumbnail.php | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/application/views/file/fragments/thumbnail.php b/application/views/file/fragments/thumbnail.php index 8bb7f6aea..82d0743fb 100644 --- a/application/views/file/fragments/thumbnail.php +++ b/application/views/file/fragments/thumbnail.php @@ -5,9 +5,12 @@ $base_url = site_url(); if (substr($base_url, -1) !== "/") { $base_url .= "/"; } +$counter = 0; ?> <div class="upload_thumbnails"><!-- - <?php foreach($items as $key => $item): ?> + <?php foreach($items as $key => $item): + $counter++; + ?> --><a <?php if (strpos($item["mimetype"], "image/") === 0) {?>rel="gallery" class="colorbox"<?php } ?> data-orientation="<?php echo $item["orientation"]; ?>" @@ -15,9 +18,16 @@ if (substr($base_url, -1) !== "/") { title="<?php echo htmlentities($item["filename"], ENT_QUOTES); ?>" data-content="<?php echo htmlentities($item["tooltip"], ENT_QUOTES); ?>" data-id="<?php echo $item["id"]; ?>"><!-- - --><img class="thumb lazyload" - data-original="<?php echo $base_url."file/thumbnail/".$item["id"]; ?>" - ><!-- + --><?php if ($counter > 42) { + ?><img + class="thumb lazyload" + data-original="<?php echo $base_url."file/thumbnail/".$item["id"]; ?>" + ><?php + } else { + ?><img + class="thumb" + src="<?php echo $base_url."file/thumbnail/".$item["id"]; ?>"><?php + } ?><!-- --><noscript><img class="thumb" src="<?php echo $base_url."file/thumbnail/".$item["id"]; ?>"></noscript></a><!-- <?php endforeach; ?> --> |