Post by Peter on Dec 3, 2004 11:42:11 GMT
Just thought I would whip up a code for people that use their SayBox on a forum like ProBoards.
What this code does is add a button to the menu which when clicked will show the SayBox or hide it .
<div id="sayboxadiv" style="position: absolute; left: 0; top: 80; display: none">
<script src="saybox.co.uk/output.php?user=USERNAME"></script>
</div>
Place that into your header, remember to change the bit in red so that it's your SayBox username.
Add this into the footer:
What this code does is add a button to the menu which when clicked will show the SayBox or hide it .
<div id="sayboxadiv" style="position: absolute; left: 0; top: 80; display: none">
<script src="saybox.co.uk/output.php?user=USERNAME"></script>
</div>
Place that into your header, remember to change the bit in red so that it's your SayBox username.
Add this into the footer:
<script type="text/javascript">
<!--
//Change the image here
var sbImage = "http://webpost.net/po/portal/saybox/saybox.gif";
var mCell = document.getElementsByTagName("td");
var sb = document.createElement("img");
sb.src = sbImage;
sb.onclick = function(){
var sbIDiv = document.getElementById("sayboxadiv");
if(sbIDiv){
if(document.getElementById("SBdiv")){
var SDdiv = document.getElementById("SBdiv").style;
sbIDiv.style.left = parseInt((screen.availWidth) - parseInt(SDdiv.width)) / 2;
}
if(sbIDiv.style.display == "none"){
sbIDiv.style.display = "";
} else {
sbIDiv.style.display = "none";
}
}
}
sb.onmouseover = function(){
this.style.cursor = "pointer"
this.title = "Click to view SayBox";
}
sb.onmouseout = function(){
this.style.cursor = "";
}
for(c=0;c<mCell.length;c++){
if(mCell[c].className=="menubg"){
mCell[c].appendChild(sb);
}
}
//-->
</script>