Search

Ok cool, will do.. loving the extension though. so THANK YOU =>

Added a description of the bug in github.. can people check if this is isolated or universal bug? I’m on Symph 2.0.4

Is there a specific reason why you don’t update to 2.0.6? Updating should’t break anything.

The site is live and we’ve changed files in the core.. gonna try build it with 2.0.6 offline and push the new one live at a later date! If I work offline and publish to the live site when ready.. I’m not sure what will happen to the section entries on the hosted database.. so don’t want to break anything until I’m comfortable with pushing an updated core.

The creation of the URL is pure JavaScript, so it shiuld Be Independent of the Symphony version. Will Look into it.

Is there a way to write this code for JIT Image manipulation to be dynamic in my templates?

/image/4/crop_width/crop_height/crop_x/crop_y/resize_width/resize_height/path/to/image.jpg

I want the: /image/4/crop_width/crop_height/crop_x/crop_y/resize_width/resize_height/ bit of the url to be dynamically set depending on what is set in the section?

I have this hard coded for a banner image in the background, but was wanting to use image crop for the control of the crop area and size of the image.. but if I hard code this on the template.. it will not listen to the JIT that is created by the image crop field.

Here is my hard coded background image code:

<xsl:for-each select="/data/banners/entry">
<div class="background-image" style="background: #f8f8f4 url({$root}/image/2/960/142/5{upload-banner/@path}/{upload-banner/filename}) top right; display: none; background-repeat: no-repeat;">
</div>
</xsl:for-each>

Would I need to set the JIT as an output datasource? so that I can use it? i.e $ds-image. not quite sure.

I see this in my xml:

<section id="15" handle="banners">Banners</section>
12
        <entry id="175">
13
            <upload-banner size="76 kb" path="/images" type="image/jpg">
14
                <filename>canwycastle.jpg</filename>
15
                <meta creation="2009-09-15T04:18:50+01:00" width="955" height="147" />
16
            </upload-banner>
17
            <crop cropped="" x1="0" x2="954" y1="2" y2="146" width="960" height="144" ratio="6.667" />
18
        </entry>

And Was thinking that something like this would work:

url({$root}/image/{$crop/x1/x2/y1/y2/width/height/ratio}{upload-banner/@path}/{upload-banner/filename})

Is this right?

{$crop/x1/x2/y1/y2/width/height/ratio}

What this is saying is:

  • find a variable named crop
  • look for a hierarchy of XML inside the crop variable whereby there is an XML element x1 which has a child x2 which has a child y1 which has a child y2 which has a child width which has a child height and get the value of the child ratio

Which won’t find anything….

It should look more like this:

url({$root}/image/{crop/x1}/{crop/x2}/{crop/y1}/{crop/y2}/{crop/width}/{crop/height}/{crop/ratio}{upload-banner/@path}/{upload-banner/filename})

Star :)

EDIT

Ah .. what about the value of image/4/ before we get into the cropping? is this still needed in the url?

No idea.

Isn’t the first value after image in JIT.. the mode? image/2/ is resize and image/4/ is crop or something.. I’ll read more, write less and thanks for the heads up on the way to write it out… it is very much appreciated. :)

Hi all,

Lets name your image field image, and your crop field thumb To display dinamicaly your thumbnail, you have to enter a code like that:

<img src="url({$root}/image/4/{thumb/@width}/{thumb/@height}/{thumb/@x1}/{thumb/@y1}/99/99/{image/@path}/{image/filename})" />

99 values are the width and height of the thumbnail (mine are squared), so change it as you need. You cant resize it dinamicaly.

If you need to display multiple sizes of thumbnails, the above solution will not work, and you can add a new field to copy and past the value of url of the cropped image.

So my final comment about this extension:

  • Thanks for this great extension
  • Not easy to understand that you have to save the entry with the file for the first time, and then edit the entry to crop the image
  • Improvement can be to save the resized values instead of the real size of the thumbnail, to add complete dinamically insert in xsl templates.

Have a nice day.

Problem with above is the cropped mode (4) is used all the time and if the image has not been cropped it won’t work!

<xsl:for-each select="/data/banners/entry">
<div class="background-image" style="background: url({$root}/image/4/{crop-image/@width}/{crop-image/@height}/{crop-image/@x1}/{crop-image/@y1}/{crop-image/@x2}/{crop-image/@y2}{upload-banner/@path}/{upload-banner/filename}) top right; display: none; background-repeat: no-repeat;">
</div>
</xsl:for-each>

I want to be able to use the image cropper to control the output of the “/image/4/” section of the JIT output..

Is this possible or not? as in create a variable in the .xsl file of yes that has a value of “4” and if the the variable is “no” then the value should be “1” or “2”.

Or does the JCrop way of manipulation not need the mode value?

EDIT

Managed to get a conditional choose->when working based on cropped=yes or not but the cropped image with the params from the image cropper extension don’t seem to be playing ball.. checked the .htaccess file for the changes and all seemed well!

I tried this structure but to no avail:

{$root}/image/4/{crop-image/@width}/{crop-image/@height}/{crop-image/@x1}/{crop-image/@y1}/960/0{upload-banner/@path}/{upload-banner/filename}

any pointers?

@klaftertief: I love your extensions; hopefully it’ll make it intro post-beta stage. I have a question:

There is an optional thumbnail preview in entry overview tables.

How do I use that?

@jedw: Nice you love it, even at this stage.
To show the thumbnail preview, you just have to check the Show column checkbox in the section configuration. At the moment the extension shows also thumbnails of uncropped images. This could be seen as a bug.

I still have to figure out some things and make some decisions before releasing it as a proper extension.

@moonoo2

Managed to get a conditional choose->when working based on cropped=yes or not but the cropped image with the params from the image cropper extension don’t seem to be playing ball..

There is also a not_yet value for the cropped-attribute. I used it to try to get required field functionality working. Maybe this is causing your problem.

@klaftertief Thanks I got it working. Looking forward to see the release version!

klaftertief: Still playing with it.. and yes I think the conditional param for cropped or not would be useful to determine how the module gets rendered in the front end?

EDIT

klaftertief:

Anymore news with imagecropper extension at all?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details