vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - [YUI] VSQ - Scroll To Top (https://vborg.vbsupport.ru/showthread.php?t=243771)

mad@Max 06-01-2010 10:00 PM

[YUI] VSQ - Scroll To Top
 
1 Attachment(s)
Title: VSQ - Scroll To Top
Compatibility: 3.8.х - 4.0.х (ie, opera, firefox, chrome, safari)
Description: able to add a button at the bottom right of the screen by pressing which occurs smoothly move to top, with animation effect:)

Install:
  1. Extract content of archive to forum folder.
  2. At the bottom of the template headinclude add
    HTML Code:

    <script type="text/javascript" src="clientscript/yui/animation/animation-min.js"></script>
    <script type="text/javascript" src="clientscript/vsqscrolltotop.js"></script>

    If the script animation already exist, so don't include it.
  3. Set the button style in a file (image, size, position, etc.).

DEMO:
http://mixplay.ru/test/forum.php

Daniel_HBK 06-02-2010 10:01 AM

Nice! , installed

snakedevil 06-02-2010 05:47 PM

Great Thanks :)

lubbie 06-02-2010 06:54 PM

Very Nice. Thanks

Seems there is an Error. After first time installation and restart of the forum its displayed also if u are on top of the page

Just found out that this Tab is displayed if u change from CMS -> Forum or Forum -> CMS etc...

RobbieZ 06-02-2010 08:07 PM

Excellent. Installed.

Where is the image coming from? Id like to do my own :D

mad@Max 06-02-2010 08:27 PM

In vsqscrolltotop.js
Code:

...
background = "url(http://mixplay.ru/images/up1.png) no-repeat scroll 0% 0% transparent";
...


BlackJacket 06-04-2010 12:02 AM

ok that is awesome! Tagged for later.

Inflikted 06-05-2010 03:50 PM

is there a way to get rid of the bouncing up top? and simply have it scroll to the top

Jesh 06-05-2010 04:37 PM

Quote:

Originally Posted by Inflikted (Post 2048795)
is there a way to get rid of the bouncing up top? and simply have it scroll to the top

To remove the 'bounce', edit the .js file, find this line

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, Y.Easing.bounceOut);

change Y.Easing.bounceOut to 0.

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, 0);

Jesh 06-05-2010 04:40 PM

Also, to change speed, change the 3.5 to any number. Higher the slower.

karlm 06-06-2010 01:37 AM

This is class!!!! I've not installed it, but it is funky nonetheless.

goxy63 06-12-2010 06:22 PM

СПАСИБО
Works just fine, nominated rated and yesss installed :D

docvader 06-12-2010 11:06 PM

Excellent!

Mo7mD.ZaYOnA 06-21-2010 01:53 PM

very good

sadiq6210 06-21-2010 03:01 PM

Awesome .. Installed

Scitz0 06-21-2010 04:47 PM

Worked great... thanks!

Hell Bomb 08-04-2010 07:22 AM

is their anyway to add this to just normal go to top button? like the one at the bottom of the page? I would much rather i do that instead :)

masterweb 08-04-2010 03:29 PM

Wow i installed it in just 2 minutes and works great!, thanks bud marked as installed :D

BadgerDog 08-31-2010 04:02 PM

Quote:

Originally Posted by Jesh (Post 2048818)
To remove the 'bounce', edit the .js file, find this line

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, Y.Easing.bounceOut);

change Y.Easing.bounceOut to 0.

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env. ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, 0);

Changed this to 0 as suggested and still getting bounce in v4.04pl1? :confused:

Thanks .. :)

Regards,
Badger

lubbie 08-31-2010 07:13 PM

Nice Gadget. Installed. Thanks

superchizo 09-09-2010 07:58 PM

excellent! thank you very much

BadgerDog 09-09-2010 08:25 PM

Un-installed... thanks anyway ...

Couldn't get bounce at top to stop ....

Regards,
Badger

Sforums 04-03-2011 02:58 PM

Good stuff, very useful to me. Intalled and rated.
mad@max, can you make one from top to bottom too? My forum is bit long and it would help a lot.

Eric 04-27-2011 09:23 AM

Quote:

Originally Posted by BadgerDog (Post 2095959)
Un-installed... thanks anyway ...

Couldn't get bounce at top to stop ....

Regards,
Badger

Old post but you should be able to edit /clientscript/vsqscrolltotop.js

Find:
Code:

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env.ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, Y.Easing.bounceOut);
Replace with:
Code:

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env.ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, Y.Easing.easeNone);
Notice what changed is in red.

Descriptions/options for Y.Easing.??

Code:

easeIn
Begins slowly and accelerates towards end. (quadratic)

easeNone
Uniform speed between points.

easeOut
Begins quickly and decelerates towards end. (quadratic)


parrots 05-06-2011 02:47 PM

Can get it to work on the forum homepage but not any of the others?
Any suggestions - it shows up on all pages but doesn't scroll back to the top.

UKCE_Hitman 05-07-2011 12:42 PM

Thx installed

nacaruncr 06-27-2011 05:52 AM

installed + tagged + 5 stars :D
thanks :D awesome :D

Popa Andrei 07-14-2011 10:36 AM

besti thing ever :D

FReeSTER 07-24-2011 03:11 PM

thank you mate this is sick. lol

swiftor 10-11-2011 07:20 AM

This is great, any chance on providing guidance on how to perhaps have a button right next to it that sends a user back to the bottom of the page, or maybe the last post?

rob39 10-12-2011 12:59 AM

Just to say Nice....it's working on my VB 4.1.4, so far....

Alecsmith 12-04-2011 05:43 AM

Excellent working with Vb 4.1.7 :)

Popa Andrei 12-28-2011 02:47 PM

change the line to
Code:

var scroll = new Y.Scroll(document.getElementsByTagName((YAHOO.env.ua.webkit ? "body" : "html"))[0], {scroll: {to: [0, 0]}}, 3.5, Y.Easing.easeNone);
but the bumbping didnt go away
www.elitegamers.co

Ricsca 02-10-2012 12:32 PM

In vb 4.1.10 dont work...

Kraxell 02-10-2012 12:37 PM

This works with all versions.

qubed 09-19-2012 01:23 PM

Does this work with 4.2? I've installed it and made the template edits, but don't see it appearing in the default theme or my custom theme that I also made the template edits too. Just checking to find out if it's an issue on my end or indeed a version incompatibility.

Jackchan 12-17-2012 10:15 PM

Installed on 4.2 and it work but I just want to have simple back to top button and remove the animation effect.

How can I do that? Thanks :)

sonictremila 03-02-2013 08:07 AM

I love you! Installed.

franzes80 12-30-2013 10:24 AM

1 Attachment(s)
Update this mod:
Work on vb 4.2.2
Insert new arrows and tested on vb 4.2.2

New demo
Demo

tsolomon 02-11-2015 08:58 AM

Hi,
Its working on 4.2.2 upd4 , but I have a problem. It shows every time when the page is loaded/reloaded. Scroll down/up and my button blinks several times and after that it is OK.

Interesting thing, I can see this button at the file attachment pop-up page /editor/.


http://rottweiler-club.com/forum.php

scripts:
http://rottweiler-club.com/clientscr...scrolltotop.js
http://rottweiler-club.com/clientscr...imation-min.js


All times are GMT. The time now is 06:13 PM.

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.05968 seconds
  • Memory Usage 1,791KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete