function MyCarpConfReset($set = 'default') { global $carpconf; CarpConfReset(); // Override any settings you wish to change here // Modifications have been made to carpinc.php that provided functionality // for displaying authors and dates. $carpconf['clinktarget'] = "_blank"; $carpconf['clinkstyle'] = "font-size: 100%;"; $carpconf['acb'] = "<hr />"; $carpconf['bitems'] = "<table>"; $carpconf['bi'] = "<tr><td>"; $carpconf['ilinktarget'] = "_blank"; $carpconf['ilinkstyle'] = "font-size: 100%;"; $carpconf['bauthor'] = "<em> by <strong>"; $carpconf['aauthor'] = "</strong></em>"; $carpconf['idateformat'] = "D, M j G:i:s T Y"; $carpconf['bdate'] = "<em> on "; $carpconf['adate'] = "</em>"; $carpconf['bidesc'] = "<br /> "; $carpconf['aidesc'] = "<br /><br />"; $carpconf['ai'] = "</td></tr>"; $carpconf['aitems'] = "</table>"; $carpconf['poweredby'] = ""; $carpconf['cacheinterval'] = 10; $carpconf['cacheinterval'] = 10; global $cfg; $carpconf['cachepath'] = $cfg[uploaddir] . "/RSScache/"; $carpconf['cacherelative'] = FALSE; // Create alternative configuration sets here if ($set == 'default') { } else { if ($set == 'rss_titles') { CarpConf('cborder', 'link'); $carpconf['clinktarget'] = "_blank"; $carpconf['clinkstyle'] = "font-size: 9px%;"; $carpconf['acb'] = "\n<div style='border-bottom: 1px solid gray'></div>"; $carpconf['iorder'] = "link"; $carpconf['ilinktarget'] = "_blank"; $carpconf['ilinkstyle'] = "font-size: 9px;"; $carpconf['maxititle'] = 50; $carpconf['maxitems'] = 10; } else { if ($set == 'rss_contentblock') { CarpConf('cborder', 'link'); $carpconf['iorder'] = "link,desc,author,date"; $carpconf['clinktarget'] = "_blank"; $carpconf['clinkstyle'] = "font-size: 100%;"; $carpconf['actitle'] = " (RSS)"; $carpconf['acb'] = "\n<div class='hr'><hr /></div>"; $carpconf['bitems'] = "\n<table width='100%'>"; $carpconf['bi'] = "\n\t<tr>\n\t\t<td>\n\t\t\t"; $carpconf['ilinktarget'] = "_blank"; $carpconf['ilinkstyle'] = "font-size: 100%; font-weight: bold;"; $carpconf['bidesc'] = " "; $carpconf['aidesc'] = "\n\t\t\t<div class='contentinfo' align='right'>"; $carpconf['ai'] = "\n\t\t</td>\n\t</tr>"; $carpconf['aitems'] = "\n</table>"; $carpconf['bauthor'] = "\n\t\t\t\tby "; $carpconf['aauthor'] = " via RSS"; $carpconf['idateformat'] = "n/j/Y g:i A"; $carpconf['bdate'] = "\n\t\t\t\t on "; $carpconf['adate'] = "\n\t\t\t</div>\n\t\t\t<div class='hr'><hr /></div>"; $carpconf['poweredby'] = ""; $carpconf['cacheinterval'] = 10; $carpconf['cacheinterval'] = 10; $carpconf['maxititle'] = 100; $carpconf['maxitems'] = 10; } } } }
Installation & Configuration Manual: http://www.mouken.com/rss/manual/ (c) 2004 XT - Commerce; www.xt-commerce.com Released under the GNU General Public License --------------------------------------------------------------*/ $carpversion = '2.7.5'; function CarpConfReset() { global $carpconf, $carpoptions; $carpconf = array('cachepath' => DIR_FS_CATALOG . 'cache/rss', 'cacheinterval' => 60, 'cacheerrorwait' => 30, 'cachetime' => '', 'descriptiontags' => 'b|/b|i|/i|br|p|/p|hr|span|/span|font|/font|img|/images|a|/a', 'proxyauth' => '', 'basicauth' => '', 'filterin' => '', 'filterout' => '', 'linktarget' => 0, 'showdesc' => 0, 'maxdesc' => 0, 'posttruncdesc' => '<i>... continues</i>', 'maxitems' => 15, 'maxtitle' => 80, 'defaulttitle' => '(no title)', 'preitem' => '', 'postitem' => HTML_BR, 'preitems' => '', 'postitems' => '', 'linkclass' => '', 'linkstyle' => '', 'linkdiv' => '', 'showctitle' => 0, 'showclink' => 0, 'showcdesc' => 0, 'maxctitle' => 80, 'cclass' => '', 'cstyle' => '', 'cdiv' => '', 'encodingin' => '', 'encodingout' => '', 'linktitles' => 1, 'maxredir' => 10, 'timeout' => 15, 'sendhost' => 1, 'removebadtags' => 1, 'outputformat' => 0, 'poweredby' => '<br/><i><a href="http://www.mouken.com/rss/" target="_blank">Newsfeed display by CaRP</a></i>', 'newwindow' => 0); $carpoptions = '|'; while (list($k, $v) = each($carpconf)) { $carpoptions .= "{$k}|"; } } CarpConfReset(); function CarpConf($n, $v) { global $carpconf, $carpoptions; $n = explode('|', strtolower(preg_replace("/ /", '', $n))); for ($i = count($n) - 1; $i >= 0; $i--) { if (strpos($carpoptions, "|{$n[$i]}|") !== false) { $carpconf[$n[$i]] = $v; } else { CarpError("Unknown option ({$n[$i]}). Please check the spelling of the option name and that the version of CaRP you are using supports this option.", 0); } } } function CarpOutput($t) { global $carpconf, $carpoutput;