Extension:Attachments/cs

Category:MIT licensed extensions/cs
Příručka k rozšířením MediaWiki
Attachments
Stav rozšíření: stabilníCategory:Stable extensions/cs
Implementace Funkce analyzátoru Category:Parser function extensions/cs, Proměnná Category:Variable extensions/cs, Akce stránky Category:Page action extensions/cs, Háček Category:Hook extensions/cs
Popis Připojí ke stránkám podstránky, soubory a externí odkazy.
Autoři
Nejnovější verze 1.0.1
Zásady kompatibility Vydání snímků současně s MediaWiki. Hlavní vývojová větev není zpětně kompatibilní.
MediaWiki 1.39+Category:Extensions with manual MediaWiki version/cs
Licence Licence MIT
Stáhnout Category:Extensions in GitHub version control/cs
Příklad https://vowi.fsinf.at/
  • $wgAttachmentsNamespaces
  • $wgAttachmentsChunkListByLetter
  • $wgAttachmentsShowSubpageForm
  • $wgAttachmentsShowLinkForm
  • $wgAttachmentsShowInNamespaces
  • $wgAttachmentsShowInViews
  • $wgAttachmentsShowEmptySection
Category:All extensions/cs

Rozšíření Attachments umožňuje uživatelům připojovat podstránky, soubory a externí odkazy ke stránkám v povolených jmenných prostorech.

  • Přílohy lze snadno přidat prostřednictvím uživatelského rozhraní.
  • Přílohy článku se zobrazují v automaticky generovaném seznamu na jeho konci.
  • Toto rozšíření se integruje se vzhledy Vector a Minerva Neue.

Jak to funguje?

  • Podstránky se automaticky počítají jako připojené k nadřazené stránce
  • Když nahráváte soubor pomocí akce Attach (připojit stránku), do popisu se přidá analyzátorová funkce {{#attach: Title}}.
  • Když přidáte odkaz, rozšíření vytvoří podstránku obsahující funkci parseru {{#exturl: URL}}.
  • Obě funkce parseru nastavují vlastnosti stránky, které jsou dotazovány na automaticky generované sekce.

Pokročilé funkce

  • #attach can also be used to attach a regular page to another regular page.
  • You can exclude subpages starting with a specific prefix from the autoindex with {{#attachments ignore subpages: prefix}} on the parent page.
  • You can access attachments before they are sorted with the BeforeSortAttachments(&$links) hook, where links is an associative array mapping string keys to HTML links. Return false to take over the sorting.

Relatively linking an attached file

The Attachments extension provides the {{FILEPREFIX}} parser function to faciliate linking/embedding attached files.

If you attach an image Example.jpg to Somepage then you can embed the image:

  • from Somepage with [[File:{{FILEPREFIX}}Example.jpg]]
  • from Somepage/Subpage with [[File:{{FILEPREFIX:..}}Example.jpg]]
  • from Somepage/Subpage/Subsubpage with [[File:{{FILEPREFIX:../..}}Example.jpg]]

Note that the same also works with [[Media:...]] links.

Instalace

Volitelné konfigurační parametry

$wgAttachmentsChunkListByLetter Boolean Whether or not the attachment list should be chunked by the first letter of list items. Defaults to true.
$wgAttachmentsShowSubpageForm Boolean Whether or not the subpage form should be shown. Defaults to true.
$wgAttachmentsShowLinkForm Boolean Whether or not the external link form should be shown. Defaults to true.
$wgAttachmentsShowInNamespaces Boolean Whether or not a link to the attachments should be shown in the namespaces (page, discussion). Defaults to false.
$wgAttachmentsShowInViews Boolean Whether or not an 'add attachments' link should be shown in the views (read, edit source, view history). Defaults to false.
$wgAttachmentsShowEmptySection Boolean Whether or not to show certain elements when there are no attachments for a page. Defaults to false.

Tipy

Kredity

This extension is essentially a complete rewrite of PerPageResources by Mathias Ertl, which consists of Extension:Resources, Extension:AddResource and Extension:ExternalRedirects. This extension replaces all three, notable differences are:

  • attachments are stored in page_props instead of pagelinks
  • no open redirects, just links
  • attachments are shown at the end of pages, as opposed to on a special page

Originally developed and maintained by Gittenburg.

Související odkazy

Category:Attachment extensions/cs
Category:All extensions/cs Category:Attachment extensions/cs Category:BeforePageDisplay extensions/cs Category:ChangeTagsListActive extensions/cs Category:Extensions in GitHub version control/cs Category:Extensions with manual MediaWiki version/cs Category:Hook extensions/cs Category:ListDefinedTags extensions/cs Category:MIT licensed extensions/cs Category:MagicWordwgVariableIDs extensions/cs Category:Page action extensions/cs Category:ParserFirstCallInit extensions/cs Category:ParserGetVariableValueSwitch extensions/cs Category:Parser function extensions/cs Category:SkinTemplateNavigation::Universal extensions/cs Category:Stable extensions/cs Category:Variable extensions/cs