Ça marche !! Merci beaucoup !!

It Works ! Thanx a lot !!

Ok je test et je te dis !

EDIT
Tout d'abord : après avoir essayé d'envoyer une image avec le script PBB FTP Gallery, j'avais eu une erreur. Mais visiblement, l'image est tout de même arrivé sur le ftp, mais pas sur le bon : sur le ftp d' UPVPHOTO et non pas sur le ftp d' UPVDATA. C'est peut-être une erreur de ma part dans la configuration.

Ensuite, je viens de transférer le "gallery.php" du script Pbb Gallery, et j'ai toujours la même erreur lorsque je le lance :  "Error: DB gallery."

Quand je suit le lien que tu m'as donné pour poster une image, tout marche pour le mieux. La page pour entrer la description, le titre, et chercher le fichier s'affiche bien; lorsque le fichier est envoyé le forum me redirige vers "gallery.php", et là erreur de nouveau.

Voici le contenu de mon "gallery.php", je ne l'ai pas modifié, voulant voir les options par défaut du mod.

<?php

define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';

// Load the gallery.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/gallery.php';

if ($pun_user['g_read_board'] == '0')
    message($lang_common['No view']);

//Hide Gallery from Guest
//if ($pun_user['is_guest'])
//   message($lang_common['No permission']);
    
$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_gallery['Page Title'];

define('PUN_ALLOW_INDEX', 1);

require PUN_ROOT.'header.php';

/***********************************************************************/
/* Configuration                                                       */
$rep_upload = 'img/gallery/'; // Upload rep
$max_size = '1572864';        // Max size of picture in octet 1024 octet = 1kB
$largeur_max = '150';         // Max width of thumb
$hauteur_max = '150';         // Max height of thumb
$prefixe = 'mini_';           // prefixe of thumb

$hide_smilies = 0;                   // 1 = hide smilies, 0 = show smilies
$nb_img = '4';                // number of picture by ligne
$nb_ligne = '5';              // number of ligne by page
/***********************************************************************/

if (isset($_GET['info']))
  $info = $_GET['info'];
else
  $info = 'none';

if (isset($_GET['option']))
  $option = $_GET['option'];
else
  $option = 'none';
  

/***********************************************************************
Gallery : Add an image
************************************************************************/
if ($info == 'new')
{

  if ($pun_user['is_guest'])
  {
      message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error Guest']);
  }
  else
  {

    if (isset($_POST['form_sent']))
    {

      if ($_POST['titre'] != '')
        $titre = $_POST['titre'];
      else
          message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error Title']);
      
      if ($_POST['description'] != '')
        $description = $_POST['description'];
      else
          message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error Description']);

       $uploaded_file = $_FILES['req_file'];
  
          // Make sure the upload went smooth
          if (isset($uploaded_file['error']))
          {
              switch ($uploaded_file['error'])
              {
                  case 1:    // UPLOAD_ERR_INI_SIZE
                      message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error Too large ini']);
                      break;
                  case 2:    // UPLOAD_ERR_FORM_SIZE
                      message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error Too large']);
                      break;
  
                  case 3:    // UPLOAD_ERR_PARTIAL
                      message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error Partial upload']);
                      break;
  
                  case 4:    // UPLOAD_ERR_NO_FILE
                      message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error No file']);
                      break;
  
                  case 6:    // UPLOAD_ERR_NO_TMP_DIR
                      message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error No tmp directory']);
                      break;
  
                  default:
                      // No error occured, but was something actually uploaded?
                      if ($uploaded_file['size'] == 0)
                          message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error No file']);
                      break;
              }
          }

          if (is_uploaded_file($uploaded_file['tmp_name']))
          {

        $id = time();

              $allowed_types = array('image/gif', 'image/jpeg', 'image/pjpeg');
              if (!in_array($uploaded_file['type'], $allowed_types))
                  message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error No file']);
  
              // Determine type
              $extensions = null;
              if ($uploaded_file['type'] == 'image/gif')
                  $extensions = array('.gif', '.jpg');
              else if ($uploaded_file['type'] == 'image/jpeg' || $uploaded_file['type'] == 'image/pjpeg')
                  $extensions = array('.jpg', '.gif');
  
              // Move the file to the gallery directory.
              if (!@move_uploaded_file($uploaded_file['tmp_name'], $rep_upload.$id.$extensions[0]))
                  message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error Move failed'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.');
  
        $size = getimagesize($rep_upload.$id.$extensions[0]);

        $largeur_src=$size[0];
        $hauteur_src=$size[1];

        if($extensions[0] == '.gif'){
              $image_src=imagecreatefromgif($rep_upload.$id.$extensions[0]);
         }

        if($extensions[0] == '.jpg'){
              $image_src=imagecreatefromjpeg($rep_upload.$id.$extensions[0]);
         }

        // on verifie que l'image source ne soit pas plus petite que l'image de destination
         if ($largeur_src>$largeur_max OR $hauteur_src>$hauteur_max)
         {
           // si la largeur est plus grande que la hauteur
           if ($hauteur_src<=$largeur_src)
              $ratio=$largeur_max/$largeur_src;
           else
              $ratio=$hauteur_max/$hauteur_src;
         }
         else
         {
            $ratio=1;  // l'image créee sera identique à l'originale
         } 

         $image_dest=imagecreatetruecolor(round($largeur_src*$ratio), round($hauteur_src*$ratio));
         imagecopyresized($image_dest,$image_src,0,0,0,0,round($largeur_src*$ratio),round($hauteur_src*$ratio),$largeur_src,$hauteur_src);
  
         imagejpeg($image_dest, $rep_upload.$prefixe.$id.$extensions[0]);

         if (!file_exists($rep_upload.$prefixe.$id.$extensions[0]))
                      message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_gallery['Error Move failed']);

          }
          else
              message('<strong>'.$lang_gallery['Error Annonce'].'</strong> '.$lang_profile['Error Unknown failure']);

        // Ajoute la référence de l'image dans la database
    $db->query('INSERT INTO pun_gallery (titre, user_id, description, date_ajout, ext) VALUES(\''.$db->escape($titre).'\', \''.$pun_user['id'].'\', \''.$db->escape($description).'\', \''.$id.'\', \''.$extensions[0].'\')') or error('Error DB gallery', __FILE__, __LINE__, $db->error());

        redirect($PHP_SELF, $lang_gallery['Upload Ok']);

    }

