Jump to content
apeisa

Release: Thumbnails

Recommended Posts

Wohoooh! What have you done?

Another eastern egg? ;)

Can't wait to try out later if I'm not fallen as sleep...

Share this post


Link to post
Share on other sites

Yay, nice work... Yet another practical and very useful addition. Thanks for the work on this.

Share this post


Link to post
Share on other sites

Just tested this on another site setup, and I have few minor bugs. It's usable, but previews won't show due js-error. I'll do quick fix for that at evening or tomorrow.

Share this post


Link to post
Share on other sites

Nice work Antti! This is really coming together nicely.

Share this post


Link to post
Share on other sites

I quickly tried last night, and there's still some things.

- when I have the crop image field in a tab, and upload an image the layout is messed (tabs overlap title). I can't provide more infos ATM (will make screenshot later, but I'm busy)

- I don't like the thumb links... should be better (more clear) . And is it possible to put them inside the "fieldset"?

I would like if it's something like :

thumbnail - edit"

big - edit

- when there is big images, it's impossible or very akward to use it.

- when I upload (html5) an image, I can't use preview fancybox before it's saved.

Share this post


Link to post
Share on other sites

Ok guys, sorry about last version - there was bug in previews that assumed your fieldname was "cropImages"...

This version is actually pretty nice. I commented the modal view out, since it was really annoying with bigger images. You really want all the possible space there. Also added timestamps for image urls in admin to prevent browser cache. It seems to help.

I have few things for the future:

  • Remove thumbnails after actual image is removed
  • Allow resizing thumbnails in your templates.

post-79-132614279962_thumb.gif

Share this post


Link to post
Share on other sites

That preview looks awesome. I can't seem to get it to work here though (FF7). I'm getting a JS error "event is not defined" on this line in InputfieldCropImage.js:

if( event.type === 'mouseover' ) {

Share this post


Link to post
Share on other sites

Heh, I did test this on Chrome and IE9... And now that I test it on Firefox the preview fails here too. Is FF new IE? :)

Should be quick fix though. Thanks for finding that one Ryan!

Share this post


Link to post
Share on other sites

- when I have the crop image field in a tab, and upload an image the layout is messed (tabs overlap title). I can't provide more infos ATM (will make screenshot later, but I'm busy)

I didn't understand this. If this still occurs in latest version, I would really appreciate screenshot or more description about how to produce this one.

- when I upload (html5) an image, I can't use preview fancybox before it's saved.

This is fixed in latest commit, thanks for finding & reporting Soma.

Share this post


Link to post
Share on other sites

I found one bug. I give aspect ratio in wrong format to Jcrop, so it fails when having more complicated aspect ratios. Quick fix that I will push at the evening.

EDIT: Fixed.

Share this post


Link to post
Share on other sites

Thanks for the update! I just trying it out and its awesome! Also the strange messing up is gone now.

Also like how you solved it with the thumb links and the preview is awesome!

I think it's an ok solution to make a popup, and it's well done I think, just the order and preview I still don't like it with big images. What if there would be no preview just the big image and the "crop" button on top left or so? After cropping we already have a preview, and it already can be edited again. I think it's hard to see there's a button on bottom hidden, just thinking.

---

Somehow the crop button is at a strange place for me, is that only my theme? (see screen)

post-1337-132614279969_thumb.jpg

Share this post


Link to post
Share on other sites

Thanks for your feedback Soma. Glad it is working! That is default position fur button. It is clumsy, specially if image and thumbnail are large (like in your example).

I have good idea for cropping UI. Description text, cropping button and thumbnail preview toggle on fixed top bar. Optional preview image on top right corner, on top of the original image (depends of course how large original image and preview thumbnail are).

I will implement this during weekend.

Share this post


Link to post
Share on other sites

Thank you Apeisa for the infos.

I have another thing we might should look at. There seems to be problems with floats not cleared in the PW admin (default), like I do normally use clearfix class. I've experienced this while creating themes. For example also you redirects module, the buttons overlap the container (form) on bottom. I think there should be some solution to make this working better and consistent. I had to implement a clearfix over script to some containers so I can add inline/floated stuff. I sense that there we will have problem when there's modules and custom theme's that do thing differently. What is everones experience about this?

