blob: 84445c1681a3cbc8a6ea6804fb9532538e5d1b22 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<?php
/**
* @cond file_level_code
* This is not a valid entry point, perform no further processing unless THUMB_HANDLER is defined
*/
if ( !defined( 'THUMB_HANDLER' ) ) {
echo "This file is part of MediaWiki and is not a valid entry point\n";
die( 1 );
}
/**
* Sample configuration file for thumb-handler.php.
* In order to use thumb-handler.php:
* 1) Copy this file to thumb.config.php and modify the settings.
* 2) The webserver must be setup to have thumb-handler.php as a 404 handler.
* This can be done in apache by editing .htaccess in the /thumb directory by adding:
* <IfModule rewrite_module>
* RewriteEngine on
* RewriteCond %{REQUEST_FILENAME} !-f
* RewriteCond %{REQUEST_FILENAME} !-d
* RewriteRule ^([^/]+/)?[0-9a-f]/[0-9a-f][0-9a-f]/[^/]+/[^/]+$ /path/to/thumb_handler.php [L]
* </IfModule>
*/
$thgThumbUrlMatch = array(
# URL name of the server (e.g. "upload.wikipedia.org").
'server' => 'http://localhost',
# URL fragment to the thumb/ directory
'dirFragment' => 'MW_trunk/images/thumb',
# URL regex fragment correspond to the directory hashing of thumbnails.
# This must correspond to $wgLocalFileRepo['hashLevels'].
'hashFragment' => '[0-9a-f]/[0-9a-f][0-9a-f]/' // 2-level directory hashing
);
$thgThumbCurlConfig = array(
# Optionally cURL to thumb.php instead of using it directly
'enabled' => false,
# The URL to thumb.php, accessible from the web server.
'url' => 'http://localhost/MW_trunk/thumb.php',
# Optional proxy server to use to access thumb.php
'proxy' => null,
# Timeout to use for cURL request to thumb.php.
# Leave it long enough to generate a ulimit timeout in ordinary
# cases, but short enough to avoid a local PHP timeout.
'timeout' => 53
);
# Custom functions for overriding aspects of thumb handling
$thgThumbCallbacks = array();
|