Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
58 posts Page 4 of 6
Previous 1, 2, 3, 4, 5, 6 Next
expected result thanks !!! :D :D :D :D :D :D
When I get this error in the most cases the php memory is to low. When uploading an image above 6mb, the backend crashes and I have a similar backend as the screenshoot posted before. When uploding a picture smaler pic it works well. So check your php memory_limit if you got the same issue. Sometimes it is limited by the host.
Bartonsweb wrote: Hello fellow couch enthusiasts

The native thumbnail works fine, but it doesn't leave much room for customisation, it allows 6 positions to choose from to select the crop and that's it. This is okay, I mean it does work - but it's not very friendly to users, especially when the portion of an image you wish to be in the thumbnail doesn't fit within the pre-defined cropping regions, also it doesn't allow for resizing the image into the thumbnail (If you wish to do that).
So I am here to present my solution to you all: JCropthumb


You think will be possible to use this addon to manually crop also images and not only thumbnails? Actually many images are taken with digital cameras with very hight resolution and usually needed to be resized but resize is not ever the best solution.

Thanks...
You think will be possible to use this addon to manually crop also images and not only thumbnails?


Hi Fabio,

Unfortunetly not with this addon. This addon couples with couches existing method of creating thumbnails, it just changes the admin side a bit.

Unfortunetly (Somewhat), normal image uploading is handled entirely by KCFinder. This means we can't create much of a couch addon to handle this (Without replacing KCFinder). However, you could explore some KCFinder solutions to this, perhaps we could couple it in with some couch code to make it easier to handle via kfunctions.

My research suggests that resizing images in the manner this addon allows is not possible with KCFinder. But you could probably set a max width/height for images to be resized to within KCFinder upon uploading.

To do this, currently you need to edit a core file (Perhaps @KK could show us, if possible, how to do this without editing this core file?)

File: /cms/includes/kcfinder/config.php: Line 85 & 86.
Code: Select all
'maxImageWidth' => 0,
'maxImageHeight' => 0,


Edit: I'm not sure why I even suggested the above, the default "Width" and "Height" parameters on the image editable do exactly this.. Should probably not answer questions until I've woken up properly! lol.
Image
fabioferrero wrote:
You think will be possible to use this addon to manually crop also images and not only thumbnails? Actually many images are taken with digital cameras with very hight resolution and usually needed to be resized but resize is not ever the best solution.

Thanks...


I've tried to use jcropthumb on couch 2.0beta, but seems that doesn't work...
This is a slice of code used:

Code: Select all
   <cms:repeatable name='gallery'>
      <cms:editable
         name='titolo'
         label='Titolo'
         desc='Titolo'
         type='text'
      />
      <cms:editable
         name='image_raw'
         label='Immagine'
         desc='Carica qui la tua immagine'
         width='600'
         height='300'
         show_preview='1'
         preview_height='100'
         type='image'
      />
       <cms:editable
           name='image'
           type='jcropthumb'
           assoc_field='image_raw'
           desc='automatica'
           show_preview='1'
         width='600'
         height='300'
         enforce_min='1'
       />
   </cms:repeatable>


There is something wrong because
Code: Select all
<cms:show image />
show nothing...

What I miss?

Thanks.
@fabio,

Sorry, this addon won't work in repeatable regions, please use the normal type "Thumbnail" inside the table. I expect you don't even see anything in the repeatable table for the jcropthumb editable you defined.
Image
Bartonsweb wrote: @fabio,

Sorry, this addon won't work in repeatable regions, please use the normal type "Thumbnail" inside the table. I expect you don't even see anything in the repeatable table for the jcropthumb editable you defined.


Opps... :(

Thanks...
@fabioferrero, @Bartonsweb,
You think will be possible to use this addon to manually crop also images and not only thumbnails?
As a workaround we can do this -
a. define a region of type 'image', as we normally do, but do not set any width or height - basically it should accept whatever image is uploaded without trying to process it.
b. define a region of type 'jcropthumb' attaching it to the image above. Set whatever constraints you want for your final image on this region.

Now instruct the user can manipulate the image in the 'jcropthumb' region.
On the frontend, don't use the main image - rather use the image outputted by the 'jcropthumb' region.
So basically now we'll be using the thumbnail region as the main image and the 'image' region would just serve to hold the pristine original.

How does that sound?
KK wrote: @fabioferrero, @Bartonsweb,
You think will be possible to use this addon to manually crop also images and not only thumbnails?
As a workaround we can do this -
a. define a region of type 'image', as we normally do, but do not set any width or height - basically it should accept whatever image is uploaded without trying to process it.
b. define a region of type 'jcropthumb' attaching it to the image above. Set whatever constraints you want for your final image on this region.

Now instruct the user can manipulate the image in the 'jcropthumb' region.
On the frontend, don't use the main image - rather use the image outputted by the 'jcropthumb' region.
So basically now we'll be using the thumbnail region as the main image and the 'image' region would just serve to hold the pristine original.

How does that sound?


Yes, sound good, and I've tried this... but...
...I need jcropthumb inside a repeatable region, and doesn't work... (also type thumbnail doesn't work, I've used cms:thumbnail).

Next time...
Hi, I constantly have problems with jcrop. I'm working an MAC and PC. First all things are working but after a while when updating templates on Mac the backend crashes. I guess this happens is when creating the template on PC and then updateing at MAC

log error: [21-Jul-2017 04:37:42 xxx] PHP Fatal error: Call to a member function get_data() on null in /Users/xxx/cms/addons/jcropthumb/jcropthumb.php on line 100

After removing the jcrop from the template again the backend is still gone (white screen).

any ideas?
Previous 1, 2, 3, 4, 5, 6 Next
58 posts Page 4 of 6

Who is online

In total there are 3 users online :: 1 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: Google [Bot] and 2 guests

cron