Difference between revisions of "Template:Quran Sura InfoBox"

From HodHood
Jump to: navigation, search
(separate "Surah Index of Subjects")
(global $suraIndexOfSubjects;)
 
(11 intermediate revisions by the same user not shown)
Line 230: Line 230:
 
</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]]
  
<div class="infobox infobox-800 mw-collapsible mw-collapsed" style="clear: right">
+
<phptag>
<big>Surah Index of Subjects</big>
+
global $suraIndexOfSubjects;
<div class="mw-collapsible-content">
+
 
{{#regex:{{{sura-index-of-subjects}}}|%\s*\K\[*([^\],]+)\]*%|[[Has Sura Index of Subjects::$1]]}}
+
if ( !isset( $argv['sura-index-of-subjects'] ) ) {
</div>
+
    $suraIndexOfSubjects = false;
</div>
+
    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

Sura Attributes

HodHoodQuranLogo.PNG