/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.4 2005-05-25 13:49:22 jpm Exp $ |
// CVS : $Id: more_recherche.class.php,v 1.3 2005-05-19 12:46:12 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.4 $ $Date: 2005-05-25 13:49:22 $ |
*@version $Revision: 1.3 $ $Date: 2005-05-19 12:46:12 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
117,10 → 117,7 |
} |
} |
usort($aso_resultats, 'comparer'); |
$pds_max = 0; |
if (isset($aso_resultats[0]['poids'])) { |
$pds_max = $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); |
} |
177,11 → 174,6 |
/* +--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.4 2005-05-25 13:49:22 jpm Exp $ |
// CVS : $Id: more_recherche_papyrus_menu.class.php,v 1.3 2005-05-19 12:46:12 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.4 $ $Date: 2005-05-25 13:49:22 $ |
*@version $Revision: 1.3 $ $Date: 2005-05-19 12:46:12 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
117,21 → 117,19 |
$aso_resultat['date_creation'] .= '<span class="page_modification_annee"> '.$annee.'</span>'."\n"; |
} |
// Analyse du poids de cette page vis à vis des méta informations |
// Analyse du poids de cette page |
$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', |
'gm_public'); |
foreach ($tab_champs_a_visiter as $val) { |
if (stristr($aso_menu_info[$val], $motif)) { |
if (stristr($aso_menu_info[$val] , $motif)) { |
$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; |
if ($aso_resultat['poids'] > 0) { |
$this->setResultat($aso_resultat); |
} |
143,11 → 141,6 |
/* +--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.3 2005-05-25 13:49:22 jpm Exp $ |
// CVS : $Id: more_langue_fr.inc.php,v 1.2 2005-04-14 17:39:34 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.3 $ $Date: 2005-05-25 13:49:22 $ |
*@version $Revision: 1.2 $ $Date: 2005-04-14 17:39:34 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
49,7 → 49,6 |
// +------------------------------------------------------------------------------------------------------+ |
// 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'); |
68,7 → 67,6 |
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 | |
78,11 → 76,6 |
/* +--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. |
* |
/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.6 2005-05-25 13:49:22 jpm Exp $ |
// CVS : $Id: moteur_recherche.php,v 1.5 2005-05-19 12:46:12 jpm Exp $ |
/** |
* Applette : moteur de recherche |
* |
38,7 → 38,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.6 $ $Date: 2005-05-25 13:49:22 $ |
*@version $Revision: 1.5 $ $Date: 2005-05-19 12:46:12 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
144,47 → 144,43 |
$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'])) { |
$retour_resultats .= '<li>'."\n"; |
$retour_resultats .= '<h2><a href="'.$val['url'].'" '; |
if ($val['hreflang'] != '') { |
$retour_resultats .= 'hreflang="'.$val['hreflang'].'" '; |
} |
if ($val['accesskey'] != '') { |
$retour_resultats .= 'accesskey="'.$val['accesskey'].'" '; |
} |
if ($val['title'] != '') { |
$retour_resultats .= 'title="'.$val['title'].'" '; |
} |
$retour_resultats .= '>'.$val['titre'].'</a></h2>'; |
$retour_resultats .= '<dl>'."\n"; |
//if (trim($val['poids']) != '') { |
// $retour_resultats .= '<dt>'.MORE_LG_RESULTAT_POIDS.'</dt>'."\n"; |
// $retour_resultats .= '<dd>'.$val['poids'].'</dd>'."\n"; |
//} |
if (trim($val['score']) != '') { |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_SCORE.'</dt>'."\n"; |
$retour_resultats .= '<dd>'.$val['score'].MORE_LG_RESULTAT_POURCENT.'</dd>'."\n"; |
} |
if (trim($val['date_creation']) != '') { |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_DATE_CREATION.'</dt>'."\n"; |
$retour_resultats .= '<dd>'.$val['date_creation'].'</dd>'."\n"; |
} |
if (trim($val['description']) != '') { |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_DESCRIPTION.'</dt>'."\n"; |
$retour_resultats .= '<dd>'.$val['description'].'</dd>'."\n"; |
} |
$retour_resultats .= '</dl>'."\n"; |
$retour_resultats .= '</li>'."\n"; |
$retour_resultats .= '<ul id="more_resultat">'."\n"; |
foreach ($aso_resultats as $val) { |
if (!empty($val['url'])) { |
$retour_resultats .= '<li>'."\n"; |
$retour_resultats .= '<h2><a href="'.$val['url'].'" '; |
if ($val['hreflang'] != '') { |
$retour_resultats .= 'hreflang="'.$val['hreflang'].'" '; |
} |
if ($val['accesskey'] != '') { |
$retour_resultats .= 'accesskey="'.$val['accesskey'].'" '; |
} |
if ($val['title'] != '') { |
$retour_resultats .= 'title="'.$val['title'].'" '; |
} |
$retour_resultats .= '>'.$val['titre'].'</a></h2>'; |
$retour_resultats .= '<dl>'."\n"; |
//if (trim($val['poids']) != '') { |
// $retour_resultats .= '<dt>'.MORE_LG_RESULTAT_POIDS.'</dt>'."\n"; |
// $retour_resultats .= '<dd>'.$val['poids'].'</dd>'."\n"; |
//} |
if (trim($val['score']) != '') { |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_SCORE.'</dt>'."\n"; |
$retour_resultats .= '<dd>'.$val['score'].MORE_LG_RESULTAT_POURCENT.'</dd>'."\n"; |
} |
if (trim($val['date_creation']) != '') { |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_DATE_CREATION.'</dt>'."\n"; |
$retour_resultats .= '<dd>'.$val['date_creation'].'</dd>'."\n"; |
} |
if (trim($val['description']) != '') { |
$retour_resultats .= '<dt>'.MORE_LG_RESULTAT_DESCRIPTION.'</dt>'."\n"; |
$retour_resultats .= '<dd>'.$val['description'].'</dd>'."\n"; |
} |
$retour_resultats .= '</dl>'."\n"; |
$retour_resultats .= '</li>'."\n"; |
} |
$retour_resultats .= '</ul>'."\n"; |
} |
$retour_resultats .= '</ul>'."\n"; |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_NAVIGATION'] = ''; |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_TETE'] = ''; |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] = $retour_resultats; |
212,7 → 208,7 |
$id = 'more_motif'; |
$aso_attributs = array( 'id'=>$id, 'tabindex' => $tab_index++, 'size' => MORE_FORM_MOTIF_SIZE, 'maxlength' => MORE_FORM_MOTIF_MAXLENGTH, |
'accesskey' => MORE_LG_FORM_ACCESSKEY, 'onclick' => "javascript: this.value='';"); |
'onclick' => "javascript: this.value='';"); |
$label = '<label for="'.$id.'">'.MORE_LG_FORM_MOTIF.'</label>'; |
$more_form->addElement('text', $id, $label, $aso_attributs); |
241,11 → 237,6 |
/* +--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 |