Commit graph

11 commits

Author SHA1 Message Date
Bartosz Dziewoński 61fad3f69d Suppress wrapping <div class="mw-parser-output"> around our <citation> tags
This wrapping and the ability to disable it was introduced in MW 1.30.

Bug: T171389
Change-Id: Id2eeda5602c75cafea293abd125989c29d3fc314
2017-10-13 23:17:40 +02:00
Florian Schmidt c422031326 Add a possibility to add a "cite this page" link without adding the NS as a content namespace
Sometimes it's required or at least a good option to have a cite this page
link on pages, that aren't content pages (like the project namespace).

This change adds a new configuration option for this extensions to allow to
add namespaces as namespaces that should have a cite this page link, even if
they're not a content page.

Bug: T150053
Change-Id: I2523bd9124ab8998a7c327d8045d7585d4dcf8b4
2016-12-30 16:55:11 +01:00
Kunal Mehta 096f6e91fc Rewrite to avoid messing with global state
The main goal of this rewrite is to not use or mess with any global
state.

The ParserGetVariableValueTs and ParserGetVariableValueVarCache hooks
were replaced with setting the timestamp via
ParserOptions::setTimestamp(). This also means that {{#time:...}} from
ParserFunctions extension will correctly use the page's timestamp
instead of the current one.

Disabling tidy is also done using ParserOptions instead of changing
global state.

Change-Id: Ib2810aa5891c57831380a1a4718656cc09932b96
2016-09-19 16:29:14 -07:00
Kunal Mehta 12623a5acd Use BaseTemplateToolbox hook so link appears in the right place
The SkinTemplateToolboxEnd hook is nasty and requires echo-ing raw HTML.
It also has the problem that if there are any other extensions using
that hook, the CiteThisPage link will easily end up in the wrong place
and under the wrong heading.

This is trivial to fix though by using the BaseTemplateToolbox hook,
which is designed for actually adding links to the toolbox!

Bug: T140290
Change-Id: I9557130c40e17edc12a225a3b7b1cdec028f93d0
2016-07-13 15:27:14 -07:00
Kunal Mehta 37960b1e78 Set manifest_version in extension.json
Bug: T100745
Change-Id: I4cd084c705e9369c117752cf1f03870a8a8ba948
2015-06-11 21:22:30 -07:00
umherirrender 9198c04a02 Replace deprecated $wgSpecialPageGroups
$wgSpecialPageGroups is deprecated since 1.21
override SpecialPage::getGroupName instead

Change-Id: I34c23170b839ac876bcdf5b384d4a14a9c5f7f02
2015-05-15 22:00:37 +02:00
Gilles Dubuc dbb9eb1adf Explicitly define module position
Style modules currently added through addModuleStyles default
to being in the head ("top" position). This is an unhealthy default,
since only critical styles that are needed at pageload should be
in the head. In order to be able to switch the default to "bottom",
existing module positions have to be defined explicitly.

Bug: T97410
Change-Id: I6831621bf4d684c84e5e77fa8bfb18f6a20f3b7d
2015-04-28 15:36:37 +02:00
Kunal Mehta eda4c0fdae Re-build extension.json, deprecate and empty CiteThisPage.php
Change-Id: I931c0d4f4a7f14418c4763eaf62fa22513e39955
2015-04-21 04:32:29 +00:00
Kunal Mehta 9fc70aed7d Add missing class to autoload
Change-Id: Ia381ac708a73182516b15bf372c3ae26278acbd8
2015-04-20 18:54:25 -07:00
Ricordisamoa 7c4220755b Add 'license-name' matching SPDX conventions
References:
http://spdx.org/licenses/
https://www.mediawiki.org/wiki/Manual:$wgExtensionCredits#license-name

Change-Id: I1a662e034da85b8457665dcbcbe6c6d190639182
2015-04-20 17:48:07 +02:00
Kunal Mehta 7d94dc92ee Add extension.json
Change-Id: I2e4b7c0adb60356617065c60db96a0ccf14a2c22
2015-01-26 21:35:00 -08:00