Page 1 of 1

Back to top mod (By Solidjeuh)

Posted: 04 Dec 2011, 05:17
by Solidjeuh
This little script will add a ' Back To Top ' arrow to the bottom of you forum.
Preview:
http://www.youtube.com/watch?v=eA43etGySxU

Open: styles\prosilver\template\overal_header.html

Find:

Code: Select all

 <a name="start_here"></a>
Add Before:

Code: Select all

<div id="backtotop">
<a href="#"><img src="../backtotop/images/back_to_top_btn.png" alt="Back to TOP" /></a>
</div>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Find:

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
Add Before:

Code: Select all

<!-- include latest jQuery Library -->
<script type="text/javascript" src="../backtotop/js/jquery.js"></script>

	<!-- Back To Top by Solidjeuh -->
	<script type="text/javascript">
	    jQuery(document).ready(function(){
	        jQuery('#backtotop a').click(function(){
	            jQuery('html, body').animate({scrollTop:0}, 'slow');
	            return false;
	        });
	    });
	</script>
If you already have jquery.js in your script, Then you don't need to add this:

Code: Select all

<!-- include latest jQuery Library -->
<script type="text/javascript" src="../backtotop/js/jquery.js"></script>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Open: styles\prosilver\theme\content.css

Add this to the bottom on a new line:

Code: Select all

	#backtotop{
	    position: fixed;
	    right:10px;
	    bottom:2px
	}
	#backtotop a{
	    text-decoration:none;
	    border:0 none;
	    display:block;
	    width:26px;
	    height:86px;
	}
	#backtotop a:hover{
	    opacity:.7; /*mouse over fade effect*/
}
Download:
http://www.solidjeuhforumradio.be/backtotopDownload.zip

Place the 'backtotop ' folder into the root of your site / forum

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Refresh templates and theme's into the admin panel!
Press ctrl +F5 on your forum, If you do not see any changes.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Images are very easy to change.. Just add the image you want, rename it to: back_to_top_btn.png
And place it in backtotop/images
You can change the hight and width in .css

I do not know if it are the same changes for subsilver!
Never had it, Never gonna .. lol

Hope you like this little mod!
Kind Regards,
Solidjeuh

P.S:
I know there is already a back to top function in prosilver!
But this one is on every page, Very useful for forums with large pages like index.php ..

Back to top mod (By Solidjeuh)

Posted: 16 Feb 2012, 16:50
by Th3 Cr0w
Please, it would be possible to update the download link?

Back to top mod (By Solidjeuh)

Posted: 16 Feb 2012, 18:06
by Solidjeuh
Th3 Cr0w wrote:Please, it would be possible to update the download link?
Done!
sorry, something went wrong on my server :)

Back to top mod (By Solidjeuh)

Posted: 17 Feb 2012, 05:59
by Th3 Cr0w
it worked, thanks. :D