Xenplaza Toolbox 1.0

Sơn Nguyễn

♥ Forever Alone ♥
Staff member
Overview
This small template modification makes a toolbox at the right side of your forum with some following feartures:
  • Go to top site
  • Go to bottom site
  • Back to before page
  • Page scroll down
  • Pause page scroll down
  • Refresh page
  • Contact button

Installation
1. Upload all file to your forum root.
2. Create xenplaza_toolbox template:

Mã:
<xen:require css="xenplaza_toolbox.css" />
 
<script language="javascript" type="text/javascript">
function confirmRefresh() {
var okToRefresh = confirm("Do you really want to refresh this page?");
if (okToRefresh)
    {
            setTimeout("location.reload(true);",1000);
    }
}
</script>
 
<script language="javascript">
    suspendcode="<div id='xenplaza_toolbox' align='center'><a onclick='javascript:amutop();return false;' href='#' title='Up to TOP'><img border=0 src=\"styles/xenplaza/toolbox/up.png\" width=\"24\"></a><br><a onclick='javascript:history.back();return false;' href='#' title='Back'><img border=0 src=\"styles/xenplaza/toolbox/back.png\" width=\"24\"></a><br><a href='misc/contact' class='OverlayTrigger' title='Contact'><img border=0 src=\"styles/xenplaza/toolbox/contact.png\" width=\"24\"></a><br><a href='javascript:confirmRefresh();' title='Refresh'><img border=0 src=\"styles/xenplaza/toolbox/refresh.png\" width=\"24\"></a><br><a onclick='javascript:sc();return false;' href='#' title='Stop Scroll'><img border=0 src=\"styles/xenplaza/toolbox/pause.png\" width=\"24\"></a><br><a onclick='javascript:clearInterval(timer);initialize();return false;' href='#' title='Scroll Down'><img border=0 src=\"styles/xenplaza/toolbox/autodown.png\" width=\"24\"></a><br><a onclick='javascript:amubutton();return false;' href='#' title='Go to Bottom'><img border=0 src=\"styles/xenplaza/toolbox/down.png\" width=\"24\"></a></div>"
    document.write(suspendcode);
 
    var currentpos,timer;
 
    function initialize()
    {
        timer=setInterval ("scrollwindow ()",30);
    }
    function sc()
    {
        clearInterval(timer);
    }
    function scrollwindow()
    {
        currentpos = document.documentElement.scrollTop || document.body.scrollTop;
        window.scrollTo(0,++currentpos);
    }
    function amutop()
    {
        window.scrollTo(0,0)
        clearInterval(timer);
    }
    function amubutton()
    {
        window.scrollTo(0,80000)
        clearInterval(timer);
    }
</script>

3. Create xenplaza_toolbox.css template:

Mã:
#xenplaza_toolbox {
    z-index: 99;
    width:26px;
    position:fixed;
    right:1px;
    top:250px;
    background: transparent;
    -moz-border-radius: 5px;
}
#xenplaza_toolbox a:hover {
    opacity:1
}

4. Now add this to the bottom of the page_container_js_body template
Mã:
<xen:include template="xenplaza_toolbox" />

Screenshot
xenplazatoolbox-png.1445


Source: Xenplaza - Premium Xenforo Addons & Styles



Download: http://www.mediafire.com/?dpsgp8ss908197n
 
Bên trên