| [ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
All output and handler function needed for the media management popup
| Author: | Andreas Gohr |
| License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
| File Size: | 1028 lines (32 kb) |
| Included or required: | 5 times |
| Referenced: | 0 times |
| Includes or requires: | 5 files inc/search.php inc/html.php inc/confutils.php inc/fulltext.php inc/JpegMeta.php |
| media_filesinuse($data,$id) X-Ref |
| Lists pages which currently use a media file selected for deletion References uses the same visual as search results and share their CSS tags except pagenames won't be links. author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> |
| media_metasave($id,$auth,$data) X-Ref |
| Handles the saving of image meta data author: Andreas Gohr <andi@splitbrain.org> |
| media_metaform($id,$auth) X-Ref |
| Display the form to edit image meta data author: Andreas Gohr <andi@splitbrain.org> |
| media_delete($id,$auth) X-Ref |
| Handles media file deletions If configured, checks for media references before deletion author: Andreas Gohr <andi@splitbrain.org> return: mixed false on error, true on delete or array with refs |
| media_upload($ns,$auth) X-Ref |
| Handles media file uploads This generates an action event and delegates to _media_upload_action(). Action plugins are allowed to pre/postprocess the uploaded file. (The triggered event is preventable.) Event data: $data[0] fn_tmp: the temporary file name (read from $_FILES) $data[1] fn: the file name of the uploaded file $data[2] id: the future directory id of the uploaded file $data[3] imime: the mimetype of the uploaded file author: Andreas Gohr <andi@splitbrain.org> author: Michael Klier <chi@chimeric.de> triggers: MEDIA_UPLOAD_FINISH return: mixed false on error, id of the new file on success |
| _media_upload_action($data) X-Ref |
| Callback adapter for media_upload_finish() author: Michael Klier <chi@chimeric.de> |
| media_upload_finish($fn_tmp, $fn, $id, $imime) X-Ref |
| Saves an uploaded media file author: Andreas Gohr <andi@splitbrain.org> author: Michael Klier <chi@chimeric.de> |
| media_contentcheck($file,$mime) X-Ref |
| This function checks if the uploaded content is really what the mimetype says it is. We also do spam checking for text types here. We need to do this stuff because we can not rely on the browser to do this check correctly. Yes, IE is broken as usual. link: http://www.splitbrain.org/blog/2007-02/12-internet_explorer_facilitates_cross_site_scripting author: Andreas Gohr <andi@splitbrain.org> |
| media_notify($id,$file,$mime) X-Ref |
| Send a notify mail on uploads author: Andreas Gohr <andi@splitbrain.org> |
| media_filelist($ns,$auth=null,$jump='') X-Ref |
| List all files in a given Media namespace |
| media_fileactions($item,$auth) X-Ref |
| Print action links for a file depending on filetype and available permissions |
| media_printfile($item,$auth,$jump) X-Ref |
| Formats and prints one file in the list |
| media_printimgdetail($item) X-Ref |
| Prints a thumbnail and metainfos |
| media_uploadform($ns, $auth) X-Ref |
| Print the media upload form if permissions are correct author: Andreas Gohr <andi@splitbrain.org> |
| media_nstree($ns) X-Ref |
| Build a tree outline of available media namespaces author: Andreas Gohr <andi@splitbrain.org> |
| media_nstree_item($item) X-Ref |
| Userfunction for html_buildlist Prints a media namespace tree item author: Andreas Gohr <andi@splitbrain.org> |
| media_nstree_li($item) X-Ref |
| Userfunction for html_buildlist Prints a media namespace tree item opener author: Andreas Gohr <andi@splitbrain.org> |
| media_resize_image($file, $ext, $w, $h=0) X-Ref |
| Resizes the given image to the given size author: Andreas Gohr <andi@splitbrain.org> |
| media_crop_image($file, $ext, $w, $h=0) X-Ref |
| Crops the given image to the wanted ratio, then calls media_resize_image to scale it to the wanted size Crops are centered horizontally but prefer the upper third of an vertical image because most pics are more interesting in that area (rule of thirds) author: Andreas Gohr <andi@splitbrain.org> |
| media_get_from_URL($url,$ext,$cache) X-Ref |
| Download a remote file and return local filename returns false if download fails. Uses cached file if available and wanted author: Andreas Gohr <andi@splitbrain.org> author: Pavel Vitis <Pavel.Vitis@seznam.cz> |
| media_image_download($url,$file) X-Ref |
| Download image files author: Andreas Gohr <andi@splitbrain.org> |
| media_resize_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h) X-Ref |
| resize images using external ImageMagick convert program author: Pavel Vitis <Pavel.Vitis@seznam.cz> author: Andreas Gohr <andi@splitbrain.org> |
| media_crop_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x,$ofs_y) X-Ref |
| crop images using external ImageMagick convert program author: Andreas Gohr <andi@splitbrain.org> |
| media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x=0,$ofs_y=0) X-Ref |
| resize or crop images using PHP's libGD support author: Andreas Gohr <andi@splitbrain.org> author: Sebastian Wienecke <s_wienecke@web.de> |
| Generated: Tue Dec 2 01:30:01 2008 | Cross-referenced by PHPXref 0.7 |