// Résultats vers la table, et affichage de la liste de mots clefs
echo "<tr><td class=\"keylink\"><p align=justify>" ;
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.3.1 //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2004 Gregory DEMAR <gdemar@wanadoo.fr> //
// http://www.chezgreg.net/coppermine/ //
// ------------------------------------------------------------------------- //
// 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. //
// ------------------------------------------------------------------------- //
//***************************************************************************//
//* Touched by PYAP on November 2004 . . . *//
//* this Mod/Hack on SEARCH.PHP, it's a fine Google pump ! *//
//* EXEMPLE : http://expo.pays-dignois.com.search.php for exemple *//
//***************************************************************************//
//* Si vous rencontrez un problème avec Coppermine, *//
//* n'hésitez pas à visiter le Forum COPPERMINE EN FRANCAIS ci-dessous *//
//* http://forum.coppermine-gallery.net/index.php?board=38.0 *//
//* MERCI *//
//***************************************************************************//
define('IN_COPPERMINE', true);
define('SEARCH_PHP', true);
require('include/init.inc.php');
pageheader($lang_search_php[0]);
starttable("500", "<center>$lang_search_php[0]</center>");
echo <<< EOT
<tr><td> </td></tr>
<tr>
<form method="get" action="thumbnails.php">
<input type="hidden" name="album" value="search">
<input type="hidden" name="type" value="full">
<td class="tableb" align="center" height="60">
<input type="input" style="width: 90%" name="search" maxlength="255" value="" class="textinput">
</td>
</tr>
<tr>
<td colspan="8" align="center" class="tablef">
<input type="submit" value="{$lang_search_php[0]}" class="button">
</td>
</form>
</tr>
EOT;
endtable();
echo "<br>";
// Select all keywords
starttable("500", "<center>Notre liste de liens, par Mot-Clef de A-Z à a-z</center><br>", 1,"");
$result = mysql_query("select keywords from {$CONFIG['TABLE_PICTURES']}");
if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap']);
// Find unique keywords
$keywords_array = array();
while (list($keywords) = mysql_fetch_row($result)) {
$array = explode(" ",$keywords);
foreach($array as $word)
{
if (!in_array($word,$keywords_array)) $keywords_array[] = $word;
}
}
sort($keywords_array);
$count = count($keywords_array);
//echo "<br>";
echo "$count Mots-Clef dans notre base de données";
// Result to table
echo "<tr><td class=\"keylink\"><p align=justify>" ;
for ($i = 0; $i < $count; $i++) {
echo "<a href=\"thumbnails.php?album=search&search=$keywords_array[$i] \" >$keywords_array[$i]</a> " ;
}
echo "</p></td></tr>" ;
endtable();
pagefooter();
ob_end_flush();
?>
..il va falloir que je mette en place sur mon site dès que j'en aurais le tempsIl n'y a pas beaucoup de boulot avant de voir le résultat, juste un Copier/coller du code ci-dessus, c'est tout !
Il n'y a pas beaucoup de boulot avant de voir le résultat, juste un Copier/coller du code ci-dessus, c'est tout !
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /data/members/free/multimania/fr/p/h/o/photosfrantz/htdocs/search.php on line 59???
Quelle version de Coppermine utilise-tu ?
Désolé pour le désagrément !
je ne comprends pas le soucis dont tu es victime
Quoteje ne comprends pas le soucis dont tu es victime
Moi non plus ??? d'autant plus que si je fais une requete sql sur ma base, ça marche (select 'keywords' from ....)
Mais je ne connais pas grand chose au PhP :-\\
En attendant d'avoir trouvé une solution je ne mettrais pas cette possibilité sur mon module de recherche.
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.3.1 //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2004 Gregory DEMAR <gdemar@wanadoo.fr> //
// http://www.chezgreg.net/coppermine/ //
// ------------------------------------------------------------------------- //
// 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. //
// ------------------------------------------------------------------------- //
//***************************************************************************//
//* Touched by PYAP on November 2004 . . . *//
//* this Mod/Hack on SEARCH.PHP, it's a fine Google pump ! *//
//* EXEMPLE : http://expo.pays-dignois.com.search.php for exemple *//
//***************************************************************************//
//* Si vous rencontrez un problème avec Coppermine, *//
//* n'hésitez pas à visiter le Forum COPPERMINE EN FRANCAIS ci-dessous *//
//* http://forum.coppermine-gallery.net/index.php?board=38.0 *//
//* MERCI *//
//***************************************************************************//
define('IN_COPPERMINE', true);
define('SEARCH_PHP', true);
require('include/init.inc.php');
pageheader($lang_search_php[0]);
// Déclaration de la FORM search
starttable("500", "<center>$lang_search_php[0]</center>");
echo <<< EOT
<tr><td> </td></tr>
<tr>
<form method="get" action="thumbnails.php">
<input type="hidden" name="album" value="search">
<input type="hidden" name="type" value="full">
<td class="tableb" align="center" height="60">
<input type="input" style="width: 90%" name="search" maxlength="255" value="" class="textinput">
</td>
</tr>
<tr>
<td colspan="8" align="center" class="tablef">
<input type="submit" value="{$lang_search_php[0]}" class="button">
</td>
</form>
</tr>
EOT;endtable();
echo "<br>";
// Selection de tous les keywords
// et Déclaration de la Table affichant la liste de mots clefs
starttable("500", "<center>Notre liste de mots en base de données Coppermine</center><br>", 1,"");
$result = mysql_query("select keywords from {$CONFIG['TABLE_PICTURES']}");
if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap']);
// Find unique keywords
$keywords_array = array();
while (list($keywords) = mysql_fetch_row($result)) {
$array = explode(" ",$keywords);
foreach($array as $word)
{
if (!in_array($word,$keywords_array)) $keywords_array[] = $word;
}
}
sort($keywords_array);
$count = count($keywords_array);
// echo "<br>";
// echo "$count Mots-Clef dans notre base de données"; // Supprimez les commentaires pour afficher le nombre de mots-clefs
// Résultats vers la table, et affichage de la liste de mots clefs
echo "<tr><td class=\"keylink\">; //<p align=justify>" ;
for ($i = 0; $i < $count; $i++) {
echo "<a href=\"thumbnails.php?album=search&search=$keywords_array[$i] \" >$keywords_array[$i]</a> " ;
}
echo "</p></td></tr>" ;
endtable();
pagefooter();
ob_end_flush();
?>
moi aussi je viens juste de faire le test même erreur Huhca me rassure ;)
Pourquoi n'ai-je aucun message d'erreur avec mon code pas propre !
Par contre ce que je constate c'est que nous sommes bien matinaux tous les deux pour un dimanche !!
- 2ème, peut t'on changer la couleur des mots clés ?
-sommes nous limités dans le nombre de mots clés ?No limit......
Pour le nombre de mots clés, en utilisation pro ça peut aller très loin pour un bon référencement.
On peut re-uploader un fichier search.php qui fonctionne ?Celui de Chtito en pièces jointes sur la première page de ce sujet fonctionne très bien chez moi.
Bonjour,QuoteOn peut re-uploader un fichier search.php qui fonctionne ?Celui de Chtito en pièces jointes sur la première page de ce sujet fonctionne très bien chez moi.
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.3.1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2004 Gregory DEMAR <gdemar@wanadoo.fr>Â Â Â Â Â Â Â Â Â //
// http://www.chezgreg.net/coppermine/Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â //
// ------------------------------------------------------------------------- //
// 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.                    //
// ------------------------------------------------------------------------- //
//***************************************************************************//
//* Touched by PYAP on November 2004 . . .                 *//
//* this Mod/Hack on SEARCH.PHP, it's a fine Google pump !         *//
//* EXEMPLE : http://expo.pays-dignois.com.search.php for exemple      *//
//***************************************************************************//
//*     Si vous rencontrez un problème avec Coppermine,        *//
//*  n'hÃ(c)sitez pas à visiter le Forum COPPERMINE EN FRANCAIS ci-dessous  *//
//*Â Â Â http://forum.coppermine-gallery.net/index.php?board=38.0Â Â Â Â *//
//*Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â MERCIÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â *//
//***************************************************************************//
define('IN_COPPERMINE', true);
define('SEARCH_PHP', true);
require('include/init.inc.php');
pageheader($lang_search_php[0]);
starttable("500", "<center>$lang_search_php[0]</center>");
echo <<< EOT
    <tr><td> </td></tr>
    <tr>
        <form method="get" action="thumbnails.php">
        <input type="hidden" name="album" value="search">
        <input type="hidden" name="type" value="full">
    <td class="tableb" align="center" height="60">
        <input type="input" style="width: 90%" name="search" maxlength="255" value="" class="textinput">
        </td>
    </tr>
    <tr>
        <td colspan="8" align="center" class="tablef">
            <input type="submit" value="{$lang_search_php[0]}" class="button">
        </td>
        </form>
    </tr>
