The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#4
|
|||
|
|||
![]()
not my site.. I am just helping fix this issue... but I will let the owner know...
--------------- Added [DATE]1321974573[/DATE] at [TIME]1321974573[/TIME] --------------- Quote:
Code:
// info: init_startup(), Prod: vbulletin, name: Ad Generator $sql = "SELECT styleid, multiplicity FROM " . TABLE_PREFIX . "adv_banner_style"; $adv_styles = $vbulletin->db->query_read_slave($sql); while ($adv_style = $vbulletin->db->fetch_array($adv_styles)) { $sql = "SELECT bannerid, src, alt, url FROM " . TABLE_PREFIX . "adv_banner WHERE styleid = " . $adv_style['styleid']; $sql .= " ORDER BY RAND() "; if ($adv_style['multiplicity'] > 0) $sql .= " LIMIT " . $adv_style['multiplicity']; $adv_q = $vbulletin->db->query_read_slave($sql); $banner[$adv_style['styleid']] = ""; while ($bnr = $vbulletin->db->fetch_array($adv_q)) { if (substr($bnr['src'], -4) == '.txt') { // Scripted creative if ($bannerFile = fopen($bnr['src'], "r")) { $bannerSource = fread($bannerFile, filesize($bnr['src'])); @fclose($bannerFile); } else { $bannerSource = ""; // Place error message/image here if you desire one } $banner[$adv_style['styleid']] .= '<div style="padding: 1px; border: none;">' . $bannerSource . '</div>'; } else { // Image / URL creative $banner[$adv_style['styleid']] .= '<div style="padding: 1px; border: none;"><a href="' . $bnr['url'] . '" target="_New"><img src="' . $bnr['src'] . '" alt="' . $bnr['alt'] . '" border="0" /></a></div>'; } } } vB_Template::preRegister('navbar', array('banner' => $banner)); vB_Template::preRegister('FORUMHOME', array('banner' => $banner)); vB_Template::preRegister('SHOWTHREAD', array('banner' => $banner)); vB_Template::preRegister('FORUMDISPLAY', array('banner' => $banner)); vB_Template::preRegister('search_resultlist', array('banner' => $banner)); Code:
<div style="float:right; width:100px; position:relative;">{vb:raw banner.1}</div> <div id="content_container"> <div id="content" style="margin-right:120px;"> Code:
<!-- Adversiting Edit --> <div id="sidebar_container" style="float:right; width:100px; margin:0px; padding:0px; margin-top:20px; position:relative;">{vb:raw banner.1}</div> <!-- Advertising Edit --> <div id="content_container"> <div id="content" style="margin-right:120px;"> Code:
<div style="width:468px; margin-left:auto; margin-right:auto; margin-bottom:5px; margin-top:-5px;">{vb:raw banner.2}</div> Code:
<!-- Adversiting Edit --> <div id="sidebar_container" style="float:right; width:100px; margin:0px; padding:0px; margin-top:20px; position:relative;">{vb:raw banner.1}</div> <!-- Advertising Edit --> <div id="content_container"> <div id="content" style="margin-right:120px;"> Code:
<div style="float:right; width:100px; position:relative;">{vb:raw banner.1}</div> <div id="content_container"> <div id="content" style="margin-right:120px;"> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|