Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   placing a few ad banner in header area (http://forum.bytesforall.com/showthread.php?t=499)

monochrome Feb 22, 2009 02:56 PM

placing a few ad banner in header area
 
Hi

First of all thanx for this excellent theme! I am totally overwhelmed by the flexibility and tweak-options.

One thing i can't figure out and that's how to place a few small ad banners linking to advertisers in the header area. The banners will not overlap the RSS or search field, thus remain to the left.
Three half size banners would be the ideal situation... all linking to their own advertiser.

I just replaced the logo image with one half size banner. This is my website -> www.monochrome.nl
Now i'd like 3 of these banners.... and with a correct link and not only linking to the homepage.

Is this possible... and how???

monochrome Feb 22, 2009 03:30 PM

Small correction... i would like to place the ads in the logo area.

Thanx in advance and a donation is made. Keep up the good work!

Flynn Feb 22, 2009 06:04 PM

At A. Theme Options -> Header, delete what you have at Show Logo Image? and leave Show Blog Title? and Show Blog Tagline? at No as you have it now.

In functions/bfa_header_config.php, find at around line 98, this:
PHP Code:

    // END of title/description 

and replace with this:
PHP Code:

    // END of title/description
$logo_area .='
    <td rowspan="2" valign="middle" class="header-banner">
    BANNER 1 CODE
    </td>
    <td rowspan="2" valign="middle" class="header-banner">
    BANNER 2 CODE
    </td>    
    <td rowspan="2" valign="middle" class="header-banner">
    BANNER 3 CODE
    </td>
'


Optional:
To customize the three table cells containing the banners, add via HTML/CSS Inserts -> CSS Inserts

HTML Code:

td.header-banner {
width: XXXpx;
padding: Xpx Xpx Xpx Xpx;
}

On another note:
You've set your width to 99% with a min-width of 1024px and a max-width of 1024px. You could achieve the same by putting "1024px" into Layout -> Layout WIDTH and type (FLUID or FIXED).

Also, you should set this to 1000px instead because right now you have horizontal scrollbars. The vertical scollbar needs room, too. The max width that works in all browsers for 1024px screens without causing horizontal scrollbars is 1004px.

Thank you for the donation

monochrome Feb 24, 2009 12:30 PM

Thanx Flyn!!

It took me a while to figure it out, but now it's done i'm really happy with the results.

I only have to figure out how to get some space between the two banners and get the sponsor banner to open in a new window.

Cheers
Frank

Flynn Feb 24, 2009 12:37 PM

To open links in a new window add the bold part to the link

<a target="_blank" href="....

To get spaces between the banners use the CSS I posted above and put values in there

HTML Code:

td.header-banner {
padding: 0px 20px 0px 0px !important;
}

This means a padding of 0 TOP, 20px RIGHT, 0 BOTTOM, 0 LEFT.

The result would be a 20 pixels space on the right side of each banner.

monochrome Feb 24, 2009 03:00 PM

Thanx again Flyn!! The banner opens a new window. The spacing somehow doesn't work. I checked the bfa_header_config.php and the code is exactly like you posted, except i left the td tag open to include the link info.. like this. Or should i leave the <td> behind the "header-banner" and open another <td> in the next line?

Sorry to ask so many question... i can hardly understand HTML, so all i can do is copy/paste :o

Quote:

// END of title/description
$logo_area .='
<td rowspan="2" valign="middle" class="header-banner"
width="234" height="60"><a target="_blank" href="URL OF ADVERTISER"><img src="URL TO BANNER" border="0"></a>
</td>
<td rowspan="2" valign="middle" class="header-banner"
width="234" height="60"><a href="mailto:MY EMAIL?subject=Advertizing on Monochrome watch blog"><img src="URL TO BANNER" border="0"></a>
</td>
';

Flynn Feb 24, 2009 03:19 PM

My fault, I added !important to the CSS code in post #5 now. Please try again with the code above it should work now.

It didn't work because it could not overwrite the default style for table cells in the logoarea-table.

monochrome Feb 24, 2009 03:28 PM

Hahahaha... i'm really just copy-paste level :)
Thanx again Flynn !!

And it works

keeperleaguegm May 4, 2009 11:47 AM

Flynn...this new theme is awesome. Similar to monochrome I'd like to use the header area to serve ads. However, unlike him/her I wanted to remove the page link menu and replace it with a 728 x 90 and keep the logo/blog title intact. The explanation you provided didn't seem to fit...is this possible? Thanks again...donation coming your way.

Mike

Flynn May 5, 2009 07:04 PM

In bfa_header_config.php find

PHP Code:

        // END of title/description 

and after it add

PHP Code:

$logo_area .='
<td valign="middle">
YOUR BANNER CODE
</td>'


And at Theme Options -> Header, turn off the search box, and at Theme Options -> RSS Settings, turn off the RSS icons

To move the banner around give the td an id, then add styles at CSS Inserts

$logo_area .='
<td valign="middle" id="my728banner">
YOUR BANNER CODE
</td>';

CSS Insert:
HTML Code:

td#my728banner {
margin: XXpx XXpx XXpx XXpx;
}


keeperleaguegm May 29, 2009 01:12 PM

Flynn-
I must be a moron, but I can't locate the bfa_header_config.php. I'm using the new theme 3.32.

Thanks,
Mike

keeperleaguegm May 29, 2009 01:31 PM

Nevermind...got it.

keeperleaguegm May 29, 2009 01:45 PM

Flynn: Make adjustments to the code as suggested (with my ad code inserted):

// END of title/description
$logo_area .='
<td valign="middle">
<SCRIPT>
document.write('<scr' + 'ipt src=http://ad.doubleclick.net/adj/keeperleaguegm.fsv/home;sect=home;fantasy=yes;game=no;tile=1;dcopt=is t;sz=728x90;ord=' + random_number + '?></scr' + 'ipt>');
</SCRIPT>
<NOSCRIPT>
<A HREF="http://ad.doubleclick.net/jump/keeperleaguegm.fsv/home;sect=home;fantasy=yes;game=no;tile=1;sz=728x9 0;ord='+random_number+'?" >
<IMG SRC="http://ad.doubleclick.net/ad/keeperleaguegm.fsv/home;sect=home;fantasy=yes;game=no;tile=1;sz=728x9 0;ord='+random_number+'?" border="0" height="90" width="728"></A>
</NOSCRIPT>

</td>';


Then I got this error on the site:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/keeperle/public_html/wp-content/themes/atahualpa332/atahualpa332/functions/bfa_header_config.php on line 122

Suggestions?
Thanks,
Mike

mwsmedia Jun 8, 2009 11:31 PM

Quote:

Originally Posted by Flynn (Post 1953)
At A. Theme Options -> Header, delete what you have at Show Logo Image? and leave Show Blog Title? and Show Blog Tagline? at No as you have it now.
In functions/bfa_header_config.php, find at around line 98, this:
<snip>

Would this technique also work to create a widget area (sidebar) in this area above (or below?) the name of the blog?

Sounds like a good work-around for not being able to customize the links of the image block..!

Flynn Jun 11, 2009 04:34 AM

You can create widget areas anywhere in the layout. There was a thread about this here on the forum

meK Jun 12, 2009 01:50 AM

Ok , i'am haveing problem moveing around the new banner on my blog .
Everything works grate , but the banner is not in the middle like i want to ... i follow all the steps and still nothing....

This is my header_config.php :

// END of title/description
$logo_area .='
<td valign="middle" id="my728banner"><a target="_blank" href="http://www.weddingpro.ro"><img src="http://anzia.ro/images/weddingpro2.jpg" border="0"></a>
</td>';

And this what i added on Css Inserts :

td#my728banner {
margin: 100px 100px 100px 100x;
}
#sbsl27_1 {
width: 100%;
}
ul.rMenu {
background: transparent;
margin-top: 215px;
margin-left: 2px;
padding: 0px;
position: absolute;
width:auto;
z-index:4;
}
ul.rMenu li {
background-color: transparent;
}
ul.rMenu li a:link,
ul.rMenu li a:hover,
ul.rMenu li a:visited,
ul.rMenu li a:active
{
font-weight: bold;
}
#imagecontainer {
position:absolute;
width:100%;
z-index:3;
}
#sbsl6_3 {
width: 100%;
}

Can anyone tell me what i'am missing ?

Flynn Jun 18, 2009 04:26 AM

You cannot have margin on a table cell.

td#my728banner {
margin: 100px 100px 100px 100x;
vertical-align: middle;
text-align: center;

}

Nicooo Jun 25, 2009 11:37 AM

1 Attachment(s)
Hi,

and thx for this great theme !!!!

IŽd like to have a Leader (728x90) on this place here @ center...

Please HELP:)

jfriedman Jun 25, 2009 04:44 PM

I've been running a 468x60 ad in the logo area at damtrends.com. People like the placement so much that I've already gotten 2 inquiries about it. Is there a way I can set up a rotation of 2 or more ads in that same space in the logo area?

Flynn Jun 25, 2009 08:11 PM

This will not rotate them but display a random one on each page view:

PHP Code:

<?php $random_number rand(1,3); 
switch (
$random_number) {
case 
1$img "someimage1.gif"$link "http://advertiser1.com/"; break;
case 
2$img "someimage2.gif"$link "http://advertiser2.com/"; break;
case 
3$img "someimage3.gif"$link "http://advertiser3.com/"
?>

<a href="<?php echo $link?>"><img src="<?php echo $img?>" alt="" /></a>

If you want real rotation, specific view shares per advertiser and other settings look for an ad management script or plugin

Dan Jun 26, 2009 11:56 AM

How is it possible that there is not an easy way to add html code to the banner area so we can rotate affiliate banner links? This seems pretty basic for any modern website.

ArtfulPussycat Feb 1, 2010 02:10 PM

So I have been all through bfa_header_config.php and the following code is just not there. (newer version?)
Code:

// END of title/description
Without that remark in bfa_header_config.php, where do I insert Flynns code above?

Thanks in advance for any/all help!


All times are GMT -6. The time now is 06:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.