Subversion Repositories Applications.papyrus

Compare Revisions

Regard whitespace Rev 372 → Rev 373

/trunk/papyrus/applettes/moteur_recherche/moteur_recherche.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: moteur_recherche.php,v 1.5 2005-05-19 12:46:12 jpm Exp $
// CVS : $Id: moteur_recherche.php,v 1.6 2005-05-25 13:49:22 jpm Exp $
/**
* Applette : moteur de recherche
*
38,7 → 38,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.5 $ $Date: 2005-05-19 12:46:12 $
*@version $Revision: 1.6 $ $Date: 2005-05-25 13:49:22 $
// +------------------------------------------------------------------------------------------------------+
*/
 
144,6 → 144,9
$aso_resultats = $moteur->rechercherMotif();
//$GLOBALS['_DEBOGAGE_'] = '<pre>'.print_r($aso_resultats, true).'</pre>';
$retour_resultats .= '<h1>'.MORE_LG_RESULTAT_TITRE.'</h1>'."\n";
if (count($aso_resultats) == 0) {
$retour_resultats .= '<p class="information">'.MORE_LG_RESULTAT_VIDE.'</p>'."\n";
} else {
$retour_resultats .= '<ul id="more_resultat">'."\n";
foreach ($aso_resultats as $val) {
if (!empty($val['url'])) {
181,6 → 184,7
}
}
$retour_resultats .= '</ul>'."\n";
}
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_NAVIGATION'] = '';
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_TETE'] = '';
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] = $retour_resultats;
208,7 → 212,7
$id = 'more_motif';
$aso_attributs = array( 'id'=>$id, 'tabindex' => $tab_index++, 'size' => MORE_FORM_MOTIF_SIZE, 'maxlength' => MORE_FORM_MOTIF_MAXLENGTH,
'onclick' => "javascript: this.value='';");
'accesskey' => MORE_LG_FORM_ACCESSKEY, 'onclick' => "javascript: this.value='';");
$label = '<label for="'.$id.'">'.MORE_LG_FORM_MOTIF.'</label>';
$more_form->addElement('text', $id, $label, $aso_attributs);
237,6 → 241,11
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.5 2005/05/19 12:46:12 jpm
* Correction bogue accesskey.
* Ajout d'un id à la liste.
* Arrondissement des score.
*
* Revision 1.4 2005/04/14 17:39:34 jpm
* Amélioration du moteur de rechercher :
* - pourcentage
/trunk/papyrus/applettes/moteur_recherche/bibliotheque/more_recherche.class.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: more_recherche.class.php,v 1.3 2005-05-19 12:46:12 jpm Exp $
// CVS : $Id: more_recherche.class.php,v 1.4 2005-05-25 13:49:22 jpm Exp $
/**
* Classe permettant d'effectuer des recherches sur les métas informations des menus.
*
34,7 → 34,7
//Autres auteurs :
*@author aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.3 $ $Date: 2005-05-19 12:46:12 $
*@version $Revision: 1.4 $ $Date: 2005-05-25 13:49:22 $
// +------------------------------------------------------------------------------------------------------+
*/
 
117,7 → 117,10
}
}
usort($aso_resultats, 'comparer');
$pds_max = 0;
if (isset($aso_resultats[0]['poids'])) {
$pds_max = $aso_resultats[0]['poids'];
}
for ($i = 0 ; $i < count($aso_resultats) ; $i++) {
$aso_resultats[$i]['score'] = round((100 / $pds_max) * $aso_resultats[$i]['poids'], 1);
}
174,6 → 177,11
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/05/19 12:46:12 jpm
* Correction bogue accesskey.
* Ajout d'un id à la liste.
* Arrondissement des score.
*
* Revision 1.2 2005/04/14 17:39:34 jpm
* Amélioration du moteur de rechercher :
* - pourcentage
/trunk/papyrus/applettes/moteur_recherche/bibliotheque/more_recherche_papyrus_menu.class.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: more_recherche_papyrus_menu.class.php,v 1.3 2005-05-19 12:46:12 jpm Exp $
// CVS : $Id: more_recherche_papyrus_menu.class.php,v 1.4 2005-05-25 13:49:22 jpm Exp $
/**
* Classe permettant d'effectuer des recherches sur les informations des menus de Papyrus.
*
38,7 → 38,7
//Autres auteurs :
*@author aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.3 $ $Date: 2005-05-19 12:46:12 $
*@version $Revision: 1.4 $ $Date: 2005-05-25 13:49:22 $
// +------------------------------------------------------------------------------------------------------+
*/
 
117,7 → 117,7
$aso_resultat['date_creation'] .= '<span class="page_modification_annee"> '.$annee.'</span>'."\n";
}
// Analyse du poids de cette page
// Analyse du poids de cette page vis à vis des méta informations
$tab_champs_a_visiter = array( 'gm_nom', 'gm_titre', 'gm_titre_alternatif', 'gm_mots_cles',
'gm_description_libre', 'gm_description_resume', 'gm_description_table_matieres',
'gm_source', 'gm_auteur', 'gm_contributeur', 'gm_editeur', 'gm_categorie',
127,6 → 127,8
$aso_resultat['poids']++;
}
}
// Analyse du poids de cette page vis à vis du contenu
$nbre_correspondance = preg_match_all('/'.$motif.'/i', $aso_menu_contenu['gmc_contenu'], $tab_morceaux);
$aso_resultat['poids'] = $aso_resultat['poids'] + $nbre_correspondance;
141,6 → 143,11
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/05/19 12:46:12 jpm
* Correction bogue accesskey.
* Ajout d'un id à la liste.
* Arrondissement des score.
*
* Revision 1.2 2005/04/14 17:39:34 jpm
* Amélioration du moteur de rechercher :
* - pourcentage
/trunk/papyrus/applettes/moteur_recherche/langues/more_langue_fr.inc.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: more_langue_fr.inc.php,v 1.2 2005-04-14 17:39:34 jpm Exp $
// CVS : $Id: more_langue_fr.inc.php,v 1.3 2005-05-25 13:49:22 jpm Exp $
/**
* Gestion des langues de l'applette Moteur_Recherche
*
34,7 → 34,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.2 $ $Date: 2005-04-14 17:39:34 $
*@version $Revision: 1.3 $ $Date: 2005-05-25 13:49:22 $
// +------------------------------------------------------------------------------------------------------+
*/
 
49,6 → 49,7
// +------------------------------------------------------------------------------------------------------+
// Le formulaire de sélection du site dont les menus doivent être administrer :
define('MORE_LG_FORM_TITRE', 'Moteur de recherche');
define('MORE_LG_FORM_ACCESSKEY', '4');
define('MORE_LG_FORM_MOTIF', 'Rechercher : ');
define('MORE_LG_FORM_MOTIF_REGLE', 'Une chaine doit être saisie pour pouvoir lancer la recherche !');
define('MORE_LG_FORM_MOTIF_VALUE', 'Rechercher');
67,6 → 68,7
define('MORE_LG_RESULTAT_CADRE_OUVRIR', '(');
define('MORE_LG_RESULTAT_CADRE_FERMER', ')');
define('MORE_LG_RESULTAT_POINT', '.');
define('MORE_LG_RESULTAT_VIDE', 'Aucun résultat pour cette recherche!');
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
76,6 → 78,11
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/04/14 17:39:34 jpm
* Amélioration du moteur de rechercher :
* - pourcentage
* - ajout d'info
*
* Revision 1.1 2004/12/07 10:24:16 jpm
* Moteur de recherche version de départ.
*