I just installed it :s
Quote:
$f = intval($vbulletin->GPC['forumid']); $ids = array(); $qids = array(); $SQL = "SELECT * FROM " . TABLE_PREFIX . "rbs_banners WHERE enabled=1 AND startdate<=" . TIMENOW . " AND enddate>=" . TIMENOW . " AND IF(forumhome, $f=0, IF(forumids='', 1, FIND_IN_SET('$f', forumids))) AND IF(maximpressions>0, impressions0 AND clicksdb->query_read($SQL); while($rs = $vbulletin->db->fetch_array($rss)) { // Handle primary and secondary usergroups if($rs['usergroups']) { // Field defined $usergroups = explode(',', $rs['usergroups']); if(!is_member_of($vbulletin->userinfo, $usergroups)) { // Not member of these groups, skip continue; } } $ids["$rs[position]"][] = $rs; } $vbulletin->db->free_result($rss); // Set target to new page if not local to forum $bburl = $vbulletin->options['bburl']; if(!$rbs_target = $vbulletin->options['rbs_target']) { $rbs_target = '_blank'; } // For each banner position $rbs_n_placeholder = $vbulletin->options['rbs_n_placeholder']; $phs = array(); foreach($ids AS $key => $idx) { $ph = @sprintf($rbs_n_placeholder, $key); $len = strlen($ph); $phs[] = $ph; // Shuffle (mix) the ads randomly shuffle($idx); // Check for available replacements foreach($idx as $rs) { if(!$npos = strpos(strtolower($output), strtolower($ph))) { break; } // Replace next placeholder $html = ''; $embed = ''; $image = rbs_url_sanity($rs['image']); $name = htmlspecialchars($rs['name']); if($rs['clicktrack']) { $url = $bburl . '/rbs_banner.php?id=' . $rs['id']; } else { $url = rbs_url_sanity($rs['url']); } if($rs['flash']) { if($rs['embed']) { $embed = '
|
|