Commit graph

16 commits

Author SHA1 Message Date
Ammar Abdulhamid b9bdc3fc19 Use SidebarBeforeOutput hook to add 'cite this page' sidebar link.
* Remove usage of BaseTemplateToolbox in favor of SidebarBeforeOutput hook
* Also remove SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook, since SidebarBeforeOutput can provide functionalities of both.

Bug: T253687
Depens-On: Ie10a59048cdf882bad811d3c8fae386d90e93867
Change-Id: Ibe989364b9e500497759e79b789667d0a3430828
2020-05-30 04:49:18 +01:00
DannyS712 115fa5c9e8 extension.json - don't use array syntax when hooks only have 1 handler
Change-Id: Id49f9b74de9331892cb81f54b31a802f10cf1ca9
2020-03-11 08:42:01 +00:00
Tulsi Bhagat 0022ef4944 Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: I43bc6670706ae8eee3b5f2c2e9a35f649afdb8af
2018-02-12 12:26:23 +00:00
Kunal Mehta 14c37dd760 Move classes into includes/
Change-Id: I1aa22e05f5968d7e099bdc738ce54ec0d12c31d1
2018-02-09 18:37:58 +00:00
Kunal Mehta 03c21d7395 Use SPDX 3.0 license identifier
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: I696a8317d244cb0b824f71870dace1f40bc5fa12
2018-01-04 02:54:53 -08:00
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