MediaWiki REL1_31
|
Static Public Member Functions | |
static | getBetaPreferences ( $user, &$prefs) |
Add a beta preference to gate the feature. | |
static | getModulesForArticle (&$out, &$skin) |
Handler for BeforePageDisplay hook Add JavaScript to the page when an image is on it and the user has enabled the feature if BetaFeatures is installed. | |
static | getModulesForCategory (&$catPage) |
Handler for CategoryPageView hook Add JavaScript to the page if there are images in the category. | |
static | getPreferences ( $user, &$prefs) |
Adds a default-enabled preference to gate the feature on non-beta sites. | |
static | getTestModules (array &$testModules, ResourceLoader &$resourceLoader) |
Get modules for testing our JavaScript. | |
static | makeGlobalVariablesScript (&$vars, OutputPage $out) |
Export variables which depend on the current user. | |
static | onEventLoggingRegisterSchemas (array &$schemas) |
static | onExtensionFunctions () |
static | onUserGetDefaultOptions (&$defaultOptions) |
static | resourceLoaderGetConfigVars (&$vars) |
Export variables used in both PHP and JS to keep DRY. | |
static | thumbnailBeforeProduceHTML (ThumbnailImage $thumbnail, array &$attribs, &$linkAttribs) |
Modify thumbnail DOM. | |
Static Protected Member Functions | |
static | getModules (&$out) |
Handler for all places where we add the modules Could be on article pages or on Category pages. | |
static | shouldHandleClicks ( $user) |
Checks the context for whether to load the viewer. | |
Static Protected Attributes | |
static | $discussionLink |
Link to a page where this module can be discussed. | |
static | $helpLink |
Link to help about this module. | |
static | $infoLink |
Link to more information about this module. | |
Definition at line 24 of file MultimediaViewerHooks.php.
|
static |
Add a beta preference to gate the feature.
User | $user | |
array | &$prefs |
Definition at line 151 of file MultimediaViewerHooks.php.
References $discussionLink, $helpLink, $infoLink, $wgExtensionAssetsPath, and $wgMediaViewerIsInBeta.
|
staticprotected |
Handler for all places where we add the modules Could be on article pages or on Category pages.
OutputPage | &$out |
Definition at line 99 of file MultimediaViewerHooks.php.
References $out.
Referenced by getModulesForArticle(), and getModulesForCategory().
|
static |
Handler for BeforePageDisplay hook Add JavaScript to the page when an image is on it and the user has enabled the feature if BetaFeatures is installed.
OutputPage | &$out | |
Skin | &$skin |
Definition at line 113 of file MultimediaViewerHooks.php.
References $out, getModules(), NS_FILE, and NS_SPECIAL.
|
static |
Handler for CategoryPageView hook Add JavaScript to the page if there are images in the category.
CategoryPage | &$catPage |
Definition at line 134 of file MultimediaViewerHooks.php.
References $out, and getModules().
|
static |
Adds a default-enabled preference to gate the feature on non-beta sites.
User | $user | |
array | &$prefs |
Definition at line 179 of file MultimediaViewerHooks.php.
References $wgMediaViewerIsInBeta.
|
static |
Get modules for testing our JavaScript.
array | &$testModules | |
ResourceLoader | &$resourceLoader |
Definition at line 251 of file MultimediaViewerHooks.php.
|
static |
Export variables which depend on the current user.
array | &$vars | |
OutputPage | $out |
Definition at line 235 of file MultimediaViewerHooks.php.
References $out, $vars, User\getDefaultOptions(), and shouldHandleClicks().
|
static |
Definition at line 57 of file MultimediaViewerHooks.php.
|
static |
Definition at line 47 of file MultimediaViewerHooks.php.
References $wgResourceModules.
|
static |
Definition at line 37 of file MultimediaViewerHooks.php.
References $wgMediaViewerEnableByDefault.
|
static |
Export variables used in both PHP and JS to keep DRY.
array | &$vars |
Definition at line 198 of file MultimediaViewerHooks.php.
References $discussionLink, $helpLink, $infoLink, $vars, $wgMediaViewerActionLoggingSamplingFactorMap, $wgMediaViewerAttributionLoggingSamplingFactor, $wgMediaViewerDimensionLoggingSamplingFactor, $wgMediaViewerDurationLoggingLoggedinSamplingFactor, $wgMediaViewerDurationLoggingSamplingFactor, $wgMediaViewerImageQueryParameter, $wgMediaViewerIsInBeta, $wgMediaViewerNetworkPerformanceSamplingFactor, $wgMediaViewerRecordVirtualViewBeaconURI, and $wgMediaViewerUseThumbnailGuessing.
|
staticprotected |
Checks the context for whether to load the viewer.
User | $user |
Definition at line 72 of file MultimediaViewerHooks.php.
References $wgMediaViewerEnableByDefault, $wgMediaViewerEnableByDefaultForAnonymous, and $wgMediaViewerIsInBeta.
Referenced by makeGlobalVariablesScript().
|
static |
Modify thumbnail DOM.
ThumbnailImage | $thumbnail | |
array | &$attribs | Attributes of the element |
array | bool | &$linkAttribs | Attributes of the wrapping element |
Definition at line 328 of file MultimediaViewerHooks.php.
References $attribs.
|
staticprotected |
Link to a page where this module can be discussed.
Definition at line 30 of file MultimediaViewerHooks.php.
Referenced by getBetaPreferences(), and resourceLoaderGetConfigVars().
|
staticprotected |
Link to help about this module.
Definition at line 34 of file MultimediaViewerHooks.php.
Referenced by getBetaPreferences(), and resourceLoaderGetConfigVars().
|
staticprotected |
Link to more information about this module.
Definition at line 26 of file MultimediaViewerHooks.php.
Referenced by getBetaPreferences(), and resourceLoaderGetConfigVars().