Difference between revisions of "Template:Quran Sura InfoBox"

From HodHood
Jump to: navigation, search
m ($a = explode( ', ', $argv['sura-index-of-subjects'] ); var_dump( $a );)
(global $suraIndexOfSubjects;)
 
(7 intermediate revisions by the same user not shown)
Line 231: Line 231:
  
 
<phptag>
 
<phptag>
 +
global $suraIndexOfSubjects;
 +
 
if ( !isset( $argv['sura-index-of-subjects'] ) ) {
 
if ( !isset( $argv['sura-index-of-subjects'] ) ) {
 +
    $suraIndexOfSubjects = false;
 
     break;
 
     break;
 
}
 
}
  
 
$a = explode( ', ', $argv['sura-index-of-subjects'] );
 
$a = explode( ', ', $argv['sura-index-of-subjects'] );
var_dump( $a );
+
asort( $a );
  
echo '
+
$suraIndexOfSubjects = [];
<div class="infobox infobox-800 mw-collapsible mw-collapsed" style="clear: right">
+
foreach ( $a as $value ) {
<big>Surah Index of Subjects</big>
+
  $fl = $value[0]; // $fl = strtolower( $value[0] );
<div class="mw-collapsible-content">
+
  $suraIndexOfSubjects[$fl][] = "[[Has Sura Index of Subjects::$value]]";
{{#regex:{{{sura-index-of-subjects}}}|%\s*\K\[*([^\],]+)\]*%|[[Has Sura Index of Subjects::$1]]}}
+
}
</div>
 
</div>';
 
 
</phptag>
 
</phptag>

Latest revision as of 16:13, 2 April 2018

Sura Attributes

HodHoodQuranLogo.PNG