The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Google AdSense 'floating' display?
hey folks, I have a fixed-width board with a set of ads outside of it in a seperate table cell. One of our local sites has a cool script that lets their ads float down the page as a user scrolls... any idea how I could do the same with mine?
my new vb site: www.edodgeball.com site from which I want to figure out how the ads move: www.cvillemovies.com thanks! |
#2
|
||||
|
||||
Wow that's a cool code. How would you do that on any page, not just your forums?
|
#3
|
|||
|
|||
that's what I want to know.
|
#4
|
||||
|
||||
From what i can see is there ad code is:
Code:
<table cellspacing="2" cellpadding="4" id="floatingtable" style="position:relative;"> <tr><td align="center"><script type="text/javascript"><!-- google_ad_client = "pub-123456789"; google_ad_width = 120; google_ad_height = 600; google_ad_format = "120x600_as"; google_ad_channel =""; google_ad_type = "text_image"; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "000000"; google_color_url = ["FF0000","FF9900","ABD552","5BC6A0","8686FF","23B1FE","F398F3","FF999E"]; google_color_text = "999999"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></td></tr> <tr><td align="center"><img src="images/clr.gif" class="space" width="120" height="1" alt="" /></td></tr> </table> </td> </tr> </table> & the script to make it hover is Code:
<script type="text/javascript"> <!--//<![CDATA[ var aY = 0; var pY = 0; var topoff = document.getElementById("floatingtable").offsetTop; var stopit = document.body.offsetHeight - document.getElementById("floatingtable").offsetHeight - topoff; function floating() { if (window.innerHeight) { pY = window.pageYOffset; } else if (document.documentElement.scrollTop) { pY = document.documentElement.scrollTop; } aY += (pY - aY - topoff)/10; if ((aY < stopit) && (aY >= 0)) { document.getElementById("floatingtable").style.top = aY + "px"; } setTimeout("floating()", 10); } floating(); //]]>--> </script> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|