MyBB Community Forums

Full Version: Top of the page effect.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Well this is my very first tut ever! So be nice to me. Toungue

First here is an example page of what the end result can look like.

http://tm0.org/forum/post-18.html#pid18

You can achieve this thanks to Dymamic Drive. (All credits go to them, i am merely breaking it down. Link to their tut here) http://www.dynamicdrive.com/dynamicindex3/scrolltop.htm

First start off by Downloading their JS file here

http://www.dynamicdrive.com/dynamicindex...control.js

Upload that to your MyBB root.

Open your admin control panel. Go to the template section, and open you template of your current theme.

*If you have more then one theme you will have to do the following more then once.*

Find you "showthread templates" , expand it and go to showthread.

Right under the header add


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="scrolltopcontrol.js">

/***********************************************
* Scroll To Top Control script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Project Page at http://www.dynamicdrive.com for full source code
***********************************************/

</script>

Add that code.

Next you need to upload an image to your Root MyBB folder. (Not your images folder)

I used this as one. http://www.freeclipartnow.com/signs-symb...p.jpg.html

Dynamic Drive supplies this image.

http://www.dynamicdrive.com/dynamicindex3/up.png

A good google term would be (Your colour) up arrow.

Upload that file VIA your control panel or a FTP client/SSH.

After that, check out what area your theads and see if it is still there.

If you want to add it to a different page such as your index, just do the same just use your index templates.


Thats it i'm done if you need anything i'll be right here.

If you PM me for support on this i will slap you.

Again i would like to state that none of this code is mine. All of it is Dynamic Drive's. I merely have shown you how to add it into MyBB. I claim ZERO percent of it.
http://www.dynamicdrive.com/dynamicindex3/scrolltop.htm
Thank you.

Also credits to RateU for telling me what it was. Darn Jquery..
Very nice, it only appears when the user can't see the top anymore. I'm sure many people will find it very useful Big Grin
(2009-12-14, 01:01 AM)combus Wrote: [ -> ]Very nice, it only appears when the user can't see the top anymore. I'm sure many people will find it very useful Big Grin

It appears after you move 100px down Big Grin
It is very nice information. I hope for all user it is very useful. I am impressed. I think 100px is enough to appear.
I would like to add this, however when I did I found I could not use inline moderation options anymore and the delete icons on posts within threads went missing. This occurred for me even when I put this script in the specified location on an otherwise unmodified copy of the default theme. I checked (and had the same issue) in both IE and firefox.
I'm a bit lost, what exactly does this do?
it puts an arrow (image) at the bottom right of the screen when:
- You are viewing a thread AND
- you have already scrolled down at least 100px

The image can then be clicked on to scroll back up to the top of the screen. Personally, I like the effect it has while scrolling (can be seen by going to the first link provided and clicking on the green arrow).

Problem is, as I said (or implied), it appears to conflict with the script for inline moderation. I haven't figured out a way to display it for members without displaying it for moderators and admins, so I wasn't able to leave it up on my site (being able to moderate posts is a bit more important than this).
Oh, I guess it doesn't work for IE7 because I don't see it. Sad
I place it on index, forum, and showthread.
work perfectly. And change setting from 100 to 400.
Tested on Opera, IE8 and FireFox..
Yes, it does work (tested on IE8 and firefox here)...did you check to see if you could moderate posts after using that?
Pages: 1 2