Hallo Backslash,
ich habe Deine PicofX-Version eingebunden, allerdings werden jetzt nur noch ganz kleine Versionen der Gallery-Bilder angezeigt. Hier der Quellcode von Picofx:
<?php
/* ìlchClan Pic of the X modul
-------------------------------------------------------------|
Copyright : © by Manuel |
E-Mail : Webmaster@ilch.de |
Internet : www.ilch.de |
Version : v.1 |
Lastupdate : 13.12.2003 |
Modul Copyright : © by David |
------------------------------------------------------------
*/
# PicOfX 1.0.5.2
# Modified by Hendrik "BACKSLASH" Seifert
defined ('main') or die ( 'no direct access' );
echo '<table width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td align="center">';
$svResult = db_query('SELECT * FROM xic_allg WHERE k = 'picofx'');
while($saRow = db_fetch_assoc($svResult))
{
$picofxOpts[$saRow['v1']] = $saRow['v2'];
}
$picofxNow = date('Y-m-d');
// pruefen ob das bild gewechselt werden muss.
if($picofxOpts['nextchange'] == $picofxNow || $picofxOpts['nextchange'] < $picofxNow)
{
// verzeichnis oeffnen um dateinamen einzulesen
$picofxDHandle = opendir ('./include/images/gallery/');
$picofxRandList = array();
while (false !== ($file = readdir ($picofxDHandle)))
{
if ($file != '.' && $file != '..' && strpos($file, $picofxOpts['directory'] .'_') !== false && strpos($file, '.', 1) && strpos($file, '_thumb_') === false && strpos($file, '.txt') === false)
{
$picofxRandList[] = $file;
}
}
// zufallszahl fuer den index des $picofxRandList array generieren um damit
// das naechste zufaellige bild auszuwaehlen
srand ((double)microtime()*1000000);
$picofxOpts['pic'] = $picofxRandList[rand(0, count($picofxRandList) - 1)];
$picofxNextChange = date('Y-m-d', time() + 3600 * 24 * $picofxOpts['interval']);
// geaendertes pic in db speichern
db_query('UPDATE xic_allg SET v2 = ''. $picofxOpts['pic'] .'' WHERE k = 'picofx' AND v1 ='pic' LIMIT 1');
db_query('UPDATE xic_allg SET v2 = ''. $picofxNextChange .'' WHERE k = 'picofx' AND v1 ='nextchange' LIMIT 1');
}
$picofxt = explode('_', $picofxOpts['pic']);
$picofxThumb = implode('_', $picofxt);
$picofxImg = getimagesize('include/images/gallery/'.$picofxThumb);
if($picofxImg[0] > $picofxOpts['picwidth'])
{
$picofxImg[1] = ceil(($picofxImg[1] / $picofxImg[0]) * $picofxOpts['picwidth']);
$picofxImg[0] = $picofxOpts['picwidth'];
}
$galpos = strpos ($picofxThumb, "_");
$galord = substr($picofxThumb, 0, $galpos);
$galpic = $galord."_".substr($picofxThumb, $galpos + 1);
$galpic = str_replace("_small", "", $galpic);
$galink = "/?m=gallery&um=showimg&category=$galord&img=$galpic";
echo '
<a href="'.$galink.'">
<img src="include/images/gallery/'.$picofxThumb.'" width="'.$picofxImg[0].'" height="'.$picofxImg[1].'" alt="" border=0>
</a>';
echo '</td></tr></table>';
?>
was ist da falsch? Habe eigentlich nichts verändert.
Gruss
Flash77
Edit by SLJ:
Ich habe die klammern eckig gemacht.
Zuletzt geändert von SLJ am 08.11.2005 - 21:25
Zuletzt modifiziert von manuel am 25.07.2008 - 11:28:04