PDA

View Full Version : 120 x 120 ad display


Patrick
05-08-2008, 05:39 PM
I just discovered your theme theme today and I'm blown away!

Truly a nice looking and great piece of work.

Quick question: Do you have a widget or plugin that would go in the right sidebar that displays 120x120 graphic ads like you have on your own site homepage?

If so that would make one heck of an addition to the template for all of us bloggers out here that are monetizing their blogs.

Thanks much and again...outstanding looking work.

Patrick

Kevin
05-08-2008, 05:43 PM
Thanks Patrick. Glad you like the theme. I'll be getting more released in the coming months :)

The plugin I use is called Got Banners (http://gotchance.com/got-banners-plugin/). It rotates banners so that all banners get displayed in all positions. It's really easy to use.

Let me know if you need any help with the theme :)

Patrick
05-08-2008, 09:43 PM
WOW...what a great plugin.

Thanks much and thanks again for the super theme.

Patrick

Patrick
05-08-2008, 10:36 PM
I've tried the Gotbanners plugin but it won't display 2 across and 2 deep like it does on the bloggingtips.com website.

I notice the right column in Evolution is not as wide as in bloggingtips.com.

Me thinks the problem lies there...however I am now screwed as resizing all elements on the page to give a right column width of 294 as in bloggingtips.com
is way way beyond my abilities.

Would you have a simple solution for this?

Patrick

Kevin
05-08-2008, 10:49 PM
not sure why it isnt displaying 2 down and 2 across

the inside area of the evolution theme is about 265 pixels (if I remember that), this is just over 240 pixels so a 3rd banner should go to the next line

resizing the sidebar is not that hard however it would mean the domtab information being squeezed (and possibly messed up).

Kevin
05-08-2008, 10:58 PM
I'm messing about with this myself to see if I can get this working :)

Kevin
05-08-2008, 11:33 PM
ok, I figured out why this happening.

So now for some basic maths :)

According to this (http://gotchance.com/2007/12/20/gotbanners-making-2-columns/), the plugin puts a 5px banner round every image. This means with 2 banners you have 20 pixels of whitespace so for 2 120x120 banners you would need a width of at least 260 pixels (240 for the images, 5pixels at the left hand side, 10 pixels in the middle and another 5 pixels at the right hand side).

The widget class in the evolution sidebar is about 270 pixels in width however it has padding on the right hand side of 13 pixels and padding of 15 pixels at the left hand side. Therefore, your sidebar area is down to 242 pixels - and if you remember, we need 260 pixels!!

So you have a few options

1. You edit the gotbanners.php file so that the margin is reduced from 5 pixels to 0 (follow this guide (http://gotchance.com/2007/12/20/gotbanners-making-2-columns/)). With no margin used the space you need is only 240 (and remember we have 242 pixels of space). Unfortunately, this means there is no space between the banners which makes it look horrible like this :

http://www.bloggingtips.com/demo/wp-content/uploads/2008/05/gotbanners-1.gif

2. Create a class similar to the widget or about class and reduce the size of the widget. Not too hard really. Just copy the code from them and call it something like 'sidebar-banners' or whatever and reduce the margin.

or the easiest method which is

3. just dont place the gotbanners code inside one of the boxes. This means it wont have a white background but you can keep the 5 pixel margins (which I think is good). This will give you this :

http://www.bloggingtips.com/demo/wp-content/uploads/2008/05/gotbanners-2.gif

Hope this helps you patrick - or at least points you in the right direction. If you have any more problems just let me know :)

Patrick
05-09-2008, 12:31 AM
Okay...I tried for the easiest option (which I think would look pretty good really.)

Unfortunately when I paste the gotobanner code directly into sidebar.php it breaks the sidebar.

I know some php but there is a lot of code going on inside that widget that I don't understand.

I am currently pasting this section of the gotobanner widget code into sidebar.php:

function got_page()
{
echo '<div class="wrap">
<h2>Got Banners Options</h2>
<fieldset class="options">
<legend>Enter your banner codes separated by a Tilde (~)</legend>';

if (isset($_POST['ads']))
{
$handle = fopen("../wp-content/plugins/gotbanners/gotbanners.txt", "w");

$gads = stripslashes($_POST['ads']);

fwrite($handle, $gads);
fclose($handle);
}

$gads = file_get_contents("../wp-content/plugins/gotbanners/gotbanners.txt");

echo '<form action="'.$_SERVER['PHP_SELF'].'?page=gotbanners" method="post">
<textarea name="ads" rows="10" cols="100">'.$gads.'</textarea>
<input name="gsubmit" type="submit" value="Save">';
}

Kevin
05-09-2008, 01:13 AM
you don't need to do any of that
just paste this code

<?php got_banners(); ?>

and the banner function will be called :)