Share this post


Link to post
Share on other sites

I changed the name of the module from CropImage to Thumbnails. If you have used git you need to update your origin repo (or simply just clone it again from new address).

Share this post


Link to post
Share on other sites

I have another thing we might should look at. There seems to be problems with floats not cleared in the PW admin (default), like I do normally use clearfix class. I've experienced this while creating themes. For example also you redirects module, the buttons overlap the container (form) on bottom. I think there should be some solution to make this working better and consistent. I had to implement a clearfix over script to some containers so I can add inline/floated stuff. I sense that there we will have problem when there's modules and custom theme's that do thing differently. What is everones experience about this?

I usually go with just overflow: hidden or auto;

Share this post


Link to post
Share on other sites

Looks much better!

But it changes the background of the normal "edit page" page to #444...

Share this post


Link to post
Share on other sites

Thanks. Just made it fixed. Now it works pretty nicely even with huge images.

Share this post


Link to post
Share on other sites

Damn you browser cache, just realized that this will mess your edit page layout if you do hard refresh :) Will fix this soon. (edit: Same bug that Nico reported on his edit, didn't notice that at the time).

EDIT: Ok, should be good now. I also started working on feature which allows you to crop original image. I got it working, but I need to think it a little bit more. It should remove all thumbnails created for that image (from this module but also from templates) etc... I committed the code still, just commented out the setting for that.

Share this post


Link to post
Share on other sites

Great updates Antti. This is looking better than I ever expected.

I did notice one thing when I was playing with it today. If I change the size on a preset it 'forgets' the previously generated thumbs and just reverts to an autocrop. Is that the intended behavior?

Regards

Marty

Share this post


Link to post
Share on other sites

Yes. It always does default re-crop if width or height doesn't match. That makes sure that images are always desired size. I could use cropped image as base if new size is smaller, but that could result poor crops also. I don't save cropping propotions anywhere so it is not possible use those propotions and crop again from original.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Macrura
      PrevNextTabs Module
      Github: https://github.com/outflux3/PrevNextTabs
      Processwire helper modules for adding page navigation within the editor.
      Overview
      This is a very simple module that adds Previous and Next links inline with the tabs on the page editor. Hovering over the tab shows the title of the previous or next page (using the admin's built in jqueryUI tooltips.)
      Usage
      This module is typically used during development where you or your editors need to traverse through pages for the purpose of proofing, flagging and/or commenting. Rather than returning to the page tree or lister, they can navigate with these links.
      Warnings
      If you are using PW version 2.6.1 or later, the system will prevent you from leaving the page if you have unsaved edits.
      For earlier versions, to avoid accidentally losing changes made to a page that might occur if a user accidentally clicks on one of these, make sure to have the Form Save Reminder module installed.
      http://modules.processwire.com/modules/prev-next-tabs/
    • By Gadgetto
      SnipWire - Snipcart integration for ProcessWire
      Snipcart is a powerful 3rd party, developer-first HTML/JavaScript shopping cart platform. SnipWire is the missing link between Snipcart and the content management framework ProcessWire.
      With SnipWire, you can quickly turn any ProcessWire site into a Snipcart online shop. The SnipWire plugin helps you to get your store up and running in no time. Detailed knowledge of the Snipcart system is not required.
      SnipWire is free and open source licensed under Mozilla Public License 2.0! A lot of work and effort has gone into development. It would be nice if you could donate an amount to support further development:

      Status update links (inside this thread) for SnipWire development
      2020-03-21 -- SnipWire 0.8.5 (beta) released! Improves SnipWires webhooks interface and provides some other fixes and additions 2020-03-03 -- SnipWire 0.8.4 (beta) released! Improves compatibility for Windows based Systems. 2020-03-01 -- SnipWire 0.8.3 (beta) released! The installation and uninstallation process has been heavily revised. 2020-02-08 -- SnipWire 0.8.2 (beta) released! Added a feature to change the cart and catalogue currency by GET, POST or SESSION param 2020-02-03 -- SnipWire 0.8.1 (beta) released! All custom classes moved into their own namespaces. 2020-02-01 -- SnipWire is now available via ProcessWire's module directory! 2020-01-30 -- SnipWire 0.8.0 (beta) first public release! (module just submitted to the PW modules directory) 2020-01-28 -- added Custom Order Fields feature (first SnipWire release version is near!) 2020-01-21 -- Snipcart v3 - when will the new cart system be implemented? 2020-01-19 -- integrated taxes provider finished (+ very flexible shipping taxes handling) 2020-01-14 -- new date range picker, discount editor, order notifiactions, order statuses, and more ... 2019-11-15 -- orders filter, order details, download + resend invoices, refunds 2019-10-18 -- list filters, REST API improvements, new docs platform, and more ... 2019-08-08 -- dashboard interface, currency selector, managing Orders, Customers and Products, Added a WireTabs, refinded caching behavior 2019-06-15 -- taxes provider, shop templates update, multiCURL implementation, and more ... 2019-06-02 -- FieldtypeSnipWireTaxSelector 2019-05-25 -- SnipWire will be free and open source Plugin Key Features
      Fast and simple store setup Full integration of the Snipcart dashboard into the ProcessWire backend (no need to leave the ProcessWire admin area) Browse and manage orders, customers, discounts, abandoned carts, and more Multi currency support Custom order and cart fields Process refunds and send customer notifications from within the ProcessWire backend Process Abandoned Carts + sending messages to customers from within the ProcessWire backend Complete Snipcart webhooks integration (all events are hookable via ProcessWire hooks) Integrated taxes provider (which is more flexible then Snipcart own provider) Useful Links
      SnipWire in PW modules directory SnipWire Docs (please note that the documentation is a work in progress) SnipWire @GitHub (feature requests and suggestions for improvement are welcome - I also accept pull requests) Snipcart Website  
      ---- INITIAL POST FROM 2019-05-25 ----
       
    • By horst
      Croppable Image 3
      for PW 3.0.20+
      Module Version 1.2.0
      Sponsored by http://dreikon.de/, many thanks Timo & Niko!
      You can get it in the modules directory!
      Please refer to the readme on github for instructions.
       
      - + - + - + - + - + - + - + - + - + - NEWS - 2020/03/19 - + - + - + - + - + - + - + - + - + - 
      There is a new Version in the pipe, that supports WebP too: 
       
      - + - + - + - + - + - + - + - + - + - NEWS - 2020/03/19 - + - + - + - + - + - + - + - + - + - 
       
       
      -------------------------------------------------------------------------
       
      Updating from prior versions:
       
      Updating from Croppable Image 3 with versions prior to 1.1.7, please do this as a one time step:
      In the PW Admin, go to side -> modules -> new, use "install via ClassName" and use CroppableImage3 for the Module Class Name. This will update your existing CroppableImage3 module sub directory, even if it is called a new install. After that, the module will be recogniced by the PW updater module, what makes it a lot easier on further updates.
      -------------------------------------------------------------------------
       
      For updating from the legacy Thumbnail / CropImage to CroppableImage3 read on here.
       
      -------------------------------------------------------------------------
       
    • By Robin S
      Inspired by a recent question.
      Image Crop Ratios
      Allows preset aspect ratios to be defined per image field for the ProcessWire image crop tool.
      The module adds a select dropdown to the crop tool. Choose an aspect ratio and the crop area will be fixed to that ratio.
      Screencast

      Installation
      Install the Image Crop Ratios module.
      Configuration
      Default aspect ratios for all image fields can be defined in the module config. Aspect ratios for specific image fields can be defined on the Input tab of the field settings. You can override the ratio settings in template context if needed. Insert a hyphen as the first item in the ratio settings unless you want to force a ratio to be applied to the crop tool. The hyphen represents a blank option that allows a free crop area to be drawn. Usage
      Click the "Crop" link on the details view of an image thumbnail. Click the "Crop" icon at the top of the editor window. Choose an option from the "Ratio" select dropdown.  
      https://github.com/Toutouwai/ImageCropRatios
      https://modules.processwire.com/modules/image-crop-ratios/
×
×
  • Create New...