bonjour,
je ne comprend comment je pourrais afficher mon image de partner que je recupere de ma fonction:
Citation :function b_partner_random($options){
global $xoopsDB;
$myts =& MyTextSanitizer::getInstance();
$block = array();
$sql = mysql_query("SELECT * FROM ".$xoopsDB->prefix("partner")."");
$count = mysql_numrows($sql);
mt_srand((double)microtime()*1000000);
$alea = mt_rand(1, $count);
$result = $xoopsDB->query("SELECT lien, nomlien, photo FROM ".$xoopsDB->prefix("partner")." where photoid=$alea limit 1");
while($row = $xoopsDB->fetchRow($result)) {
if( !strstr($row[2], 'swf'))
{
$h_vign = $options[0];
$urlphoto = "".XOOPS_URL."/modules/marro_partner/images/";
$taille = getimagesize($urlphoto."/".$row[2]);
$reduc = floor(($h_vign*100)/($taille[1]));
$l_vign = floor(($taille[0]*$reduc)/100);
$block['content'] .= "<a target=\"blank\" href=\"$row[0]\">";
$block['content'] .= "<img src=\"$urlphoto/$row[2]\" ";
$block['content'] .="width='$l_vign' height='$h_vign'>";
$block['content'] .= "</a> ";
$block['content'] .= "<center><small><a href=$row[0]>$row[1]</a></small></center><br />";
}
else {
$block['content'] .="<object type='application/x-shockwave-flash' data='$photo' id='$photoid'>
<param name='movie' value=".XOOPS_URL."/modules/marro_partner/images/$row[2]>
<param name='quality' value='best'>
<param name='menu' value='false'></object>";
}
}
return $block;
}
mon module marchais sur une vieille version de xoops et php4 mais plus avec la derniere de xoops et php5
vous avez peu etre une idee?
ps a oui le but de la fonction est d afficher d une maniere ou d une autre suivant si c est du swf ou autre.