$lang_gallery['Image Use'] = str_replace('<MAX_SIZE>', ceil($max_size / 1024).' KB', $lang_gallery['Image Use']);

?>

<strong><?php echo $lang_gallery['Navigation']; ?></strong> <a href="<?php echo $PHP_SELF; ?>"><?php echo $lang_gallery['Page Title']; ?></a> / <?php echo $lang_gallery['Page Desc Up']; ?><br /><br />

     <div class="blockform">
        <h2><span><?php echo $lang_gallery['Post Title']; ?></span></h2>
        <div class="box">
          <form id="upload_image" method="post" enctype="multipart/form-data" action="<?php echo $PHP_SELF; ?>?info=new">
        <div class="inform">
                    <fieldset>
                        <legend><?php echo $lang_gallery['Image Info']; ?></legend>
                        <div class="infldset">
                            <input type="hidden" name="form_sent" value="1" />
              <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_size; ?>" />
                            <label><?php echo $lang_gallery['Image Use']; ?><br /></label>
                            <label><?php echo $lang_gallery['Image Regle']; ?><br /></label>
                            <label><strong><?php echo $lang_gallery['Title Form']; ?></strong><br /><input type="text" name="titre" size="50" maxlength="40" /><br /></label>
                            <label><strong><?php echo $lang_gallery['Desc Form']; ?></strong><br /><i><?php echo $lang_gallery['Image Desc']; ?></i><br /><textarea name="description" rows="5" cols="95"></textarea><br /></label>
              <label><strong><?php echo $lang_gallery['Img Form']; ?></strong><br /><input name="req_file" type="file" size="40"/><br /></label>
                        </div>
                    </fieldset>
                </div>
                <p><input type="submit" name="upload" value="<?php echo $lang_gallery['Button Up']; ?>" /><br /></p>
            </form>
        </div>
    </div>
<?php
  }
}

/***********************************************************************
Gallery : View
************************************************************************/
if ($info == 'none' && $option == 'none' || $info == 'modo' && $option == 'none')
{
if ($pun_user['g_id'] == PUN_ADMIN)
  $lien_modo = ' - <a href="'.$PHP_SELF.'?info=modo">'.$lang_gallery['Moderation'].'</a>';
else
  $lien_modo = '';

?>

<script type="text/javascript"> 
function LiveScroll(id_div) {
    if (id_div != '') action_div(id_div);
}
</script>

<strong><?php echo $lang_gallery['Navigation']; ?></strong> <a href="<?php echo $PHP_SELF; ?>"><?php echo $lang_gallery['Page Title']; ?></a> / <?php echo $lang_gallery['Page Desc Gal']; ?> - <a href="<?php echo $PHP_SELF.'?info=new'; ?>"><?php echo $lang_gallery['Add Picture'] ?></a><?php echo $lien_modo; ?><br /><br />
<?php

require PUN_ROOT.'include/parser.php';

$nb_images = $nb_ligne*$nb_img;

// Fetch user count
$result = $db->query('SELECT COUNT(id) FROM pun_gallery') or error('Unable to fetch gallery list count', __FILE__, __LINE__, $db->error());
$num_image = $db->result($result);

// Determine the user offset (based on $_GET['p'])
$num_pages = ceil($num_image / $nb_images);

$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p'];
$start_from = $nb_images * ($p - 1);

// Generate paging links
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, $PHP_SELF.'?list=page');

$i = 0;
$j = 0;

?>

<div class="linkst">
    <div class="inbox">
        <p class="pagelink"><?php echo $paging_links ?></p>
    </div>
</div>

<table border="0" cellspacing="10" cellpadding="0" align="center" width="80%">

<?php
$gal_result = $db->query('SELECT gal.*, user.username AS username FROM pun_gallery AS gal, pun_users AS user WHERE gal.user_id = user.id ORDER BY gal.date_ajout DESC LIMIT '.$start_from.', '.$nb_images.'') or error('DB gallery', __FILE__, __LINE__, $db->error());

    while ($gal = $db->fetch_assoc($gal_result))
    {

if ($pun_user['g_id'] == PUN_ADMIN && $info == 'modo')
  $supp_modo = '<br /><br /><a href="'.$PHP_SELF.'?info=modo&option=del&id='.$gal['id'].'">'.$lang_gallery['Modo_del'].'</a>';
else
  $supp_modo = '';

$i++;
$j++;

if ($i == 1)
  echo '  <tr>'."\n";
?>

      <td bgColor="#F5F5F5" style="border:1px solid #666;background-image: url(<?php echo $rep_upload; ?><?php echo $prefixe.$gal['date_ajout'].$gal['ext']; ?>);background-repeat: no-repeat;background-position: center center;" width="<?php echo $largeur_max; ?>px" height="<?php echo $hauteur_max; ?>px" align="center" valign="middle">

        <div align="left" id="id_<?php echo $gal['id']; ?>"  style="DISPLAY: none; float: left; POSITION: absolute; width:260px; margin: 140px -57px; padding: 2px; background: #FFF;border: 1px solid #000;">
        <strong><?php echo $lang_gallery['Title Form']; ?></strong> <?php echo $gal['titre']; ?><br />
        <strong><?php echo $lang_gallery['Add Time']; ?></strong> <?php echo format_time($gal['date_ajout']); ?><br />
        <strong><?php echo $lang_gallery['Add By']; ?></strong> <?php echo $gal['username'] ?><br /><br />
        <strong><?php echo $lang_gallery['Desc Form']; ?></strong> <?php echo parse_message($gal['description'], 0); ?><br />
        </div>
        
<a onMouseOver="LiveScroll('id_<?php echo $gal['id'] ?>')" onMouseOut="LiveScroll('id_<?php echo $gal['id'] ?>')" target="_blank" href="<?php echo $rep_upload; ?><?php echo $gal['date_ajout'].$gal['ext']; ?>">
<img src="<?php echo $rep_upload; ?>pix.gif" width="<?php echo $largeur_max; ?>px" height="<?php echo $hauteur_max; ?>px" border="0">
</a>
<?php echo $supp_modo; ?>

      </td>
<?php
if ($i == $nb_img)
  { echo '  </tr>'."\n"; $i = 0; }

    }

if ($j < $nb_img)
  { echo '  <td style="border:none;"> </td></tr>'."\n"; }

?>
</table>
<div class="linkst">
    <div class="inbox">
        <p class="pagelink"><?php echo $paging_links ?></p>
    </div>
</div>
<br /><br /><br />
<?php
}

/***********************************************************************
Gallery : Modo del
************************************************************************/
if ($info == 'modo' && $option == 'del')
{

if (isset($_GET['id']))
  $id = $_GET['id'];
else
  $id = 'none';

  if ($id != 'none' && $pun_user['g_id'] == PUN_ADMIN)
  {
    $gal_result = $db->query('SELECT * FROM pun_gallery WHERE id = '.$id.' LIMIT 1') or error('DB del gallery', __FILE__, __LINE__, $db->error());
    
        $gal = $db->fetch_assoc($gal_result);
    
                // Delete apicture
                @unlink($rep_upload.$prefixe.$gal['date_ajout'].$gal['ext']);
                @unlink($rep_upload.$gal['date_ajout'].$gal['ext']);
    
    $gal_del = $db->query('DELETE FROM pun_gallery WHERE id = '.$id.' LIMIT 1') or error('DB del gallery', __FILE__, __LINE__, $db->error());

        redirect($PHP_SELF.'?info=modo', $lang_gallery['Del Ok']);

  }
  else
  {
        redirect($PHP_SELF.'?info=modo', $lang_gallery['Error Del']);
  
  }

}

require PUN_ROOT.'footer.php';

?>

Merci pour ton aide !

[RE EDIT]
En effet, Free ne supporte pas le Ftp.
Mais j'ai toujours le pb de database...

J'ai bien la table pun_gallery.

Quand je poste une image, ça me donne ça :

