Template:BSD/doc
{{#switch:<translate></translate> | = {{#if:{{#ifexpr: ( {{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:bsd/doc|-1|-2}}|doc|1|0}} and {{#if:en|1|0}} ) )|1|}}
|
{{#ifeq:show |show
|
| 40px | <translate> This is a documentation [[<tvar name=2>Special:MyLanguage/Help:Subpages</tvar>|subpage]] for <tvar name=1>Template:BSD</tvar>.</translate> {{#if: |<translate> It contains usage information, [[<tvar name=7>Special:MyLanguage/Help:Categories</tvar>|categories]] and other content that is not part of the original <tvar name=1>{{{text1}}}</tvar>.</translate>
|<translate> It contains usage information, [[<tvar name=7>Special:MyLanguage/Help:Categories</tvar>|categories]] and other content that is not part of the original <tvar name=1>Template</tvar> page.</translate>
}} |
}}{{#if: |
| {{#ifexist:Template:BSD
| [[Category:{{#switch:Template
| Template | Project = Template
| Module = Module
| User = User
| #default = MediaWiki
}} documentation pages{{#translation:}}]]
| [[Category:Documentation subpages without corresponding pages{{#translation:}}]]
}}
}}
|
}}
| #default=
{{#switch:
| = {{#if:{{#ifexpr: ( {{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:bsd/doc|-1|-2}}|doc|1|0}} and {{#if:en|1|0}} ) )|1|}}
|
{{#ifeq:show |show
|
| 40px | This is a documentation subpage for Template:BSD. {{#if: |It contains usage information, categories and other content that is not part of the original {{{text1}}}. |It contains usage information, categories and other content that is not part of the original Template page.}} |
}}{{#if: |
| {{#ifexist:Template:BSD
| [[Category:{{#switch:Template
| Template | Project = Template
| Module = Module
| User = User
| #default = MediaWiki
}} documentation pages{{#translation:}}]]
| [[Category:Documentation subpages without corresponding pages{{#translation:}}]]
}}
}}
|
}}
| #default=
Lua error: expandTemplate: template loop detected.
}} }}
Usage
This template defaults to the 3-clause version, but may be used for any of the w:BSD licenses, by adding a parameter:
- {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:BSD|BSD]]{{#if:4||4}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}} — This will show the original 4-clause license.
- {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:BSD|BSD]]{{#if:3||3}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}} — This is the same as {{BSD}}, and will show the new 3-clause license.
- {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:BSD|BSD]]{{#if:2||2}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}} — This will show the FreeBSD 2-clause license.
- {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:BSD|BSD]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}} — This will show the same as {{BSD|3}}, and will show the new 3-clause license.
The text of the license may be customized with the year, owner and organization parameters:
{{BSD|4|year=2009|owner=[[User:Jimbo Wales|Jimbo Wales]]|organization=the Wikimedia Foundation}}gives:
| 100px | BSD License Copyright © {{#if: 2009 |2009,}} Jimbo Wales Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
{{#switch:
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|File
| file
| other
}}
}}
| file | image =
| other | #default = }}
{{BSD|3|year=2009|owner=[http://en.wikipedia.org/wiki/User:Jimbo_Wales Jimbo Wales]}}gives:
| 100px | BSD License Copyright © {{#if: 2009 |2009,}} Jimbo Wales Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
{{#switch:
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|File
| file
| other
}}
}}
| file | image =
| other | #default = }}
{{BSD|2|year=2009}}gives:
| 100px | BSD License Copyright © {{#if: 2009 |2009,}} belongs to the uploader Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
{{#switch:
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|File
| file
| other
}}
}}
| file | image =
| other | #default = }}
{{BSD}}gives:
| 100px | BSD License Copyright © {{#if: |{{{year}}},}} belongs to the uploader Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
{{#switch:
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|File
| file
| other
}}
}}
| file | image =
| other | #default = }}