MediaWiki REL1_32
MultimediaViewer.php File Reference

This file is part of the MediaWiki extension MultimediaViewer. More...

Go to the source code of this file.

Variables

array bool $wgMediaViewerActionLoggingSamplingFactorMap = false
 If set, records user actions via EventLogging and applies a sampling factor according to the map.
 
int bool $wgMediaViewerAttributionLoggingSamplingFactor = false
 If set, records whether image attribution data was available.
 
int bool $wgMediaViewerDimensionLoggingSamplingFactor = false
 If set, records whether image dimension data was available.
 
int bool $wgMediaViewerDurationLoggingLoggedinSamplingFactor = false
 If set, records loading times via EventLogging with factor specific to loggedin users.
 
int bool $wgMediaViewerDurationLoggingSamplingFactor = false
 If set, records loading times via EventLogging.
 
bool $wgMediaViewerEnableByDefault = true
 If trueish, and $wgMediaViewerIsInBeta is unset, Media Viewer will be turned on by default.
 
bool null $wgMediaViewerEnableByDefaultForAnonymous = null
 Overrides $wgMediaViewerEnableByDefault for anonymous users.
 
string bool $wgMediaViewerImageQueryParameter = false
 If set, adds a query parameter to image requests made by Media Viewer.
 
bool $wgMediaViewerIsInBeta = false
 If set, Media Viewer will try to use BetaFeatures.
 
int bool $wgMediaViewerNetworkPerformanceSamplingFactor = false
 If set, records image load network performance via EventLogging once per this many requests.
 
string bool $wgMediaViewerRecordVirtualViewBeaconURI = false
 If set, records a virtual view via the provided beacon URI.
 
bool $wgMediaViewerUseThumbnailGuessing = false
 When this is enabled, MediaViewer will try to guess image URLs instead of making an imageinfo API to get them from the server.
 
if(function_exists( 'wfLoadExtension')) else
 

Detailed Description

This file is part of the MediaWiki extension MultimediaViewer.

MultimediaViewer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

MultimediaViewer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with MultimediaViewer. If not, see http://www.gnu.org/licenses/.

Author
Mark Holmquist mtrac.nosp@m.eur@.nosp@m.membe.nosp@m.r.fs.nosp@m.f.org
Note
Copyright © 2013, Mark Holmquist

Definition in file MultimediaViewer.php.

Variable Documentation

◆ $wgMediaViewerActionLoggingSamplingFactorMap

array bool $wgMediaViewerActionLoggingSamplingFactorMap = false

If set, records user actions via EventLogging and applies a sampling factor according to the map.

A "default" key in the map must be set. False if unset.

Definition at line 87 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\resourceLoaderGetConfigVars().

◆ $wgMediaViewerAttributionLoggingSamplingFactor

int bool $wgMediaViewerAttributionLoggingSamplingFactor = false

If set, records whether image attribution data was available.

A value of 1000 means there will be an 1:1000 chance to log the attribution event. False if unset.

Definition at line 71 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\resourceLoaderGetConfigVars().

◆ $wgMediaViewerDimensionLoggingSamplingFactor

int bool $wgMediaViewerDimensionLoggingSamplingFactor = false

If set, records whether image dimension data was available.

A value of 1000 means there will be an 1:1000 chance to log the dimension event. False if unset.

Definition at line 79 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\resourceLoaderGetConfigVars().

◆ $wgMediaViewerDurationLoggingLoggedinSamplingFactor

int bool $wgMediaViewerDurationLoggingLoggedinSamplingFactor = false

If set, records loading times via EventLogging with factor specific to loggedin users.

A value of 1000 means there will be an 1:1000 chance to log the duration event. False if unset.

Definition at line 63 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\resourceLoaderGetConfigVars().

◆ $wgMediaViewerDurationLoggingSamplingFactor

int bool $wgMediaViewerDurationLoggingSamplingFactor = false

If set, records loading times via EventLogging.

A value of 1000 means there will be an 1:1000 chance to log the duration event. False if unset.

Definition at line 55 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\resourceLoaderGetConfigVars().

◆ $wgMediaViewerEnableByDefault

bool $wgMediaViewerEnableByDefault = true

If trueish, and $wgMediaViewerIsInBeta is unset, Media Viewer will be turned on by default.

Definition at line 113 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\onUserGetDefaultOptions(), and MultimediaViewerHooks\shouldHandleClicks().

◆ $wgMediaViewerEnableByDefaultForAnonymous

bool null $wgMediaViewerEnableByDefaultForAnonymous = null

Overrides $wgMediaViewerEnableByDefault for anonymous users.

If set to null, will fall back to value of $wgMediaViewerEnableByDefault

Definition at line 120 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\shouldHandleClicks().

◆ $wgMediaViewerImageQueryParameter

string bool $wgMediaViewerImageQueryParameter = false

If set, adds a query parameter to image requests made by Media Viewer.

Definition at line 126 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\resourceLoaderGetConfigVars().

◆ $wgMediaViewerIsInBeta

bool $wgMediaViewerIsInBeta = false

◆ $wgMediaViewerNetworkPerformanceSamplingFactor

int bool $wgMediaViewerNetworkPerformanceSamplingFactor = false

If set, records image load network performance via EventLogging once per this many requests.

False if unset.

Definition at line 47 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\resourceLoaderGetConfigVars().

◆ $wgMediaViewerRecordVirtualViewBeaconURI

string bool $wgMediaViewerRecordVirtualViewBeaconURI = false

If set, records a virtual view via the provided beacon URI.

Definition at line 132 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\resourceLoaderGetConfigVars().

◆ $wgMediaViewerUseThumbnailGuessing

bool $wgMediaViewerUseThumbnailGuessing = false

When this is enabled, MediaViewer will try to guess image URLs instead of making an imageinfo API to get them from the server.

This speeds up image loading, but will result in 404s when $wgGenerateThumbnailOnParse (so the thumbnails are only generated as a result of the API request). MediaViewer will catch such 404 errors and fall back to the API request, but depending on how the site is set up, the 404 might get cached, or redirected, causing the image load to fail. The safe way to use URL guessing is with a 404 handler: https://www.mediawiki.org/wiki/Manual:Thumb.php#404_Handler

Definition at line 106 of file MultimediaViewer.php.

Referenced by MultimediaViewerHooks\resourceLoaderGetConfigVars().

◆ else

if (function_exists('wfLoadExtension')) else
Initial value:
{
die( 'This version of the MultimediaViewer extension requires MediaWiki 1.25+' )

Definition at line 34 of file MultimediaViewer.php.