I would love to find a way to show a preview of the image (and perhaps a cropping tool in the upload form for PhotoSmash. has anyone already done this? if so, is the code available somewhere?
not resolvedI would love to find a way to show a preview of the image (and perhaps a cropping tool in the upload form for PhotoSmash. has anyone already done this? if so, is the code available somewhere?
Hi cbsop,
The Preview should be built-in (if you're using a custom layout, just look for something to that effect in the list of tags on the right).
Cropping...that's a bit harder. If anyone does that and wants to submit the code, it'd make a nice addition.
Cheers,
Byron
Byron,
I've found this jQuery cropping plugin, but to be honest I'm a php coder, not a JQuery coder. would it be possible to add this plugin to photosmash, and if so, how difficult would it be to implement and then update the thumbnail?
It would probably take a day or so to work it out.
What you would need from the jQuery plugin is to send the following to an Ajax file;
nonce for security
image ID
height
width
top-left starting pixel
Then your ajax would need to verify that user has rights to crop, then it could use the wordpress functions to crop the image, but I'm not sure how to tell it where to start cropping from (top-left pixel).
So, I think it's all very possible...just probably really time consuming.
If you attempt it and get stuck shoot me any questions. I'll be glad to help where I can.
BB