टेम्पलेट:PDFlink
PDFlink must be run with an argument{{{1}}} PDF ({{{2}}})
This template should not be used in citation templates such as Citation Style 1 and Citation Style 2, because it includes markup that will pollute the COinS metadata they produce; see COinS in Wikipedia. |
{{PDFlink}} highlights that a link points to a PDF document (on some systems PDF files may take time to download and display within the browser, and their use on many websites is not compliant with the Web Content Accessibility Guidelines).
Usage
संपादन करींThe following lines:
{{PDFlink|[http://www.example.org/Link.pdf Link]}} {{PDFlink|[http://www.example.org/Link.pdf Link]|32 KB}} {{PDFlink|[http://www.example.org/fileserver/239349 Link]|1.4 MB}}
yield:
Note: It was previously possible to add the icon with {{PDFlink}}
by itself, but the functionality has changed, making this no longer work in Internet Explorer. You must surround it with the template as shown above to work correctly in Internet Explorer.[स्पष्टीकरण जरूरी]
Units: Per WP:Manual of Style (dates and numbers), use KB and MB (kilobytes and megabytes), not KiB and MiB (kibibytes and mibibytes), as very few readers have ever even heard of the latter units.
PDFbot
संपादन करींAn unassisted bot, User:PDFbot, has been created to add and keep file size information current. In addition, it will fix many mistakes and the limitation as described in the section below.
Note: the bot will replace the contents of the second parameter when updating the file size.
Icon
संपादन करींThe icon is added using CSS and is found in MediaWiki:Common.css, the relevant portion that applies the icon is:
/* Change the external link icon to an Adobe icon anywhere the PDFlink class
is used (notably Template:PDFlink). This works in IE, unlike the above. */
#content span.PDFlink a,
#mw_content span.PDFlink a {
background: url("http://upload.wikimedia.org/wikipedia/commons/2/23/Icons-mini-file_acrobat.gif") center right no-repeat;
padding-right: 18px;
}
Limitations and easy workarounds
संपादन करींThe problematic "=" character
संपादन करींWhen this template is used with unnamed parameters, links containing the "=
" (equals sign) character will cause the link to not display at all. Workarounds available are:
- Use explicitly numbered parameters,
|1=
and|2=
, for the URL and the file size, respectively
or
- Use
{{=}}
as a replacement for=
or
- Replace the
=
character with its numeric character entity reference,=
- Bad example
{{PDFlink|[http://example.org/bla?a=xy|Link.pdf Link to a PDF]|32 KB}}
- 32 KB PDF
- Good examples
{{PDFlink|[http://example.org/bla?a=xy|Link.pdf Link to a PDF]|32 KB}}
- Link to a PDF PDF (32 KB)
{{PDFlink|1=[http://example.org/bla?a=xy{{!}}Link.pdf Link to a PDF]|2=32 KB}}
- Link to a PDF PDF (32 KB)
परिचय खातिर ऊपर दिहल गइल बिबरनलेख के टेम्पलेट:PDFlink/doc से ट्रांसक्लूड क के इहाँ देखावल जा रहल बाटे। (संपादन करीं | इतिहास देखीं) संपादक लोग एह टेम्पलेट के अभ्यासपन्ना (सैंडबाक्स) (बनाईं | मिरर करीं) आ टेस्टकेस (बनाईं) पन्ना सभ पर अभ्यास आ प्रयोग (टेस्टिंग) क सकत बाटे। अनुरोध बा कि अगर श्रेणी जोड़े के होखे तब /doc उपपन्ना (सबपेज) पर जोड़ल जाय। एह टेम्पलेट के उपपन्ना (सबपेज) देखीं। |