Subversion Repositories eFlore/Archives.herbiers

Compare Revisions

Ignore whitespace Rev 20 → Rev 21

/trunk/applications/hb_rss/hb_rss.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hb_rss.php,v 1.8 2006-11-07 17:28:21 jp_milcent Exp $
// CVS : $Id: hb_rss.php,v 1.9 2007-08-22 14:34:04 jp_milcent Exp $
/**
* Générateur de flux RSS pour les Herbiers
*
29,7 → 29,7
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*
*@copyright Tela-Botanica 2000-2006
*@version $Revision: 1.8 $ $Date: 2006-11-07 17:28:21 $
*@version $Revision: 1.9 $ $Date: 2007-08-22 14:34:04 $
// +------------------------------------------------------------------------------------------------------+
*/
 
166,18 → 166,18
$GLOBALS['_HERBIER_']['rss']['url']->addQueryString('type', $flux);
$aso_infos['link'] = str_replace('&', '&amp;', $GLOBALS['_HERBIER_']['rss']['url']->getURL());
$aso_infos['description'] = 'Flux RSS sur les '.$flux.'s.';
$aso_infos['pubdate'] = strftime('%d %b %Y %H:%M:%S GMT', strtotime(str_replace('$', '', str_replace('Date: ', '', '$Date: 2006-11-07 17:28:21 $'))));
$aso_infos['pubdate'] = strftime('%d %b %Y %H:%M:%S GMT', strtotime(str_replace('$', '', str_replace('Date: ', '', '$Date: 2007-08-22 14:34:04 $'))));
$tab_infos[] = $aso_infos;
}
}
// En fonction, de l'appel depuis Papyrus ou pas nous affichons du XML ou du XHTML
if (!defined('PAP_VERSION')) {
$sortie = html_entity_decode(gen_RSS($aso_meta, $tab_infos, $limite));
$sortie = html_entity_decode(hb_generer_rss($aso_meta, $tab_infos, $limite));
} else {
$sortie = gen_XHTML($aso_meta, $tab_infos);
$sortie = hb_generer_xhtml($aso_meta, $tab_infos);
}
 
/** gen_XHTML() - generer la liste des flux en XHTML
/** hb_generer_xhtml() - generer la liste des flux en XHTML
*
* @param array Les méta données des flux
* @param array Les infos sur les flux
184,7 → 184,7
*
* @return string La liste des flux RSS
*/
function gen_XHTML($meta = '', $infos = '')
function hb_generer_xhtml($meta = '', $infos = '')
{
$xhtml = '<h1>'.$meta['titre'].'</h1>'."\n";
$xhtml .= '<p>'.$meta['description'].'</p>'."\n";
199,7 → 199,7
return $xhtml;
}
 
/** gen_RSS() - generer un fichier de flux RSS par type d'annonce
/** hb_generer_rss() - generer un fichier de flux RSS par type d'annonce
*
* @param array Les méta données du flux
* @param array Les items du flux
206,7 → 206,7
*
* @return string Le code du flux RSS
*/
function gen_RSS($meta = '', $infos = '')
function hb_generer_rss($meta = '', $infos = '')
{
// En-tete du flux RSS version 2.0
$xml = '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n";
257,6 → 257,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.8 2006-11-07 17:28:21 jp_milcent
* Correction concernant les urls des collections.
*
* Revision 1.7 2006/10/31 16:03:42 jp_milcent
* Correction rendu xhtml dans Papyrus.
*