Hi,
I have a text field (ExercisePhotos) that saves the image names as comma separated values(multiple file upload). I want to show images as colorbox image gallery in a custom file.
How to show images as gallery? I want the first image be shown but the other images be shown after the client clicks on the first image.
Thanks
Mansour
Hi,
I used the following code and colorbox works.
$photos = explode(',',$a_row['ExercisePhotos']);
foreach($photos as $i =>$key) {
echo "<a title=\"".$Language->phrase("ViewImageGallery")."\" href=\"exercises/$key\" data-rel=\"".$a_row['ExerciseID']."\" class=\"ew-lightbox\" ><img src=\"exercises/$key\"/></a>";
}
How I can resize the images before showing and show the first image only.Thanks
If your field is a file upload field, PHPMaker will show the images as gallery by colorbox. If you just want to show the first image, you may add CSS under the HTML > Styles > User (assume v2019) to hide the other images. If you have enabled “resize” in the View Tag panel, the images shown will be resized. (To resize via script, the URLs will not be linked to images directly in such case. You can press F12 in your browser to view the HTML source to check the URLs.)
Hi,
Is it means that I can’t use Resize function directly in my custom file?
I know both the file name and location.
I don’t know the parameters in above code?!
Any suggestion?
Thanks
arbei wrote:
If your field is a file upload field, PHPMaker will show the images as gallery by
colorbox. If you just want to show the first image, you may add CSS under the HTMLStyles > User (assume v2019) to hide the other images. If you have enabled
“resize” in the View Tag panel, the images shown will be resized. (To
resize via script, the URLs will not be linked to images directly in such case. You
can press F12 in your browser to view the HTML source to check the URLs.)
Hi,
may I ask you post a sample code in this case?
thanks