Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/01/2010, 09:19
albertrc
 
Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 15 años, 2 meses
Puntos: 1
jquery + sexylightbox2.3 +php

o me de error por las comillas o no me funciona es posible hacer esto abajo hay todo el codigo

lo que hago es devolver una categoria de imagenes con php i quiero que cuando pinchen se active el sexylightbox



<div class='imagen'><a href='{$row['ruta_foto_grande'] rel=sexylightbox[group1]}' /><img src=' {$row['ruta_foto_pequena']} '/></a></div>



</div> ";









<html>
<head>


<script type="text/javascript" src="jquery-1.4.js"></script>

<script type="text/javascript" src="jquery.easing.1.3.js"></script>

<script type="text/javascript" src="sexylightbox.v2.3.jquery.min.js"></script>

<link rel="stylesheet" href="sexylightbox.css" type="text/css" media="all" />



<script type="text/javascript">

$(document).ready(function(){

SexyLightbox.initialize({color:'blanco'});

});



</script>
</head>
</html>
Código PHP:
<?php
    
include('select/select.php');
    
$link mysqli_connect($hostname,$user,$password,$database);

    
    
$query "select nombre_categoria,ruta_foto_grande,ruta_foto_pequena from producto,foto,categoria where id_foto=producto_id_foto and id_categoria=producto_id_categoria and id_categoria=$_GET[id_categoria]  group by nombre_producto  ";
    
mysqli_query ($link,'SET NAMES "utf8" ');
    
$result mysqli_query($link,$query);
    
$nom_categoria=0;
    
$galeria=0;


    while (
$row mysqli_fetch_array($resultMYSQLI_ASSOC)){
            echo 
"<div class='galeria'>";
        if(
$nom_categoria==0){
            echo    
"  <div class='categoria'><h1>".ucfirst("{$row['nombre_categoria']}")."</h1></div>";
        }
                        
        
        
        echo 
"
                     <div class='imagen'><a href='{$row['ruta_foto_grande']     rel=sexylightbox[group1]}'   /><img src=' {$row['ruta_foto_pequena']} '/></a></div>
            
            
            
            </div>                "
;
            
    
if(++
$galeria==3){
echo 
"    <div class='clear'></div>";
$galeria=0;
}
        
        
    
$nombre_categoria++;


    }

         
/* free result set */
mysqli_free_result($result);
/* close connection */
mysqli_close($link);
?>