Template:Webref: Difference between revisions

From NDWiki
Jump to navigation Jump to search
(Debuging "original source", adding "type" parameter)
(Replacing optional "type" with optional "size". Modified example)
Line 1: Line 1:
{{#if: {{{original-source|}}} | "{{{title}}}" (found at {{ #ifeq: {{{type}}} | pdf | <span class="PDFlink">[{{{url}}} {{{publisher}}}]</span> |[{{{url}}} {{{publisher}}}] }}, original published by ''{{#if:{{{original-source-url|}}}|[{{{original-source-url}}} {{{original-source}}}]|{{{original-source}}}}}'') | {{ #ifeq: {{{type}}} | pdf | <span class="PDFlink">"[{{{url}}} {{{title}}}]"</span> | "[{{{url}}} {{{title}}}]" }} at {{{publisher}}} }}. Accessed on {{{accessdate}}}.<noinclude>
{{#if: {{{original-source|}}} | "{{{title}}}" (found at [{{{url}}} {{{publisher}}}], original published by ''{{#if:{{{original-source|}}}|[{{{original-source-url}}} {{{original-source}}}]|{{{original-source}}}}}'') | "[{{{url}}} {{{title}}}]" at {{{publisher}}} }}. {{#if: {{{size|}}} | Filesize {{{size}}}.}} Accessed on {{{accessdate}}}.<noinclude>


This template is used to reference to a online source in a NDWiki article, either direct or inderect. It should be placed in the '''Sources''' section.
This template is used to reference to a online source in a NDWiki article, either direct or inderect. It should be placed in the '''Sources''' section.
Line 8: Line 8:
;title : The title of of the reference (mandatory).
;title : The title of of the reference (mandatory).
;publisher : The publisher. The one who is hosting the website (mandatory).
;publisher : The publisher. The one who is hosting the website (mandatory).
;size : File size in Megabytes. This parameter is (usually) not interesting for ordinary webpages.
;accessdate : The date when the web reference was accessed (mandatory).
;accessdate : The date when the web reference was accessed (mandatory).
;type : If the type is "pdf" a small PDF icon is added behind the link.
;note : This paramater gives the posibility to add a note about this reference. The note will not be visible on the page.  
;note : This paramater gives the posibility to add a note about this reference. The note will not be visible on the page.  
;original-source : If a reference is indirect, this parameter describes the original source.
;original-source : If a reference is indirect, this parameter describes the original source.
Line 22: Line 22:


===Indirect reference===
===Indirect reference===
<nowiki>{{Webref |url=http://foobar.com/FBitw |title=FooBar is the way |publisher=FooBar Inc |original-source=FooBar Press |original-source-url=http://foo.bar.com/FBitw |accessdate=</nowiki>{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
<nowiki>{{Webref |url=http://foobar.com/FBitw.pdf |title=FooBar is the way |publisher=FooBar Inc |size=3.2 | original-source=FooBar Press |original-source-url=http://foo.bar.com/FBitw.pdf |accessdate=</nowiki>{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
gives
gives


{{Webref|url=http://foobar.com/FBitw|title=FooBar is the way |publisher=FooBar Inc |original-source=FooBar Press |original-source-url=http://foo.bar.com/FBitw |accessdate={{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
{{Webref|url=http://foobar.com/FBitw.pdf |title=FooBar is the way |publisher=FooBar Inc |size=3.2 |original-source=FooBar Press |original-source-url=http://foo.bar.com/FBitw.pdf |accessdate={{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}


[[Category:Templates|{{PAGENAME}}]]
[[Category:Templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Revision as of 17:53, 14 August 2009

"[{{{url}}} {{{title}}}]" at {{{publisher}}}. Accessed on {{{accessdate}}}.

This template is used to reference to a online source in a NDWiki article, either direct or inderect. It should be placed in the Sources section.

Parameters

url
The full URL to the reference on the web (mandatory).
title
The title of of the reference (mandatory).
publisher
The publisher. The one who is hosting the website (mandatory).
size
File size in Megabytes. This parameter is (usually) not interesting for ordinary webpages.
accessdate
The date when the web reference was accessed (mandatory).
note
This paramater gives the posibility to add a note about this reference. The note will not be visible on the page.
original-source
If a reference is indirect, this parameter describes the original source.
original-source-url
If a indirect reference was a webpage, use this parameter for that URL.

Example

Direct reference

{{Webref |url=http://www.mozilla.com |title=Mozilla Firefox web browser |publisher=The Mozilla Foundation |accessdate=25 November 2024 }} gives

"Mozilla Firefox web browser" at The Mozilla Foundation. Accessed on 25 November 2024.

Indirect reference

{{Webref |url=http://foobar.com/FBitw.pdf |title=FooBar is the way |publisher=FooBar Inc |size=3.2 | original-source=FooBar Press |original-source-url=http://foo.bar.com/FBitw.pdf |accessdate=25 November 2024 }} gives

"FooBar is the way" (found at FooBar Inc, original published by FooBar Press). Filesize 3.2. Accessed on 25 November 2024.