Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 04-01-2006, 08:42 PM
eDodgeball eDodgeball is offline
 
Join Date: Mar 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 04-01-2006, 09:35 PM
Ryan McBain's Avatar
Ryan McBain Ryan McBain is offline
 
Join Date: Feb 2002
Location: Earth
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow that's a cool code. How would you do that on any page, not just your forums?
Reply With Quote
  #3  
Old 04-02-2006, 06:13 PM
eDodgeball eDodgeball is offline
 
Join Date: Mar 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that's what I want to know.
Reply With Quote
  #4  
Old 04-02-2006, 10:44 PM
Liquid1ce's Avatar
Liquid1ce Liquid1ce is offline
 
Join Date: Feb 2004
Location: /root
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:55 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04517 seconds
  • Memory Usage 2,184KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete