Return to top of page link

setishock

Wizard of Wires
Messages
10,726
Location
4321
David,
Some of the threads in your forum get really long and it would be nice to have a TOP link parked under the previous / next links at the bottom of the thread page. So here ya go.

This line of code has been tested by me and is currently in use at www.AnimeAppeal.com. To see this code in action go open a long thread such as one of the picture threads and go all the way to the bottom of the page. Click > top < to get back to the top of the page. Pretty handy, huh?
Buzz has a top link in use at www.computervitals.com but I am not certain if it's the same code.

Code:
<a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a>

Navigate to your themes SHOWTHREAD template. In the search field put: nextoldest and click: find. That will get you to the section of code you are going to edit.
Add the blue code making the class whatever you want except > button. Button is a reserved var name for VB. Or you can just leave it like you see it here. Reason mine is named topbutt2 is there is the first code line in the footer template named topbutt. Topbutt means top button.
Code:
<!-- next / previous links -->
	<br />
	<div class="smallfont" align="center">
		<strong>«</strong>
			<a href="showthread.php?$session[sessionurl]t=$threadid&goto=nextoldest" rel="nofollow">$vbphrase[prev_thread]</a>
			| <a href="showthread.php?$session[sessionurl]t=$threadid&goto=nextnewest" rel="nofollow">$vbphrase[next_thread]</a>
                               		<strong>»</strong>
                             [color=blue]<div class="topbutt2" align="center">[/color]  [color=red]<a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a></div>[/color]
	</div>
<!-- / next / previous links -->

After you add this code click: save and reload. Check a thread to be sure it works.
 
Yeah and it's white on a lite back ground and for the most part blends in.
This parks the top link up under the << Previous Thread | Next Thread >> links where it's more visable.
 
Back
Top Bottom