Line 19... |
Line 19... |
19 |
// | |
|
19 |
// | |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
24 |
// CVS : $Id: more_recherche_papyrus_menu.class.php,v 1.3 2005-05-19 12:46:12 jpm Exp $
|
24 |
// CVS : $Id: more_recherche_papyrus_menu.class.php,v 1.4 2005-05-25 13:49:22 jpm Exp $
|
25 |
/**
|
25 |
/**
|
26 |
* Classe permettant d'effectuer des recherches sur les informations des menus de Papyrus.
|
26 |
* Classe permettant d'effectuer des recherches sur les informations des menus de Papyrus.
|
27 |
*
|
27 |
*
|
28 |
* Permet de rechercher et classer les menus en fonction d'une chaine.
|
28 |
* Permet de rechercher et classer les menus en fonction d'une chaine.
|
29 |
* Utilisation des bibliothèques inclue par Papyrus :
|
29 |
* Utilisation des bibliothèques inclue par Papyrus :
|
Line 36... |
Line 36... |
36 |
//Auteur original :
|
36 |
//Auteur original :
|
37 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
37 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
38 |
//Autres auteurs :
|
38 |
//Autres auteurs :
|
39 |
*@author aucun
|
39 |
*@author aucun
|
40 |
*@copyright Tela-Botanica 2000-2004
|
40 |
*@copyright Tela-Botanica 2000-2004
|
41 |
*@version $Revision: 1.3 $ $Date: 2005-05-19 12:46:12 $
|
41 |
*@version $Revision: 1.4 $ $Date: 2005-05-25 13:49:22 $
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
43 |
*/
|
43 |
*/
|
Line 44... |
Line 44... |
44 |
|
44 |
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
Line 115... |
Line 115... |
115 |
}
|
115 |
}
|
116 |
if (($annee = date('Y', strtotime($aso_menu_info['gm_date_creation'] )) ) != 0 ) {
|
116 |
if (($annee = date('Y', strtotime($aso_menu_info['gm_date_creation'] )) ) != 0 ) {
|
117 |
$aso_resultat['date_creation'] .= '<span class="page_modification_annee"> '.$annee.'</span>'."\n";
|
117 |
$aso_resultat['date_creation'] .= '<span class="page_modification_annee"> '.$annee.'</span>'."\n";
|
118 |
}
|
118 |
}
|
Line 119... |
Line 119... |
119 |
|
119 |
|
120 |
// Analyse du poids de cette page
|
120 |
// Analyse du poids de cette page vis à vis des méta informations
|
121 |
$tab_champs_a_visiter = array( 'gm_nom', 'gm_titre', 'gm_titre_alternatif', 'gm_mots_cles',
|
121 |
$tab_champs_a_visiter = array( 'gm_nom', 'gm_titre', 'gm_titre_alternatif', 'gm_mots_cles',
|
122 |
'gm_description_libre', 'gm_description_resume', 'gm_description_table_matieres',
|
122 |
'gm_description_libre', 'gm_description_resume', 'gm_description_table_matieres',
|
123 |
'gm_source', 'gm_auteur', 'gm_contributeur', 'gm_editeur', 'gm_categorie',
|
123 |
'gm_source', 'gm_auteur', 'gm_contributeur', 'gm_editeur', 'gm_categorie',
|
124 |
'gm_public');
|
124 |
'gm_public');
|
125 |
foreach ($tab_champs_a_visiter as $val) {
|
125 |
foreach ($tab_champs_a_visiter as $val) {
|
126 |
if (stristr($aso_menu_info[$val] , $motif)) {
|
126 |
if (stristr($aso_menu_info[$val], $motif)) {
|
127 |
$aso_resultat['poids']++;
|
127 |
$aso_resultat['poids']++;
|
128 |
}
|
128 |
}
|
- |
|
129 |
}
|
- |
|
130 |
|
129 |
}
|
131 |
// Analyse du poids de cette page vis à vis du contenu
|
130 |
$nbre_correspondance = preg_match_all('/'.$motif.'/i', $aso_menu_contenu['gmc_contenu'], $tab_morceaux);
|
132 |
$nbre_correspondance = preg_match_all('/'.$motif.'/i', $aso_menu_contenu['gmc_contenu'], $tab_morceaux);
|
131 |
$aso_resultat['poids'] = $aso_resultat['poids'] + $nbre_correspondance;
|
133 |
$aso_resultat['poids'] = $aso_resultat['poids'] + $nbre_correspondance;
|
132 |
|
134 |
|
133 |
if ($aso_resultat['poids'] > 0) {
|
135 |
if ($aso_resultat['poids'] > 0) {
|
134 |
$this->setResultat($aso_resultat);
|
136 |
$this->setResultat($aso_resultat);
|
135 |
}
|
137 |
}
|
136 |
}
|
138 |
}
|
Line 139... |
Line 141... |
139 |
}
|
141 |
}
|
Line 140... |
Line 142... |
140 |
|
142 |
|
141 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
143 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
142 |
*
|
144 |
*
|
- |
|
145 |
* $Log: not supported by cvs2svn $
|
- |
|
146 |
* Revision 1.3 2005/05/19 12:46:12 jpm
|
- |
|
147 |
* Correction bogue accesskey.
|
- |
|
148 |
* Ajout d'un id à la liste.
|
- |
|
149 |
* Arrondissement des score.
|
143 |
* $Log: not supported by cvs2svn $
|
150 |
*
|
144 |
* Revision 1.2 2005/04/14 17:39:34 jpm
|
151 |
* Revision 1.2 2005/04/14 17:39:34 jpm
|
145 |
* Amélioration du moteur de rechercher :
|
152 |
* Amélioration du moteur de rechercher :
|
146 |
* - pourcentage
|
153 |
* - pourcentage
|
147 |
* - ajout d'info
|
154 |
* - ajout d'info
|