• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Show thumbnail in directory

Show thumbnail in directory 1 year 11 months ago #42040

  • rbuelund
  • rbuelund's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
I am using the fileupload field to upload an image with a submission. How do I show the thumbnail of this image in the directory instead of just the link to the image ??
The administrator has disabled public write access.

Show thumbnail in directory 1 year 11 months ago #42054

  • rbuelund
  • rbuelund's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
I got this answer from support, that works just perfectly:

Place this script in the "Scripts called on Listing Layout" in the directory.

$pattern = '#<a href="(.*?/submission-view-file/.*?)">.*?</a>#';
if (preg_match_all($pattern, $directoryLayout, $matches)){
foreach ($matches[0] as $i => $fullMatch){
$directoryLayout = str_replace($fullMatch, '<img src="'.$matches[1][$i].'"/>', $directoryLayout);
}
}
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!