Difference between revisions of "Template:Quran Sura InfoBox"

From HodHood
Jump to: navigation, search
m (echo '<div class="glossary"><div class="glossary-caption">' . $key . '</div><div class="glossary-content">' . implode( ', ', $value ) . '</div></div>';)
(global $suraIndexOfSubjects;)
 
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;
 
}
 
}
Line 238: Line 241:
 
asort( $a );
 
asort( $a );
  
$return = [];
+
$suraIndexOfSubjects = [];
 
foreach ( $a as $value ) {
 
foreach ( $a as $value ) {
 
   $fl = $value[0]; // $fl = strtolower( $value[0] );
 
   $fl = $value[0]; // $fl = strtolower( $value[0] );
   $return[$fl][] = "[[Has Sura Index of Subjects::$value]]";
+
   $suraIndexOfSubjects[$fl][] = "[[Has Sura Index of Subjects::$value]]";
}
 
 
 
 
 
 
 
 
 
echo '
 
<div class="infobox infobox-800 mw-collapsible mw-collapsed" style="clear: right">
 
<big>Surah Index of Subjects</big>
 
<div class="mw-collapsible-content">';
 
 
 
foreach ( $return as $key => $value ) {
 
  echo '<div class="glossary"><div class="glossary-caption">' . $key . '</div><div class="glossary-content">' . implode( ', ', $value ) . '</div></div>';
 
 
}
 
}
 
echo '</div></div>';
 
 
</phptag>
 
</phptag>

Latest revision as of 16:13, 2 April 2018

Sura Attributes

HodHoodQuranLogo.PNG