예제 #1
0
/**
 * Returns the size of the images to be used in the feed.
 *
 * @return int
 */
function getRSSImageSize()
{
    $rssmode = getRSSAlbumsmode();
    if (isset($_GET['size'])) {
        $size = sanitize_numeric($_GET['size']);
    } else {
        $size = NULL;
    }
    if (is_numeric($size) && !is_null($size) && $size < getOption('feed_imagesize')) {
        $size = $size;
    } else {
        if ($rssmode == "albums") {
            $size = getOption('feed_imagesize_albums');
            // un-cropped image size
        } else {
            $size = getOption('feed_imagesize');
            // un-cropped image size
        }
    }
    return $size;
}
예제 #2
0
<?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;
?>