It also adds an animation for the arrow matching other
recently Codex provided arrow icons adopted animations.
Change-Id: If8b2b45b24351ee5c8fc9ee1380563f5d5b88678
The new hook OutputPageRenderCategoryLink gets triggered on rendering a
single category.
This change prevents wgCategories = [] on
$wgCategoryTreeHijackPageCategories = true.
Bug: T372155
Depends-On: Id82a77a57d1f12233d974ea4c1b093f50c5ab74f
Change-Id: Ic86f210474cbc0e2dcebf664cf2309a4a4408f60
The parameter onlyroot is deprecated since July 2008.
Generate a tracking category for tracking the deprecation.
Bug: T290062
Change-Id: I8eb58fa7831e11e6a6719f11fb1ff310666cdc4e
The modules are already in the ParserOutput by change
I8d2a6d92f45f30495263eea716adb4eeaf7ebfbb.
The hack with the flag for the OutputPageParserOutput hook is not
needed anymore.
Do not deploy this change before the caches has been purged or expired.
Bug: T212059
Change-Id: If9427bbf114870ec9747670367915e11750c6525
Replace the dynamic property on SpecialTrackingCategories object,
this was used to store preloaded Category objects.
Dynamic properties are deprecated in php8.2
The preload and storage is now done with the service.
Adjust doc to LinkTarget (Id0cc2ca)
Bug: T324897
Change-Id: I891ad79bc357d32585ef4d9206d398c5a75222aa
Core now provides all-member count separately with type guarantee.
Also bump core requirement to >= 1.38.0
Change-Id: I2b489e690ad05462a553e424bd9495593a8d2b1b
The configuration variable "CategoryTreeForceHeaders" allowed to force
the loading of the modules on every page by the hooks
"BeforePageDisplay" and "BeforePageDisplayMobile".
This is not needed anymore because the modules are now already loaded
if the category tree is used some on the other hooks.
Change-Id: I9fde894977463ecd1c4b07da449d98c39b3665ea
This change requires CSSJanus version 2.0.0 included in core by
I0528443e4eae0338f5a37491352db03944c6bd4c since MediaWiki 1.37.
Bug: T288943
Depends-On: I0528443e4eae0338f5a37491352db03944c6bd4c
Change-Id: I38c08b2073e10e7d56b286b1ae75b400578ce2dd
This allows better to style the buttons.
The complicated CSS selector for the direction supports a categorytree
in the user interface language like in the sidebar or on
Special:CategoryTree and in the content language like on category pages
and with <categorytree> in the content.
The CSS selector :dir( rtl ) would be a short version for this but it is
currently only supported by Firefox:
https://developer.mozilla.org/en-US/docs/Web/CSS/:dir
Bug: T288910
Change-Id: Ibfb0cb28f0086fb1b7d0997be2246bc120eea85e
The MediaWikiServices hook runs before the service container is fully initialized, so it cannot have services injected. For this reason, it needs to be separate from the handlers for other hooks.
Change-Id: I1519aea8bca2f3977fcf15ee8776a1b3319687b5
This converts the CategtoryTree extension to the new (MW1.35) hook system.
The patch was written live during a hackathon workshop.
A recording of the workshop is available at
<https://www.youtube.com/watch?v=ZOj44Rbh0tM&t>.
Re-applying after fixing: premature access to $wgRequest
Restores change: Ie52c393af378a980a2dac4ae7076fd6c016a8e0e
Reverts revert: Ieee300c7b35b7069bd7e781610c915f2ecae1bf1
NOTE: the "mode" parameter for category pages seems to be broken,
as the mode is not proeprly propoagated to dynamic requests.
This was already the case before this change, and this change
does not try to fix that issue. I was tempted to just remove
the feature entirely, but T137812 inidcates that it may be useful to
some. I will comment there to see if this should be fiexed or removed.
Bug: T282110
Bug: T271011
Change-Id: Ic3ee05e9dc382f4ada5cfeb9ff5d9a69249cc60d
This feature add an option `notranslations` that allows the category
tree only to show the default pages and not include their translations
equivalents on the tree. For example let's say we have a page (Test_page)
that was created in a default language "en" in a category TestCat, and has
translations listed: Test_page/es, Test_page/de, Test_page/ar etc.
Doing `<categorytree notranslations="on">TestCat</categorytree> will render
only the Test_page page with it's link to the page on the tree and nothing
more.
Note: If page "Foo/hu" exist but "Foo" doesn't, it should include "Foo/hu"
in the category tree. In most case though, a base page will exist.
Also, the feature is only available if Extension:Translate is made
available on that wiki.
TODO: If "notranslations" is used along side with "showcount", consider
subtracting the number of pages suppressed from the total page count
in the category tree for consistency.
Bug: T229265
Change-Id: Ib4e7ab6ad98c05857cda1cd98bbc19e0504677bb
This was internal to CategoryTree JS code and only needed on very
few pages. Export it as part of the module that needs it, instead.
Given this is computed and not a plain config var, use callback
to generate the value.
Bug: T219342
Change-Id: I790a98128b0a3317e27ac0d5fda08d48aeb640dc
It has origins in times when this code was in an AJAX function, however
now that it's in an API module it's not needed and can be counter-productive
as headers issued might conflict with MW headers. Let the API take care of
this via its standard means.
Change-Id: I8ebf8e7b935d7d252ac010bc1b88202b87f43e20
The module 'ext.categoryTree.css' was renamed to
'ext.categoryTree.styles' in 3cdb4e95f2.
The caches should now be expired.
Change-Id: I4e2e96c088c47e7e3dfa801c56847dc48d68ee4e
This change allows the skin to customize if there is a sidebar or not.
For example the SkinApi overloads buildSidebar and therefor the hook
SkinBuildSidebar is not triggered.
Change-Id: Ib39736901f25822d40265ccaa5fd0feea977cdc1
The hook `SkinJoinCategoryLinks` is not used and not triggered.
Also remove the style for the class CategoryTreeCategoryBarItem because
it is only used in skinJoinCategoryLinks::skinJoinCategoryLinks.
Change-Id: I52e4f819ff195fc1fa8a148b0bb58d95a4bf22d7
Also rename the style module from 'ext.categoryTree.css' to
'ext.categoryTree.styles'.
Keep the previous module name 'ext.categoryTree.css' for compability to
cached versions.
Also move the files of the module 'ext.categoryTree' into a
subdirectory ext.categoryTree.
Change-Id: Ie5ea28acfb43e33a94ec5824baf4f26d63d8e9e6
Register all hooks unconditionally in extension.json, and then in the
hook
itself, check whether they should be doing anything.
Change-Id: I5f0019fc444371a24a11a25ca2d980c0a9ab5a61
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: Ie7dda5637ce63abd241cfca73ee37b3d014d2efb
Add the category count to the core special page
Special:TrackingCategories to see at one view, if such categories
contains pages which maybe needs attention.
Depends on a hook addition in core.
Depends On: If195fb55dee1350a6de095892ce89e6565287cd9
Change-Id: If3815586c2a280b4e8958c13010c9f7436b8723d
We keep constants in CategoryTree.php extension loader to maintain
backwards compatibility with the MediaWiki configuration. It's expected
users will migrate from them when they switch to wfLoadExtension.
Bug: T87888
Change-Id: If67d0fe2ff758c7fd41386d04f5c0839c8c665a1