Manual:Non-clickable Images

From MediaWiki.org
Jump to: navigation, search

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

[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.

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox