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: Image Aléatoire "GET_PHOTO.PHP"  (Read 9865 times)

0 Members and 1 Guest are viewing this topic.

rico-wa

  • Coppermine newbie
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 4
    • Forum auto web-automobile.com
Image Aléatoire "GET_PHOTO.PHP"
« on: November 14, 2011, 11:37:40 am »

Bonjour,

J'ai suivi la méthode d'ajout pour afficher aléatoirement des images sur mon portail

http://forum.web-automobile.com/portal.php

Mais j'aimerais maintenant avoir le fond de la même couleur que mon bloc et aussi espacer les photos

Pouvez vous m'aider
D'avance merci

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Image Aléatoire "GET_PHOTO.PHP"
« Reply #1 on: November 14, 2011, 12:09:00 pm »

quel est le code utilisé ?
Y at'il des fichiers inclus, si oui, merci de nous en donner le code (ceux qui permettent d'afficher ces images)
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

rico-wa

  • Coppermine newbie
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 4
    • Forum auto web-automobile.com
Re: Image Aléatoire "GET_PHOTO.PHP"
« Reply #2 on: November 14, 2011, 12:20:15 pm »

Bonjour MrKeller,

le code utilisé est le suivant (trouvé http://www.think-underground.com/post/2006/03/11/204-afficher-les-images-d-une-galerie-coppermine-sur-un-autre-site)

Code: [Select]
<?php 
// Coppermine Photo Gallery - get_image script
// Based on the RSS feed by Dr. Tarique Sani - http://tariquesani.net/
// Adapted by djib to display a random photo - http://djib.fr
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// -
// Just put into the same directory as your coppermine installation
// 

define('IN_COPPERMINE'true);
define('INDEX_PHP'true);
require(
'include/init.inc.php');

//How many items you want to show in your get_photo script
if(isset($_GET['nb'])) {
     
$thumb_per_page=$_GET['nb'];
} else {
     
$thumb_per_page 4;
}
$thumb_count 4;
$lower_limit 0;

if(isset(
$_GET['album'])){
    
$album $_GET['album'];
}

//If it is a numeric album get the name and set variables
if (is_numeric($album)){
     
$album_name_keyword get_album_name($album);
     
$CURRENT_CAT_NAME $album_name_keyword['title'];
     
$ALBUM_SET "AND aid IN (".(int)$_GET['album'].")".$ALBUM_SET;
     
$album 'random';
}

//If the album is not set set it to lastup - this is the default
if(!isset($album)){
     
$album 'random';
}


//Changes these to point to your site if the following is not giving correct results.
$link_url $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
$image_url $CONFIG['ecards_more_pic_target']."albums/";


$data get_pic_data($album$thumb_count$album_name$lower_limit$thumb_per_page);


foreach(
$data AS $picture) {
    
$thumb_url "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
    
$description '<a href="' $link_url $picture['pid'] . '"><img class="get_photo" src="' $thumb_url '"  alt="Photo aléatoire"/></a>';
    echo 
$description;

}
?>

situé http://forum.web-automobile.com/galerie/get_photo.php

envoyé sur le portail dans un bloc par le biais d'une iframe

merci

ps: y a toujours à remplir les Verifications?

rico-wa

  • Coppermine newbie
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 4
    • Forum auto web-automobile.com
Re: Image Aléatoire "GET_PHOTO.PHP"
« Reply #3 on: November 14, 2011, 01:23:11 pm »

ha oui et voir aussi pour que si l'on clique sur une image de la visioneusse , ça s'ouvre dans une fenetre et non dans l'iframe  :(

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Image Aléatoire "GET_PHOTO.PHP"
« Reply #4 on: November 14, 2011, 04:15:32 pm »

Je viens de voir que votre galerie est toujours sous cpg1.4.27. Cette série (cpg1.4.x) n'est plus supportées. Il faudrait passer à la version cpg 1.5.x...
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

rico-wa

  • Coppermine newbie
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 4
    • Forum auto web-automobile.com
Re: Image Aléatoire "GET_PHOTO.PHP"
« Reply #5 on: November 14, 2011, 04:20:53 pm »

 :o j'étais à cette version mais le bridge pour prosilver phpbb3 ne marchait sur mon forum :-X
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.