googlemediawiki

Install the MultimediaViewer extension

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.

The MultimediaViewer extension gives wiki users a different interface for viewing full-size, or nearly full-size, images in their browser without extraneous page loads or confusing interstitial pages.

To install the MultimediaViewer plugin, please follow the steps below depending on your installation type:

Approach A: Bitnami installations using system packages

  • Download the latest MultimediaViewer version from the official Mediawiki extension page.

  • Uncompress the downloaded file in the extensions directory of Mediawiki. The command below should create the MultimediaViewer directory in the Mediawiki extensions directory:

    $ tar -xzf MultimediaViewer-*.tar.gz -C /opt/bitnami/mediawiki/extensions
    
  • Add the MultimediaViewer plugin to the Mediawiki LocalSettings.php file:

    require_once "$IP/extensions/MultimediaViewer/MultimediaViewer.php";
    

If you have enabled PageSpeed you will need to disable it for the images directory. To do this, edit the file /opt/bitnami/apache2/conf/vhosts/mediawiki-htaccess.conf and modify the Directory directive for that directory. The Directory directive should look like this:

<Directory "/opt/bitnami/mediawiki/images">
  # Protect against bug T30235
  <IfModule rewrite_module>
    RewriteEngine On
    RewriteOptions inherit
    RewriteCond %{QUERY_STRING} \.[^\\/:*?\x22<>|%]+(#|\?|$) [nocase]
    RewriteRule . - [forbidden]
    # Fix for bug T64289
    Options +FollowSymLinks
  </IfModule>
  ModPagespeed off
</Directory>

Approach B: Self-contained Bitnami installations

  • Download the latest MultimediaViewer version from the official Mediawiki extension page.

  • Uncompress the downloaded file in the extensions directory of Mediawiki. The command below should create the MultimediaViewer directory in the Mediawiki extensions directory:

    $ tar -xzf MultimediaViewer-*.tar.gz -C /opt/bitnami/apps/mediawiki/htdocs/extensions
    
  • Add the MultimediaViewer plugin to the Mediawiki LocalSettings.php file:

    require_once "$IP/extensions/MultimediaViewer/MultimediaViewer.php";
    

If you have enabled PageSpeed you will need to disable it for the images directory. To do this, edit the file /opt/bitnami/apps/mediawiki/conf/htaccess.conf and modify the Directory directive for that directory. The Directory directive should look like this:

<Directory "/opt/bitnami/apps/mediawiki/htdocs/images">
  # Protect against bug T30235
  <IfModule rewrite_module>
    RewriteEngine On
    RewriteOptions inherit
    RewriteCond %{QUERY_STRING} \.[^\\/:*?\x22<>|%]+(#|\?|$) [nocase]
    RewriteRule . - [forbidden]
    # Fix for bug T64289
    Options +FollowSymLinks
  </IfModule>
  ModPagespeed off
</Directory>
Last modification June 30, 2020