Template:Bukhari: Difference between revisions

no edit summary
[checked revision][checked revision]
(Expr function should not be used for DarusSalam refs which sometimes have suffixes for this collection. It was never actually even needed for the USC refs as the Three digit template added leading zeros as needed for the old cmje links but the edit source never had them (as the template would then add too many))
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 2: Line 2:
   {{ #switch: {{lc: {{{4|}}} }}  
   {{ #switch: {{lc: {{{4|}}} }}  
     | in-book = [https://quranx.com/Hadith/Bukhari/In-Book/Book-{{{2|1}}}/Hadith-{{{3|1}}}/ Sahih Bukhari {{{2|1}}}:{{{3|1}}} (In-Book Ref)]
     | in-book = [https://quranx.com/Hadith/Bukhari/In-Book/Book-{{{2|1}}}/Hadith-{{{3|1}}}/ Sahih Bukhari {{{2|1}}}:{{{3|1}}} (In-Book Ref)]
     | darussalam= [https://quranx.com/Hadith/Bukhari/DarusSalam/Hadith-{{{3|1}}}/ Sahih Bukhari {{{3|1}}} (Dar-us-Salam Ref)]
     | darussalam= [https://quranx.com/Hadith/Bukhari/DarusSalam/Hadith-{{{3|1}}}/ Sahih Bukhari {{{3|1}}}]
     | [https://quranx.com/Hadith/Bukhari/DarusSalam/Hadith-{{{3|1}}}/ Sahih Bukhari {{{3|1}}} (4th parameter error)]
     | [https://quranx.com/Hadith/Bukhari/DarusSalam/Hadith-{{{3|1}}}/ Sahih Bukhari {{{3|1}}} (4th parameter error)]
   }}|
   }}|
Line 15: Line 15:
"1": {
"1": {
"label": "Volume number",
"label": "Volume number",
"description": "The Volume number when using the USC-MSA reference system",
"description": "Enter a single space, or Volume number when using the USC-MSA reference system",
"required": false,
"required": false,
"suggested": true,
"suggested": true,
"type": "number",
"type": "number",
"default": "1",
"default": "",
"example": "3"
"example": "3"
},
},
"2": {
"2": {
"label": "Book number",
"label": "Book number",
"description": "The Book number when using the USC-MSA or In-book reference system",
"description": "Enter a single space, or Book number when using the USC-MSA or In-book reference system",
"required": false,
"required": false,
"suggested": true,
"suggested": true,
"type": "number",
"type": "number",
"default": "1",
"default": "",
"example": "27"
"example": "27"
},
},
Line 40: Line 40:
},
},
"4": {
"4": {
"label": "Alternative reference system",
"label": "Reference system",
"description": "Enter darussalam when you are using the Dar-us-Salam reference system or in-book when using the In-book reference system (leave blank if using the USC-MSA reference system)",
"description": "Enter darussalam for the Dar-us-Salam reference system (preferred). Enter in-book when using the In-book reference system, or leave blank if using the USC-MSA reference system.",
"required": false,
"required": false,
"suggested": true,
"suggested": true,
"type": "string",
"type": "string",
"default": "",
"default": "darussalam",
"example": "darussalam"
"example": "darussalam"
}
}
Line 52: Line 52:
</templatedata>
</templatedata>


This template is used to provide sources for Bukhari references from USC-MSA and other indexing conventions. 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, In-book, and Dar-us-Salam reference conventions.
This template is used to provide sources for Bukhari references. It formerly produced links to USC's CMJE hadith compendium, which has been retired. We are currently using QuranX.com instead, which is able to handle a choice of indexing conventions:
 
* USC-MSA (created by University of South Carolina)
* In-book (a hybrid system created by sunnah.com)
* Dar-us-Salam (created by the mid 20th century scholar Fuad Abdul Baqi).
 
The latter has become the de facto standard in English, Arabic and other languages. For that reason we have converted all existing USC-MSA citations for this collection to the Dar-us-Salam referencing system.
 
Detailed information about the hadith translations and reference systems available on QuranX.com can be read in the following document:<BR /> https://github.com/QuranX/QuranX/blob/master/docs/QuranXHadiths.md


Note that all of Bukhari is Sahih.<BR>
Note that all of Bukhari is Sahih.<BR>


==Usage==
==Usage==
First Parameter is the Volume Number.<BR>
First Parameter is the Volume Number (optional).<BR>
Second Parameter is the Book Number.<BR>
Second Parameter is the Book Number (optional).<BR>
Third Parameter is the Hadith Number.<BR>
Third Parameter is the Hadith Number.<BR>
Forth Parameter (optional) is used to indicate that you are using one of the alternative referencing systems: Dar-us-Salam or In-book (default is USC-MSA).  
Fourth Parameter (optional) is used to indicate the referencing system: Dar-us-Salam or In-book (if left blank, the default is USC-MSA). The revised site policy is to use the Dar-us-Salam system.  


With the Dar-us-Salam Reference system, only a hadith number is specified, and is the same as in the Dar-us-Salam print edition.
With the Dar-us-Salam Reference system, the fourth parameter value must be darussalam and only a hadith number is specified, which is the same as in the Dar-us-Salam print editions (and is the number in bold on sunnah.com). '''When using Visual Editor''' (but not source editor), a single space should be entered for the Volume number and for the Book number so that the generated wikitext will have a pipe ("|") for each of the empty parameters i.e. when saved it will generate for example <code><nowiki>{{Bukhari|||123|darussalam}}</nowiki></code> instead of <code><nowiki>{{Bukhari|3=123|4=darussalam}}</nowiki></code>. This is preferred in order to keep Visual Editor generated wikitext consistent with the existing wikitext across the site.


With the In-book system, the book number for a hadith is the same as in the Dar-us-Salam print edition, and the hadith number is a simple incremental index starting at 1 for the first hadith in each book.  
With the USC-MSA system, the volume, book and hadith numbers are as in USC's CMJE database (retired).


To cite a hadith with USC-MSA numbering:    <tt><nowiki>{{Bukhari|#|#|#}}</nowiki></tt>
With the In-book system, the book number for a hadith is the same as in the Dar-us-Salam print edition, and the hadith number is a simple incremental index starting at 1 for the first hadith in each book. The fourth parameter value must be in-book.


To cite a hadith with Dar-us-Salam Reference numbering:    <tt><nowiki>{{Bukhari|||#|darussalam}}</nowiki></tt> (note the empty first and second parameters)
To cite a hadith with Dar-us-Salam Reference numbering:    <tt><nowiki>{{Bukhari|||#|darussalam}}</nowiki></tt> (note the empty first and second parameters)
To cite a hadith with USC-MSA numbering:    <tt><nowiki>{{Bukhari|#|#|#}}</nowiki></tt>


To cite a hadith with In-book numbering:    <tt><nowiki>{{Bukhari||#|#|in-book}}</nowiki></tt> (note the empty first parameter)
To cite a hadith with In-book numbering:    <tt><nowiki>{{Bukhari||#|#|in-book}}</nowiki></tt> (note the empty first parameter)


;Example for hadiths using MSA-USC numbering:
;Example for hadith using Dar-us-Salam Reference numbering:
:<nowiki>{{Bukhari|3|27|8}}</nowiki>
:<nowiki>{{Bukhari|||1780|darussalam}}</nowiki>


Produces:
Produces:
:{{Bukhari|3|27|8}}
:{{Bukhari|||1780|darussalam}}


;Example for the same hadith using Dar-us-Salam Reference numbering:
;Example for the same hadith using MSA-USC numbering:
:<nowiki>{{Bukhari|||1780|darussalam}}</nowiki>
:<nowiki>{{Bukhari|3|27|8}}</nowiki>


Produces:
Produces:
:{{Bukhari|||1780|darussalam}}
:{{Bukhari|3|27|8}}


;Example for the same hadith using In-book reference numbering:
;Example for the same hadith using In-book reference numbering:
Editors, em-bypass-2, Reviewers, rollback, Administrators
3,454

edits