vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - Showthread Autoscroll (https://vborg.vbsupport.ru/showthread.php?t=264011)

ctsolutions 05-21-2011 10:00 PM

Showthread Autoscroll
 
1 Attachment(s)
Just a little script that I found. Credits goes not to me.
Should works with all vB Releases with Java script enabled.

Useful for:
  • Long text to read.
  • Long guides.
  • Rolleplay Story's
  • Other long threads.

Just add on bottom of your "Showthread" template.

Settings:

Scroll Speed:
var speed=1

Time after the scrolling start:
setInterval("scrollwindow()",400)

Code:

<SCRIPT language=JavaScript1.2>
 //change 1 to another integer to alter the scroll speed. Greater is faster
 var speed=1
 var currentpos=0,alt=1,curpos1=0,curpos2=-1
 function initialize(){
 startit()
 }
 function scrollwindow(){
 if (document.all &&
 !document.getElementById)
 temp=document.body.scrollTop
 else
 temp=window.pageYOffset
 if (alt==0)
 alt=2
 else
 alt=1
 if (alt==0)
 curpos1=temp
 else
 curpos2=temp
 if (curpos1!=curpos2){
 if (document.all)
 currentpos=document.body.scrollTop+speed
 else
 currentpos=window.pageYOffset+speed
 window.scroll(0,currentpos)
 }
 else{
 currentpos=0
 window.scroll(0,currentpos)
 }
 }
 function startit(){
 setInterval("scrollwindow()",400)
 }
 window.onload=initialize
 </SCRIPT>


Skyrider 05-22-2011 12:13 PM

Got any demo's / examples up? Would be nice to see it in action.

nomoreturn 05-22-2011 12:54 PM

works great for me www.mastdunya.com

Dr.osamA 05-23-2011 12:24 PM

Thank you bro

installed under test

mgurain 04-28-2012 11:20 AM

Could this be supported, the idea seems good.


All times are GMT. The time now is 05:04 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.01051 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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