Jump to content

Free mod - Banner Rotation


Guest senyoupro

Recommended Posts

Guest senyoupro

I had been looking for a banner code that would work and I couldnt see to come across an answer on here so I tried a few codes out and finally got a good one that works great.

Goto /StyleTemplates/Global/index.tpl

Copy the following code,

-if youd like it to be at the top of the page above the cart place the code directly after <body>

-if youd like it at the bottom of the page copy the code directly after </body>

-Use <br> (as many needed, I used 2) to space it from the copyright text. Check mine to see the spacing.

This will add the rotation of banners to the bottom of your page.

For preview goto the bottom of my store.. www.senyoupro.com/store

<script LANGUAGE="JavaScript">



<!-- Begin

var how_many_ads = 3;

var now = new Date()

var sec = now.getSeconds()

var ad = sec % how_many_ads;

ad +=1;

if (ad==1) {

url="http://www.1and1.com/?k_id=8923729";

alt="http://www.1and1.com/?k_id=8923729";

banner="http://1and1.org/banners/counting2.gif";

width="468";

height="60";

}

if (ad==2) {

url="http://www.senyoupro.com";

alt="SenyouPro.com";

banner="http://www.senyoupro.com/images/SenyouPro_logo.gif";

width="468";

height="60";

}

if (ad==3) {

url="http://www.goto.com";

alt="goto.com";

banner="http://imageserv.imgis.com/images/Ad13700St1Sz1Sq1_Ban1.gif";

width="468";

height="60";

}

document.write('<center>');

document.write('<a href=\"' + url + '\" target=\"_top\">');

document.write('<img src=\"' + banner + '\" width=')

document.write(width + ' height=' + height + ' ');

document.write('alt=\"' + alt + '\" border=0><br>');

document.write('<small>' + txt + '</small></a>');

document.write('</center>');

// End -->

</SCRIPT>

Link to comment
Share on other sites

Guest vrakas

Nice job :)

I also noticed you changed the copyright font colour, good. ;)

Now you moved all the boxes to the left you have to make the main frame to fit the page ;)

Link to comment
Share on other sites

Guest benlogan

I have done your mod, and it works great except the "Powered By" is linked to my affiliate address. How do i fix that. Also how can i stop the blue outline off hyperlinked items?

Link to comment
Share on other sites

Guest senyoupro

I have done your mod, and it works great except the "Powered By" is linked to my affiliate address. How do i fix that. Also how can i stop the blue outline off hyperlinked items?

Thats odd. I didnt even notice that it did that until you mentioned something and I looked at mine.

I fixed the problem though, to have it at the bottom of the page, place it after </body>

Use <br> (as many needed, I used 2) to space it from the copyright text. Check mine to see the spacing.

Link to comment
Share on other sites

how can i stop the blue outline off hyperlinked items

I usually go all out and create a style in the stylesheet that says

a img {

border: 0px;

}

or add a class to the link, say, class="imglink" or class="noborder" and in the stylesheet go

a.imglink {

border: 0px;

}

That should cover all the bases in shorthand. Or you could write it all out . . .

a.imglink:link img, a.imglink:active img, a.imglink:visited img, a.imglink:hover img {

border: 0px;

}

A little pedantic, but anyway that's the way I usually do it :)

Link to comment
Share on other sites

@ Bill, that would be a background-image on the body tag, like I used on my first CubeCartâ„¢ store :)

Here's one way of coding something like that:

body {

	background:black url(../styleImages/backgrounds/pageBg.gif) no-repeat fixed;

}

Make your skyline named pageBg.gif, or change the image name in code above. You can also set background-position: bottom; if you want to align it with the bottom of the screen, centered.

Link to comment
Share on other sites

Guest senyoupro

nebody actually worked out how to make the banners rotate? as the script donnt seem to work

works fine on my page? I think if you had more than just two banners that it would show them more randomly but since I only have 2 it shows one more and less randomly.

Link to comment
Share on other sites

Guest blacktaisaltco

hello. can you tell me the idots way to do this? i want to change my website around www.blacktaisaltco.com

my web guy quit and I dont know how to do it!! I am trying to learn until i get someone.

[email protected]

i want to add a background to the home page, a picture if possible, then change it around so that I have extra space to write some things on the homepage, because now, it looks as iff it doesnt go to the end of the page.

Gerald Katen.... If you can help, I will give my exotic salts and scrubs...

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...