Manual:Thumb.php

This page is a translated version of the page Manual:Thumb.php and the translation is 67% complete.
Outdated translations are marked like this.

Detalhes

thumb.php is a script used for creating and streaming thumbnails.

Para usá-lo, defina $wgThumbnailScriptPath para o caminho deste arquivo.

Os parâmetros são f para o nome do arquivo, w para o tamanho, p para página em arquivos de várias páginas (se disponível).

Exemplo: https://commons.wikimedia.org/w/thumb.php?f=Delle_strade_ferrate_e_della_loro_futura_influenza_in_Europa.djvu&w=600&p=206

Rotina de tratamento de página 404 (inexistente)

Este script pode também ser utilizado como uma manipulador de páginas 404 para gerar miniaturas de imagem quando elas não existirem. To use it, follow the steps below, then set $wgGenerateThumbnailOnParse to false. If you have $wgLocalFileRepo defined in LocalSettings.php, then you need to also set:

$wgLocalFileRepo['transformVia404'] = true;
Exemplo: https://www.mediawiki.org/w/thumb.php?f=example.jpg&width=100

Transformações por script

Apenas adicione o seguinte código no final do arquivo LocalSettings.php .

$wgThumbnailScriptPath = "$wgScriptPath/thumb.php";

Nenhuma mudança de configuração no Apache é necessária. Isso fará com que thumb.php já retorne o arquivo se ele já foi renderizado, ou renderizar o arquivo sob demanda, se necessário.

Ver também