Code: Select all
<a href="fulls/01.jpg"><img src="thumbs/01.jpg" alt=""></a
Code: Select all
<?php if($Wcms->loggedIn) { ?>
<?= $Wcms->block('gallery_01') ?>
<?php } else { ?>
<a href='<?php echo img_link($Wcms->block('gallery_01')) ?>'><?= $Wcms->block('gallery_01') ?></a>
<?php } ?>
Code: Select all
function img_link($img) {
global $Wcms;
$lefttrim = ltrim($img, '<img src=\"');
$result = rtrim($lefttrim, '"/>');
return $result;
}
When nobody is logged in, it functions as the clickable thumbnail in the original design, Succes!
Or so I thought...
Any image uploaded using the summernote filepicker results in a massive database entry, resulting in the following:
Since the url format probably can't be altered/shortened, I guess this isn't gonna work and this design is just not filepicker compatible.
Please tell me if I missed anything or if anyone has had more succes with this in previous endeavors!