Sunday, October 15, 2006

Random Rotating Banner Hack

It is working!
Press "F5" on your keyboard and a different banner should appear.
After two days of trying (yep very sad, but do I care!), I have finally modified my blogger template to do random roation on the banner graphics. If you don't get what I mean, press "F5" on your keyboard and a different banner should appear, if it happen to be the same banner then press again till you see a new one. It is a standard plug-in for Wordpress but we didn't have it in Blogger.... until now. Well I think this could be the first in the world of Blogger Beta, if not it is definitely my first hack anyway. Thanks Ramani from Hackosphere who gave me a few tips. Read on to see the scripts I have used.

I am not sure if it will works for all blogger templates, so I will just show you what I have done and you may have to modified it for your template. First of all I assume you have created a few graphical banners and have uploaded them onto a graphic hosting website.

For the 'Rounder' template I have used there is a piece of script in the CCS Style Section that read like this:

#header {
background:#476 url("http://www.blogblog.com/rounders4/bg_hdr_bot.jpg") no-repeat left bottom;
margin:0 0 0;
padding:0 0 8px;
color:#fff;
}


Basically my script works by overwriting the 'background' definition at the <body> part of the template. I wrote the following right after the <body> tag:

<script type="text/javascript">

var banner= new Array()

banner[0]="http://static.flickr.com/84/269053449_acad87a793_o.jpg"
banner[1]="http://static.flickr.com/95/269053438_4ef5a3983e_o.jpg"
banner[2]="http://static.flickr.com/96/269053404_44a3b0eda8_o.jpg"
banner[3]="http://static.flickr.com/108/269053262_608edbdda4_o.jpg"
banner[4]="http://static.flickr.com/98/269053232_6f7c6f994a_o.jpg"
var random=Math.round(4*Math.random());

document.write("<style>");
document.write("#header {");
document.write(' background:url("' + banner[random] + '") no-repeat left TOP;');
document.write(" }");
document.write("</style>");

</script>


My scripts above used Java Script to define an array of 5 url locations of the banners' graphic. Then the next line generate a random discret number between 0-4. The next part will generate some html codes to overwrite the "background" definition of the the "Header" style by selection a random banner everytime.

You will need to change the following:
1) The URL Locations of your graphics.
2) If you have 5 banners, you type "4" in the random number generating equation Math.round(4*Math.random()); If you have 3 banners type "2" and so forth.

Good luck, let me know if it works.

289 comments:

«Oldest   ‹Older   201 – 289 of 289
sohbet odaları said...

very blog thanks

Anonymous said...

Yes! Finally something about christian louboutin.
Feel free to visit my webpage Christian Louboutin Outlet

Anonymous said...

What is absolutely exciting for me is always that within those 12 days I am now 25% exactly towards my goal I set myself: an objective of 32 kg to shed in 56 days. However, I would want to recommend walking at a fast pace phen375 most people get overweight to eat the incorrect foods in the wrong time. Improve a man body, mind and spirit to eat a diet plan prescribed because of your genes, and take advantage of natural weight reduction along with a healthy total well being. When they're putting on the weight by shoving a complete bit of cake inside their mouth given that they can't stop, you'll already be satisfied because you've had your 3 bites http://www.phen375factsheet.com i had signed the oprah challenge, arrived at lifeskills 411, the you are a ceo events, and was beginning food addicts anonymous. 0 hours producing longer time period of action, and so partly to blame for "The Weekend Pill" sobriquet [url=http://www.phen375factsheet.com]phen375 cheap[/url] plan any occasion . and snacks at approximately exactly the same time daily.

islington escorts said...

If a site has quality contents, all other points are valid as reader will only come on your site if there is quality on your site.

richmond escorts said...

I have to say that for the last few of hours i have been hooked by the amazing posts on this site. Keep up the great work.

london escorts said...

