Skip to content

Commit 82a150e

Browse files
committed
version 0.1.0
Signed-off-by: Josh Crawford <[email protected]>
1 parent 419e494 commit 82a150e

File tree

7 files changed

+182
-223
lines changed

7 files changed

+182
-223
lines changed

README.md

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -58,36 +58,11 @@ Aspect ratio options are:
5858
- Provide hook for third-party Aspect Ratio options.
5959

6060

61-
## Changelog
62-
63-
#### 0.0.7
64-
65-
- Fix to ensure images uploaded are both an image, and manipulatable.
66-
- Better error-catching for resizing.
67-
68-
#### 0.0.6
69-
70-
- Added cropping option to Element Actions.
71-
72-
#### 0.0.5
61+
## Compatibility
7362

74-
- Performance improvements - now uses Tasks to handle batch resizing.
63+
Requires Craft 2.5+ to run.
7564

76-
#### 0.0.4
7765

78-
- Fix to make sure environment variables are parsed for asset sources.
79-
80-
#### 0.0.3
81-
82-
- Added batch processing for existing assets.
83-
- Added image quality option.
84-
85-
#### 0.0.2
86-
87-
- Moved hook from `onBeforeSaveAsset` to `onSaveAsset`.
88-
- Asset record is updated after resize, reflecting new image width/height/size.
89-
- Added option to restrict resizing to specific Asset sources.
90-
91-
#### 0.0.1
66+
## Changelog
9267

93-
- Initial release.
68+
[View JSON Changelog](https://github.com/engram-design/ImageResizer/blob/master/changelog.json)

changelog.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
[
2+
{
3+
"version": "0.1.0",
4+
"downloadUrl": "https://github.com/engram-design/ImageResizer/archive/0.1.0.zip",
5+
"date": "2015-12-02 08:30:00",
6+
"notes": [
7+
"[Added] Craft 2.5 support, including release feed and icons."
8+
]
9+
},
10+
{
11+
"version": "0.0.7",
12+
"downloadUrl": "https://github.com/engram-design/ImageResizer/archive/0.0.7.zip",
13+
"date": "2015-10-03 00:00:00",
14+
"notes": [
15+
"[Improved] Better error-catching for resizing.",
16+
"[Fixed] Fix to ensure images uploaded are both an image, and manipulatable."
17+
]
18+
},
19+
{
20+
"version": "0.0.6",
21+
"downloadUrl": "https://github.com/engram-design/ImageResizer/archive/0.0.6.zip",
22+
"date": "2015-09-25 00:00:00",
23+
"notes": [
24+
"[Added] Added cropping option to Element Actions."
25+
]
26+
},
27+
{
28+
"version": "0.0.5",
29+
"downloadUrl": "https://github.com/engram-design/ImageResizer/archive/0.0.5.zip",
30+
"date": "2015-09-24 00:00:00",
31+
"notes": [
32+
"[Improved] Performance improvements - now uses Tasks to handle batch resizing."
33+
]
34+
},
35+
{
36+
"version": "0.0.4",
37+
"downloadUrl": "https://github.com/engram-design/ImageResizer/archive/0.0.4.zip",
38+
"date": "2015-09-22 00:00:00",
39+
"notes": [
40+
"[Fixed] Fix to make sure environment variables are parsed for asset sources."
41+
]
42+
},
43+
{
44+
"version": "0.0.3",
45+
"downloadUrl": "https://github.com/engram-design/ImageResizer/archive/0.0.3.zip",
46+
"date": "2015-09-21 00:00:00",
47+
"notes": [
48+
"[Added] Added batch processing for existing assets.",
49+
"[Added] Added image quality option."
50+
]
51+
},
52+
{
53+
"version": "0.0.2",
54+
"downloadUrl": "https://github.com/engram-design/ImageResizer/archive/0.0.2.zip",
55+
"date": "2015-09-20 00:00:00",
56+
"notes": [
57+
"[Added] Added option to restrict resizing to specific Asset sources.",
58+
"[Improved] Moved hook from `onBeforeSaveAsset` to `onSaveAsset`.",
59+
"[Improved] Asset record is updated after resize, reflecting new image width/height/size."
60+
]
61+
},
62+
{
63+
"version": "0.0.1",
64+
"downloadUrl": "https://github.com/engram-design/ImageResizer/archive/0.0.1.zip",
65+
"date": "2015-09-19 00:00:00",
66+
"notes": [
67+
"Initial release"
68+
]
69+
}
70+
]

imageresizer/ImageResizerPlugin.php

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
class ImageResizerPlugin extends BasePlugin
55
{
6-
/* --------------------------------------------------------------
7-
* PLUGIN INFO
8-
* ------------------------------------------------------------ */
6+
// =========================================================================
7+
// PLUGIN INFO
8+
// =========================================================================
99

1010
public function getName()
1111
{
@@ -14,7 +14,12 @@ public function getName()
1414

1515
public function getVersion()
1616
{
17-
return '0.0.7';
17+
return '0.1.0';
18+
}
19+
20+
public function getSchemaVersion()
21+
{
22+
return '1.0.0';
1823
}
1924

2025
public function getDeveloper()
@@ -27,6 +32,21 @@ public function getDeveloperUrl()
2732
return 'http://sgroup.com.au';
2833
}
2934

35+
public function getPluginUrl()
36+
{
37+
return 'https://github.com/engram-design/ImageResizer';
38+
}
39+
40+
public function getDocumentationUrl()
41+
{
42+
return $this->getPluginUrl() . '/blob/master/README.md';
43+
}
44+
45+
public function getReleaseFeedUrl()
46+
{
47+
return $this->getPluginUrl() . '/blob/master/changelog.json';
48+
}
49+
3050
public function getSettingsHtml()
3151
{
3252
$sourceOptions = array();
@@ -52,10 +72,18 @@ protected function defineSettings()
5272
);
5373
}
5474

75+
public function onBeforeInstall()
76+
{
77+
// While Craft 2.5 switched imgAreaSelect for Jcrop
78+
if (version_compare(craft()->getVersion(), '2.5', '<')) {
79+
throw new Exception($this->getName() . ' requires Craft CMS 2.5+ in order to run.');
80+
}
81+
}
82+
5583

56-
/* --------------------------------------------------------------
57-
* HOOKS
58-
* ------------------------------------------------------------ */
84+
// =========================================================================
85+
// HOOKS
86+
// =========================================================================
5987

6088
public function init()
6189
{

imageresizer/elementactions/ImageResizer_CropImageElementAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public function getName()
1010

1111
public function getTriggerHtml()
1212
{
13-
craft()->templates->includeJsResource('lib/imgareaselect/jquery.imgareaselect.pack.js');
14-
craft()->templates->includeCssResource('lib/imgareaselect/imgareaselect-animated.css');
13+
craft()->templates->includeJsResource('lib/jcrop/jquery.Jcrop.min.js');
14+
craft()->templates->includeCssResource('lib/jcrop/jquery.Jcrop.min.css');
1515

1616
craft()->templates->includeCssResource('imageresizer/css/CropElementAction.css');
1717
craft()->templates->includeJsResource('imageresizer/js/CropElementAction.js');

imageresizer/resources/css/CropElementAction.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@
3030
body.ltr .buttons.leftalign {
3131
float: left;
3232
}
33+
34+
body.ltr .buttons.rightalign {
35+
float: right;
36+
}

imageresizer/resources/icon.svg

Lines changed: 8 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)