Difference between revisions of "Template:Quran Sura InfoBox"
From HodHood
P.Astakhov (talk | contribs) (replace infobox-big by infobox-800 class) |
P.Astakhov (talk | contribs) (global $suraIndexOfSubjects;) |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <div class="infobox | + | <div class="infobox mw-collapsible mw-collapsed"> |
<big>Sura Attributes</big> | <big>Sura Attributes</big> | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
Line 29: | Line 29: | ||
<th>Number of Prostration</th> | <th>Number of Prostration</th> | ||
<td>{{#regex:{{{number-of-prostration}}}|%\s*\K([^,]+)%|[[Has Number of Prostration::$1]]}}</td> | <td>{{#regex:{{{number-of-prostration}}}|%\s*\K([^,]+)%|[[Has Number of Prostration::$1]]}}</td> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
</tr>}} | </tr>}} | ||
Line 234: | Line 229: | ||
</table></div></div>[[Sura Serial Number::{{{qs_sernumber|}}}| ]][[Is Sura Text::true| ]][[Category:Quran English Translation]] | </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