Welcome to Geeklog, Anonymous Saturday, November 26 2022 @ 11:02 am EST

Geeklog Forums

List of active syndication feeds as a static page


Status: offline

jmichael

Forum User
Chatty
Registered: 04/08/04
Posts: 47
Still learning the easy stuff in PHP. I wanted to set up a dynamic list of active feeds. So I came up with the following php for use on a static page. See it in action here.

Ahh, yes, AVANTGO ... if anyone wants my rss2-feed-hacked-for-avantgo, shoot me an email to jmi AT lndcentral DOT com
Text Formatted Code

$results = db_query("select * from ".$_DB_table_prefix."syndication WHERE is_enabled = 1 ORDER BY format, title",1);
$rows = DB_numRows($results);
$display ="<table>";
$display .= '<tr><td colspan="2">';
$display .= "<p><br>This page contains a list of active RDF/RSS news feeds as well as mobile channels that can be used by Avantgo and similar services. Our Avantgo channels are also suitable for online browsing on small screens.<p><br><br>";
$display .= "</td></tr>";

for ($i=0; $i< $rows; $i++) {
    $row = DB_fetchArray($results) ;

    $pfx = "Channel " ;
    $color = '<font color="red">';
    $fmt = $row['format'];
    if ( strcmp( $fmt, "avantgo") ) {
        $pfx = "Feed ";
        $color = '<font color="blue">';
    }

    $maxa = $row['limits'] ;
    if ( $maxa == 0 ) {
        $maxm = "";
    } else {
        $maxm = " (max. " . $maxa . ' articles)';
    }

    $display .= '<tr><td colspan="2" bgcolor="#DDDDDD"><b>'.$row['title']."</b></td></tr>";
    $fspec = $_CONF['site_url'] . '/backend/' . $row['filename'];
    $flink = '<a href="'.$fspec.'">' . $fspec . '</a>';
    $display .= '<tr><td width="20%" valign="top">' . $color  . strtoupper($row['format']) . '</font></td><td>' .$row['description']  . $maxm . '</td></tr>';
    $display .= '<tr><td>' . $pfx . 'URL: </td><td>' . $flink.'</td></tr>';
    $display .= '<tr><td colspan="2"> </td></tr>';
}
$display .= "</table>";

return $display;

 
 Quote

All times are EST. The time is now 11:02 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content