Fatal error: Call to undefined function: ftp_connect() in /var/www/free.fr/6/2/upvphoto/forum/gallery.php on line 170

Ben, j'ai fait une copie du forum sur lequel je veux l'installer ici.
Je sais bien que c'est laconique comme explication, mais le message d'erreur l'est tout autant smile

Bon, je viens de tester ta Pbb FTP gallery, mais comme c'est sensiblement la même chose (et donc le même problème sad ) je reposte ici.
J'ai bien tout envoyé sur le ftp, j'ai configuré les premières lignes du fichier gallery.php, j'ai bien executé le fichier txt dans phpmyadmin, mais toujours ce "DB_error".
Visiblement il n'arrive pas à se connecter à la bdd. Un problème de préfixe peut-être ? Personnellement je n'en utilise pas.
Précision : je suis sur Free. Mais ça ne devrait pas poser problème, vu la démo...

Translate :
I've tested Pbb FTP Gallery and Pbb Gallery, they're quite similar, so I keep posting my problem here.
I sent everything i had to send to the FTP, I modified the first line of gallery.php, I created the new table in the database with the .txt file, but i still get this "DB error".
It doesn't seems to connect to the Sql databas. Perhaps a prefix problem ? I don' use any.

Ouaip. Mais, il me dit que ça ne marche pas.
En même temps, ne t'embêtes pas, je vais plutôt essayer ton autre mod : PunBB FTP Gallery, qui m'intéresse plus !
Merci !

Je l'ai essayé en local, mais j'ai une erreur :

Error: DB gallery.

Une idée de ce que c'est ? Je pense avoir tout fait correctement...

I've tryed it on my computer but i get an error :

Error: DB gallery.

Any idea of what it is ? I think i've done all good...

http://img248.echo.cx/img248/9710/pq2lr.png

The "p" doesn't have its "bar" (I don't know how to say that in english)

109

(1,382 replies, posted in General discussion)

Disi'z la Peste
(well, it's a french "singer".)

When you make a post in italic, with a "p" or a "q" at the beginning of the line, it is cut :

p
p
q
q

Does anybody know how to change that ?

Tanks !

Sorry if the problem has already been solved !

There is a french guy who coded something like that.
Go to to PunBB.fr to see the code,
and to CtrlAltSuppr.com to view the demo.

112

(4 replies, posted in General discussion)

There is Mod called Calendar 2.0by Gizzmo
Perhaps it is what you are searching for...

113

(40 replies, posted in Archive)

Bonjour à tous, je viens d'avoir le même problème.
Et il se trouve que je l'ai résolue d'une façon assez simple :
sous free, le nom de la base de donnée correspond au login de free.
C'est à dire que si ton site est apupv.free.fr alors le nom de la base de donnée sera apupv
jusque là pas de problème.
Mais si votre site est canard.wc.free.fr alors le nom de votre base de donnée sera canard_wc
Il suffit donc de changer les . en _
C'est con mais faut pas l'oublier !



PS : désolé si la réponse a déjà été donnée, mais j'ai parcouru le topic assez rapidement. Et mieux vaut deux fois qu'une !

114

(5 replies, posted in Archive)

Nickel ça marche... et en plus j'ai compris !
Merci beaucoup pour ton aide !

115

(5 replies, posted in Archive)

Après avoir remplacé mon sale code par le tien, j'ai le texte alternatif "Logo" qui vient s'affiché à côté de l'image...
Je l'ai donc supprimé du code, mais juste pour savoir, pourquoi ça me fait ça ?

Merci !

116

(5 replies, posted in Archive)

Je crois avoir trouvé mon problème : j'avais mis un petit .mov dans le header, et depuis que je l'ai enlevé, plus de problème !

Ensuite, pourquoi cette ligne de code te fait hurler ? C'est si affreux que ça ?
Est-elle responsable des alertes que certains de mes utilisateurs reçoivent avec IExplorer (alerte du type : "Impossible de charger Logo.png" alors que le logo est bien là)?

Merci beaucoup !

117

(5 replies, posted in Archive)

Bonjour,
je suis en train de mettre un forum pun-bb en place ( http://apupv.free.fr ) et j'ai des petits problèmes depuis quelques minutes.
Lorsque je reste quelque temps sur le forum, allant ici et là, la fenêtre se ferme toute seule sans rien me demander et sans raison apparente. Naviguant sous Firefox 1.0, je me pose quelques questions...
Je tente alors sous I.Explorer, et là, plus de problème (le monde à l'envers quoi...)
Je test alors d'autre forum pun-bb avec mon renard flamboyant ( http://www.ctrlaltsuppr.com/ , ce forum...), et là je n'ai aucun problème...

Je dois vous avouer que je reste un peu perplexe devant mon écran....
Alors si vous avez une idée, et si vous pouviez tester mon forum, ça serait sympa !

Merci beaucoup !