Bonjour,
je me permet de relancer la discussion et je m'excuse pour mon anglais pas très bon.
Je viens de découvrir le fichier "imgflow_external.php" et il corresponds presqu'à mon attente.
Je voudrais juste savoir comment faire pour afficher les cinq derniers albums en utilisant une de leur photo et en affichant le nom de l'album sous la photo.
D'avance merci .....
<?php
/**************************************************
Coppermine 1.4.x Plugin - Imageflow v1.2
*************************************************
Copyright (c) 2008 Timos-Welt (www.timos-welt.de)
*************************************************
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
**************************************************/
/* Things you may change */
$imageflow_bgcolor = "000000"; // background color; use hex format without leading '#'
$imageflow_width = "350px"; // either use pixel (800px) or percent (50%)
$imageflow_topcorrect = 50; // correct top border of animation
// (negative values = move to top, positive values = move to bottom)
$imageflow_align = "center"; // allowed: "center" or "left"
$imageflow_intable = 1; // leave this set to 1 normally
$imageflow_numberofpics = 5; // number of random images to select from CPG database
$imageflow_skipportait = 0; // set to 1 if you only want pics where width>height
$imageflow_procent = 1; // The factor that the generated reflexion images are smaller than
// the intermediate size pictures of your gallery. 1.0 means, they
// have the original size. 0.5 means, they are half as big.
$imageflow_fontcolor = "ffffff"; // font color for captions; use hex format without leading '#'
$imageflow_loading = "Loading Images"; // Message displayed while loading
/* Please don't change anything below */
echo <<<EOS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<title>Imageflow for external usage</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
EOS;
define('IN_COPPERMINE', true);
global $CONFIG, $FORBIDDEN_SET, $imageflow_row;
require_once('./include/init.inc.php');
echo <<<EOS
<link rel="stylesheet" title="Standard" href="imgflow_screen.css" type="text/css" media="screen" />
<script language="JavaScript" type="text/javascript" src="imgflow_imageflow.js"></script>
<style type="text/css">
EOS;
echo " #imageflow{background-color:#".$imageflow_bgcolor.";width:".$imageflow_width.";}\n";
echo " #imgflowcontainer{margin-top:".$imageflow_topcorrect."px;width:".$imageflow_width.";}\n";
echo " #imgflowslider{background-image:url('imgflow_slider.gif');}\n";
echo " #imgflowcaptions{color:#".$imageflow_fontcolor.";}\n";
echo " #imgflowloading{color:#".$imageflow_fontcolor.";}\n";
echo " body{background-color:#".$imageflow_bgcolor.";}\n";
echo " </style>\n";
echo " </head>\n";
echo " <body>\n";
if ($imageflow_align == "center") echo " <center>\n";
if ($imageflow_intable) echo " <div id=\"imgflowcontainer\" style=\"width:".$imageflow_width.";\">\n";
echo " <div id=\"imageflow\">\n";
echo " <div id=\"imgflowloading\">\n";
echo " <b>".$imageflow_loading."</b><br/>\n";
echo " <img src=\"imgflow_loading.gif\" width=\"208\" height=\"13\" alt=\"loading\" />\n";
echo " </div>\n";
echo " <div id=\"imgflowimages\">\n";
// maximum pics to show
$imageflowlimit=$imageflow_numberofpics;
// request of your database
$imageflow_pics='';
$imageflow_FORBIDDEN_SET = "";
if ($FORBIDDEN_SET != "") $imageflow_FORBIDDEN_SET = "AND $FORBIDDEN_SET";
$imageflow_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' AND approved = 'YES' $imageflow_FORBIDDEN_SET ORDER BY RAND() LIMIT $imageflowlimit";
// result of request
$imageflow_result = cpg_db_query($imageflow_query);
// For reading result
$imageflow_rowset = array();
// Index of tab
$i=0;
// max height : will be 75px or 100px
$max_height=0;
// For each pic.....building javascript in php
while($imageflow_row = mysql_fetch_array($imageflow_result)){
if (($imageflow_skipportrait == 0) || ($imageflow_row['pwidth'] > $imageflow_row['pheight'])) {
// reading pid of pic
$imageflow_key=$imageflow_row['pid'];
// reading height of pic
$imageflow_image_size = compute_img_size($imageflow_row['pwidth'], $imageflow_row['pheight'], $CONFIG['thumb_width']);
// path of pic
$imageflow_file="albums/".$imageflow_row['filepath']."normal_".$imageflow_row['filename'];
// link of pic
$imageflow_lien="<img class=\"imgflowimg\" src=\"imgflow_reflect.php?bgc=".$imageflow_bgcolor."&procent=".$imageflow_procent."&cache=0&img=".$imageflow_file."\" longdesc=\"thumbnails.php?album=".$imageflow_row['aid']."\" alt=\"".$imageflow_row['caption']."\" />";
// building javascript code
$imageflow_pics .= $imageflow_lien."\n";
$i=$i+1;
}
}
// free memory
mysql_free_result($imageflow_result);
echo $imageflow_pics;
echo "</div><div id=\"imgflowcaptions\"></div><div id=\"imgflowscrollbar\"><div id=\"imgflowslider\"></div></div></div>";
if ($imageflow_intable) echo "</div>";
if ($imageflow_align == "center") { echo "</center>
"; }
echo "<!-- End Imageflow PlugIn -->\n";
echo "</body>";
echo "</html>";
?>