Пример #1
0
 } else {
     if ($o->getField("type") == 'rss') {
         ob_start();
         include_once dirname(__FILE__) . "/carprss/carp.php";
         $rss_url = $o->getField("url");
         $url = "#";
         /******************************************************************************
          * replace general media library urls (i.e. $mediapath/$sitename/filename)
          * replace general with specific
          ******************************************************************************/
         $rss_url = convertTagsToInteralLinks($site, $rss_url);
         //printpre($rss_url);
         $rss_style = "rss_titles";
         $site_match = "site={$site}";
         $page_match = "page={$page}";
         MyCarpConfReset($rss_style);
         /******************************************************************************
          * RSS channel display options
          * if feed from same page, don't display channel link and open items in same window
          * if feed from another page on same site, display channel and open in same window
          * all other feeds display channel link and open in new window
          ******************************************************************************/
         if (ereg($site_match, $rss_url)) {
             $carpconf['ilinktarget'] = "_self";
             CarpConf('cborder', '');
             if (ereg($page_match, $rss_url)) {
                 CarpConf('cborder', '');
             } else {
                 $carpconf['clinktarget'] = "_self";
             }
         }
Пример #2
0
/* } */
//  print "<pre>";
//  print_r($o->data);
//  print "</pre>";
ob_start();
print "\n\n";
$url = $o->getField("url");
// if (ereg("^".$cfg[full_uri], $url)
// 	|| ereg("^".$cfg[personalsitesurl], $url)
// 	|| ereg("^".$cfg[classsitesurl], $url))
// {
// 	$replacement = "index.php?".session_name()."=".session_id();
// 	$url = ereg_replace("index.php\?", $replacement, $url);
// }
MyCarpConfReset();
MyCarpConfReset('rss_contentblock');
if (is_numeric($o->getField("shorttext"))) {
    $num_per_page = $o->getField("shorttext");
    CarpConf('maxitems', $num_per_page);
} else {
    CarpConf('maxitems', 5);
}
// If we have an auser, create a cache just for them.
if ($_SESSION['auser']) {
    CarpCacheShow($url, '', 1, $_SESSION['auser']);
} else {
    // If the user has a valid campus ip-address, then they are a
    // member of 'institute'.
    $ipIsInInstitute = FALSE;
    $ip = $_SERVER[REMOTE_ADDR];
    // check if our IP is in inst_ips
Пример #3
0
            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;
            }
        }
    }
}
MyCarpConfReset();