Cái này mình convert từ Xenforo sang VBB
Demo: http://4r.thptdonganh.in/
Chức năng:
-Up to top
-Down to bottom
-Refresh
-Back
-Contact
Tạo một template mới có tên là xenplaza_toolbar
Nội dung:
Chèn vào cuối footer code sau:
Demo: http://4r.thptdonganh.in/
Chức năng:
-Up to top
-Down to bottom
-Refresh
-Back
-Contact
Tạo một template mới có tên là xenplaza_toolbar
Nội dung:
PHP:
<!-- Css Toolbar -->
<script type="text/css">
#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
}
</script>
<!-- Toolbar -->
<script language="javascript" type="text/javascript">
function confirmRefresh() {
var okToRefresh = confirm("Bạn có muốn tải lại trang?");
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='Lên Trên'><img border=0 src=\"http://4r.thptdonganh.in/styles/xenplaza/toolbox/up.png\" width=\"24\"></a><br><a onclick='javascript:history.back();return false;' href='#' title='Quay Lại'><img border=0 src=\"http://4r.thptdonganh.in/styles/xenplaza/toolbox/back.png\" width=\"24\"></a><br><a href='misc/contact' class='OverlayTrigger' title='Liên Hệ'><img border=0 src=\"http://4r.thptdonganh.in/styles/xenplaza/toolbox/contact.png\" width=\"24\"></a><br><a href='javascript:confirmRefresh();' title='Tải Lại Trang'><img border=0 src=\"http://4r.thptdonganh.in/styles/xenplaza/toolbox/refresh.png\" width=\"24\"></a><br><a onclick='javascript:sc();return false;' href='#' title='Ngừng Cuộn'><img border=0 src=\"http://4r.thptdonganh.in/styles/xenplaza/toolbox/pause.png\" width=\"24\"></a><br><a onclick='javascript:clearInterval(timer);initialize();return false;' href='#' title='Cuộn Xuống'><img border=0 src=\"http://4r.thptdonganh.in/styles/xenplaza/toolbox/autodown.png\" width=\"24\"></a><br><a onclick='javascript:amubutton();return false;' href='#' title='Xuống Dưới'><img border=0 src=\"http://4r.thptdonganh.in/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>
Chèn vào cuối footer code sau:
PHP:
{vb:raw xenplaza_toolbar}