MediaWiki  REL1_21
thumb.php File Reference

PHP script to stream out an image thumbnail. More...

Go to the source code of this file.

Enumerations

enum  MW_NO_OUTPUT_COMPRESSION

Functions

 wfExtractThumbParams ($thumbRel)
 Extract the required params for thumb.php from the thumbnail request URI.
 wfStreamThumb (array $params)
 Stream a thumbnail specified by parameters.
 wfThumbError ($status, $msg)
 Output a thumbnail generation error message.
 wfThumbHandle404 ()
 Handle a thumbnail request via thumbnail file URL.
 wfThumbHandleRequest ()
 Handle a thumbnail request via query parameters.

Detailed Description

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.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Definition in file thumb.php.


Enumeration Type Documentation

Definition at line 24 of file thumb.php.


Function Documentation

wfExtractThumbParams ( thumbRel)

Extract the required params for thumb.php from the thumbnail request URI.

At least 'width' and 'f' should be set if the result is an array.

Parameters:
$thumbRelString Thumbnail path relative to the thumb zone
Returns:
Array|null associative params array or null

Definition at line 299 of file thumb.php.

References $matches, $params, $size, array(), list, RepoGroup\singleton(), and wfRunHooks().

wfStreamThumb ( array params)

Stream a thumbnail specified by parameters.

Parameters:
$paramsArray
Returns:
void

Definition at line 92 of file thumb.php.

Referenced by wfThumbHandleRequest().

wfThumbError ( status,
msg 
)

Output a thumbnail generation error message.

Parameters:
$statusinteger
$msgstring
Returns:
void

Definition at line 349 of file thumb.php.

References $debug, $url, echo, global, title, and wfHostname().

Handle a thumbnail request via thumbnail file URL.

Returns:
void

Definition at line 64 of file thumb.php.

References $wgArticlePath, are, global, name, of, and title.

Handle a thumbnail request via query parameters.

Returns:
void

Definition at line 51 of file thumb.php.

References $params, and wfStreamThumb().