$main_template = 'rss';
$sub_template = "rss_item";$media_template = 'mrss';$media_sub_template = "mrss_item";
@define('RSS_MAX_ITEMS', 30);
@define('RSS_MAX_ITEMS', 100);
if (isset($HTTP_GET_VARS['items']) || isset($HTTP_POST_VARS['items'])) {
// # of images in category is passed in over HTTP Get (increased max limit to accomodate// larger category total setsif (isset($HTTP_GET_VARS['slc']) || isset($HTTP_POST_VARS['items'])) { $num_items = (isset($HTTP_POST_VARS['items'])) ? intval($HTTP_POST_VARS['items']) : intval($HTTP_GET_VARS['slc']);
$action = 'images';
} else if ($action == 'media') { // use media RSS template $main_template = $media_template; $sub_template = $media_sub_template;
case 'images':
case 'media':
'author' => array(
'enclosure_info' => ($row['image_thumb_file'] ? getimagesize(THUMB_PATH."/".$row['cat_id']."/".$row['image_thumb_file']) : array(0,0, "", "")), 'realimage' => get_rss_enclosure($row['image_media_file'], "media", $row['cat_id']), 'realimage_info' => getimagesize(MEDIA_PATH."/".$row['cat_id']."/".$row['image_media_file']),
'item_enclosure_type' => '',
'item_enclosure_width' => '', 'item_enclosure_height' => '', 'item_enclosure_info_width' => '', 'item_enclosure_info_height' => '', 'item_realimage' => false, 'item_realimage_url' => '', 'item_realimage_length' => '', 'item_realimage_type' => '', 'item_realimage_width' => '', 'item_realimage_height' => '', 'item_realimage_info_width' => '', 'item_realimage_info_height' => '',
$tpl_vars['item_enclosure'] = true;
// set thumbnail height/width $tpl_vars['item_enclosure_width'] = $item['enclosure_info'][0]; $tpl_vars['item_enclosure_height'] = $item['enclosure_info'][1]; // have to %20 encode the URIs for RSS (the file path is probably ok, but what about other %s? $tpl_vars['item_enclosure_url'] = str_replace(" ", "%20", $item['enclosure']['url']);
$site_template->register_vars($tpl_vars);
if ($action == 'media') { // only need this if we're in the media template if (@count($item['realimage']) > 0) { $tpl_vars['item_realimage'] = true; // set full image height/width $tpl_vars['item_realimage_width'] = $item['realimage_info'][0]; $tpl_vars['item_realimage_height'] = $item['realimage_info'][1]; // have to %20 encode the URIs for RSS (the file path is probably ok, but what about other %s? $tpl_vars['item_realimage_url'] = str_replace(" ", "%20", $item['realimage']['url']); $tpl_vars['item_realimage_length'] = $item['realimage']['length']; $tpl_vars['item_realimage_type'] = $item['realimage']['type']; } }
$items .= $site_template->parse_template("rss_item");
$items .= $site_template->parse_template($sub_template);
//-----------------------------------------------------//--- Clickstream -------------------------------------
//-----------------------------------------------------//--- Slideshow ---------------------------------------//-----------------------------------------------------$mrss_url = $script_url."/rss.php?action=media&".URL_CAT_ID."=".$cat_id."&slc=".$num_rows_all;$gslideshow_url = $script_url."/sshow.php?rssurl=".urlencode($mrss_url);if ($num_rows_all > 0) { $gslideshow = "<span class=\"slideshow\"><a href=\"#\" onClick=\"window.open('".$gslideshow_url."','_blank','toolbar=0, location=0, scrollbars=0, menuBar=0, width=500, height=520'); return(false)\">View Slideshow of Images</a></span>";} else { $gslideshow = " ";}$site_template->register_vars(array( "gslideshow_url" => $gslideshow_url, "gslideshow" => $gslideshow));
{paging_stats} <br /> <br />
<p> {gslideshow} </p>
'enclosure_info' => ($row['image_thumb_file'] ? getimagesize(THUMB_PATH."/".$row['cat_id']."/".$row['image_thumb_file']) : array(0,0, "", "")),
'enclosure_info' => (isset($row['image_thumb_file']) && !empty($row['image_thumb_file'])) ? getimagesize(THUMB_PATH."/".$row['cat_id']."/".get_basefile(stripslashes(trim($row['image_thumb_file'])))) : array(0,0, "", "")),
$site_template->register_vars(array( "gslideshow_url" => $gslideshow_url, "gslideshow" => $gslideshow));
$site_template->register_vars(array( "gslideshow_url" => (isset($gslideshow_url) && !empty($gslideshow_url)) ? $gslideshow_url : "", "gslideshow" => (isset($gslideshow) && !empty($gslideshow)) ? $gslideshow : ""));