Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Lien sur les images  (Read 6843 times)

0 Members and 1 Guest are viewing this topic.

alex14_kiss

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Lien sur les images
« on: October 24, 2005, 06:18:31 pm »

bonsoir j'ai une petite question j'ai chercher dans l'aide mai j'ai pas trouver!
comment faire pour qu'a chaque fois qu'on upload un image dans coppermine il y a le lien du site qui se met automatiquement sur l'image!
comme ceci
Merci d'avance

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fmkaolsen.flirtatious.org%2Falbums%2Fuserpics%2F10001%2F00576.jpg&hash=80129454472eece14d3f8b8b9d816de7431abdf4)
Logged

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Lien sur les images
« Reply #1 on: October 24, 2005, 06:28:03 pm »

Bonjour,

Deux solutions:
  • Soit vous mettez le texte sur l'image avant de la télécharger
  • Soit vous utilisez un Mod "watermarck" (faites une recherche sur le forul concernat les Mods/Hacks)

Mais vous n'aurez pas de lien cliquable vers votre site
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

alex14_kiss

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Lien sur les images
« Reply #2 on: October 24, 2005, 06:34:25 pm »

oui j'ai regarder sa
http://forum.coppermine-gallery.net/index.php?topic=3269.0

mia c'est en anglai et je comprend rien je sait qu'il faut mettre des codes mai le haut ou c'est écrit en anglais je comprend pas  :\'(
Logged

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Lien sur les images
« Reply #3 on: October 24, 2005, 07:00:33 pm »

traduction rapide:

Quote
En premier j'ai fait mon image du filigrane et l'ai téléchargé dans le répertoire principal de ma galerie .  Le fichier a été appelé watermark.png
Ensuite j'ai créé un fichier appelé logo.php et l'ai téléchargé dans le répertoire principal de ma galerie  avec le code suivant:
Code: [Select]
<?
//Most coding by semisphere
//http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=4053&start=0
// A few lines by BY DJ AXION
// e-mail: DJ@the-expansion.com
// Enjoy this script!



######################################################################################################
## Vos parametrages ici
######################################################################################################
                                                                                                                                                                                       
        // watermark IMAGE settings
       
        $watermark_width        = 143;                                        // watermark wanted width
       
        $watermark_height        = 20;                                        // watermark wanted height
       
        /*
        NOTE
       
        If the watermark is resized, transparency may contain lines and spots of your transparency color.
        Try to put the right size from the beginning
       
        */
       
        $opacity                = 90;                                        // 0 completely invisible
       
        $margin_x                = 0.1;                                        // margin from the right in pixels (x axis)
       
        $margin_y                = 0.1;                                        // margin from the bottom in pixels (y axis)
       
        $quality                = 100;                                         // 100 is maximum quality
       
        $watermark_image        = "watermark.png";       
        // Full path to image
       
        $watermark_type                = "PNG";                                 // JPEG or PNG
       
        $transColor                = array(0, 0, 0);                 // transparency color index in rgb
       
######################################################################################################
## Ne rien modifier après cette ligne
## well, if you want to, you won't be busted ;-)
######################################################################################################


       
        // get the file we want to watermark
        $file                        = imagecreatefromjpeg($picturename);

        // get the image details and create an image
        $image_width                = imagesx($file);
        $image_height                = imagesy($file);
        $image                        = $file;








if (!preg_match("/thumb_/i", "$picturename"))
{

                // get the watermark details, and open it
                $watermark_info                = getImageSize($watermark_image);

                eval ("\$watermark = ImageCreateFrom$watermark_type(\$watermark_image);");

                // calculate scale of watermark and create scaled watermark
                $scaled_watermark         = imageCreateTrueColor($watermark_width, $watermark_height);

                // resize the watermark to the new scale
                imageCopyResampled($scaled_watermark, $watermark, 0, 0, 0, 0, $watermark_width, $watermark_height, $watermark_info[0], $watermark_info[1]);

                // set the transparent color ($transColor)
                $transparentColor        = imagecolorallocate ($scaled_watermark, $transColor[0],$transColor[1],$transColor[2]);

                imagecolortransparent($scaled_watermark, $transparentColor);

                // add the watermark to the image
                 ImageCopyMerge($image, $scaled_watermark, $image_width - $watermark_width - ($watermark_width * $margin_x), $image_height - $watermark_height - ($watermark_height * $margin_y), 0, 0, $watermark_info[0], $watermark_info[1], $opacity);


}


       


        // send out a header
        header("content-type:image/jpeg");

        // send the image
        imagejpeg($image,'',$quality);

        // clean up
        imagedestroy($image);

?>
Puis dans include/functions.inc.php trouvez
Code: [Select]
       return $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);et changez en:
Code: [Select]
f ($pic_row['user1']!="YES") {

return $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);


} else {

return 'logo.php?picturename='.$url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']); }
dans la section  config de votre galerie Mettez  "Watermark" dans le champ1 
 
Maintenant  la partie facultative.  Si vous voulez le filigrane  par défaut (c'est seulement  par défaut pour les images que vous téléchargez après que vous fassiez ce changement) allez à 
 
include/picmgmt.inc.php et changez
Code: [Select]
function add_picture($aid, $filepath, $filename, $title = '', $caption = '', $keywords = '', $user1 = '', $user2 = '', $user3 = '', $user4 = '', $category = 0, $raw_ip = '', $hdr_ip = '')par
Code: [Select]
function add_picture($aid, $filepath, $filename, $title = '', $caption = '', $keywords = '', $user1 = 'YES', $user2 = '', $user3 = '', $user4 = '', $category = 0, $raw_ip = '', $hdr_ip = '')Le script cherche le "OUI" dans le champ du filigrane ($user1) donc vous pouvez le mettre à n'importe quoi autre que OUI et le filigrane ne paraîtra pas.

Voilà c'est un peu rapide comme traduction mais j'espère que ca aidera a comprendre le fonctionnement du Mod

Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

alex14_kiss

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Lien sur les images
« Reply #4 on: October 24, 2005, 07:08:10 pm »

ok merci beaucpour je vai essayer j'espaire que je vai m'en sortir  ;)
Logged

alex14_kiss

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Lien sur les images
« Reply #5 on: October 24, 2005, 07:10:02 pm »

 le répertoire principal c'est ou il y a les page php comme 'index.php ... ?
Logged

alex14_kiss

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Lien sur les images
« Reply #6 on: October 24, 2005, 07:35:08 pm »

voila j'ai fait se qu'il fallai faire mai quand je vai sur mon coppermine sa me met


Parse error: parse error, unexpected '{' in /SITES_SATA/www/html/paparazzi117/cpg1.3.5/cpg135/include/functions.inc.php on line 1279
Logged

Pascal YAP

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Lien sur les images
« Reply #7 on: October 24, 2005, 10:14:42 pm »

Bonjour,

voir aussi : http://forum.coppermine-gallery.net/index.php?topic=13402.0

note : fer a tenssion alors thographe et pas d'écris en èSèMèS réplica, c ipèr irritant !
Vos messages sont lus avec des navigateurs internet, pas avec des téléphones portables. M E R C I.

PYAP
Logged

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Lien sur les images
« Reply #8 on: October 25, 2005, 07:35:48 am »

vérifiez le code collé dans le fichier. Il est possible que mon copier collé ait oublié un morceau de code. Il faut le prendre dans le post en anglais pour être sur.
N'oubliez pas de sauvegarder vos fichiers initiaux avant toute modification. Parfois c'est bien utile...
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.