Extension:Attachments/ar

Category:MIT licensed extensions/ar
الدليل المرجعي لامتدادات ميدياويكي
Attachments
حالة الإصدار مستقرCategory:Stable extensions/ar
تنفيذ دوال المحلل اللغوي Category:Parser function extensions/ar, متغير Category:Variable extensions/ar, تصرف خاصة بالصفحة Category:Page action extensions/ar, وصلة Category:Hook extensions/ar
بيان إرفاق صفحات فرعية وملفات ووصلات شبكية خارجية في الصفحات.
المؤلف/المؤلفون
آخر إصدار 1.0.1
سياسة التوافق تصدر اللقطات البرمجية مع ميدياويكي. الإصدار الرئيسي لا يتوافق مع الإصدارات السابقة.
MediaWiki 1.39+Category:Extensions with manual MediaWiki version/ar
ترخيص رخصة MIT
التنزيل Category:Extensions in GitHub version control/ar
مثال https://vowi.fsinf.at/
  • $wgAttachmentsNamespaces
  • $wgAttachmentsChunkListByLetter
  • $wgAttachmentsShowSubpageForm
  • $wgAttachmentsShowLinkForm
  • $wgAttachmentsShowInNamespaces
  • $wgAttachmentsShowInViews
  • $wgAttachmentsShowEmptySection
Category:All extensions/ar

يسمح امتداد Attachments للمستخدمين إرفاق صفحات فرعية وملفات ووصلات شبكية خارجية في الصفحات قائمة في نطاقات الاسم المنشطة.

  • 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 Neue 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 description.
  • 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.

سمات متقدمة

  • #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.

التنصيب

متغيرات ضبط اختيارية

$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 'ad 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.

نصائح

شكر وتقدير

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.

انظر أيضا

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