Back to top mod (By Solidjeuh)

Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
Locked
User avatar
Solidjeuh
BBCoder IV
BBCoder IV
Posts: 257
Joined: 16 Oct 2011, 02:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium
Contact:

Back to top mod (By Solidjeuh)

Post 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 ..
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
===============
Onze Website: https://www.muziekpromo.net
User avatar
Th3 Cr0w
BBCoder II
BBCoder II
Posts: 7
Joined: 21 Aug 2011, 19:02
BBCodes: 30
Location: Japão
Contact:

Back to top mod (By Solidjeuh)

Post by Th3 Cr0w »

Please, it would be possible to update the download link?
Forgive my bad english.
User avatar
Solidjeuh
BBCoder IV
BBCoder IV
Posts: 257
Joined: 16 Oct 2011, 02:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium
Contact:

Back to top mod (By Solidjeuh)

Post by Solidjeuh »

Th3 Cr0w wrote:Please, it would be possible to update the download link?
Done!
sorry, something went wrong on my server :)
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
===============
Onze Website: https://www.muziekpromo.net
User avatar
Th3 Cr0w
BBCoder II
BBCoder II
Posts: 7
Joined: 21 Aug 2011, 19:02
BBCodes: 30
Location: Japão
Contact:

Back to top mod (By Solidjeuh)

Post by Th3 Cr0w »

it worked, thanks. :D
Forgive my bad english.
Locked