Got Chance

gotbanners making 2 columns

GotBanners – Making 2 Columns

December 20, 2007 by Hari

If you have installed GotBanners and if it displays only one columns of banners, here is your solution. I started getting a lot of mails asking me how to do it. So, here is the answer. Its fairly simple.

It purely depends on the space you have. You need to have atleast 290px width to accommodate 2 rows of 125×125 banners. Because, GotBanners automatically adds 5px margin to each banner. If you have lesser space, alter this line in gotbanners.php :

echo "<style>.gotbanners { text-align: center; } .gotbanners img { margin: 5px; } </style>";

Change the 5px to something lesser. If you just have 250px, you’ll have to change it to 0px.

Hope its clear for everyone. If you have any other questions, feel free to contact me.

If you’re new here, you may want to subscribe to our RSS feed. Thanks.

Posted in Programming, WordPress Plugins.









29 Responses to “GotBanners – Making 2 Columns”

Trackback URL
Feed for this entry

 

Well since GotBanners plugin supports HTML what do you say about simply adding br at the end of each banner

xHTML Coding wrote on December 21st, 2007 at 4:40 pm

 

That is not at all required. Because, GotBanners automatically aligns the banners into different lines.

By the way, i think you have not understood the topic of this post. This post is about how to make 2 columns and not 2 rows…

Hari wrote on December 21st, 2007 at 4:45 pm

 

I’m still confused?. What part of the code above is telling gotbanners to split into 2 columns? All that seems to be doing to me is making the column spacing less than 5px? Are you sayoing that gotbanners looks at the TD width first to determine if it will go 1 column or two automatically?

Sorry if I appear stupid

Jason wrote on December 21st, 2007 at 8:15 pm

 

Basically, GotBanners displays all the banners as such. It just adds a 5px margin andthe displays as banner1, banner 2 etc… If you do it normally, they will not be aligned. So, i used a <center> tag so that the banners will be aligned properly irrespective of the number of columns. Now, a banner goes to the next line only if it has insufficient space in the first line. So, if we reduce the margin, we give the next banner more space…

I hope that is clear

Hari wrote on December 22nd, 2007 at 2:47 am

 

I just wanted to take a moment to thank you for GotBanners. I’m running it in a test blog to display two rows with 3 buttons each and it works great!

Robert Irizarry wrote on January 4th, 2008 at 5:15 am

 

Thanks I was looking for something like this and your plugin works great.

Jason wrote on January 6th, 2008 at 1:13 am

 

Hi admin!

My blog has error when i setup your plugin , my blog is WordPress 2.3.1 , how to do i must now ? pls help me , thank you

alex wrote on January 12th, 2008 at 2:24 pm

 

Haven’t tested it on 2.3+. So, i might not work.

Never mind about that. My next project is about to be launched. Does all what GotBanners does and also has many extra features : Rotatee

Hari wrote on January 12th, 2008 at 5:56 pm

 

Tested this and it is working great.

I wanted to make it to show just 2 ads though. In the current configuration, the script only displays ALL of the ads in a random order.

To fix this:

edit gotbanners.php around line 80 to this



for($j=0; $j

Jim wrote on January 19th, 2008 at 4:24 am

 

Hey Jim,

As i’ve been saying, my new project Rotatee.com has a solutiong for this too. You can display any number of banners at a time…

Hari wrote on January 19th, 2008 at 8:20 am

 

I am working getting two columns, but it isn’t working. I have exactly 250px of space, and have modified the code per your instructions an nothing. I have even removed the center tag, but no luck. Any ideas?

jason wrote on February 3rd, 2008 at 1:31 am

 

Hey jason,

Are you talking about http://finance.jasoncrews.name/ ? If so, i see that GotBanners is working well on that site.

By the way, i suggest that you try Rotatee.com : /2008/02/01/rotateecom-launches/

Hari wrote on February 3rd, 2008 at 7:04 am

 

Happy to say that GotBanners is working very well with my site’s new theme. And I’ve seen no issues running under the 2.3.x.

Robert Irizarry wrote on March 10th, 2008 at 10:15 pm

 

many thanks for the plugin.

btw, i like your bubble comment style

Samsul wrote on March 23rd, 2008 at 5:13 am

 

oh ! thanks,

Hari wrote on March 23rd, 2008 at 11:32 am

 

I like the way gotbanners work, but i would like to only show two banners and to rotate them. I got about 12 banners in total, but would like to show only 2 at a time. Is there any chance to do so? I realize Rotatee does just that, but since its in private beta, can’t really access it.

Paul wrote on April 4th, 2008 at 9:59 am

 

You can use the “gotchance” invite code to sign up !

Hari wrote on April 4th, 2008 at 3:31 pm

 

ultras supporters

beşiktaş wrote on April 19th, 2008 at 2:23 pm

 

sorry

hit sihirbazı wrote on April 19th, 2008 at 2:24 pm

 

adopbe

hit oranı wrote on April 19th, 2008 at 2:24 pm

 

polly

kmk bilişim wrote on April 19th, 2008 at 2:24 pm

 

ileydaes

site hazırla wrote on April 19th, 2008 at 2:25 pm

 

lolita

ankara evden eve wrote on April 19th, 2008 at 2:25 pm

 

jolire

söve wrote on April 19th, 2008 at 2:25 pm

 

rererr

film izle wrote on April 19th, 2008 at 2:26 pm

 

Useful…

Thanks!

ASP wrote on April 19th, 2008 at 4:31 pm

 

great plugin, so why not also install an option to make 2 or even more ads possible?

gofree wrote on May 9th, 2008 at 10:49 am

 

hi cool plugin workin fine with wp 2.5.1

thanks for the plugin

akash wrote on June 10th, 2008 at 6:46 am

 

Yes, this is a really cool plugin.

Watch Shaman King wrote on July 16th, 2008 at 12:21 pm

Leave a Reply