/** * Replaces "_" with "-" in the locale for usage in the feed's xml * * @return string */ function getRSSLocaleXML() { $locale = getRSSLocale(); $validlocale = strtr($locale, "_", "-"); return $validlocale; }
<?php $host = getRSSHost(); $protocol = SERVER_PROTOCOL; if ($protocol == 'https_admin') { $protocol = 'http'; } $locale = getRSSLocale(); $validlocale = getRSSLocaleXML(); $modrewritesuffix = getRSSImageAndAlbumPaths("modrewritesuffix"); header('Content-Type: application/xml'); $rssmode = getRSSAlbumsmode(); $albumfolder = getRSSAlbumnameAndCollection("albumfolder"); $collection = getRSSAlbumnameAndCollection("collection"); $albumname = getRSSAlbumTitle(); $albumpath = getRSSImageAndAlbumPaths("albumpath"); $imagepath = getRSSImageAndAlbumPaths("imagepath"); $size = getRSSImageSize(); $items = getOption('feed_items'); // # of Items displayed on the feed $gallery = new Gallery(); ?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title><?php echo strip_tags(get_language_string($gallery->get('gallery_title'), $locale)) . ' ' . strip_tags($albumname); ?> </title> <link><?php echo $protocol . "://" . $host . WEBPATH; ?>