View Full Version : Issue converting template to 4.1.8
SteveLV702
11-22-2011, 04:08 AM
Site is currently running vb 4.0.7 trying to upgrade it to vb 4.1.8 for my client as they want to be able to create iOS/Android app but I am having a little issue....
they have some ads along the side that I can't seem to fix....
http://www.pro-touring.com/forum.php <--- original site running 4.0.7
http://www.pro-touring.com/beta/forum.php <--- 4.1.8 working on
attached I included some screen shots as can see got /forum.php working/looking right but if click on a thread the ads are at the top and gotta scroll all the way to bottom of ads before see threads... same thing if click on a post....
Anyone help me fix this.
nerbert
11-22-2011, 06:23 AM
I think you need a "clear:none;" in the css for the ad column. "clear:left;" will not allow anything to the left of the column so it drops below the ads. I don't know where there would be a"clear:left;" for the ad column but you can override it with an inline style if you need to.
You know that your testing instance is not allowed to be accessible to the public, right?
(If you have 2 licenses for this domain, disregard my comment.)
SteveLV702
11-22-2011, 01:03 PM
not my site.. I am just helping fix this issue... but I will let the owner know...
--------------- Added 1321974573 at 1321974573 ---------------
I think you need a "clear:none;" in the css for the ad column. "clear:left;" will not allow anything to the left of the column so it drops below the ads. I don't know where there would be a"clear:left;" for the ad column but you can override it with an inline style if you need to.
there is no css for the ad (that I am aware of) there is just a plugin with this info
// 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));
then in FORUMDISPLAY there is this code in there
<div style="float:right; width:100px; position:relative;">{vb:raw banner.1}</div>
<div id="content_container">
<div id="content" style="margin-right:120px;">
then in FORUMHOME there is this 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;">
in navbar there is
<div style="width:468px; margin-left:auto; margin-right:auto; margin-bottom:5px; margin-top:-5px;">{vb:raw banner.2}</div>
search_resultlist there is
<!-- 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;">
and finally but not least in SHOWTHREAD there is
<div style="float:right; width:100px; position:relative;">{vb:raw banner.1}</div>
<div id="content_container">
<div id="content" style="margin-right:120px;">
nerbert
11-22-2011, 02:53 PM
I would just go through all the div tags in all those pieces of code and insert "clear:none;" in the style statements until it works. If doing that doesn't change anything edit it out. If a div doesn't have a style statement add one style="clear:none;" I would start with the code you posted on the bottom in the first div tag.
clear:none probably won't hurt anything and you can experiment around with html and css all you want without worrying you are going ruin anything -- if it does't work undo it.
SteveLV702
11-22-2011, 03:09 PM
ya didn't work :'(
nerbert
11-22-2011, 03:20 PM
There are two div's in the first block of code, did you try those ?
$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......
SteveLV702
11-22-2011, 03:45 PM
Yup
// 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="clear:none; padding: 1px; border: none;">' . $bannerSource . '</div>';
} else {
// Image / URL creative
$banner[$adv_style['styleid']] .= '<div style="clear:none; 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));
then I even tried with a clear: none;
// 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="clear: none; padding: 1px; border: none;">' . $bannerSource . '</div>';
} else {
// Image / URL creative
$banner[$adv_style['styleid']] .= '<div style="clear: none; 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));
neither worked :'(
Lynne
11-25-2011, 03:33 PM
I can't see the non-working site.
SteveLV702
11-25-2011, 04:02 PM
I can't see the non-working site.
like can't see it cause its turned off? or can't see it cause its down cause some people its appearing down all together (like me) while others can see just fine...
Lynne
11-25-2011, 04:12 PM
Can't see it because vbulletin is turned off and therefore I get the vbulletin message (something like) "You've reached our test forum, please go back to www.site.com"
Usually people password protect their test site (.htaccess). That way they can still have the forum on but people can't see it unless they have the .htaccess username/password.
SteveLV702
11-25-2011, 04:23 PM
ya well some reason his hosting had "Frontpage Extension" turned on so wouldn't let password protect it.. and so waiting on host to turn off/disable FrontPage Extension... I would log into cPanel and turn off but some reason I can't even access site at all I just get a failed to connect to server message..
--------------- Added 1322245654 at 1322245654 ---------------
okay he temp turned them on.....
we thought maybe was a issue with new v4.1.8 and all the new template changes but even went and installed a v4.1.7 test forum and problem still exist there too so stuck on what to do to fix it.
http://www.pro-touring.com/ = Live Site
http://www.pro-touring.com/beta/ = Test 4.1.8
http://www.pro-touring.com/beta2/ = Test 4.1.7
--------------- Added 1322247463 at 1322247463 ---------------
okay got FrontPage Extension disabled and directories password protected so have PMed you it so you can see..
--------------- Added 1322247567 at 1322247567 ---------------
um nvm um you don't have PMs turned on
Lynne
11-25-2011, 08:32 PM
Sorry, I turned them off last weekened when I was gone and forgot to turn them back on.
SteveLV702
11-26-2011, 12:39 AM
Sorry, I turned them off last weekened when I was gone and forgot to turn them back on.
okay just PMed you the Username/Password
--------------- Added 1322328584 at 1322328584 ---------------
okay got it sort of fixed on 4.1.8
http://www.pro-touring.com/beta/forum.php
http://www.pro-touring.com/beta/forumdisplay.php?66-Advertisers-Forum
http://www.pro-touring.com/beta/showthread.php?6132-Welcome-to-Pro-Touring-com
all show correctly.. now problem is in /beta/admincp/ the Ad Manager menu option is gone so unable to edit existing ads or ad new ads...
Live Site
--------------------------
http://f.cl.ly/items/1q031U0L202s2A262z0L/Screen%20Shot%202011-11-26%20at%209.16.11%20AM.png
Beta/Test Site (notice Advertising has normal google adsense ads stuff)
-------------------------------
http://f.cl.ly/items/1M3945251q0d0Y2b3J3b/Screen%20Shot%202011-11-26%20at%209.18.13%20AM.png
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.