Hi, and good day to you all
. Today I present you one of my newest codes, it's a code witch allows your users to see if there is a post by a Banned user on that Page! It also shows the message on his profile. There is a live preview of the code on this very page! Just look at the little pop-up above. That's because i have made an account called Banned, then posted here with the account, then banned him, and then put this code in his Signature.
Ok, first this is the code:
[html]<script LANGUAGE="JavaScript">
<!-- Warning; Banned user alert! -->
<!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ -->
var qub1_mess = 'PUT THE TEXT YOU WANT TO APPEAR HERE';
var qub1_background = '#D8D8D8'
var qub1_bordure = '#000000'
var qub1_police = 'Verdana'
var qub1_police_taille = '12'
var qub1_police_color = '#000000'
var qub1_hauteur = 120
var qub1_largeur = 340
var qub1_box2 = 1;
qub1_classe = 'border-color:'+qub1_bordure+';border-style:solid;border-width:1px;background:'+qub1_background+';font-family:'+qub1_police+';font-size:'+qub1_police_taille+'px;color:'+qub1_police_color;
if(document.getElementById)
{
document.write('<DIV ID=qub1_box1 STYLE="position:absolute;visibility:hidden;'+qub1_classe+';width:20;height:'+(qub1_hauteur+20)+';z-index:10"></DIV>');
document.write('<DIV ID=qub1_box2 STYLE="position:absolute;visibility:hidden;'+qub1_classe+';width:'+qub1_box2+';height:'+qub1_hauteur+';z-index:5');
if(document.all)
document.write(';padding:10');
document.write('"></DIV>');
document.write('<DIV ID=qub1_box3 STYLE="position:absolute;visibility:hidden;'+qub1_classe+';width:20;height:'+(qub1_hauteur+20)+';z-index:10"></DIV>');
qub1_Y = document.body.clientHeight;
qub1_X = document.body.clientWidth;
qub1_posX = Math.round(qub1_X/2);
qub1_posY = Math.round(qub1_Y/2)-Math.round(qub1_hauteur/2);
}
function qub1_deplace()
{
document.getElementById("qub1_box1").style.left = qub1_posX-20-(qub1_box2/2);
document.getElementById("qub1_box3").style.left = qub1_posX+(qub1_box2/2);
document.getElementById("qub1_box2").style.left = qub1_posX-(qub1_box2/2)-5;
document.getElementById("qub1_box2").style.width = qub1_box2+10;
qub1_box2 += 5;
if(qub1_box2<qub1_largeur)
setTimeout("qub1_deplace()",10);
else
{
document.getElementById("qub1_box2").innerHTML = '<CENTER>'+qub1_mess+'<BR><BR><B><A HREF=javascript:qub1_close()><FONT COLOR='+qub1_police_color+'>Close Warning</FONT></A></B></CENTER>'
}
}
function qub1_start()
{
if(document.getElementById)
{
document.getElementById("qub1_box1").style.visibility = 'visible'
document.getElementById("qub1_box2").style.visibility = 'visible'
document.getElementById("qub1_box3").style.visibility = 'visible'
document.getElementById("qub1_box1").style.top = qub1_posY-10
document.getElementById("qub1_box2").style.top = qub1_posY
document.getElementById("qub1_box3").style.top = qub1_posY-10
qub1_deplace();
}
}
function qub1_close()
{
if(document.getElementById)
{
document.getElementById("qub1_box1").style.visibility = 'hidden'
document.getElementById("qub1_box2").style.visibility = 'hidden'
document.getElementById("qub1_box3").style.visibility = 'hidden'
document.getElementById("qub1_box1").style.top = -600
document.getElementById("qub1_box2").style.top = -600
document.getElementById("qub1_box3").style.top = -600
qub1_deplace();
}
}
window.onload = qub1_start;
</script>[/html]
Ok, now you should put the code in the Banned user's Signature. Don't worry, the BBC tags for all the HTML are already included. Just edit what you need to edit (shown below) and copy the whole thing and paste in the Signature! It will work Immediatly.
Now this is what you need to edit:
You can replace the PUT THE TEXT YOU WANT TO APPEAR HERE text with your own. You can find it here:
var qub1_mess = 'PUT THE TEXT YOU WANT TO APPEAR HERE';
^^ To edit the above, you need to have a little HTML knowledge. To go down one row, use " <br> ". To insert a Hyperlink, use "<a href="THE LINK HERE">YOUR HYPERLINK TEXT HERE</a>". If you want to insert something else, just ask, and I will give the code.
Oh, and if you need it, here is the code we used:
var qub1_mess = '<b>~WARNING~</b> <br> You are on a page where a banned-user has posted. If there is any abusive content I cannot be held responsible. <br> <br> <b>Users Information:</b> <br> Username: Banned <br> <br> <b>What do you want to do?</b> <br> <a href="
http://qub1.smfforfree.com/index.php?action=profile;u=2">Vieuw his Userpage</a> <br> <input TYPE="button" VALUE="Go back" onClick="history.go(-1);">';
You may edit it to fit your needs.
You will also need to edit the look of the WARNING. This is easy, just use our
Hexadecimal Color Topic for the colors, and the rest is kind of self explainatory. The part you need to edit looks like this:
var qub1_background = '#D8D8D8'
var qub1_bordure = '#000000'
var qub1_police = 'Verdana'
var qub1_police_taille = '12'
var qub1_police_color = '#000000'
var qub1_hauteur = 120
var qub1_largeur = 340
Now for the last little thing you can edit is the little text at the bottom of the warning witch will close the warning when it is clicked. You can find it here:
document.getElementById("qub1_box2").innerHTML = '<CENTER>'+qub1_mess+'<BR><BR><B><A HREF=javascript:qub1_close()><FONT COLOR='+qub1_police_color+'>Close Warning</FONT></A></B></CENTER>'
Just edit the Red text to what you want.
Thanks for reading, and if you are going to use it, thanks for using!