Extension:Attachments/fr

From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:Attachments and the translation is 90% complete.
Other languages:
English • ‎Türkçe • ‎français • ‎svenska • ‎العربية • ‎日本語
Manuel des extensions MediaWiki
OOjs UI icon advanced.svg
Attachments
État de la version : stable
px
Implémentation Fonction d'analyseur , Variable , Action de page , Accroche
Description Attacher des sous-pages, des fichiers et des liens externes aux pages.
Auteur(s) (Gittenburgdiscussion)
Dernière version 0.1.0 (2019-06-11)
Politique de compatibilité Master maintains backwards compatibility.
MediaWiki 1.32+
Licence Licence MIT
Téléchargement
Exemple https://vowi.fsinf.at/
$wgAttachmentsNamespaces

Vérifier la matrice des utilisations et des versions.

L'extension Attachments permet aux utilisateurs d'attacher des sous-pages, des fichiers ou des liens externes aux pages des espaces de noms activés.

  • Attachments can easily be added through the user interface.
  • Attachments of an article are displayed in an automatically generated list at its end.
  • This extension integrates with the Vector and Minerva skins.

So how does it work?

  • subpages automatically count as attached to their parent page
  • When you upload a file through the Attach page action, a parser function {{#attach: Title}} is added to the descripiton.
  • When you add a link, the extension creates a subpage containing the {{#exturl: URL}} parser function.
  • Both parser functions set page properties, which are queried for the autogenerated sections.

Fonctionnalités avancée

  • #attach can also be used to attach a regular page to another regular page.
  • You can link files added through the Attach page action relatively with [[File:{{FILEPREFIX}}filename.jpg]] (or {{FILEPREFIX:..}} for the parent 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.

Installation

  • Download et placez le(s) fichiers (s) dans un répertoire appelé Attachments dans votre dossier extensions/.
  • Ajoutez le code suivant à la fin de votre fichier LocalSettings.php :
    wfLoadExtension( 'Attachments' );
    
  • Yes Fait – Accédez à Special:Version sur votre wiki pour vérifier que l'extension a bien été installée.

Paramètres de configuration

$wgAttachmentsNamespaces
Associative array, set a namespace id to true to enable the extension in the namespace.
For example: $wgAttachmentsNamespaces[NS_MAIN] = true;
Note that you should also enable subpages for these namespaces.

Astuces

Crédits

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

Voir aussi