Foros del Web » Programando para Internet » PHP »

Añadir Tooltip a sistema de Thumbnails.

Estas en el tema de Añadir Tooltip a sistema de Thumbnails. en el foro de PHP en Foros del Web. Hola. Tengo un actual sistema de thumbnails y me gustaria añadirle un Tooltip (viñetas). He probado de juntarlo de mil maneras y siempre me tira ...
  #1 (permalink)  
Antiguo 26/10/2008, 10:08
 
Fecha de Ingreso: abril-2008
Mensajes: 24
Antigüedad: 16 años
Puntos: 0
Pregunta Añadir Tooltip a sistema de Thumbnails.

Hola.
Tengo un actual sistema de thumbnails y me gustaria añadirle un Tooltip (viñetas).
He probado de juntarlo de mil maneras y siempre me tira error.

CODIGO TOOLTIP:
<a href="#" onmouseover="showToolTip(event,'This is the content of the tooltip. This is the content of the tooltip.');return false" onmouseout="hideToolTip()">TEXTO TOOLTIP QUE SERIA EL TUMBNAIL</a>

CODIGO THUMBNAILS:
<?
$imagen_G = $_PATHS['fotos_videos'].$foto_actual['link'];
$imagen_E = $_PATHS['dir_fotos_videos'].$foto_actual['link'];

if (file_exists($imagen_E)) {
$desc = "(". $foto_actual['alt'] . ") " . $foto_actual['foto_desc'] ;
echo "<a href=\"index.php?mod=23&id=" . $_GET['id'] ."&idf=". $foto_actual['id_foto'] ."&order_by=". $_GET['order_by'] ."&order=". $_GET['order'] ."&limit=". $_GET['limit'] ."&num=". $num ."\">";
echo "<img class=\"foto\" src=\"".$imagen_G."\" alt=\"$desc\" title=\"$desc\" height=110 width=170>";
// onmouseover=\"return escape(tip".$foto_actual['id_foto'].");\"
echo "</a>";
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;" . $foto_actual['foto_desc'];
/* if ($_GET['order_by']=='ranking') {
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;Puntuaci&oacute;n: " . round($foto_actual['ranking']);
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;Votos: " . $foto_actual['votos'];
}*/
  #2 (permalink)  
Antiguo 26/10/2008, 10:14
Avatar de vidalsoft  
Fecha de Ingreso: julio-2008
Ubicación: /www/...
Mensajes: 339
Antigüedad: 15 años, 9 meses
Puntos: 1
Respuesta: Añadir Tooltip a sistema de Thumbnails.

Hola... cual es el error ?
__________________
Anthony Vidal Contreras | @AnthonyVidalC | Skype: vidalsystem | [email protected]
  #3 (permalink)  
Antiguo 26/10/2008, 10:18
 
Fecha de Ingreso: abril-2008
Mensajes: 24
Antigüedad: 16 años
Puntos: 0
Respuesta: Añadir Tooltip a sistema de Thumbnails.

Ahora en
$desc = "(". $foto_actual['alt'] . ") " . $foto_actual['foto_desc'] ;
Define que sale como alt en los thumbnails, y yo lo que no se hacer es añadir el codigo del tooltip ese a mi codigo de thumbnails para que al poner encima el raton no haga el alt sino el codigo de tooltip.

Me daba siempre error pusiera como pusiera el codigo del tooltip en medio del codigo de thumbnails
  #4 (permalink)  
Antiguo 26/10/2008, 18:08
 
Fecha de Ingreso: abril-2008
Mensajes: 24
Antigüedad: 16 años
Puntos: 0
Respuesta: Añadir Tooltip a sistema de Thumbnails.

Una ayudita por favor...
  #5 (permalink)  
Antiguo 26/10/2008, 20:41
Avatar de Ronruby  
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 9 meses
Puntos: 416
Respuesta: Añadir Tooltip a sistema de Thumbnails.

Muestranos como lo estas haciendo para asi poder ayudarte.

Probablemente te falte escapar las comillas.
Y tan solo para que salga el texto es reemplazar donde dice:
This is the content of the tooltip. This is the content of the tooltip
Por el valor de la variable $desc
  #6 (permalink)  
Antiguo 27/10/2008, 03:35
 
Fecha de Ingreso: abril-2008
Mensajes: 24
Antigüedad: 16 años
Puntos: 0
Respuesta: Añadir Tooltip a sistema de Thumbnails.

Lo he probado de mil maneras y siempre me daba error.
Esta es una de ellas:
<?
$imagen_G = $_PATHS['fotos_videos'].$foto_actual['link'];
$imagen_E = $_PATHS['dir_fotos_videos'].$foto_actual['link'];

if (file_exists($imagen_E)) {
$desc = "(". $foto_actual['alt'] . ") " . $foto_actual['foto_desc'] ;
echo "<a href=\"index.php?mod=23&id=" onmouseover="showToolTip(event,'This is the content of the tooltip. This is the content of the tooltip.');return false" onmouseout="hideToolTip()">TEXTO TOOLTIP QUE SERIA EL TUMBNAIL<" . $_GET['id'] ."&idf=". $foto_actual['id_foto'] ."&order_by=". $_GET['order_by'] ."&order=". $_GET['order'] ."&limit=". $_GET['limit'] ."&num=". $num ."\">";
echo "<img class=\"foto\" src=\"".$imagen_G."\" alt=\"$desc\" title=\"$desc\" height=110 width=170>";
// onmouseover=\"return escape(tip".$foto_actual['id_foto'].");\"
echo "</a>";
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;" . $foto_actual['foto_desc'];
/* if ($_GET['order_by']=='ranking') {
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;Puntuaci&oacute;n: " . round($foto_actual['ranking']);
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;Votos: " . $foto_actual['votos'];
}*/
  #7 (permalink)  
Antiguo 27/10/2008, 13:15
 
Fecha de Ingreso: abril-2008
Mensajes: 24
Antigüedad: 16 años
Puntos: 0
Respuesta: Añadir Tooltip a sistema de Thumbnails.

Una ayudita por favor.
  #8 (permalink)  
Antiguo 27/10/2008, 16:09
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: Añadir Tooltip a sistema de Thumbnails.

mmm.... y cual es el error??

(o adivinamos)

o lee esto mientras lo pienso...

http://www.forosdelweb.com/f18/como-...s-bien-588701/
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:25.