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: syndication.php,v 1.10 2007-12-13 14:10:51 alexandre_tb Exp $
|
24 |
// CVS : $Id: syndication.php,v 1.11 2008-10-29 15:55:56 alexandre_tb Exp $
|
25 |
/**
|
25 |
/**
|
26 |
* papyrus_bp - syndication.php
|
26 |
* papyrus_bp - syndication.php
|
27 |
*
|
27 |
*
|
28 |
* Description :
|
28 |
* Description :
|
29 |
*
|
29 |
*
|
Line 31... |
Line 31... |
31 |
//Auteur original :
|
31 |
//Auteur original :
|
32 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
32 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
33 |
//Autres auteurs :
|
33 |
//Autres auteurs :
|
34 |
*@author Aucun
|
34 |
*@author Aucun
|
35 |
*@copyright Tela-Botanica 1999-2006
|
35 |
*@copyright Tela-Botanica 1999-2006
|
36 |
*@version $Revision: 1.10 $ $Date: 2007-12-13 14:10:51 $
|
36 |
*@version $Revision: 1.11 $ $Date: 2008-10-29 15:55:56 $
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
*/
|
38 |
*/
|
Line 39... |
Line 39... |
39 |
|
39 |
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
Line 97... |
Line 97... |
97 |
if ($argument != '') {
|
97 |
if ($argument != '') {
|
98 |
$tab_parametres = explode('=', $argument, 2);
|
98 |
$tab_parametres = explode('=', $argument, 2);
|
99 |
$options[$tab_parametres[0]] = trim($tab_parametres[1], '"');
|
99 |
$options[$tab_parametres[0]] = trim($tab_parametres[1], '"');
|
100 |
}
|
100 |
}
|
101 |
}
|
101 |
}
|
102 |
|
102 |
//
|
103 |
//+----------------------------------------------------------------------------------------------------------------+
|
103 |
//+----------------------------------------------------------------------------------------------------------------+
|
104 |
// Gestion des erreurs de paramétrage
|
104 |
// Gestion des erreurs de paramétrage
|
105 |
if (!isset($options['url'])) {
|
105 |
if (!isset($options['url'])) {
|
106 |
$GLOBALS['_SYNDICATION_']['erreurs'][] = sprintf(SYND_LG_ERREUR_URL, $balise);
|
106 |
$GLOBALS['_SYNDICATION_']['erreurs'][] = sprintf(SYND_LG_ERREUR_URL, $balise);
|
107 |
}
|
107 |
}
|
Line 198... |
Line 198... |
198 |
$aso_site['ext'] = true;
|
198 |
$aso_site['ext'] = true;
|
199 |
}
|
199 |
}
|
200 |
// Gestion des pages syndiquees
|
200 |
// Gestion des pages syndiquees
|
201 |
$i = 0;
|
201 |
$i = 0;
|
202 |
$nb_item = $feed->numberEntries;
|
202 |
$nb_item = $feed->numberEntries;
|
- |
|
203 |
|
203 |
foreach ($feed as $item) {
|
204 |
foreach ($feed as $item) {
|
204 |
//echo '<pre>'.print_r($item, true).'</pre>';
|
- |
|
- |
|
205 |
|
205 |
if ($options['nb'] != 0 && $nb_item >= $options['nb'] && $i >= $options['nb']) {
|
206 |
if ($options['nb'] != 0 && $nb_item >= $options['nb'] && $i >= $options['nb']) {
|
206 |
break;
|
207 |
break;
|
207 |
}
|
208 |
}
|
208 |
$i++;
|
209 |
$i++;
|
- |
|
210 |
|
209 |
$aso_page = array();
|
211 |
$aso_page = array();
|
210 |
$aso_page['site'] = $aso_site;
|
212 |
$aso_page['site'] = $aso_site;
|
211 |
$aso_page['url'] = htmlentities($item->link);
|
213 |
$aso_page['url'] = htmlentities($item->link);
|
212 |
$aso_page['titre'] = mb_convert_encoding($item->title, 'HTML-ENTITIES', $encodages);
|
214 |
$aso_page['titre'] = mb_convert_encoding($item->title, 'HTML-ENTITIES', $encodages);
|
- |
|
215 |
$aso_page['description'] = mb_convert_encoding($item->description, 'HTML-ENTITIES', $encodages);
|
- |
|
216 |
$aso_page['category'] = mb_convert_encoding($item->model->getElementsByTagName('category')->item(0)->nodeValue, 'HTML-ENTITIES', $encodages);
|
- |
|
217 |
$aso_page['author'] = mb_convert_encoding($item->author, 'HTML-ENTITIES', $encodages);
|
213 |
$aso_page['date'] = $item->pubDate;
|
218 |
$aso_page['date'] = $item->pubDate;
|
214 |
if ($options['formatdatepro']) {
|
219 |
if ($options['formatdatepro']) {
|
215 |
switch ($options['formatdatepro']) {
|
220 |
switch ($options['formatdatepro']) {
|
216 |
case 'jm' :
|
221 |
case 'jm' :
|
217 |
$aso_page['date'] = strftime('%d.%m', $aso_page['date']);
|
222 |
$aso_page['date'] = strftime('%d.%m', $aso_page['date']);
|
Line 276... |
Line 281... |
276 |
}
|
281 |
}
|
Line 277... |
Line 282... |
277 |
|
282 |
|
278 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
283 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
279 |
*
|
284 |
*
|
- |
|
285 |
* $Log: not supported by cvs2svn $
|
- |
|
286 |
* Revision 1.10 2007-12-13 14:10:51 alexandre_tb
|
- |
|
287 |
* Fusion avec la livraison AHA : 13 decembre 2007
|
280 |
* $Log: not supported by cvs2svn $
|
288 |
*
|
281 |
* Revision 1.9 2007-12-03 14:54:14 jp_milcent
|
289 |
* Revision 1.9 2007-12-03 14:54:14 jp_milcent
|
282 |
* Fusion avec la livraison AHA : 3 décembre 2007
|
290 |
* Fusion avec la livraison AHA : 3 décembre 2007
|
283 |
*
|
291 |
*
|
284 |
* Revision 1.7.2.2 2007-12-03 14:52:21 jp_milcent
|
292 |
* Revision 1.7.2.2 2007-12-03 14:52:21 jp_milcent
|