How do you make it so that every time a member goes to a new page the logo changes?
| CODE |
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin var how_many_ads = 2; var now = new Date() var sec = now.getSeconds() var ad = sec % how_many_ads; ad +=1; if (ad==1) { url="URL GOES HERE"; alt="ALT TEXT"; banner="IMAGE URL HERE"; width="NUMBER"; height="NUMBER"; } if (ad==2) { url="URL GOES HERE"; alt="ALT TEXT"; banner="IMAGE URL HERE"; width="NUMBER"; height="NUMBER"; }
document.write('<a href=\"' + url + '\" target=\"_blank\">'); document.write('<img src=\"' + banner + '\" width=') document.write(width + ' height=' + height + ' '); document.write('alt=\"' + alt + '\" border=0></a>'); // End --> </SCRIPT>
|
Go down to where it says "var how_many_ads = 2", change 2 to how many images you have in your rotation.
Replace all the words in CAPITALS with your info.
When adding more, copy and paste the following code; be sure to change the numbers to 2,3,4, etc.
| CODE |
ad +=1; if (ad==1) { url="URL GOES HERE"; alt="ALT TEXT"; banner="IMAGE URL HERE"; width="NUMBER"; height="NUMBER"; |
I've only used this code on a site before, so a forum owner can feel free to correct me on this, but I'd say the code would go wherever you have your current banner code; either in the Logo Box of the Images section in the Admin CP, or wherever you want to banner to be in the header. =]
Your topic has been solved and moved to the 'Solved Support Topics' forum! Still have a question, or something isn't clear yet? Open up a new topic, but be sure to be more specific this time!