| [ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
PHP script to stream out an image thumbnail. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
| File Size: | 650 lines (22 kb) |
| Included or required: | 2 times |
| Referenced: | 0 times |
| Includes or requires: | 1 file includes/WebStart.php |
| wfThumbHandleRequest() X-Ref |
| Handle a thumbnail request via query parameters return: void |
| wfThumbHandle404() X-Ref |
| Handle a thumbnail request via thumbnail file URL return: void |
| wfStreamThumb( array $params ) X-Ref |
| Stream a thumbnail specified by parameters param: array $params List of thumbnailing parameters. In addition to parameters return: void |
| wfGenerateThumbnail( File $file, array $params, $thumbName, $thumbPath ) X-Ref |
| Actually try to generate a new thumbnail param: File $file param: array $params param: string $thumbName param: string $thumbPath return: array (MediaTransformOutput|bool, string|bool error message HTML) |
| wfThumbIsStandard( File $file, array $params ) X-Ref |
| Returns true if this thumbnail is one that MediaWiki generates links to on file description pages and possibly parser output. $params is considered non-standard if they involve a non-standard width or any non-default parameters aside from width and page number. The number of possible files with standard parameters is far less than that of all combinations; rate-limiting for them can thus be more generious. param: File $file param: array $params return: bool |
| wfExtractThumbRequestInfo( $thumbRel ) X-Ref |
| Convert pathinfo type parameter, into normal request parameters So for example, if the request was redirected from /w/images/thumb/a/ab/Foo.png/120px-Foo.png. The $thumbRel parameter of this function would be set to "a/ab/Foo.png/120px-Foo.png". This method is responsible for turning that into an array with the folowing keys: * f => the filename (Foo.png) * rel404 => the whole thing (a/ab/Foo.png/120px-Foo.png) * archived => 1 (If the request is for an archived thumb) * temp => 1 (If the file is in the "temporary" zone) * thumbName => the thumbnail name, including parameters (120px-Foo.png) Transform specific parameters are set later via wfExtractThumbParams(). param: string $thumbRel Thumbnail path relative to the thumb zone return: array|null Associative params array or null |
| wfExtractThumbParams( $file, $params ) X-Ref |
| Convert a thumbnail name (122px-foo.png) to parameters, using file handler. param: File $file File object for file in question param: array $params Array of parameters so far return: array Parameters array with more parameters |
| wfThumbError( $status, $msg ) X-Ref |
| Output a thumbnail generation error message param: int $status param: string $msg return: void |
| Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |