Subversion Repositories Applications.papyrus

Rev

Rev 1165 | Rev 1204 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1165 Rev 1170
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.1 2006-12-13 17:06:36 jp_milcent Exp $
24
// CVS : $Id: syndication.php,v 1.2 2006-12-13 17:20:51 jp_milcent 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.1 $ $Date: 2006-12-13 17:06:36 $
36
*@version       $Revision: 1.2 $ $Date: 2006-12-13 17:20:51 $
37
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
38
*/
38
*/
Line 39... Line 39...
39
 
39
 
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
Line 188... Line 188...
188
					$aso_site['ext'] = true;
188
					$aso_site['ext'] = true;
189
				}
189
				}
190
				// Gestion des pages syndiquées
190
				// Gestion des pages syndiquées
191
				$i = 0;
191
				$i = 0;
192
			    $nb_item = count($rss->items);
192
			    $nb_item = count($rss->items);
193
			    
-
 
194
				foreach ($rss->items as $item) {
193
				foreach ($rss->items as $item) {
-
 
194
					if ($options['nb'] != 0 && $nb_item >= $options['nb'] && $i >= $options['nb']) {
-
 
195
						break;
-
 
196
					}
-
 
197
					$i++;
195
					$aso_page = array();
198
					$aso_page = array();
196
					$aso_page['site'] = $aso_site;
199
					$aso_page['site'] = $aso_site;
197
					$aso_page['url'] = $item['link'];
200
					$aso_page['url'] = $item['link'];
198
					$aso_page['titre'] = $item['title'];	
201
					$aso_page['titre'] = $item['title'];	
199
					if (isset($item['pubdate'])) {
202
					if (isset($item['pubdate'])) {
Line 223... Line 226...
223
								break;
226
								break;
224
							default :
227
							default :
225
								$aso_page['date'] = strftime('%d.%m.%Y %H:%M', strtotime($aso_page['date']));
228
								$aso_page['date'] = strftime('%d.%m.%Y %H:%M', strtotime($aso_page['date']));
226
						}
229
						}
227
					}
230
					}
228
					if ($options['nb'] != 0 && $nb_item >= $options['nb'] && $i >= $options['nb']) {
-
 
229
						break;
-
 
230
					}
-
 
231
					$aso_site['pages'][] = $aso_page;
231
					$aso_site['pages'][] = $aso_page;
232
					$GLOBALS['_SYNDICATION_']['pages'][strtotime($aso_page['date'])] = $aso_page;
232
					$GLOBALS['_SYNDICATION_']['pages'][strtotime($aso_page['date'])] = $aso_page;
233
				}
233
				}
234
				$GLOBALS['_SYNDICATION_']['sites'][] = $aso_site;
234
				$GLOBALS['_SYNDICATION_']['sites'][] = $aso_site;
235
			}
235
			}
Line 257... Line 257...
257
}
257
}
Line 258... Line 258...
258
 
258
 
259
/* +--Fin du code ----------------------------------------------------------------------------------------+
259
/* +--Fin du code ----------------------------------------------------------------------------------------+
260
*
260
*
-
 
261
* $Log: not supported by cvs2svn $
-
 
262
* Revision 1.1  2006/12/13 17:06:36  jp_milcent
-
 
263
* Ajout de l'applette Syndication.
261
* $Log: not supported by cvs2svn $
264
*
262
*
265
*
263
* +-- Fin du code ----------------------------------------------------------------------------------------+
266
* +-- Fin du code ----------------------------------------------------------------------------------------+
264
*/
267
*/
265
?>
268
?>