Welcome, Guest
Username: Password: Remember me
Got a Joomla problem? Post as much detail about it as you can here to see if you can get a solution.

Help others in the community - post your Joomla tips and how-tos here.

TOPIC: Image resize on upload for RSForms Pro

Image resize on upload for RSForms Pro 1 year 7 months ago #7699

  • Cameron S
  • Cameron S's Avatar
  • Offline
  • Junior Boarder
  • Posts: 32
  • Thank you received: 6
I've managed to get the JCE Mediabox working automatically for images when displaying a submission but I'm wondering what others had done to resize images when originally uploading them? The couple of workarounds I have explored have been hitting the limits of my ability. I'm hoping there might be something a little more straight forward.

Thanks
The administrator has disabled public write access.

Image resize on upload for RSForms Pro 1 year 7 months ago #7700

  • rsearle
  • rsearle's Avatar
  • Offline
  • Expert Boarder
  • I build and integrate serious business web applications using the best free open source platforms
  • Posts: 140
  • Thank you received: 25
Sorry, my earlier comments re JCE MediaBox for streaming media were incorrect. But the following comment re JCE Image Manager Extended still applies.

If you want to resize still images, then JCE Image Manager Extended is the best tool. It provides resizing options for existing images or during uploads, it will automatically create thumbnails individually or in batch during uploads, it will drive write code for nice JavaScript lightboxes using your thumbnails, and lots more.

Cheers,

Russell Searle
Psicom
Last Edit: 1 year 7 months ago by rsearle. Reason: inaccurate
The administrator has disabled public write access.

Image resize on upload for RSForms Pro 1 year 7 months ago #7701

  • Cameron S
  • Cameron S's Avatar
  • Offline
  • Junior Boarder
  • Posts: 32
  • Thank you received: 6
Hi Russell,

Thanks for the quick reply.

I use the JCE Image Manager Extended for article work but I'm at a loss on how to incorporate it into processing the image fields in RSForms. Is it relatively straight forward?
The administrator has disabled public write access.

Image resize on upload for RSForms Pro 1 year 7 months ago #7702

  • tuum
  • tuum's Avatar
  • Offline
  • Moderator
  • Posts: 189
  • Thank you received: 58
Hi Cameron,
If you are talking about automatically resizing images added to an article etc, then I believe that will be a feature of the new media manager which is due to be included in Joomla 3.7 in Q3 2016.
Read all about it here
issues.joomla.org/tracker/joomla-cms/3839
You may be able to install a early beta version before then to get that functionality sooner.

If as your forum subject suggest and you are looking for a way to do this using RS Forms Pro, essentially allowing the person filling out the form to upload an image, and have that image automatically resized to a smaller thumbnail? If so, I can't help you with RS Forms Pro, but if you want an alternative form building solution then take a look at BF Survey version 2, which has an attachment question type that uses either JImage or GD to generate thumbnails automatically when images are uploaded. www.tamlynsoftware.com.au/
Full disclaimer, I'm the developer of BF Survey.

regards

Tim
Follow me on twitter twitter.com/bfsurvey
The administrator has disabled public write access.

Image resize on upload for RSForms Pro 1 year 7 months ago #7703

  • rsearle
  • rsearle's Avatar
  • Offline
  • Expert Boarder
  • I build and integrate serious business web applications using the best free open source platforms
  • Posts: 140
  • Thank you received: 25
I'm not sure that I properly understand your specific requirements, but I'll assume that your main requirement is to:

  1. Automatically resize an image during upload, so that ...
  2. ... the image shows at a consistent, known size when it is displayed later in an RSForm!

These would be two separate actions, and in principle they would occur on two logically distinct RSForms: let's call them the upload form and the display form. I can think of one method to resize the images during upload:

For the upload form, write a little PHP script to resize the uploaded images, and call it from the RSForm's Script called on form process to resize $_POST['image_field']. You could start by trying the gd imagescale() function for your custom resizer script.

This code has nothing to do with JCE MediaBox. But on the other hand, maybe you turned to JCE MediaBox because you were aiming to display image thumbnails on the display form, which could be clicked to pop up a full-size image in a lightbox. You didn't say so explicitly in your original query, but maybe that's what you want. If so, there is another option. The code that implements the JCE MediaBox thumbnail and pop-up lightbox is something like this:

<span style="margin: 0px; padding: 0px; border-width: 0px; border-style: none; border-color: #xxxxxx; max-width: 000px;" class="jcemediabox-zoom-span"><img style="margin: 0px; padding: 0px; float: none; border: medium none;" src="/images/thumbnails/thumb_image_field_name.jpg" alt="alt text" width="000" height="000"><span class="jcemediabox-zoom-image"></span></span>

You could compute a value like this by substituting the upload field value from your upload form in the src= attributes, and also providing other attribute values (width, height, colours etc) to suit your display requirements. You could compute this value into a hidden field on your upload form during the initial form submission; again, the script to do that would be called from the Script called on form process property of the form. Then the value you've computed into the hidden field could be displayed as a form field on the details layout of a directory listing, and the effect should be a clickable thumbnail image.

Or you could use ChronoForms / ChronoConnectivity instead (shameless plug), which has the flexibilty you need to solve this kind of problem without awkward workarounds.

Cheers,

Russell
Last Edit: 1 year 7 months ago by rsearle. Reason: Corrections
The administrator has disabled public write access.
The following user(s) said Thank You: Cameron S

Image resize on upload for RSForms Pro 1 year 7 months ago #7704

  • Cameron S
  • Cameron S's Avatar
  • Offline
  • Junior Boarder
  • Posts: 32
  • Thank you received: 6
Hi Tim,

This is my first RSForms project having been able to get away with using Fabrik on earlier projects. Having put a bit of time in already I will keep going but happy to look at your software in the future.

Hi Russell,

My apologies as I could have been clearer.

My coding is basic at best but I had managed to use the following snippet to allow popups in my RSForms menu details view using jcepopup.

<a href="{Image1:path}" target="_blank" class="jcepopup"><image src="{Image1:path}" width="200" height="150" /></a>

Didn't work until I assigned it to a RSForm menu from JCE parameters but it's now doing exactly what is required.

I had figured out where to put any php scripts and had found this on Github;
gist.github.com/renekreijveld/03b5c47712e492464e9c

But it is taking me a little while to nut through it. I was wondering anyone else on the forum had been down this path before which was the reason for the post.

I will have a play with the gd imagescale() function and see if I have any luck.

Thanks

Edit:

Just saw your additional comment Russell and that was the path I had already been down to display the thumbnails. The resizing on loading is hopefully my last hurdle.

Cheers
Last Edit: 1 year 7 months ago by Cameron S. Reason: Addition
The administrator has disabled public write access.

Image resize on upload for RSForms Pro 1 year 7 months ago #7705

  • rsearle
  • rsearle's Avatar
  • Offline
  • Expert Boarder
  • I build and integrate serious business web applications using the best free open source platforms
  • Posts: 140
  • Thank you received: 25
Hi Cameron,

It looks like you have figured out pop-ups for your RSForms! yourself. It also looks like the GitHub createthumbs script may be useful for resizing. It looks a bit daunting, but it also looks well thought out and pretty robust.

Good luck,

Russell
The administrator has disabled public write access.
Time to create page: 0.056 seconds
Powered by Kunena Forum