hi everybody,
i’ve got an odd problem with phpThumb ( using it in an Ditto template at the moment though, but i thought i post it in here, because few people use it in combination with Ditto and the problem would occur with MG too ... please move the post if it shouldn’t be in here )
if i call it like this in my template chunk everything works perfect:
<a class="dogimglink" href="[+Portrait+]" rel="lightbox" title="[+pagetitle+]">
[+phx:if=`[+Portrait+]`:is=``:then=``:else=`<img src="[+phx:input=`[(base_url)][+Portrait+]`:phpthumb=`&h=100&w=100&zc=1&q=95`+]" />`+]
</a>
but as soon as [+Portrait+] isn’t referenced in the <a> tag anymore the thumbnail won’t be displayed. it doesn’t matter if [+Portrait+] is in an <a> tag ... this would work too:
[+Portrait+]
[+phx:if=`[+Portrait+]`:is=``:then=``:else=`<img src="[+phx:input=`[(base_url)][+Portrait+]`:phpthumb=`&h=100&w=100&zc=1&q=95`+]" />`+]
...i can call it without the additional phx statement like this and the bahaviour would be the same:
<img src="[+phx:input=`[(base_url)][+Portrait+]`:phpthumb=`&h=100&w=100&zc=1&q=95`+]" />
the really weird thing is, that [+Portrait+] just needs to be referenced once in a series of images ( doesn’t matter if it’s the first or the second one ?!! ) in order to display all thumbs
including alt="[+Teaserimage+]" would work, but i would prefer a clean solution and first of all i’m too curious where this strange behaviour is coming from.
my modifier: "phx:phpthumb"
<?php
$output = '[(base_url)]assets/snippets/phpthumb/phpThumb.php?src=' . $output . $options;
return str_replace('&', '&', $output);
?>
so basically there needs to be at least one original path to an image somewhere (without the phpThumb query string) to get all other thumbs displayed
hope someone got an idea where this is coming from and how i could fix this - it’s driving me nuts
thanks, j