Template:Bukhari: Difference between revisions

From WikiIslam, the online resource on Islam
Jump to navigation Jump to search
[checked revision][checked revision]
(updated for simplified quranx url)
No edit summary
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if: {{{4|}}}  |  
{{#if: {{{4|}}}  |  
   {{ #switch: {{lc: {{{4|}}} }}  
   {{ #switch: {{lc: {{{4|}}} }}  
     | in-book = [http://quranx.com/Hadith/Bukhari/In-Book/Book-{{#expr:{{{2|1}}}}}/Hadith-{{#expr:{{{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)]
     | reference = [http://quranx.com/Hadith/Bukhari/Reference/Hadith-{{#expr:{{{3|1}}}}}/ Sahih Bukhari {{{3|1}}} (Dar-us-Salam Ref)]
     | darussalam= [https://quranx.com/Hadith/Bukhari/DarusSalam/Hadith-{{{3|1}}}/ Sahih Bukhari {{{3|1}}}]
     | [http://quranx.com/Hadith/Bukhari/Reference/Hadith-{{#expr:{{{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)]
   }}|
   }}|
   [http://quranx.com/Hadith/Bukhari/USC-MSA/Volume-{{#expr:{{{1|1}}}}}/Book-{{#expr:{{{2|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Sahih Bukhari {{{1|1}}}:{{{2|1}}}:{{{3|1}}}]
   [https://quranx.com/Hadith/Bukhari/USC-MSA/Volume-{{{1|1}}}/Book-{{{2|1}}}/Hadith-{{{3|1}}}/ Sahih Bukhari {{{1|1}}}:{{{2|1}}}:{{{3|1}}}]
}}<noinclude>
}}<noinclude>
<!--The noinclude tag must be right at the end of the template on the same line or you will get new lines after its use in some situations-->
<!--The noinclude tag must be right at the end of the template on the same line or you will get new lines after its use in some situations-->
<!--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)-->


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.
<templatedata>
{
"description": "This template will create a link to the specified hadith in Sahih Bukhari. Please visit its template page or read the Citing Sources page for instructions on its use with alternative hadith reference systems.",
"params": {
"1": {
"label": "Volume number",
"description": "Enter a single space, or Volume number when using the USC-MSA reference system",
"required": false,
"suggested": true,
"type": "number",
"default": "",
"example": "3"
},
"2": {
"label": "Book number",
"description": "Enter a single space, or Book number when using the USC-MSA or In-book reference system",
"required": false,
"suggested": true,
"type": "number",
"default": "",
"example": "27"
},
"3": {
"label": "Hadith number",
"description": "The hadith number",
"required": true,
"type": "number",
"default": "1",
"example": "8"
},
"4": {
"label": "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,
"suggested": true,
"type": "string",
"default": "darussalam",
"example": "darussalam"
}
}
}
</templatedata>
 
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).
 
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 USC-MSA numbering:    <tt><nowiki>{{Bukhari|#|#|#}}</nowiki></tt>
To cite a hadith with USC-MSA numbering:    <tt><nowiki>{{Bukhari|#|#|#}}</nowiki></tt>
To cite a hadith with Dar-us-Salam Reference numbering:    <tt><nowiki>{{Bukhari|||#|reference}}</nowiki></tt> (note the empty first and second parameters)


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|reference}}</nowiki>
:<nowiki>{{Bukhari|3|27|8}}</nowiki>


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


;Example for the same hadith using In-book reference numbering:
;Example for the same hadith using In-book reference numbering:

Latest revision as of 23:23, 13 November 2025

Sahih Bukhari 1:1:1

This template will create a link to the specified hadith in Sahih Bukhari. Please visit its template page or read the Citing Sources page for instructions on its use with alternative hadith reference systems.

Template parameters

ParameterDescriptionTypeStatus
Volume number1

Enter a single space, or Volume number when using the USC-MSA reference system

Default
Example
3
Numbersuggested
Book number2

Enter a single space, or Book number when using the USC-MSA or In-book reference system

Default
Example
27
Numbersuggested
Hadith number3

The hadith number

Default
1
Example
8
Numberrequired
Reference system4

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.

Default
darussalam
Example
darussalam
Stringsuggested

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:
https://github.com/QuranX/QuranX/blob/master/docs/QuranXHadiths.md

Note that all of Bukhari is Sahih.

Usage

First Parameter is the Volume Number (optional).
Second Parameter is the Book Number (optional).
Third Parameter is the Hadith Number.
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, 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 {{Bukhari|||123|darussalam}} instead of {{Bukhari|3=123|4=darussalam}}. This is preferred in order to keep Visual Editor generated wikitext consistent with the existing wikitext across the site.

With the USC-MSA system, the volume, book and hadith numbers are as in USC's CMJE database (retired).

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: {{Bukhari|||#|darussalam}} (note the empty first and second parameters)

To cite a hadith with USC-MSA numbering: {{Bukhari|#|#|#}}

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

Example for hadith using Dar-us-Salam Reference numbering
{{Bukhari|||1780|darussalam}}

Produces:

Sahih Bukhari 1780
Example for the same hadith using MSA-USC numbering
{{Bukhari|3|27|8}}

Produces:

Sahih Bukhari 3:27:8
Example for the same hadith using In-book reference numbering
{{Bukhari||26|8|in-book}}

Produces:

Sahih Bukhari 26:8 (In-Book Ref)