Extensions: Difference between revisions

2,152 bytes added ,  10 July 2018
describe ImagesLoaded extension
No edit summary
(describe ImagesLoaded extension)
Line 9: Line 9:


See too: https://www.mediawiki.org/wiki/Suggestions_for_extensions_to_be_integrated
See too: https://www.mediawiki.org/wiki/Suggestions_for_extensions_to_be_integrated
With so many extensions in QualityBox, we really need to work on a systematic way of describing for each extension:
# What does it do?
# What extension does this compare with, or replace?
# How does it do it?
# What other extensions, or platform components are involved?
# User visible features
# Admin visible features
# Optional?
# Use case
== Images Loaded ==
; What does it do?
: The [https://github.com/enterprisemediawiki/ImagesLoaded Images Loaded] extension, written by James Montalvo, is a very minimal extension that does just one thing: it loads and makes available the [https://github.com/desandro/imagesloaded 'Images Loaded' javascript library] by the same name.
; What extension does this compare with, or replace?
: If you wanted to use the javascript library without this extension, you'd have to copy/paste the code (as Administrator) into <code>MediaWiki:Common.js</code>
; How does it do it?
: By creating a single static function in the extension class, it adds a <nowiki><script> tag</nowiki> in the source for every page.
; What other extensions, or platform components are involved?
: It uses the [https://www.mediawiki.org/wiki/Manual:Hooks/BeforePageDisplay <code>BeforePageDisplay</code>] hook, which is designed to allow last minute changes to the output page, e.g. adding of CSS or JavaScript by extensions.
; User visible features
: depends on code implementing library features
; Admin visible features
: depends on code implementing library features
; Optional?
This may be optional if you don't use Semantic MediaWiki. The only place where the imagesLoaded code seems to be used is by MasonryMainPage; and SemanticMediaWiki (in their jQuery.qtip.js (which implements [http://qtip2.com/ qTip2] - Pretty powerful tooltips - v2.2.1)).
; Use case
: Since this library provides really nice 'tooltips' features, and is used for that purpose in [[Semantic MediaWiki]] and [[SemanticResultsFormats]], it's a required <abbr title="User eXperience">UX</abbr> feature. See https://www.semantic-mediawiki.org/wiki/Help:Tooltip and http://qtip2.com/ for more on tooltips (which is just ONE example of what imagesLoaded can do.)


[[Category:Extensions]]
[[Category:Extensions]]