Extension:RelatedArticles/pl
This extension is maintained by the Web team. |
RelatedArticles Status wydania: stabilne |
|
---|---|
Realizacja | Funkcja parsera , API |
Opis | Adds a link to related pages on the footer |
Autor(zy) | Reading Web Team |
Ostatnia wersja | 3.1.0 (SemVer) (Continuous updates) |
MediaWiki | 1.25+ |
PHP | 5.4+ |
Zmiany w bazie danych | Nie |
Licencja | Licencja GNU General Public License 2.0 lub późniejsza |
Pobieranie | CHANGELOG |
|
|
Quarterly downloads | 51 (Ranked 90th) |
Przetłumacz rozszerzenie RelatedArticles jeżeli jest dostępne na translatewiki.net | |
Problemy | Otwarte zadania · Zgłoś błąd |
The RelatedArticles extension adds a parser function to your wikitext that allows associating related articles with your article. It shows related pages as a list of articles and their descriptions at the bottom of a page on desktop and mobile. The extension is also smart enough to get the list of related articles using the morelike feature of CirrusSearch .
Instalacja
- Pobierz i umieść plik(i) w katalogu o nazwie
RelatedArticles
w folderzeextensions/
.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles - Dodaj poniższy kod na dole twojego pliku LocalSettings.php :
wfLoadExtension( 'RelatedArticles' );
- Zrobione – Przejdź do Special:Version na twojej wiki, aby sprawdzić czy rozszerzenie zostało pomyślnie zainstalowane.
If you use something other than w/api.php for your API, and related pages is not showing, check for any bad requests in your browser network tab.
If necessary, the API used to obtain related articles is configurable with $wgRelatedArticlesUseCirrusSearchApiUrl
Requirements for additional features
RelatedArticles can optionally provide additional features if the extensions below are installed:
- If PageImages is installed, Related Articles will include the page's selected image (if any). Otherwise, a placeholder image will be used instead.
- If EventLogging is installed, the RelatedPages feature can be configured to log events. See below for configuration manual.
- Depending on the configuration of
$wgRelatedArticlesDescriptionSource
, a small description of each page can be fetched. See the configuration manual below for required extensions. Descriptions won't be provided if the specified extension isn't installed.
Użycie
Once installed, related articles will be determined algorithmically based on CirrusSearch if available with no additional steps. Alternatively, you can disable this functionality ($wgRelatedArticlesUseCirrusSearch) and manually add related articles like so:
{{#related:Test with read more}}
{{#related:Another test page}}
Configuration
- Related articles will be shown at the bottom of the skin. Note that the page must be in the Main namespace, and being
view
ed (as opposed toedit
ed for example), and not be a disambiguation or a diff page, and the skin name (e.g.minerva
) that's being used is in the array$wgRelatedArticlesFooterAllowedSkins
(see below).
The following configuration options apply:
- If EventLogging is installed, set the event logging sampling rate
$wgRelatedArticlesLoggingSamplingRate
using a number between 0 and 1. The schema used for logging is RelatedArticles . - Use morelike feature of CirrusSearch by setting
$wgRelatedArticlesUseCirrusSearch
totrue
. If CirrusSearch is not available fallback to using the related articles marked in wikitext. - Use only CirrusSearch's morelike feature by setting
$wgRelatedArticlesOnlyUseCirrusSearch
totrue
ignoring the related articles marked in wikitext. $wgRelatedArticlesFooterAllowedSkins
List of skin names (e.g. 'minerva', 'vector') where related articles will be shown in the footer. For example, on a wiki with MonoBook, Vector and Minerva installed,$wgRelatedArticlesFooterAllowedSkins = ['vector']
will result in the widget showing on Vector only. The skin names have to all be in lowercase, e.g. 'vector' not 'Vector', even if the skin directory is 'Vector'. In versions prior to 1.37.0-wmf.3, this is named$wgRelatedArticlesFooterWhitelistedSkins
.- A small description of the page will be displayed below the title of the page, depending on the value of
$wgRelatedArticlesDescriptionSource
:wikidata
: Requires Wikibase Client, from the central wikibase repository or Extension:ShortDescription.textextracts
: Requires Extension:TextExtracts, fetched from the prop=extracts api.pagedescription
: Requires Extension:Description2 (or any other extension that sets thedescription
page property).
For development
For development the following configuration is recommended:
$wgRelatedArticlesUseCirrusSearchApiUrl = 'https://en.wikipedia.org/w/api.php';
$wgRelatedArticlesUseCirrusSearch = true;
$wgRelatedArticlesFooterAllowedSkins = [ 'vector-2022', 'vector', 'minerva', 'timeless' ];
$wgRelatedArticlesDescriptionSource = 'wikidata';
RelatedPages
The Related Pages feature is implemented in this extension. More info about its development can be found on phabricator.
On Wikimedia Projects
Related pages is enabled on:
- All Wikipedias, when using Minerva and Timeless skins (except dewiki where they disabled it on Timeless skin), and for hewiki and htwiki, Vector
- All Wikivoyages, when using Minerva, Timeless and Vector
- eswikinews, frwikinews and zhwikinews, for all skins
Feedback
- Create a task in Wikimedia's issue tracker under the "RelatedArticles" project.
- Check the list of existing RelatedArticles tasks
Help
To rozszerzenie jest wykorzystywane przez jeden lub więcej projektów Wikimedia. Oznacza to prawdopodobnie, że to rozszerzenie jest stabilne i działa wystarczająco dobrze, aby wykorzystywać je na stronach o dużym natężeniu ruchu. Odnajdź nazwę tego rozszerzenia w plikach konfiguracyjnych Wikimedia CommonSettings.php oraz InitialiseSettings.php, aby zobaczyć gdzie są zainstalowane. Pełną listę rozszerzeń zainstalowanych na określonej wiki można znaleźć na stronie Special:Version na danej wiki. |
To rozszerzenie jest dołączone do następujących farm/hostów wiki lub pakietów: To nie jest pełna lista. Niektóre farmy/hosty wiki lub pakiety mogą zawierać to rozszerzenie nawet jeśli nie są one tutaj wymienione. Zawsze sprawdzaj swoje farmy/hosty wiki, aby to potwierdzić. |
- Stable extensions/pl
- Parser function extensions/pl
- API extensions/pl
- GPL licensed extensions/pl
- Extensions in Wikimedia version control/pl
- BeforePageDisplay extensions/pl
- OutputPageParserOutput extensions/pl
- ParserFirstCallInit extensions/pl
- ResourceLoaderGetConfigVars extensions/pl
- SkinAfterContent extensions/pl
- All extensions/pl
- Extensions used on Wikimedia/pl
- Extensions included in Miraheze/pl
- Extensions included in MyWikis/pl
- Extensions included in ProWiki/pl
- Extensions included in WikiForge/pl