Template:Abudawud: Difference between revisions

From WikiIslam, the online resource on Islam
Jump to navigation Jump to search
[checked revision][checked revision]
(Expr function should not be used for DarusSalam refs which occasionally 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
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if: {{{3|}}}  |  
{{#if: {{{3|}}}  |  
   {{ #switch: {{lc: {{{3|}}} }}  
   {{ #switch: {{lc: {{{3|}}} }}  
     | darussalam= [https://quranx.com/Hadith/AbuDawud/DarusSalam/Hadith-{{{2|1}}}/ Sunan Abu Dawud {{{2|1}}} (Dar-us-Salam Ref)]
     | darussalam= [https://quranx.com/Hadith/AbuDawud/DarusSalam/Hadith-{{{2|1}}}/ Sunan Abu Dawud {{{2|1}}}]
     | hasan = [https://quranx.com/Hadith/AbuDawud/Hasan/Hadith-{{{2|1}}}/ Sunan Abu Dawud {{{2|1}}} (Ahmad Hasan Ref)]
     | hasan = [https://quranx.com/Hadith/AbuDawud/Hasan/Hadith-{{{2|1}}}/ Sunan Abu Dawud {{{2|1}}} (Ahmad Hasan Ref)]
     | [https://quranx.com/Hadith/AbuDawud/Reference/Hadith-{{{2|1}}}/ Sunan Abu Dawud {{{2|1}}} (3rd parameter error)]
     | [https://quranx.com/Hadith/AbuDawud/Reference/Hadith-{{{2|1}}}/ Sunan Abu Dawud {{{2|1}}} (3rd parameter error)]
Line 15: Line 15:
"1": {
"1": {
"label": "Book number",
"label": "Book number",
"description": "The Book number when using the USC-MSA reference system",
"description": "Enter a single space, or Book number when using the USC-MSA reference system",
"required": false,
"required": false,
"suggested": true,
"suggested": true,
"type": "number",
"type": "number",
"default": "1",
"default": "",
"example": "33"
"example": "33"
},
},
Line 31: Line 31:
},
},
"3": {
"3": {
"label": "Alternative reference system",
"label": "Reference system",
"description": "Enter darussalam when you are using the Dar-us-Salam reference system or enter hasan when using the Ahmad Hasan reference system (leave blank if using the USC-MSA reference system)",
"description": "Enter darussalam for the Dar-us-Salam reference system (preferred). Enter hasan when using the Ahmad Hasan 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": "hasan"
"example": "darussalam"
}
}
}
}
Line 43: Line 43:
</templatedata>
</templatedata>


This template is used to provide sources for Sunan Abu Dawud 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, Dar-us-Salam, and Ahmad Hasan reference conventions.<BR>
This template is used to provide sources for Sunan Abu Dawud references. It formerly produced links to USC's CMJE compendium, which is 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)
* Ahmad Hasan (created by the translator Ahmad Hasan)
* 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 and Hasan citations for this collection to the Dar-us-Salam (al-Baqi) 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


==Usage==
==Usage==
First Parameter is the Book Number.<BR>
First Parameter is the Book Number (optional).<BR>
Second Parameter is the Hadith Number.<BR>
Second Parameter is the Hadith Number.<BR>
Third Parameter (optional) is used to indicate that you are using one of the alternative referencing systems: Dar-us-Salam or Hasan (default is USC-MSA).
Third Parameter (optional) is used to indicate the referencing system: Dar-us-Salam or Hasan (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 (and is the number in bold on sunnah.com). The third parameter must be darussalam. '''When using Visual Editor''' (but not source editor), a single space should be entered for the Book number so that the generated wikitext will have a pipe ("|") for the first empty parameter i.e. when saved it will generate for example <code><nowiki>{{Abudawud||123|darussalam}}</nowiki></code> instead of <code><nowiki>{{Abudawud|2=123|3=darussalam}}</nowiki></code>. This is preferred in order to keep Visual Editor generated wikitext consistent with the existing wikitext across the site.


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 USC-MSA system, a book number and hadith number are specified, as in USC's CMJE compendium (retired).


With the Ahmad Hasan referencing system, only a hadith number is specified, and is the same as in Ahmad Hasan's translation (this is the English translation used for Abu Dawud on Quranx and other popular sites). The hadith numbers and translation are the same as was used by USC-MSA for their partial Abu Dawud collection. Hasan's book numbering is not used as it changed depending on the edition (hadiths were divided into 36 books, or into 41 books).
With the Ahmad Hasan referencing system, the third parameter must be hasan and only a hadith number is specified, which is the same as in Ahmad Hasan's translation (this is the English translation used for Abu Dawud on Quranx and other popular sites). The hadith numbers and translation are the same as were used by USC-MSA for their partial Abu Dawud collection. Hasan's book numbering is not used as it changed depending on the edition (hadiths were divided into 36 books, or into 41 books).


To use this template with Dar-us-Salam Reference numbering:    <tt><nowiki>{{Abudawud||#|darussalam}}</nowiki></tt> (note the empty first parameter)


To use this template with USC-MSA numbering:    <tt><nowiki>{{Abudawud|#|#}}</nowiki></tt>
To use this template with USC-MSA numbering:    <tt><nowiki>{{Abudawud|#|#}}</nowiki></tt>


To use this template with Dar-us-Salam Reference numbering:    <tt><nowiki>{{Abudawud||#|darussalam}}</nowiki></tt> (note the empty first parameter)  
To use this template with Ahmad Hasan numbering:    <tt><nowiki>{{Abudawud||#|hasan}}</nowiki></tt> (note the empty first parameter)


To use this template with Ahmad Hasan numbering:    <tt><nowiki>{{Abudawud||#|hasan}}</nowiki></tt> (note the empty first parameter)


;Example for hadith using Dar-us-Salam Reference numbering:
:<nowiki>{{Abudawud||4178|darussalam}}</nowiki>


Produces:
:{{Abudawud||4178|darussalam}}


;Example for hadiths using USC-MSA numbering:
;Example for the same hadith using USC-MSA numbering:
:<nowiki>{{Abudawud|33|4166}}</nowiki>
:<nowiki>{{Abudawud|33|4166}}</nowiki>


Produces:
Produces:
:{{Abudawud|33|4166}}
:{{Abudawud|33|4166}}
;Example for the same hadith using Dar-us-Salam Reference numbering:
:<nowiki>{{Abudawud||4178|darussalam}}</nowiki>
Produces:
:{{Abudawud||4178|darussalam}}


;Example for the same hadith using Ahmad Hasan numbering:
;Example for the same hadith using Ahmad Hasan numbering:

Latest revision as of 23:32, 13 November 2025

Sunan Abu Dawud 1:1

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

Template parameters

ParameterDescriptionTypeStatus
Book number1

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

Default
Example
33
Numbersuggested
Hadith number2

The hadith number

Default
1
Example
4166
Numberrequired
Reference system3

Enter darussalam for the Dar-us-Salam reference system (preferred). Enter hasan when using the Ahmad Hasan 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 Sunan Abu Dawud references. It formerly produced links to USC's CMJE compendium, which is 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)
  • Ahmad Hasan (created by the translator Ahmad Hasan)
  • 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 and Hasan citations for this collection to the Dar-us-Salam (al-Baqi) 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

Usage

First Parameter is the Book Number (optional).
Second Parameter is the Hadith Number.
Third Parameter (optional) is used to indicate the referencing system: Dar-us-Salam or Hasan (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 (and is the number in bold on sunnah.com). The third parameter must be darussalam. When using Visual Editor (but not source editor), a single space should be entered for the Book number so that the generated wikitext will have a pipe ("|") for the first empty parameter i.e. when saved it will generate for example {{Abudawud||123|darussalam}} instead of {{Abudawud|2=123|3=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, a book number and hadith number are specified, as in USC's CMJE compendium (retired).

With the Ahmad Hasan referencing system, the third parameter must be hasan and only a hadith number is specified, which is the same as in Ahmad Hasan's translation (this is the English translation used for Abu Dawud on Quranx and other popular sites). The hadith numbers and translation are the same as were used by USC-MSA for their partial Abu Dawud collection. Hasan's book numbering is not used as it changed depending on the edition (hadiths were divided into 36 books, or into 41 books).


To use this template with Dar-us-Salam Reference numbering: {{Abudawud||#|darussalam}} (note the empty first parameter)

To use this template with USC-MSA numbering: {{Abudawud|#|#}}

To use this template with Ahmad Hasan numbering: {{Abudawud||#|hasan}} (note the empty first parameter)


Example for hadith using Dar-us-Salam Reference numbering
{{Abudawud||4178|darussalam}}

Produces:

Sunan Abu Dawud 4178
Example for the same hadith using USC-MSA numbering
{{Abudawud|33|4166}}

Produces:

Sunan Abu Dawud 33:4166
Example for the same hadith using Ahmad Hasan numbering
{{Abudawud||4166|hasan}}

Produces:

Sunan Abu Dawud 4166 (Ahmad Hasan Ref)