Subversion Repositories Applications.papyrus

Rev

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

Rev 1170 Rev 1204
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.2 2006-12-13 17:20:51 jp_milcent Exp $
24
// CVS : $Id: syndication.php,v 1.3 2007-01-23 14:17:19 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.2 $ $Date: 2006-12-13 17:20:51 $
36
*@version       $Revision: 1.3 $ $Date: 2007-01-23 14:17:19 $
37
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
38
*/
38
*/
Line 39... Line 39...
39
 
39
 
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
Line 159... Line 159...
159
							}
159
							}
160
						}
160
						}
161
						if (!isset($item['pubdate'])) {
161
						if (!isset($item['pubdate'])) {
162
							$item['pubdate'] = date('dmY');
162
							$item['pubdate'] = date('dmY');
163
						}
163
						}
-
 
164
						// Le code ci-apres est pour rattraper les dates du type 01012005 parsees par magpie
-
 
165
						// lorsque les flux donne des dates au format iso
-
 
166
						if (preg_match('/^([0-3][0-9])([0-1][0-9])([0-9][0-9][0-9][0-9])$/', $item['pubdate'], $match)) {
-
 
167
							$item['pubdate'] = $match[3].'-'.$match[2].'-'.$match[1];
-
 
168
							//echo $item['pubdate'];
-
 
169
						}
164
						$res .= str_replace ('{num}', ++$i, 
170
						$res .= str_replace ('{num}', ++$i, 
165
								str_replace ('{item}', '<a href="'.$item['link'].'" target="_top">'.$item['title'].'</a>', 
171
								str_replace ('{item}', '<a href="'.$item['link'].'" target="_top">'.$item['title'].'</a>', 
166
								str_replace ('{date}', strftime('%d.%m.%Y',strtotime($item['pubdate'])),
172
								str_replace ('{date}', strftime('%d.%m.%Y',strtotime($item['pubdate'])),
167
								str_replace ('{description}', $item['description'], $options['template'])))) ;
173
								str_replace ('{description}', $item['description'], $options['template'])))) ;
168
						$res .= "\n";
174
						$res .= "\n";
Line 257... Line 263...
257
}
263
}
Line 258... Line 264...
258
 
264
 
259
/* +--Fin du code ----------------------------------------------------------------------------------------+
265
/* +--Fin du code ----------------------------------------------------------------------------------------+
260
*
266
*
-
 
267
* $Log: not supported by cvs2svn $
-
 
268
* Revision 1.2  2006/12/13 17:20:51  jp_milcent
-
 
269
* Correction bogue : paramètre nb non pris en compte
261
* $Log: not supported by cvs2svn $
270
*
262
* Revision 1.1  2006/12/13 17:06:36  jp_milcent
271
* Revision 1.1  2006/12/13 17:06:36  jp_milcent
263
* Ajout de l'applette Syndication.
272
* Ajout de l'applette Syndication.
264
*
273
*
265
*
274
*