Skip to content

Commit

Permalink
Adds ttl or recommended feed refresh rate to site_rss & site_podcast …
Browse files Browse the repository at this point in the history
…using a default of 24 hours
  • Loading branch information
dleffler committed Feb 19, 2011
1 parent 7889ec0 commit 6558cdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions site_podcast.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
$config->enable_rss = true;
$config->feed_title = empty($site_rss->feed_title) ? 'RSS for '.URL_FULL : $site_rss->feed_title;
$config->feed_desc = empty($site_rss->feed_desc) ? 'This is the site wide RSS syndication for '.HOSTNAME : $site_rss->feed_desc;
$ttl = $config->rss_cachetime;
if ($ttl == 0) { $ttl = 24; }

$ic = explode(";", $config->config['itunes_cats']);

Expand All @@ -53,6 +55,7 @@
$rss->useCached("PODCAST");
$rss->title = $config->feed_title;
$rss->description = $config->feed_desc;
$rss->ttl = $ttl;
$rss->itunes->summary = $config->feed_desc;
$rss->itunes->author = ORGANIZATION_NAME;
$rss->link = "http://".HOSTNAME.PATH_RELATIVE;
Expand Down
3 changes: 3 additions & 0 deletions site_rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@
$config->enable_rss = true;
$config->feed_title = empty($site_rss->feed_title) ? 'RSS for '.URL_FULL : $site_rss->feed_title;
$config->feed_desc = empty($site_rss->feed_desc) ? 'This is the site wide RSS syndication for '.HOSTNAME : $site_rss->feed_desc;
$ttl = $config->rss_cachetime;
if ($ttl == 0) { $ttl = 24; }

if ($config->enable_rss == true) {
$rss = new UniversalFeedCreator();
$rss->cssStyleSheet = "";
$rss->useCached();
$rss->title = $config->feed_title;
$rss->description = $config->feed_desc;
$rss->ttl = $ttl;
$rss->link = "http://".HOSTNAME.PATH_RELATIVE;
$rss->syndicationURL = "http://".HOSTNAME.PATH_RELATIVE.$_SERVER['PHP_SELF'];

Expand Down

0 comments on commit 6558cdd

Please sign in to comment.