Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/06/2004, 13:07
hammmer
 
Fecha de Ingreso: mayo-2004
Mensajes: 75
Antigüedad: 19 años, 11 meses
Puntos: 0
aki esta el codigo de la galeria (cojida en hotscripts)

<?php
///////////// PHP PHOTO ALBUM v 1.0 //////////
// //
// Author: Daniele Leone //
// Email: [email protected] //
// Website: www.danieleleone.com //
// //
//////////////////////////////////////////////
?>


<?

// CONFIGURATION

$cols = 5; // columns number
$table_bg_color = "black"; // table background color
$table_border = ""; // table border size
$table_width = "100%"; // table width

// DO NOT EDIT BELOW

$i =1;
$files = array ();
$myDirectory = opendir("imgs/thumbs");
echo "<table width='$table_width' bgcolor = '$table_bg_color' border ='$table_border' cellpadding='5' cellspacing='0'><tr>";
while ($file = readdir($myDirectory)) {

if (($file != ".") && ($file != "..") && ($file != "index.php") && !(is_dir("imgs/$file")) )
{
$files[] = $file;
if (is_int($i / $cols)) {
list($width, $height) = getimagesize("imgs/$file");
echo "<td align='center'>";
?>
<a href="#" onClick="MyWindow=window.open('viewer.php?cast=<?p hp echo $cast;?>&file=<?php echo $file;?>','MyWindow','toolbar=no,location=no,direc tories=no,status=yes,menubar=no,scrollbars=no,resi zable=no,width=<?php echo "$width";?>,height=<?php echo "$height";?>,left=20,top=20'); return false;">
<?
echo "<img src='imgs/thumbs/$file' border='0'></a>";
echo "</td></tr><tr>";
}
else
{
list($width, $height, $type, $attr) = getimagesize("imgs/$file");
echo "<td align='center'>";
?>
<a href="#" onClick="MyWindow=window.open('viewer.php?cast=<?p hp echo $cast;?>&file=<?php echo $file;?>','MyWindow','toolbar=no,location=no,direc tories=no,status=yes,menubar=no,scrollbars=no,resi zable=no,width=<?php echo "$width";?>,height=<?php echo "$height";?>,left=20,top=20'); return false;">
<?
echo "<img src='imgs/thumbs/$file' border='0'></a>";
echo "</td>";
}
$i++;
}
}
echo "</tr></table>";
closedir($myDirectory);
?>
<!-- Please do not remove this image ! It's for PHPphotoALbum page rank on search engine -->
<a href="http://www.danieleleone.com"><img src="http://www.danieleleone.com/pix.gif" width="1" height="1" border="0"></a>

yo llamo a los modulos de esta manera

modulos/galeria.php
modulos/descargas.php
modulos/etc

los tengo todos en la misma carpeta y esto es lo q tengo puesto en el theme.php para poder llamar a los modulos

<?
if (file_exists( $path_modulo )) include( $path_modulo );
else die('Error al cargar el módulo <b>'.$modulo.'</b>. No
existe el archivo <b>'.$conf[$modulo]['archivo'].'</b>');
?>

y claro me funcionan todos bien, menos el de la galeria ke las imagenes no se muestran, se supone q galeria.php llama a la carpeta imgs y la tengo en el mismo directorio, es decir en la carpeta modulos.