-
Notifications
You must be signed in to change notification settings - Fork 24
Add save events for content plugins #552
Conversation
Seems nice |
@@ -4,6 +4,12 @@ | |||
; Note : All ini files need to be saved as UTF-8 | |||
|
|||
PLG_MEDIA-ACTION_RESIZE="Media Action - Resize" | |||
PLG_MEDIA-ACTION_RESIZE_BATCH_DESC="Settings for server side actions when images got created." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to are created
@@ -4,6 +4,12 @@ | |||
; Note : All ini files need to be saved as UTF-8 | |||
|
|||
PLG_MEDIA-ACTION_RESIZE="Media Action - Resize" | |||
PLG_MEDIA-ACTION_RESIZE_BATCH_DESC="Settings for server side actions when images got created." | |||
PLG_MEDIA-ACTION_RESIZE_BATCH_LABEL="Batch Settings" | |||
PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_HEIGHT_LABEL="Image Max Width" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Height
PLG_MEDIA-ACTION_RESIZE_BATCH_DESC="Settings for server side actions when images got created." | ||
PLG_MEDIA-ACTION_RESIZE_BATCH_LABEL="Batch Settings" | ||
PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_HEIGHT_LABEL="Image Max Width" | ||
PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_HEIGHT_DESC="The maximum width an image can have. When empty, no resizing is performed." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this? The maximum height of an image to resize.
label="PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_WIDTH_LABEL" | ||
descripton="PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_WIDTH_DESC" | ||
addonAfter="px" | ||
filter="int" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reduce indent by 1.
filter="integer"
label="PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_HEIGHT_LABEL" | ||
descripton="PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_HEIGHT_DESC" | ||
addonAfter="px" | ||
filter="int" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reduce indent by 1.
filter="integer"
Thanks @Quy, made the changes. |
Pull Request for Issue #523.
Summary of Changes
A
onContentBeforeSave
andonContentAfterSave
event gets triggered when a file is created or updated or when a folder is created. This includes also cloud adapters. The file data which is uploaded is sent in the event which can be modified by a plugin.This pr includes also two new batch settings for the resize plugin where the admin can define a max width and height for any image which gets uploaded.
Testing Instructions
Expected result
Image get resized to be not bigger than the defined values.
Actual result
No automatic resize is possible.