So, für alle anderen, die mX 2.2 Version:
php
//////////////////////////////////////////
// Blockcache erlauben?
$mxblockcache = TRUE;
// Pfad zu den Bildern
$imagedir = 'modules/User_Fotoalbum/album';
// maximale Breite des Bildes
$maxwidth = 120;
//////////////////////////////////////////
$imglist = array();
$imgs = dir($imagedir);
while ($file = $imgs -> read()) {
if (preg_match('#(.*)([0-9])(\.gif|\.jpe?g)$#i', $file, $matches)) {
$imglist[] = $matches;
}
}
closedir($imgs->handle);
if (count($imglist)) {
srand ((float)microtime()*1000000);
shuffle($imglist);
$size = getimagesize($imagedir.'/'.$imglist[0][0]);
$size = ($size[0] > $maxwidth) ? 'width="120"' : $size[3];
$content = '
<center>
<img src="'.$imagedir.'/'.$imglist[0][0].'" '.$size.' border="0" alt="'.$imglist[0][1].'">
<a href="modules.php?name=Userinfo&uname='.$imglist[0][1].'">
<b>'.$imglist[0][1].'</b></a>
</center>';
}
naja, hier gleich zum downloaden....
http://modules.php?name=Downloads&d_op=getit&lid=349 [Editiert am 12.3.2004 von Tora]