Difference between revisions of "Template:Quran Sura InfoBox"
From HodHood
(Created page with "<div class="infobox mw-collapsible mw-collapsed"> <big>Sura Attributes</big> <div class="mw-collapsible-content"> [[File:{{{image|HodHoodQuranLogo.PNG}}}|200px]] <table> {{#if...") |
P.Astakhov (talk | contribs) (global $suraIndexOfSubjects;) |
||
(26 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
[[File:{{{image|HodHoodQuranLogo.PNG}}}|200px]] | [[File:{{{image|HodHoodQuranLogo.PNG}}}|200px]] | ||
<table> | <table> | ||
+ | {{#if:{{{sura-name|}}}|<tr> | ||
+ | <th>Sura Name</th> | ||
+ | <td>{{#regex:{{{sura-name}}}|%\s*\K([^,]+)%|[[Has Sura Name::$1]]}}</td> | ||
+ | </tr>}} | ||
+ | |||
+ | {{#if:{{{sura-number|}}}|<tr> | ||
+ | <th>Sura Number</th> | ||
+ | <td>{{#regex:{{{sura-number}}}|%\s*\K([^,]+)%|[[Has Sura Number::$1]]}}</td> | ||
+ | </tr>}} | ||
+ | |||
{{#if:{{{classification|}}}|<tr> | {{#if:{{{classification|}}}|<tr> | ||
− | <th>Classification</th> | + | <th>Sura Classification</th> |
− | <td>{{#regex:{{{classification}}}|%\s*\K([^,]+)%|[[Has Classification::$1]]}}</td> | + | <td>{{#regex:{{{classification}}}|%\s*\K([^,]+)%|[[Has Sura Classification::$1]]}}</td> |
</tr>}} | </tr>}} | ||
{{#if:{{{juza|}}}|<tr> | {{#if:{{{juza|}}}|<tr> | ||
Line 12: | Line 22: | ||
<td>{{#regex:{{{juza}}}|%\s*\K([^,]+)%|[[Has Juza::$1]]}}</td> | <td>{{#regex:{{{juza}}}|%\s*\K([^,]+)%|[[Has Juza::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
− | |||
{{#if:{{{number-of-ayah|}}}|<tr> | {{#if:{{{number-of-ayah|}}}|<tr> | ||
<th>Number of Ayah</th> | <th>Number of Ayah</th> | ||
<td>{{#regex:{{{number-of-ayah}}}|%\s*\K([^,]+)%|[[Has Number of Ayah::$1]]}}</td> | <td>{{#regex:{{{number-of-ayah}}}|%\s*\K([^,]+)%|[[Has Number of Ayah::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
− | {{#if:{{{ | + | {{#if:{{{number-of-prostration|}}}|<tr> |
− | <th>number-of-prostration</th> | + | <th>Number of Prostration</th> |
− | <td>{{#regex:{{{ | + | <td>{{#regex:{{{number-of-prostration}}}|%\s*\K([^,]+)%|[[Has Number of Prostration::$1]]}}</td> |
+ | </tr>}} | ||
+ | |||
+ | |||
+ | {{#if:{{{sura-polarity|}}}|<tr> | ||
+ | <th>Sura Polarity</th> | ||
+ | <td>{{#regex:{{{sura-polarity}}}|%\s*\K([^,]+)%|[[Has Sura Polarity::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
− | {{#if:{{{ | + | |
− | <th> | + | |
− | <td>{{#regex:{{{ | + | {{#if:{{{sura-chronology-seq|}}}|<tr> |
+ | <th>Sura Chronology Sequence</th> | ||
+ | <td>{{#regex:{{{sura-chronology-seq}}}|%\s*\K([^,]+)%|[[Has Sura Chronology Sequence::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
− | {{#if:{{{ | + | |
− | <th> | + | |
− | <td>{{#regex:{{{ | + | {{#if:{{{sura-main-topic|}}}|<tr> |
+ | <th>Sura Main Topic</th> | ||
+ | <td>{{#regex:{{{sura-main-topic}}}|%\s*\K([^,]+)%|[[Has Sura Main Topic::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
− | {{#if:{{{notables|}}}|<tr> | + | |
+ | |||
+ | {{#if:{{{sura-sub-topic|}}}|<tr> | ||
+ | <th>Sura SubTopic</th> | ||
+ | <td>{{#regex:{{{sura-sub-topic}}}|%\s*\K([^,]+)%|[[Has Sura Sub Topic::$1]]}}</td> | ||
+ | |||
+ | |||
+ | |||
+ | </tr>}}{{#if:{{{notables|}}}|<tr> | ||
<th>Notables</th> | <th>Notables</th> | ||
<td>{{#regex:{{{notables}}}|%\s*\K([^,]+)%|[[Has Notables::$1]]}}</td> | <td>{{#regex:{{{notables}}}|%\s*\K([^,]+)%|[[Has Notables::$1]]}}</td> | ||
+ | |||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{animals|}}}|<tr> | {{#if:{{{animals|}}}|<tr> | ||
<th>Animals</th> | <th>Animals</th> | ||
<td>{{#regex:{{{animals}}}|%\s*\K([^,]+)%|[[Has Animals::$1]]}}</td> | <td>{{#regex:{{{animals}}}|%\s*\K([^,]+)%|[[Has Animals::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{body-parts|}}}|<tr> | {{#if:{{{body-parts|}}}|<tr> | ||
<th>Body Parts</th> | <th>Body Parts</th> | ||
<td>{{#regex:{{{body-parts}}}|%\s*\K([^,]+)%|[[Has Body-Parts::$1]]}}</td> | <td>{{#regex:{{{body-parts}}}|%\s*\K([^,]+)%|[[Has Body-Parts::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{quran-surat|}}}|<tr> | {{#if:{{{quran-surat|}}}|<tr> | ||
<th>Quran Surat</th> | <th>Quran Surat</th> | ||
<td>{{#regex:{{{quran-surat}}}|%\s*\K([^,]+)%|[[Has Quran Surat::$1]]}}</td> | <td>{{#regex:{{{quran-surat}}}|%\s*\K([^,]+)%|[[Has Quran Surat::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{quran-ayat|}}}|<tr> | {{#if:{{{quran-ayat|}}}|<tr> | ||
<th>Quran Ayat</th> | <th>Quran Ayat</th> | ||
<td>{{#regex:{{{quran-ayat}}}|%\s*\K([^,]+)%|[[Has Quran Ayat::$1]]}}</td> | <td>{{#regex:{{{quran-ayat}}}|%\s*\K([^,]+)%|[[Has Quran Ayat::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{islamic-terms|}}}|<tr> | {{#if:{{{islamic-terms|}}}|<tr> | ||
<th>Islamic Terms</th> | <th>Islamic Terms</th> | ||
<td>{{#regex:{{{islamic-terms}}}|%\s*\K([^,]+)%|[[Has Islamic Terms::$1]]}}</td> | <td>{{#regex:{{{islamic-terms}}}|%\s*\K([^,]+)%|[[Has Islamic Terms::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{phrases|}}}|<tr> | {{#if:{{{phrases|}}}|<tr> | ||
<th>Phrases</th> | <th>Phrases</th> | ||
<td>{{#regex:{{{phrases}}}|%\s*\K([^,]+)%|[[Has Phrases::$1]]}}</td> | <td>{{#regex:{{{phrases}}}|%\s*\K([^,]+)%|[[Has Phrases::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{food|}}}|<tr> | {{#if:{{{food|}}}|<tr> | ||
<th>Food</th> | <th>Food</th> | ||
<td>{{#regex:{{{food}}}|%\s*\K([^,]+)%|[[Has Food::$1]]}}</td> | <td>{{#regex:{{{food}}}|%\s*\K([^,]+)%|[[Has Food::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
+ | |||
{{#if:{{{plants|}}}|<tr> | {{#if:{{{plants|}}}|<tr> | ||
<th>Plants</th> | <th>Plants</th> | ||
<td>{{#regex:{{{plants}}}|%\s*\K([^,]+)%|[[Has Plants::$1]]}}</td> | <td>{{#regex:{{{plants}}}|%\s*\K([^,]+)%|[[Has Plants::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{fruits|}}}|<tr> | {{#if:{{{fruits|}}}|<tr> | ||
<th>Fruits</th> | <th>Fruits</th> | ||
<td>{{#regex:{{{fruits}}}|%\s*\K([^,]+)%|[[Has Fruits::$1]]}}</td> | <td>{{#regex:{{{fruits}}}|%\s*\K([^,]+)%|[[Has Fruits::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{vegetables|}}}|<tr> | {{#if:{{{vegetables|}}}|<tr> | ||
<th>Vegetables</th> | <th>Vegetables</th> | ||
<td>{{#regex:{{{vegetables}}}|%\s*\K([^,]+)%|[[Has Vegetables::$1]]}}</td> | <td>{{#regex:{{{vegetables}}}|%\s*\K([^,]+)%|[[Has Vegetables::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{spices|}}}|<tr> | {{#if:{{{spices|}}}|<tr> | ||
<th>Spices</th> | <th>Spices</th> | ||
<td>{{#regex:{{{spices}}}|%\s*\K([^,]+)%|[[Has Spices::$1]]}}</td> | <td>{{#regex:{{{spices}}}|%\s*\K([^,]+)%|[[Has Spices::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{family|}}}|<tr> | {{#if:{{{family|}}}|<tr> | ||
<th>Family</th> | <th>Family</th> | ||
<td>{{#regex:{{{family}}}|%\s*\K([^,]+)%|[[Has Family::$1]]}}</td> | <td>{{#regex:{{{family}}}|%\s*\K([^,]+)%|[[Has Family::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{tribes-name|}}}|<tr> | {{#if:{{{tribes-name|}}}|<tr> | ||
<th>Tribes Name</th> | <th>Tribes Name</th> | ||
<td>{{#regex:{{{tribes-name}}}|%\s*\K([^,]+)%|[[Has Tribes Name::$1]]}}</td> | <td>{{#regex:{{{tribes-name}}}|%\s*\K([^,]+)%|[[Has Tribes Name::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
− | + | ||
− | |||
− | |||
− | |||
{{#if:{{{after-life-locations|}}}|<tr> | {{#if:{{{after-life-locations|}}}|<tr> | ||
<th>After Life Locations</th> | <th>After Life Locations</th> | ||
<td>{{#regex:{{{after-life-locations}}}|%\s*\K([^,]+)%|[[Has After Life Locations::$1]]}}</td> | <td>{{#regex:{{{after-life-locations}}}|%\s*\K([^,]+)%|[[Has After Life Locations::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{places-of-worship|}}}|<tr> | {{#if:{{{places-of-worship|}}}|<tr> | ||
<th>Places of Worship</th> | <th>Places of Worship</th> | ||
<td>{{#regex:{{{places-of-worship}}}|%\s*\K([^,]+)%|[[Has Places of Worship::$1]]}}</td> | <td>{{#regex:{{{places-of-worship}}}|%\s*\K([^,]+)%|[[Has Places of Worship::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{mountains|}}}|<tr> | {{#if:{{{mountains|}}}|<tr> | ||
<th>Mountains</th> | <th>Mountains</th> | ||
<td>{{#regex:{{{mountains}}}|%\s*\K([^,]+)%|[[Has Mountains::$1]]}}</td> | <td>{{#regex:{{{mountains}}}|%\s*\K([^,]+)%|[[Has Mountains::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{geo-locations|}}}|<tr> | {{#if:{{{geo-locations|}}}|<tr> | ||
<th>Geo-locations</th> | <th>Geo-locations</th> | ||
<td>{{#regex:{{{geo-locations}}}|%\s*\K([^,]+)%|[[Has Geo-locations::$1]]}}</td> | <td>{{#regex:{{{geo-locations}}}|%\s*\K([^,]+)%|[[Has Geo-locations::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{historical-land|}}}|<tr> | {{#if:{{{historical-land|}}}|<tr> | ||
<th>Historical Land</th> | <th>Historical Land</th> | ||
<td>{{#regex:{{{historical-land}}}|%\s*\K([^,]+)%|[[Has Historical Land::$1]]}}</td> | <td>{{#regex:{{{historical-land}}}|%\s*\K([^,]+)%|[[Has Historical Land::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{cities|}}}|<tr> | {{#if:{{{cities|}}}|<tr> | ||
<th>Cities</th> | <th>Cities</th> | ||
<td>{{#regex:{{{cities}}}|%\s*\K([^,]+)%|[[Has Cities::$1]]}}</td> | <td>{{#regex:{{{cities}}}|%\s*\K([^,]+)%|[[Has Cities::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{holly-places|}}}|<tr> | {{#if:{{{holly-places|}}}|<tr> | ||
<th>Holly Places</th> | <th>Holly Places</th> | ||
<td>{{#regex:{{{holly-places}}}|%\s*\K([^,]+)%|[[Has Holly Places::$1]]}}</td> | <td>{{#regex:{{{holly-places}}}|%\s*\K([^,]+)%|[[Has Holly Places::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{insects|}}}|<tr> | {{#if:{{{insects|}}}|<tr> | ||
<th>Insects</th> | <th>Insects</th> | ||
<td>{{#regex:{{{insects}}}|%\s*\K([^,]+)%|[[Has Insects::$1]]}}</td> | <td>{{#regex:{{{insects}}}|%\s*\K([^,]+)%|[[Has Insects::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{disease|}}}|<tr> | {{#if:{{{disease|}}}|<tr> | ||
<th>Disease</th> | <th>Disease</th> | ||
<td>{{#regex:{{{disease}}}|%\s*\K([^,]+)%|[[Has Disease::$1]]}}</td> | <td>{{#regex:{{{disease}}}|%\s*\K([^,]+)%|[[Has Disease::$1]]}}</td> | ||
</tr>}} | </tr>}} | ||
+ | |||
{{#if:{{{prayers|}}}|<tr> | {{#if:{{{prayers|}}}|<tr> | ||
<th>Prayers</th> | <th>Prayers</th> | ||
Line 178: | Line 226: | ||
</tr>}} | </tr>}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | </table></div></div>[[Sura Serial Number::{{{qs_sernumber|}}}| ]][[Is Sura Text::true| ]][[Category:Quran English Translation]] | |
− | + | ||
− | + | <phptag> | |
− | + | global $suraIndexOfSubjects; | |
− | + | ||
− | + | if ( !isset( $argv['sura-index-of-subjects'] ) ) { | |
− | + | $suraIndexOfSubjects = false; | |
− | + | break; | |
− | + | } | |
+ | |||
+ | $a = explode( ', ', $argv['sura-index-of-subjects'] ); | ||
+ | asort( $a ); | ||
+ | |||
+ | $suraIndexOfSubjects = []; | ||
+ | foreach ( $a as $value ) { | ||
+ | $fl = $value[0]; // $fl = strtolower( $value[0] ); | ||
+ | $suraIndexOfSubjects[$fl][] = "[[Has Sura Index of Subjects::$value]]"; | ||
+ | } | ||
+ | </phptag> |
Latest revision as of 16:13, 2 April 2018