@define('RSS_DEFAULT_IMAGE_SIZE', 'small'); // \'small\', \'medium\', \'large\' @define('RSS_CACHE_TIME', '10'); @define('DIR_FS_RSSFEED_CACHE', DIR_FS_SQL_CACHE); @define('RSS_ERROR_CACHE_DIR', 'Cache directory not found "' . DIR_FS_RSSFEED_CACHE . '"'); require_once DIR_WS_CLASSES . 'rss_feed.php'; $rss = new rss_feed(); if (RSS_CACHE_TIME > 0) { $rss->rssFeedCahcheSet(true); } else { $rss->rssFeedCahcheSet(false); } $rss->rss_feed_encoding(CHARSET); $rss->rss_feed_content_type('text/xml'); // 'application/rss+xml' $rss->rss_feed_set('ttl', RSS_TTL); if (!$rss->rss_feed_cache($_SERVER['QUERY_STRING'], RSS_CACHE_TIME * 60)) { // Google Base and Custom Namespaces - http://base.google.com/support/bin/answer.py?answer=58085 $rss->rss_feed_xmlns('xmlns:g="http://base.google.com/ns/1.0"'); $rss->rss_feed_xmlns('xmlns:c="http://base.google.com/cns/1.0"'); // "Ecommerce RSS" Module Specification (ERSS) - http://shopping.discovery.com/erss/ // $rss->rss_feed_xmlns('xmlns:ecommerce="http://shopping.discovery.com/erss'); // $rss->rss_feed_xmlns('xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"'); // $rss->rss_feed_xmlns('xmlns:admin="http://webns.net/mvcb/"'); // $rss->rss_feed_xmlns(array('xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"', 'xmlns:content="http://purl.org/rss/1.0/modules/content/"')); $directory_array = array(); $tpl_dir = $template->get_template_dir('rss(.*)\\.css', DIR_WS_TEMPLATE, $current_page_base, 'css'); $directory_array = $template->get_template_part($tpl_dir, '/^rss/', '.css'); foreach ($directory_array as $value) { $rss->rss_feed_style(HTTP_SERVER . DIR_WS_CATALOG . $tpl_dir . '/' . $value); }
} else { define('CDATA_OPEN', ""); define('CDATA_CLOSE', ""); } define('RSS_GENERATOR', 'VaM Shop RSS 2.0 Feed'); define('RSS_CONTENT_COPYRIGHT', 'Copyright © ' . date('Y') . ' ' . STORE_OWNER); /*--------- END OF CONFIGURATION ------------------*/ // $rss = new rss_feed('xmlns:dc="http://purl.org/dc/elements/1.1/"'); $rss = new rss_feed(); // $rss->rss_feed_xmlns('xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"'); // $rss->rss_feed_xmlns('xmlns:admin="http://webns.net/mvcb/"'); // $rss->rss_feed_xmlns(array('xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"', 'xmlns:content="http://purl.org/rss/1.0/modules/content/"')); // $rss->rss_feed_style('rss.css', 'text/css'); $rss->rss_feed_style('rss.xsl', 'text/xsl'); $rss->rss_feed_description_set(RSS_FEED_DESCRIPTION, RSS_FEED_DESCRIPTION_CHARACTERS); $rss->rss_feed_set('encoding', $_SESSION['language_charset']); $rss->rss_feed_set('content_type', 'text/xml'); $rss->rss_feed_set('title', STORE_NAME); $rss->rss_feed_set('link', HTTP_SERVER . DIR_WS_CATALOG); $rss->rss_feed_set('description', STORE_NAME_ADDRESS); $rss->rss_feed_set('lastBuildDate', date('r')); $rss->rss_feed_set('generator', RSS_GENERATOR); $rss->rss_feed_set('copyright', RSS_CONTENT_COPYRIGHT); $rss->rss_feed_set('managingEditor', STORE_OWNER_EMAIL_ADDRESS . " (" . STORE_OWNER . ")"); $rss->rss_feed_set('ttl', RSS_TTL); $rss->rss_feed_image(RSS_IMAGE_NAME, HTTP_SERVER . DIR_WS_CATALOG, HTTP_SERVER . DIR_WS_CATALOG . RSS_IMAGE); // get the language code... //$lang_code_query = vam_db_query("select code from " . TABLE_LANGUAGES . " where languages_id = " . $languages_id); // if($lang_code = vam_db_fetch_array($lang_code_query)) // $lang_code = $lang_code['code']; // else