PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : korrekte anzeige der module im adminforce



jpwfour
09.04.2008, 19:16
adminforce/content/module.php
statt:

if (is_dir ($dir.$file) && file_exists ($dir.$file.'/pref.ini') && $file != '.' && $file != '..') {
$modul = parse_ini_file ($dir.$file.'/pref.ini', TRUE);
$ico_endung = (file_exists ($dir.$file.'/icon.png')) ? 'png' : 'gif';
if ($i == 1 || ( $i % 4 ) == 0) echo ' <tr>'."\n";
echo ' <td width="25%" style="text-align: center;"><a href="javascript:ShowWindow(\'moduladmin.php?mod='.$file .'\');"><img src="'.$dir.$file.'/icon.'.$ico_endung.'" border="0" width="32" height="32" alt="" /><br />'.$modul['modul']['name'].'</a></td>'."\n";
if ( ( ( $i + 1 ) % 4 ) == 0 ) echo ' </tr>'."\n";
$i++;
}folgenden code:

if (is_dir ($dir.$file) && file_exists ($dir.$file.'/pref.ini') && $file != '.' && $file != '..') {
$modul = parse_ini_file ($dir.$file.'/pref.ini', TRUE);
$ico_endung = (file_exists ($dir.$file.'/icon.png')) ? 'png' : 'gif';
if ($i == 1 || ( ($i-1) % 4 ) == 0) echo ' <tr>'."\n";
echo ' <td width="25%" style="text-align: center;"><a href="javascript:ShowWindow(\'moduladmin.php?mod='.$file .'\');"><img src="'.$dir.$file.'/icon.'.$ico_endung.'" border="0" width="32" height="32" alt="" /><br />'.$modul['modul']['name'].'</a></td>'."\n";
if ( ( ( $i ) % 4 ) == 0 ) echo ' </tr>'."\n";
$i++;
}

Gremlin
09.04.2008, 21:30
Ich seh da grade keinen Unterschied :idea:

jpwfour
10.04.2008, 17:33
so wie ich das verstehe, sollten immer 4 modul-icons je zeile angezeigt werden.

und wenn weniger als 4, dann noch die restlichen zellen leer einfügen.

dass funktionierte aber z.bsp. bei 3 modulen schon nicht mehr richtig, da wurde nach 3 modul icons ein umbruch gemacht und dann noch 2 leere zellen eingefügt, jedenfalls sah das bei mir komisch aus.

ich hab dann einfach 2 zahlen verändert (einmal statt $i -> $i-1 und einmal statt $i+1 -> $i ) udn jetzt meine ich funktioneirt es so, wie es sollte, dass kann man natürlich nur ausprobieren, wenn man mehrere module drin hat, ich habs nur mit 2,3,4,5 getestet.