Re: smd_thumbnail: manage multiple thumbnails of your images

jstubbs wrote:

Pablo, you need to use the new image tags recently added to TXP. If you look at this TXP Tip – specifically the _ portfolio_gallery_ code block you will see how to replace upm_image with native TXP tags.

Hi! I think I’m too noob to understand tha approach. I managed to retrieve the proper image with smd gallery, but dunno how to turn it into an URL

Re: smd_thumbnail: manage multiple thumbnails of your images

Minor update to v0.21. No new user functionality, just a new function smd_thumb_get_profiles() that allows other plugins to interrogate smd_thumbnail to find the active profiles *mysterious music plays*

jpdupont

No idea what happened with your version: that gTxt string is definitely in the code. Weird glitch.

As far as allowing non-admins to see the prefs, the idea is that they don’t. Only admins should set the prefs because they’re global, but if you have a different requirement (e.g. your admin users are actually managing editors or something) then you’ll have to edit the plugin code for now. Alter line 6 and list the priv levels you want to have access to the prefs, .e.g.:

$smd_thumb_prevs = array('1, 2'); // Privs for prefs

Would allow publishers and managing editors to see them. Hope that helps.

Re: smd_thumbnail: manage multiple thumbnails of your images

Hey Stef! (long time)
Thanks for another super plugin :)

I do have a question please:

Because of this plugin replace/hides the regular TXP thumbnail system,
it’s can’t work with ‘ebl_image_edit’.
(Only if you make your magic by editing ‘ebl_image_edit’ to somehow work with the SMD thumb system, which I have no idea how)

Now since I must let the clients to be able to manually crop the thumbnail image like in ‘ebl_image_edit’,
then I will like your plugin to play as an extra system and not interfere the original one, this by creating only extra thumbnails and also not from the original-image but from the regular-thumbnail (which I can control with ‘ebl_image_edit’), now is it possible and simple enough to do please?

The reason I want it to create the extra thumbnails from the regular-system thumbnail it’s to get a much better result.
For example:
If I upload a vertical image of a person and then I’m using ‘ebl_image_edit’ to crop the head, and then I’m using your plugin to create smaller versions of it then I will end with a much better result then I was using only your plugin and by cropping the original image I was end with the chest of the person instead of the head.

(Of course it was the most perfect if there was a feature to manually crop each of the thumbnails using jCrop or other jQuery plugin, but I believe it will require a magic-wand, or just a lot of work isn’t it?)

Re: smd_thumbnail: manage multiple thumbnails of your images

THEBLUEDRAGON wrote:

creating only extra thumbnails and also not from the original-image but from the regular-thumbnail

Hmmm, if TheEric added a callback to his plugin on completion of the crop function then I could probably get smd_thumbnail to hook into that and create the thumbs for the edited image right then. Sadly, Eric has stated that he will never interface with any other plugins so I guess that’s out of the question.

However, I might be able to add a preference to my plugin that allows you to create the smd_thumb from a txp thumb, instead of from the full size image. I’m not sure if it’ll let me — it’s been a long time since I looked at the code — and it won’t be automatic. That is, you’ll have to go and batch process the ones you want to alter after you’ve cropped them, which is not ideal. Essentially what will happen is this:

the plugin will automatically create thumbs on upload (from the original image)

you crop your thumbs in ebl_image_edit

you visit the Tools area of smd_thumbnail, choose the images you want to affect and it’ll go and recreate them from the thumbnails

Re: smd_thumbnail: manage multiple thumbnails of your images

Being that TheEric stated what Bloke already linked, I think there are two possible paths:

the “pure” smd_thumbnail approach

the “pure” ebl-image-edit hack/mod approach

The “pure” smd_thumbnail approach would work by “fetching” the latest txp_thumb (aka regular thumb, original thumb) thumbnail created/cropped/resized by ebl-image-edit and storing it in the corresponding profile folder (selected on advance via some dropdown select).

The “pure” ebl-image-edit hack/mod approach would work by hacking that plugin to present the user with a dropdown select (on the “Crop” tab/fieldset), listing all the folders inside the /images/ folder. Or, in other words, to present all the folders created by smd_thumbnail, which are the folders where smd_thumbnail stores the thumbs.
So, this hypothetical hack would check for existing subfolders on /images/ and present them in a dropdown. The user would pick the folder, create the thumb, and it will get stored on the selected folder.
ebl-image-edit probably already has some re-usable code for this latter step, as that is what the plugin does when user hits the “Backup” button (i.e. it stores a copy of the image on the /images/backup/ folder).

If what my brain imagined is somewhat accurate/realistic, non of this “pure” approaches would need to “know” if the other plugin is installed or not.
So, to create a new thumbnail from the regular txp thumb (created using ebl-image-edit), it shouldn’t care for smd_thumbnail to “know” if ebl-image-edit is installed or not.
And, similarly, for a hacked ebl-image-edit that would check existing subfolders in /images/ folder, present them via a dropdown select, and saving the new cropped/resized thumb on the selected folder, it doesn’t need to “know” if smd_thumbnail is installed or not.