[grisbi-cvs] grisbi-web/newsportal/extras/rss README, NONE, 1.1 backend.php.rename_me, NONE, 1.1

NIEL GĂ©rald gegeweb at users.sourceforge.net
Mon May 24 17:03:51 CEST 2010


Update of /cvsroot/grisbi/grisbi-web/newsportal/extras/rss
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv18681/extras/rss

Added Files:
	README backend.php.rename_me 
Log Message:

news version off newsportal

--- NEW FILE: README ---
A very simple RSS backend.

Copy this file to your newsportal-directory, and edit it to configure it.

Note, that this skript doesn't connect to any newsserver, it just reads the
contents of your newsportal-spooldir. So if you don't actualize this
directory by viewing the group with newsportal, the RSS-feed won't be
actualized.
--- NEW FILE: backend.php.rename_me ---
<? header("Content-Type: text/xml"); ?>
<? echo '<?';?>xml version="1.0" encoding="ISO-8859-1"<? echo '?>';?>

<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
 "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">

<? /* 
    * Name of your Channel, 
    * URL to your Website,
    * Description and
    * Language of your channel
    */ ?>

<channel>
<title>NewsPortal WebNewsReader</title>
<link>http://florian-amrhein.de/newsportal</link>
<description>News about NewsPortal</description>
<language>de-DE</language>

<?
/* *** Some settings ****/
// Newsgroup
$group="darkzone.support.newsportal.announce";
// Path to the spool-dir of your newsportal-installation
$spooldir="spool/";
// Where is your newsportal.php?
$newsportal="newsportal.php";
// Link to your article.php
$articlelink="http://myrsschannel.com/newsportal/article.php";


include $newsportal;
$compress_spoolfiles=false;
$thread=array_reverse(loadThreadData("$group"));

// print_r($thread);

$lines=array();
$i=0;
foreach($thread as $t) {
  $i++;
  if($i==15) break; // maximum articles shown
  echo "<item>\n";
  echo '<title>'.htmlspecialchars($t->subject).' ('.
       htmlspecialchars($t->name).")</title>\n";
  echo '<link>'.$articlelink.'?id='.$t->number."</link>\n";
  echo '<dc:contributor>'.htmlspecialchars($t->name).' ('.
       htmlspecialchars($t->from).')</dc:contributor>'."\n";
  echo "</item>\n";
}
?>
</channel>
</rss>



More information about the cvs mailing list