Sorry

This feed does not validate.

Source: http://tricycle.idigitaledition.com/rss

  1. <?php
  2. /* vim: set filetype=php : */
  3. require_once('./application/functions/include.fns.php');
  4. header("content-type: application/rss+xml");
  5.  
  6. $description = $publication->rssDescription;
  7. mysql_select_db( DB_DATABASE_SETUP );
  8. $category = '';
  9. foreach( $publication->rssCategory as $count => $id ){
  10. $query = "SELECT category ".
  11. "FROM ".CATEGORIES." ".
  12. "WHERE id = '".$id."'";
  13. $result = mysql_query( $query );
  14. $row = mysql_fetch_array( $result );
  15. $category .= "\t\t\t<category>".rss_text($row['category'])."</category>\n";
  16. }
  17. mysql_select_db( DB_DATABASE );
  18. # make rss for issues first
  19. $issue = new issue();
  20. $issues = $issue->get_issues();
  21. foreach( $issues as $count => $Issue ){
  22. list($y,$m,$d) = sscanf($Issue->digital_publish_date, "%d-%d-%d");
  23. $rss_i .= "\t\t<item>\n";
  24. $rss_i .= "\t\t\t<title>".rss_text($Issue->title)."</title>\n";
  25. #$rss_i .= "\t\t\t<description><![CDATA[".$Issue->description."]]></description>\n";
  26. $rss_i .= "\t\t\t<description>&lt;a href=&quot;".IDIGI_URL."issues/".$Issue->path."/&quot;&gt;&lt;img src=&quot;".IDIGI_URL."thumbs/cover/".$Issue->id."/&quot; hspace=&quot;8&quot; align=&quot;left&quot; title=&quot;".rss_text($Issue->title)."&quot; /&gt;&lt;/a&gt;<![CDATA[".$Issue->description."]]></description>\n";
  27. $rss_i .= "\t\t\t<pubDate>".date("D, d M Y H:i:s", mktime(1,1,1,$m,$d,$y))." GMT</pubDate>\n";
  28. $rss_i .= "\t\t\t<author>[email protected] (".rss_text($publication->title).")</author>\n";
  29. $rss_i .= "\t\t\t<guid isPermaLink=\"true\">".IDIGI_URL."issues/".$Issue->id."/</guid>\n";
  30. $rss_i .= "\t\t\t<link>".IDIGI_URL."issues/".$Issue->path."/</link>\n";
  31. $rss_i .= $category;
  32. $rss_i .= "\t\t\t<source url=\"".IDIGI_URL."rss\">".rss_text($publication->title)."</source>\n";
  33. $rss_i .= "\t\t</item>\n";
  34. }
  35. $rss_i .= "\t</channel>\n";
  36. $rss_i .= "</rss>\n";
  37. # beginning of rss
  38. $rss  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
  39. $rss .= "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n";
  40. $rss .= "\t<channel>\n";
  41. $rss .= "\t\t<atom:link href=\"".IDIGI_URL."rss\" rel=\"self\" type=\"application/rss+xml\" />\n";
  42. $rss .= "\t\t<title>".rss_text($publication->title)."</title>\n";
  43. $rss .= "\t\t<link>".IDIGI_URL."</link>\n";
  44. $rss .= "\t\t<language>en-us</language>\n";
  45. $rss .= "\t\t<copyright>&#xA9; ".rss_text($publication->title)."</copyright>\n";
  46. $rss .= "\t\t<description><![CDATA[".rss_text($description)."]]></description>\n";
  47. $rss .= "\t\t<lastBuildDate>".date("D, d M Y H:i:s", mktime(1,1,1,$m,$d,$y))." EST</lastBuildDate>\n\n";
  48. $rss .= $rss_i;
  49. echo $rss;
  50.  
  51. ?>
  52.  
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda