Difference between revisions of "Template:Cite"

MuseWiki, wiki for the band Muse
Jump to navigation Jump to search
(Hur)
(Lots of cases.)
Line 1: Line 1:
<!-- WTF is wrong with this logic
<noinclude>


If auth,date,title entered, case NULL
Here be a reference template with lots of cases depending on the variables set.
If auth,date entered, condition and case are notitle


...etc.
</noinclude><includeonly>{{#switch: {{#if:{{{auth|}}}||noauth}}{{#if:{{{date|}}}||nodate}}{{#if:{{{fetch|}}}||nofetch}}{{#if:{{{notitle|}}}||notitle}}
 
| noauth = ''{{{title}}}'' ({{{date}}}). Retrieved {{{fetch}}}.                                          <!-- No author set -->
-->{{#switch: {{#if:{{{auth|}}}||noauth}}{{#if:{{{date|}}}||nodate}}{{#if:{{{notitle|}}}||notitle}}
| nodate = {{{auth}}}. ''{{{title}}}''. Retrieved {{{fetch}}}.                                            <!-- No date set -->
| noauth = ''{{{title}}}'' ({{{date}}})
| notitle = {{{auth}}}. ({{{date}}}). [{{{desc}}}]. Retrieved {{{fetch}}}.                                <!-- No title set -->
| nodate = {{{auth}}}. ''{{{title}}}''
| noauthnodate = ''{{{title}}}''. Retrieved {{{fetch}}}.                                                  <!-- No author nor date set -->
| notitle = {{{auth}}}. ({{{date}}}). [{{{desc}}}]
| noauthnotitle = ({{{date}}}). [{{{desc}}}]. Retrieved {{{fetch}}}.                                      <!-- No author nor title set -->
| noauthnodate = ''{{{title}}}''.
| nodatenotitle = {{{auth}}}. [{{{desc}}}]. Retrieved {{{fetch}}}.                                        <!-- No date nor title set -->
| noauthnotitle = ({{{date}}}). [{{{desc}}}]
| noauthnofetch = ''{{{title}}}''. ({{{date}}}).                                                          <!-- No author nor retrieval date set -->
| nodatenotitle = {{{auth}}}
| nodatenofetch = {{{auth}}}. ''{{{title}}}''                                                            <!-- No date nor retrieval date set -->
|  = {{{auth}}}. ({{{date}}}). ''{{{title}}}''.
| notitlenofetch = {{{auth}}}. ({{{date}}}). [{{{desc}}}]                                                <!-- No title nor retrieval date set -->
| #default = Say, my good chap.  Have you checked the validity of your arguments?
| noauthnodatenofetch = ''{{{title}}}''.                                                                  <!-- No author, date nor retrieval date set -->
}}
| noauthnotitlenofetch = ({{{date}}}). [{{{desc}}}]                                                      <!-- No author, title nor retrieval date set -->
| nodatenotitlenofetch = {{{auth}}}                                                                      <!-- No date, title nor retrieval date set -->
|  = {{{auth}}}. ({{{date}}}). ''{{{title}}}''.                                                           <!-- All's fine and dandy -->
| #default = Say, my good chap.  Have you checked the validity of your arguments?                         <!-- Brain fart -->
}}</includeonly>

Revision as of 04:04, 9 January 2011


Here be a reference template with lots of cases depending on the variables set.