pour afficher les 4 dernieres photos ajouté a ma galerie j'ai repris un rss que j'ai modifié pour pouvoir l'integré dans ma page d'accueil.
le probleme est que sa ne s'affiche pas sous firefox (comme d'habitude) mais que sous ie sa marche nickel.
pourriez vous jeter un oeil sur mon code et me dire si vous voyez pourquoi sous firefox sa ne marche pas ?
<div align="center"><?php
define('ZENFOLDER', 'zp-core');
header('Content-Type: application/xml');
require_once(ZENFOLDER . "/template-functions.php");
$themepath = 'themes';
$albumnr = $_GET[albumnr];
$albumname = $_GET[albumname];
if ($albumname != "")
{ $albumname = " - for album: ".$_GET[albumname]; }
if(getOption('mod_rewrite'))
{ $albumpath = "/"; $imagepath = "/"; }
else
{ $albumpath = "/index.php?album="; $imagepath = "&image="; }
?>
<rss version="2.0">
<channel>
<title><?php echo getOption('gallery_title'); ?><?php echo $albumname; ?></title>
<docs></docs><generator></generator>
<?php
$iw = $cw = 150; // Image Width
$ih = $ch = 100; // Image Height
$items = 4; // # of Items displayed on the feed
db_connect();
if ($albumnr != "")
{ $sql = "SELECT * FROM ". prefix("images") ." WHERE albumid = $albumnr AND `show` = 1 ORDER BY id DESC LIMIT ".$items;}
else
{ $sql = "SELECT * FROM ". prefix("images") ." WHERE `show` = 1 ORDER BY id DESC LIMIT ".$items; }
$result = mysql_query($sql);
while($r = mysql_fetch_array($result)) {
$id=$r['albumid'];
if ($albumnr != "")
{ $sql="SELECT * FROM ". prefix("albums") ." WHERE `show` = 1 AND id = $albumnr"; }
else
{ $sql="SELECT * FROM ". prefix("albums") ." WHERE `show` = 1 AND id = $id"; }
$album = mysql_query($sql);
$a = mysql_fetch_array($album);
?>
<item>
<title><?php echo $r['title'] ?></title>
<link><?php echo '<a href="http://'.$_SERVER["HTTP_HOST"].WEBPATH.'/'.ZENFOLDER.'/i.php?a='.$a['folder'].'&i='.$r['filename'].'" target="_blank">';?></link>
<description><?php echo '<![CDATA[<a title="'.$r['title'].' in '.$a['title'].'" href="http://'.$_SERVER["HTTP_HOST"].WEBPATH.$albumpath.$a['folder'].$imagepath.$r['filename'].'">
<img border="0" src="http://'.$_SERVER["HTTP_HOST"].WEBPATH.'/'.ZENFOLDER.'/i.php?a='.$a['folder'].'&i='.$r['filename'].'&w='.$iw.'&h='.$ih.'&cw='.$cw.'&ch='.$ch.'" alt="'. $r['title'] .'"></a>';?> <?php if($exif['datetime']) { echo '<![CDATA[Date: ' . $exif['datetime'] . ']]>'; } ?></description>
<guid><?php echo '<![CDATA[http://'.$_SERVER["HTTP_HOST"].WEBPATH.$albumpath.$a['folder'].$imagepath.$r['filename'] . ']]>';?></guid>
</item>
<?php } ?></div>
</channel>
</rss>
en haut à gauche de ce sujet.