summaryrefslogtreecommitdiff
path: root/fisheye_rss.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-12-10 15:15:09 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-12-10 15:15:09 +0000
commitb2d03e8b0e9df8dd12fe4e75cd489cadac06cbd7 (patch)
tree91c19e342e03226e169c36561dbb3720c154b383 /fisheye_rss.php
parentffaa4253580180b40499d0808d7cfcca56e13d72 (diff)
downloadfisheye-b2d03e8b0e9df8dd12fe4e75cd489cadac06cbd7.tar.gz
fisheye-b2d03e8b0e9df8dd12fe4e75cd489cadac06cbd7.tar.bz2
fisheye-b2d03e8b0e9df8dd12fe4e75cd489cadac06cbd7.zip
more rss cleanup - make sure we use appropriate cache files for individual galleries and use correct rss title when individual galleries are called
Diffstat (limited to 'fisheye_rss.php')
-rw-r--r--fisheye_rss.php27
1 files changed, 17 insertions, 10 deletions
diff --git a/fisheye_rss.php b/fisheye_rss.php
index bf20486..3d43a6e 100644
--- a/fisheye_rss.php
+++ b/fisheye_rss.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_fisheye/fisheye_rss.php,v 1.1 2006/12/09 23:07:17 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_fisheye/fisheye_rss.php,v 1.2 2006/12/10 15:15:09 squareing Exp $
* @package fisheye
* @subpackage functions
*/
@@ -23,17 +23,24 @@ $rss->description = $gBitSystem->getConfig( 'fisheye_rss_description', $gBitSyst
if( !$gBitUser->hasPermission( 'p_fisheye_view_page' ) ) {
require_once( RSS_PKG_PATH."rss_error.php" );
} else {
- // check if we want to use the cache file
- $cacheFile = TEMP_PKG_PATH.RSS_PKG_NAME.'/'.FISHEYE_PKG_NAME.'_'.$rss_version_name.'.xml';
- $rss->useCached( $rss_version_name, $cacheFile ); // use cached version if age < 1 hour
-
$listHash = array(
'max_records' => $gBitSystem->getConfig( 'fisheye_rss_max_records', 10 ),
- 'sort_mode' => 'last_modified_desc',
- 'gallery_id' => !empty( $_REQUEST['gallery_id'] ) ? $_REQUEST['gallery_id'] : NULL,
- 'user_id' => !empty( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : NULL,
+ 'sort_mode' => 'last_modified_desc',
+ 'gallery_id' => !empty( $_REQUEST['gallery_id'] ) ? $_REQUEST['gallery_id'] : NULL,
+ 'user_id' => !empty( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : NULL,
);
+ // check if we want to use the cache file
+ $cacheFile = TEMP_PKG_PATH.RSS_PKG_NAME.'/'.FISHEYE_PKG_NAME.'_'."g{$listHash['gallery_id']}_u{$listHash['user_id']}_".$rss_version_name.'.xml';
+ $rss->useCached( $rss_version_name, $cacheFile ); // use cached version if age < 1 hour
+
+ // if we have a gallery we can work with - load it
+ if( @BitBase::verifyId( $_REQUEST['gallery_id'] ) ) {
+ $gallery = new FisheyeGallery( $_REQUEST['gallery_id'] );
+ $gallery->load();
+ $rss->title .= " - {$gallery->getTitle()}";
+ }
+
$fisheye = new FisheyeImage();
$feeds = $fisheye->getList( $listHash );
@@ -45,8 +52,8 @@ if( !$gBitUser->hasPermission( 'p_fisheye_view_page' ) ) {
$item = new FeedItem();
$item->title = $feed['title'];
$item->link = $feed['display_url'];
- $item->description = '<img src="'.str_replace( '/avatar.jpg', '/medium.jpg', $feed['thumbnail_url'] ).'" />';
- $item->description .= '<br />'.$feed['data'];
+ $item->description = '<a href="'.$feed['display_url'].'"><img src="'.str_replace( '/avatar.jpg', '/medium.jpg', $feed['thumbnail_url'] ).'" /></a>';
+ $item->description .= '<p>'.$feed['data'].'</p>';
$item->date = ( int )$feed['last_modified'];
$item->source = 'http://'.$_SERVER['HTTP_HOST'].BIT_ROOT_URL;