Exceptionally interesting thank you, It is my opinion your audience might possibly want a good deal more stories like this keep up the great effort.

hotel escorts said...

I see that you did a hard work, finishing your good enough issue referring to this good post.

Anonymous said...

I just couldn't go away your website before suggesting that I actually loved the usual information a person provide in your visitors? Is going to be back continuously in order to inspect new posts
Feel free to visit my web-site : http://social.wuasabi.com/profile/stephenqac

Chat said...

Very nice publish, i definitely love this website, keep on it

Anonymous said...

pay shanghai massage distinction to the roots or map out highest These stocks are unrivalled commence the exchange trend Because the rules of the market will

Anonymous said...

Beneficial monster liver [url=http://www.ddtshanghaiescort.com/shanghai-escort.html]shanghai massage[/url] chiefly with iron wishes aide to repair anemia mollycoddle fitted more than seven months has been

Anonymous said...

the broader turn to account of the [url=http://www.ddtshanghaiescort.com]shanghai escorts[/url] android arm Toe the ingest of software or a change in the annex, the mechanical man arm can be without even trying re-assembled

cheap london escorts said...

Nice blog with a great content, thx you
London Escorts

Anonymous said...

My brother recommended I might like this blog. He was totally right.
This post actually made my day. You can not imagine simply how much time I had spent for this information!
Thanks!

Also visit my website - rif

Anonymous said...

Thank you for the auspicious writeup. It in fact was a
amusement account it. Look advanced to more added agreeable from you!
By the way, how could we communicate?

Here is my page :: jkf

Anonymous said...

Its like you read my mind! You appear to understand a lot
approximately this, such as you wrote the ebook in it or something.
I feel that you just could do with some p.c. to drive the message home a bit, however instead of that,
this is magnificent blog. A great read. I will certainly be
back.

Also visit my homepage - verizon wireless ringtones munsters theme
my web page - cruise newsletter

london escorts said...

great website

Anonymous said...

Nice blog here! Also your website loads up fast!

What web host are you using? Can I get your affiliate link to your host?

I wish my website loaded up as fast as yours lol

Visit my blog; sell structured settlement companies

Anonymous said...

It's really a nice and helpful piece of information. I'm glad that you shared this useful information with
us. Please keep us up to date like this. Thank you for
sharing.

Also visit my web page :: structured settlement loans

Anonymous said...

First of all I want to say superb blog! I had a quick question that I'd like to ask if you do not mind. I was curious to find out how you center yourself and clear your head before writing. I have had difficulty clearing my mind in getting my ideas out there. I truly do take pleasure in writing however it just seems like the first 10 to 15 minutes are wasted just trying to figure out how to begin. Any suggestions or tips? Thanks!

Also visit my web blog - structured settlement loans

Anonymous said...

I really like reading an article that will make men and women think.
Also, thanks for allowing for me to comment!

My homepage - ava fx

Anonymous said...

You are so interesting! I don't think I have read anything like this before. So wonderful to discover another person with a few genuine thoughts on this issue. Really.. thank you for starting this up. This site is something that is needed on the internet, someone with a little originality!

Look at my homepage: http://get-plus-followers.com

Anonymous said...

It's amazing designed for me to have a web page, which is valuable in favor of my knowledge. thanks admin

My website: http://www.myplan.com/community/profile.php?mode=viewprofile&u=1034066

Anonymous said...

Oh my goodness! Amazing article dude! Thank you, However I am having problems with your RSS.
I don't understand the reason why I am unable to join it. Is there anybody having similar RSS issues? Anyone that knows the solution will you kindly respond? Thanks!!

Here is my blog: aaa fx

Anonymous said...

Hello, this weekend is fastidious in support of me, because this
time i am reading this great informative article here at my home.


my weblog get more followers on twitter
my page: how can i get twitter followers

cheap london escorts said...

Thanks for sharing this post, very usefull!

cheap london escorts said...

Thanks for sharing this post, very interesting!

cheap london escorts said...

Thanks for sharing this post, very interesting.

Anonymous said...

What's up everybody, here every one is sharing these kinds of experience, therefore it's nice to read this web site,
and I used to visit this webpage everyday.

Feel free to visit my blog post :: http://www.mi.hs-heilbronn.de/gmds-cbt/index.php?title=Save_Money_By_Shopping_Beauty_Products_Online
my site: http://wiki-gratuit.com/index.php?title=Utilisateur:MapleKerr

london escorts said...

Thanks for the post I have learned a lot from it. You make a good job, very usefull!

cheap london escorts said...

Thanks for the post I have learned a lot from it. You make a good job, very usefull!

London Escorts

cheap london escorts said...

Thanks for the post I have learned a lot from it. You make a good job, very usefull!

Anonymous said...



My web site lottery software
My website: how to win the lottery

islington escorts said...

Well, guys really thanks for your help! Thank you for every other great post.

islington escorts said...

Well, guys really thanks for your help! Thank you for every other great post.

Cheap Islington Escorts

cheap richmond escorts said...

I really like your writing style, superb information, thankyou for posting

hotel london escorts said...

Hey there! I could have sworn I’ve been to this website before but after checking through some of the post I realized it’s new to me. Nonetheless, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!…

hotel london escorts said...

Hey there! I could have sworn I’ve been to this website before but after checking through some of the post I realized it’s new to me. Nonetheless, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!…

pes patchs said...

pes patchs

Anonymous said...

I've been surfing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. Personally, if all site owners and bloggers made good content as you did, the web will be a lot more useful than ever before.

Review my web-site - 78736

Anonymous said...

Thanks in support of sharing such a good thought, paragraph is nice, thats why i have
read it entirely

Feel free to visit my web site :: michael kors perfumes

Anonymous said...

Fantastic beat ! I would like to apprentice while you amend your web site, how could i subscribe for a blog
website? The account helped me a acceptable deal. I had been
tiny bit acquainted of this your broadcast offered bright clear idea

my web-site tv shows

Anonymous said...

Quality posts is the secret to attract the visitors to pay a quick visit the website, that's what this website is providing.

my website - roasted coffee beans

Anonymous said...

I am curious to find out what blog system you have been utilizing?
I'm having some small security problems with my latest blog and I would like to find something more safe. Do you have any solutions?

Feel free to surf to my blog post :: Relevant Site

Anonymous said...

Typeѕ of online gаmes online games are a supeгlative traνel by fourth dіmеnѕіon
for many should be to Unloose thеmselves, for entiгely
а fеw hours, of their mοnotonоus or hеctic Day-to-daу routines.


Visit my web page game

Anonymous said...

Great blog here! Also your website lots up very fast! What host are you using?
Can I get your affiliate hyperlink on your host? I want my website loaded up
as quickly as yours lol

Also visit my weblog michael kors mens watches

Anonymous said...

I tend not to write a lot of remarks, however i did some searching and wound up
here "Random Rotating Banner Hack". And I actually do have 2 questions for you if
it's allright. Could it be just me or does it seem like a few of the responses look like they are left by brain dead individuals? :-P And, if you are writing at additional online sites, I would like to keep up with anything fresh you have to post. Would you list of all of your public pages like your twitter feed, Facebook page or linkedin profile?

my website - レイバンサングラス

Anonymous said...

hermes bagsAuthentic Hermes Bags drvu 2013 Hermes HandbagsKelly Hermes Handbags fajv

Anonymous said...

There's definately a great deal to learn about this issue. I really like all of the points you have made.

Take a look at my weblog ... プラダ アウトレット

Anonymous said...

Your style is really unique in comparison to other folks I
have read stuff from. Thank you for posting when you've got the opportunity, Guess I'll just book mark this site.


Here is my web-site :: snipurl.com

Anonymous said...

As an gгownup with young childrеn, I pay close attention to somе net Plump for in the sort оf freeplays.
recently, Digіmon creatіon chamρionship, specified fог indisputаblе
tο Нaνe got a lot of fun. exactly snap on which linеаment/scene you the puzzle, the solvent and so helps them in proceedingѕ toωaгds their Climaх missions.
Hither you cаn Rеcreatе many games inсluding Μаter's twinned game, Luigi's wear upon game where you Facilitate Ϲonstruct the
almost unparalleled anԁ creatiѵe downloadable titlеs for the Recreatе Stаtion Vіta.

Anonymous said...

Тhе tune too metre to frеe your strain and Run imperatіvenеss.
Тhis giνеs yоu a primaгily
inνolѵe localizatіon a concеaleԁ
tгіgger. ΤhisMіnnie comрuter mouse ρrіntablеiѕ perfect the zombіeѕ walk in a suге couгѕe to the terminus
ad quеm, so the zombies cаn not gеt into the hοusе and
eаt thе leаrning аbility.


Loοk at my blog ... game

Anonymous said...

tro choі Wіsh cаrԁgames, Colοnnaԁе games anԁ Lοtto games can
Get іs beсoming mоre pop prеsent.

my web blog http://www.arabyada.com

Anonymous said...

I know this web site presents quality depending posts and other information, is there any other web page which provides such things in
quality?

My blog f15ijp.com

Anonymous said...

It's actually a nice and helpful piece of information. I am satisfied that you simply shared this helpful information with us. Please stay us up to date like this. Thank you for sharing.

Here is my weblog - cheap mac makeup

Sweety Singh said...

hallo i am Meetali Singh an escort girl to know more information visit on my site..
http://www.delhincrescortgirl.com/goa-escorts.html

Anonymous said...

I’m not that much of a online reader to be honest but your blogs really nice, keep it up!
I'll go ahead and bookmark your site to come back down the road. Cheers

Feel free to visit my weblog - karen millen clothes

Anonymous said...

My partner and I stumbled over here by a different website and thought I
might as well check things out. I like what I see so now i'm following you. Look forward to looking at your web page repeatedly.

Feel free to visit my web page: the tao of badass

London Escorts 24/7 said...

Really a good blog I like these types of blogs. A London escorts gallery for our International customers. Most of the escorts here are also of foreign descent.

Anonymous said...

Nicole Kidman was came with by her spouse Keith Urban just like she
showed more at the event. A crucial point is actually utilizing conference.

that appear always on every page linked with a website may very well be known as site-wide links.
Upper back at the battle, Rocky orders some kind of Ice Ball from Walrein.
http://historichoodriver.com/index.php

Anonymous said...

Great sіte from ωhat I've read so far. My name's Millаrd and I'm extremely pleased to view your blog. In fact, I'd loѵe to get іn
tоuch wіth you. Wіll you mаke sure you drop me а
e-mai?

Hеre is my web ѕite http://nintendonm.com/index.php/Användare:CareyCarr

Anonymous said...

Can І just saу that after finding Bloggеr: Freeуaѕoul Aԁventuгe on Ziκula, ωhat a гelief to uncovеr someοnе whо bаsiсallу knоws ωhаt
they're writing about when it comes to this. You definitely grasp how to bring a problem to light and make it worthwhile. Many more people should have a look at this and see this side of the story. I can't
believe you're not more well-known, because you most truly have the gift.

My blog post :: 66824

Anonymous said...

I loved as much as you will receive carried out right here.
The sketch is tasteful, your authored subject matter stylish.
nonetheless, you command get bought an shakiness over that you wish be delivering the following.
unwell unquestionably come more formerly again since exactly
the same nearly a lot often inside case you shield this hike.


Also visit my weblog; nike air max 2013

Anonymous said...

The Bеst gгeen coffee bean extгact side effectsWith а unique аpproach to helping people lose weight.

Aԁditionally, grееn tea гaiѕes metabolism
by 4 percent. Both RachеlRаy and a spokesmаn foг Οprah Winfгeу filedsworn statеmentswith
the FТC, alleging that the company they агe dealing ωith сompаniеs of гeρute аnd which
green сoffee bean extract sіde effects haѵe been
shown to help preѵent some types of сanсer.


Here is mу webpаge ... pure green coffee extract

Anonymous said...

тут на сайте можно посмотреть громадный выбор [url=http://www.filmkpktut.ru/]скачать бесплатное видео[/url].

Anonymous said...

Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my
blog that automatically tweet my newest twitter updates.
I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

Feel free to surf to my web-site ... Cheap Ray Ban Sunglasses

Anonymous said...

There will be a choice of taxi's, The Metro and also buses. Just getting them to debate the subject is plenty. in conjunction with its counterpart underneath the ownership of Ursula. when Louis first begin working with glass; he used jello jars and multiple glass bottles. http://moodle.iesjacaranda.es/user/view.php?id=100273&course=1

Anonymous said...

Practically nothing an research study tint merge manner perhaps even find that has virtually any section.
Within just Paris, nearly just about every single designer had
this camel coat across the runway. Antique-finished replica handbags are also
provided for the how it looks inclined. Today for some reason,
horrid trends use it during. http://www2.u-netsurf.ne.jp/~haruka/aska/aska.

cgi

london escorts said...

nice photos xx

london escorts said...

great website

london escorts said...

Nice blog with a great content, very interesting.. take care, ;)

london escorts said...

thank you for this precious information you update on this blog i will looking forwards for more information.

london escorts said...

such a great sort of post, nice there.

tek parça film izle said...

amazing blog

london escorts said...

i like very much this blog, you’re a great blogger.. and you make a good job with this articles, keep making that.. take care

Anz Joy said...

That's great just got it to work on my blog

Francis Kalu said...

Nice psoting... Have you read NAIJ Today? READ ON NAIJ NOW

Francis Kalu said...

Have you read NAIJ Today? READ ON NAIJ NOW

Francis Kalu said...

Your No. 1 Bustop for Tech Tips and Naija MP3

Francis Kalu said...

Your No. 1 Bustop for Tech Tips and Naija MP3

George Emmanuel said...

I tried it out but it did not work on my blog. Please help out. Thanks

hd porno film said...

Thank you for your time on commenting! I love all your comments and really appreciate your thoughts.Thanks
Ankaradaki Hayat Kadınları
Adana'da Hayat kadını
travesti arama portalı
Antalyada escort Kadını
mobil 3gp sex indir
seks anal sex indiriniz

Karen DebraMagdalena said...

Woա, sսperb blog layout! How ⅼong have you been Ьlogging
for? you make blogging look easy. The overall look of уour
web site is wonderful, as well as the content! I has some good article to share with you.. Check List Here
obat mata lelah karena komputer
cara menghilangkan cairan dalam perut
Cara Mengobati Keputihan Disertai Sakit Pinggang dan Perut

Blythe DorisSharon said...

obat hisprung
obat turun berok
zinc tablet anak green world
Obat pengering luka pasca operasi caesar

oky myla said...

cara mengeringkan eksim basah
bahaya penyakit hemofilia

Karen DebraMagdalena said...

I am really empowered with your writing talent. Anyway keep up the wonderful high
quality writing, it’s rare to see a great blog
such as this these days. I has some good article to share with you.. Check List Here
Slimming Capsule dan Pro Slim Tea Green World
obat mata lelah karena komputer
obat pengecil pori pori wajah di apotik

veys yılmaz said...


sohbet
chat

sohbet
elazig bilgisayar tamiri

DamTops said...

This is really awesome

damilola miracle said...

Truly awesome check more transitional coding here DamTops

«Oldest ‹Older   201 – 289 of 289   Newer› Newest»