Difference between revisions of "Template:Quran Sura InfoBox"

From HodHood
Jump to: navigation, search
m (asort( $a );)
(echo '<div class="glossary"><div class="glossary-caption">$key</div><div class="glossary-content"> . implode( ', ', $value ) . '</div></div>';)
Line 241: Line 241:
 
foreach ( $a as $value ) {
 
foreach ( $a as $value ) {
 
   $fl = $value[0]; // $fl = strtolower( $value[0] );
 
   $fl = $value[0]; // $fl = strtolower( $value[0] );
   $return[$fl][] = $value;
+
   $return[$fl][] = "[[Has Sura Index of Subjects::$value]]";
 
}
 
}
var_dump( $return );
+
 
 +
 
  
  
Line 249: Line 250:
 
<div class="infobox infobox-800 mw-collapsible mw-collapsed" style="clear: right">
 
<div class="infobox infobox-800 mw-collapsible mw-collapsed" style="clear: right">
 
<big>Surah Index of Subjects</big>
 
<big>Surah Index of Subjects</big>
<div class="mw-collapsible-content">
+
<div class="mw-collapsible-content">';
{{#regex:{{{sura-index-of-subjects}}}|%\s*\K\[*([^\],]+)\]*%|[[Has Sura Index of Subjects::$1]]}}
+
 
</div>
+
foreach ( $return as $key => $value ) {
</div>';
+
  echo '<div class="glossary"><div class="glossary-caption">$key</div><div class="glossary-content"> . implode( ', ', $value ) . '</div></div>';
 +
}
 +
 
 +
echo '</div></div>';
 
</phptag>
 
</phptag>

Revision as of 18:09, 29 March 2018

Sura Attributes

HodHoodQuranLogo.PNG

PhpTags Parse error: syntax error, unexpected '/' in Template:Quran Sura InfoBox on line 24