EOT;
endtable();
echo "<br>";
// Select all keywords
starttable("500", "<center>Notre liste de liens, par Mot-Clef de A-Z Ã a-z</center><br>", 1,"");
$result = mysql_query("select keywords from {$CONFIG['TABLE_PICTURES']}");
if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap']);
// Find unique keywords
$keywords_array = array();
while (list($keywords) = mysql_fetch_row($result)) {
$array = explode(" ",$keywords);
foreach($array as $word)
{
if (!in_array($word,$keywords_array)) $keywords_array[] = $word;
}
}
sort($keywords_array);
$count = count($keywords_array);
//echo "<br>";
echo "$count Mots-Clef dans notre base de donnÃ(c)es";
// Result to table
echo "<tr><td class=\"keylink\"><p align=justify>" ;
for ($i = 0; $i < $count; $i++) {
echo "<a href=\"thumbnails.php?album=search&search=$keywords_array[$i] \" >$keywords_array[$i]</a> " ;
}
echo "</p></td></tr>" ;
endtable();
pagefooter();
ob_end_flush();
?>
essaye d'enlever tous les carractères  qui n'ont rien à faire ici
Voila, c'est fait, et ça marche nickel !!!!
Pour voir ce que donnent +1000 mots les uns à coté des autres :
C'est effectivement peu lisible.Surtout si on a une connection bas-débit ! mon search.php affiché pèse 146ko actuellement ! C'est beaucoup ;)
Pour les sites avec beaucoup d'images il est peut être judicieux de ne mettre que quelques mots clé par photos en essayant de trouver des mots qui rassemblent plusieurs photos dans une même catégorie.La galerie de l'exemple propose 719 photos et est dotée de 1076 mots-clefs... ça fait donc 1,496 mot clef par photo ! Je suis donc en-deça de ta proposition ;)
// Select all keywords
starttable("500", "<center>Notre liste de liens, par Mot-Clef de A-Z à a-z</center><br>", 1,"");
$result = mysql_query("select keywords from {$CONFIG['TABLE_PICTURES']}");
if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap']);
// Find unique keywords
$keywords_array = array();
while (list($keywords) = mysql_fetch_row($result)) {
$array = explode(" ",$keywords);
foreach($array as $word)
{
if (!in_array($word,$keywords_array)) $keywords_array[] = $word;
}
}
sort($keywords_array);
$count = count($keywords_array);
//echo "<br>";
echo "$count Mots-Clef dans notre base de données";
// Result to table
echo "<tr><td class=\"keylink\"><p align=justify>" ;
for ($i = 0; $i < $count; $i++) {
echo "<a href=\"thumbnails.php?album=search&search=$keywords_array[$i] \" >$keywords_array[$i]</a> " ;
}
echo "</p></td></tr>" ;
endtable();
<tr><td> </td></tr>
Cette ligne génère chez moi un espace blanc (normal) mais cette ligne sert-elle à quelque chose ?