Denne kode bruger jeg på en V6 men på min V7 vil den kun vise et filnavn, og ikke et billed.
Jeg får denne fejl:
Warning: filesize() [function.filesize]: stat failed for images/photoalbum/hallw5.jpg in /home/www/josephine.xn--frkjr-vra7j.org/photogallery.php on line 94
Er der en der kan se om jeg skal rette noget så den også virker i V7
Kode @openside("tilfældige billeder");
echo "<script>
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != '[object]'){ //do this so I can take a string too
setTimeout('nereidFade('+object+','+destOp+','+rate+','+delta+')',0);
return;
}
clearTimeout(nereidFadeTimers[object.sourceIndex]);
diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;
if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout('nereidFade(nereidFadeObjects['+object.sourceIndex+'],'+destOp+','+rate+','+delta+')',rate);
}
}
</script>";
//Definerer SAFEMODE
define("SAFEMODE", true);
echo "<CENTER><MARQUEE BEHAVIOR='SCROLL' ALIGN='CENTER' VALIGN='BOTTOM'
DIRECTION='UP' WIDTH='120' HEIGHT='150' SCROLLAMOUNT='1' SCROLLDELAY='1'
ONMOUSEOVER='this.stop()' ONMOUSEOUT='this.start()'>";
$album_real = "photoalbum/";
$result = dbquery("SELECT * FROM ".$db_prefix."photos ORDER BY RAND() DESC
LIMIT 0,90");
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
//Checker om safemode er on eller ej
if (!SAFEMODE) {
$album = $data['album_id'];
$album_real = "photoalbum/album_" . $album . "/";
}
$album_id = $data['album_id'];
$itemsubject = trimlink($data['photo_id'], 23);
$itemdescription = trimlink($data['photo_title'], 23);
echo "<center><a
href='".BASEDIR."photogallery.php?album_id=".$album_id."&photo_id=".$data['photo_id']."'
title='".$data['photo_title']."' class='side'>
<img src='".IMAGES."$album_real".$data['photo_thumb1']."' border='0'><br />
$itemdescription <p> </center> </a> \n";
}
} else {
echo $locale['004'];
}
closeside();
Redigeret af CS_DK d. 17-11-2009 20:32
|