Manual:Non-clickable Images

From mediawiki.org

Warning[edit]

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[edit]

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.