forum.coppermine-gallery.net

Support => Français (French) => Language Specific Support => cpg1.4.x Français (French) => Topic started by: karice on November 08, 2008, 04:30:38 pm

Title: Pb Titre sur image agrandie
Post by: karice on November 08, 2008, 04:30:38 pm
Bonjour à tous,
Lorsque je passe la souris sur l'image agrandie, j'obtiens le "nom du fichier + la taille" ce qui n'est pas très esthétique !
Peux ton avoir le Titre de l'image à la place ou au pire rien du tout ?

Merci d'avance.

Fabrice.
Title: Re: Pb Titre sur image agrandie
Post by: François Keller on November 09, 2008, 09:52:13 am
oui c'est possible il faut trouver la fonction d'affichage de la photo dans le fichier theme.php du theme sample, la copier dans le fichier theme.php du theme utilisé et modifier la balise "alt" du code d'affichage
Title: Re: Pb Titre sur image agrandie
Post by: karice on November 09, 2008, 02:16:44 pm
oui c'est possible il faut trouver la fonction d'affichage de la photo dans le fichier theme.php du theme sample, la copier dans le fichier theme.php du theme utilisé et modifier la balise "alt" du code d'affichage

Euh.....comment dirais-je........tu peux me la faire en français, car là pour moi c du chinois  ;D  ;D  ;D
Je suis comme qui dirait un simple utilisateur  ;)

Fabrice.

www.fhoto.123.fr (http://www.fhoto.123.fr)
Title: Re: Pb Titre sur image agrandie
Post by: François Keller on November 09, 2008, 03:23:36 pm
je regarde de plus près des que j'ai un moment
Title: Re: Pb Titre sur image agrandie
Post by: François Keller on November 09, 2008, 08:47:43 pm
voilà la fonction modifiée pour afficher le titre de l'image
cette fonction est à coller dans le fichier theme.php de ton theme (si elle existe déjà, il faut la remplacer par celle là)
Code: [Select]
// Display the full size image
function theme_display_fullsize_pic()
{
    global $CONFIG, $THEME_DIR, $ALBUM_SET;
    global $lang_errors, $lang_fullsize_popup, $lang_charset;

    if (isset($_GET['picfile']))
    {
        if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);

    $picfile = $_GET['picfile'];
    $picname = $CONFIG['fullpath'] . $picfile;
    $imagesize = @getimagesize($picname);
    $imagedata = array('name' => $picfile, 'path' => path2url($picname), 'geometry' => $imagesize[3]);
    }
    elseif (isset($_GET['pid']))
    {
    $pid = (int)$_GET['pid'];
    $sql = "SELECT * " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$pid' $ALBUM_SET";
    $result = cpg_db_query($sql);

    if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);

    $row = mysql_fetch_array($result);
    $pic_url = get_pic_url($row, 'fullsize');
    $geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';
    $imagedata = array('name' => $row['filename'], 'path' => $pic_url, 'geometry' => $geom, 'title' => $row['title']);
    }

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=<?php echo $CONFIG['charset'] == 'language file' $lang_charset $CONFIG['charset'?>" />
  <title><?php echo $CONFIG['gallery_name'?>: <?php echo $lang_fullsize_popup['click_to_close'];
      
?>
</title>
  <script type="text/javascript" src="scripts.js"></script>
  <style type="text/css">
  body { margin: 0; padding: 0; background-color: gray; }
  img { margin:0; padding:0; border:0; }
  #content { margin:0 auto; padding:0; border:0; }
  table { border:0; height:100%; width:100%; border-collapse:collapse}
  td {         vertical-align: middle; text-align:center; }
  </style>
  </head>
  <body>
    <script language="JavaScript" type="text/JavaScript">
      adjust_popup();
    </script>
    <table>
      <tr>
            <td>
          <div id="content">
              <?php     echo  '<a href="javascript: window.close()"><img src="'
                
htmlspecialchars($imagedata['path']) . '" '
                
$imagedata['geometry']
                . 
'alt="'
                
htmlspecialchars($imagedata['title'])
                . 
'" title="'
                
htmlspecialchars($imagedata['title'])
                . 
":&nbsp;\n"$lang_fullsize_popup['click_to_close']
                . 
'" /></a><br />' ."\n";
               
?>

          </div>
        </td>
      </tr>
    </table>
  </body>
</html>
<?php
}
Title: Re: Pb Titre sur image agrandie
Post by: karice on November 10, 2008, 10:02:19 am
Super !!!

Merci beaucoup ça marche nickel ;)

Fabrice.

www.fhoto.123.fr (http://www.fhoto.123.fr)
Title: Re: Pb Titre sur image agrandie
Post by: François Keller on November 10, 2008, 11:14:01 am
n'oublie pas de passé le post en résolu en cochant le "v" en haut à droite de ton premier message