DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:media_resize

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
devel:event:media_resize [2020-07-06 16:45] samyelmandevel:event:media_resize [2020-09-28 18:40] (current) – [MEDIA_RESIZE] samyelman
Line 1: Line 1:
 ====== MEDIA_RESIZE ====== ====== MEDIA_RESIZE ======
-([[devel:develonly|Development Only]])+
 ---- dataentry event ---- ---- dataentry event ----
 Description:    handles media resizing or cropping  Description:    handles media resizing or cropping 
Line 10: Line 10:
 This event can be used to alter the resizing or cropping process in [[xref>lib/exe/fetch.php]]. It can be used to prevent the native resizing algorithm in whatever case is required, for example, if there is a need to use a specific algorithm not available in DokuWiki, or disable resizing for certain file extensions. This is processed before the [[devel:event:MEDIA_SENDFILE]] but after [[devel:event:FETCH_MEDIA_STATUS]] and offers a BEFORE and an AFTER processing.  This event can be used to alter the resizing or cropping process in [[xref>lib/exe/fetch.php]]. It can be used to prevent the native resizing algorithm in whatever case is required, for example, if there is a need to use a specific algorithm not available in DokuWiki, or disable resizing for certain file extensions. This is processed before the [[devel:event:MEDIA_SENDFILE]] but after [[devel:event:FETCH_MEDIA_STATUS]] and offers a BEFORE and an AFTER processing. 
  
-The native resizing algorithm can be prevented by returning FALSE in the BEFORE process. +The native resizing algorithm can be prevented by calling ''%%$event->preventDefault()%%'' in the BEFORE process. 
  
 If manipulating the image, the processed image's URL should be set as $data['file'] in the AFTER process.  If manipulating the image, the processed image's URL should be set as $data['file'] in the AFTER process. 
devel/event/media_resize.1594046728.txt.gz · Last modified: 2020-07-06 16:45 by samyelman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki