vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Google AdSense 'floating' display? (https://vborg.vbsupport.ru/showthread.php?t=111924)

eDodgeball 04-01-2006 08:42 PM

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!

Ryan McBain 04-01-2006 09:35 PM

Wow that's a cool code. How would you do that on any page, not just your forums?

eDodgeball 04-02-2006 06:13 PM

that's what I want to know. ;)

Liquid1ce 04-02-2006 10:44 PM

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>

This is placed just before < / body > tag


All times are GMT. The time now is 05:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01075 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete