Manual:Non-clickable Images
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature has been deprecated and should not be used with current versions of MediaWiki.</translate> <translate> This feature was deprecated (or possibly removed completely) in version <tvar |
Warning
The following involves editing Linker.php
, a core MediaWiki file. It is a very simple procedure, but if you feel at all uncomfortable editing core files, do not do so. Make sure to create a backup copy of Linker.php before making the suggested edit.
How to
Open the file Linker.php
from your includes
folder and go to the function makeImageLink2. Find the lines:
if ( !$thumb ) {
$s = $this->makeBrokenImageLinkObj( $title );
} else {
$s = $thumb->toHtml( array(
'desc-link' => true,
'alt' => $fp['alt'],
'valign' => isset( $fp['valign'] ) ? $fp['valign'] : false ,
'img-class' => isset( $fp['border'] ) ? 'thumbborder' : false ) );
}
Change the value of 'desc-link' from true to false so that it now appears as
if ( !$thumb ) {
$s = $this->makeBrokenImageLinkObj( $title );
} else {
$s = $thumb->toHtml( array(
'desc-link' => false,
'alt' => $fp['alt'],
'valign' => isset( $fp['valign'] ) ? $fp['valign'] : false ,
'img-class' => isset( $fp['border'] ) ? 'thumbborder' : false ) );
}
The images in your wiki should now be non-clickable.