Template:Muwatta: Difference between revisions

no edit summary
[checked revision][checked revision]
No edit summary
No edit summary
 
Line 12: Line 12:
}}<!--If parameter 5 exists and is not erroneously mistyped, create an In-book reference url with 1st and 3rd parameters. If no 5th parameter, create a USC-MSA ref url, using parameters 2 and 4 for cases where the old template was misused (i.e. 4 contains a number), or otherwise with parameters 1 and 3-->{{#if: {{{5|}}}  |  
}}<!--If parameter 5 exists and is not erroneously mistyped, create an In-book reference url with 1st and 3rd parameters. If no 5th parameter, create a USC-MSA ref url, using parameters 2 and 4 for cases where the old template was misused (i.e. 4 contains a number), or otherwise with parameters 1 and 3-->{{#if: {{{5|}}}  |  
   {{ #switch: {{lc: {{{5|}}} }}  
   {{ #switch: {{lc: {{{5|}}} }}  
     | in-book = [https://quranx.com/Hadith/Malik/In-Book/Book-{{#expr:{{{1|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}} (In-Book Ref)]
     | arabic = [https://quranx.com/Hadith/Malik/In-Book/Book-{{#expr:{{{1|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}} (Arabic Ref)]
     | [https://quranx.com/Hadith/Malik/In-Book/Book-{{#expr:{{{1|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}} (5th parameter error)]
     | [https://quranx.com/Hadith/Malik/In-Book/Book-{{#expr:{{{1|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}} (5th parameter error)]
   }}|
   }}|
Line 21: Line 21:
<!--The <nowiki>{{#expr: }}</nowiki> function in the template is used to trim any leading zeros in the numbers.-->
<!--The <nowiki>{{#expr: }}</nowiki> function in the template is used to trim any leading zeros in the numbers.-->
<!--the old cmje links were constructed making use of the <nowiki>{{three digit|}}</nowiki> function)-->
<!--the old cmje links were constructed making use of the <nowiki>{{three digit|}}</nowiki> function)-->
<templatedata>
{
"description": "This template will create a link to the specified hadith in Muwatta Malik. Please visit its template page or read the Citing Sources page for instructions on its use with alternative hadith reference systems.",
"params": {
"1": {
"label": "Book number",
"description": "The Book number when using the USC-MSA or Arabic reference system",
"required": true,
"type": "number",
"default": "1",
"example": "27"
},
"2": {
"label": "Section number",
"description": "The Section number when using the USC-MSA reference system (can be left blank)",
"required": false,
"suggested": true,
"type": "number",
"default": "1",
"example": "27"
},
"3": {
"label": "Hadith number",
"description": "The hadith number",
"required": true,
"type": "number",
"default": "1",
"example": "8"
},
"4": {
"label": "Suffix",
"description": "Any suffix letter after the hadith number (can be left blank)",
"required": false,
"suggested": true,
"type": "string",
"default": "",
"example": "a"
},
"5": {
"label": "Alternative reference system",
"description": "Enter arabic when you are using the Arabic reference system (leave blank if using the USC-MSA reference system)",
"required": false,
"suggested": true,
"type": "string",
"default": "",
"example": "arabic"
}
}
}
</templatedata>


This template is used to provide sources for al-Muwatta references. It formerly produced links to the cmje website, which no longer works. We are currently using QuranX.com instead, which is able to handle USC-MSA, and in-book (Arabic) reference conventions.
This template is used to provide sources for al-Muwatta references. It formerly produced links to the cmje website, which no longer works. We are currently using QuranX.com instead, which is able to handle USC-MSA, and in-book (Arabic) reference conventions.
Line 31: Line 81:
Forth Parameter is for the a, b, c etc suffix which some hadiths have on cmje (leave this empty - it is ignored by the current template except for any number within it due to some editors incorrectly using the template in the past by putting the hadith number in there (with or without suffix) and the book number in the 2nd parameter)
Forth Parameter is for the a, b, c etc suffix which some hadiths have on cmje (leave this empty - it is ignored by the current template except for any number within it due to some editors incorrectly using the template in the past by putting the hadith number in there (with or without suffix) and the book number in the 2nd parameter)


Fifth Paramater (optional) is used to indicate that you are using the alternative In-book referencing system (default is USC-MSA).
Fifth Paramater (optional) is used to indicate that you are using the Arabic reference system (default is USC-MSA).
 
The In-book reference system for Muwatta Malik is on other sites called 'Arabic Reference'.
   
   
;Example for hadiths using MSA-USC numbering:
;Example for hadiths using MSA-USC numbering:
Line 41: Line 89:
:{{Muwatta|14||8}}
:{{Muwatta|14||8}}


;Example for the same hadith using in-book numbering:
;Example for the same hadith using Arabic reference numbering:
:<nowiki>{{Muwatta|14||465||in-book}}</nowiki> (note the empty 2nd and 4th parameters)
:<nowiki>{{Muwatta|14||465||arabic}}</nowiki> (note the empty 2nd and 4th parameters)


Produces:
Produces:
:{{Muwatta|14||465||in-book}}
:{{Muwatta|14||465||arabic}}




Editors, em-bypass-2, Reviewers, rollback, Administrators
2,743

edits