Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Oct 30, 2005 12:00:20 GMT
This will alert a message to members who have been banned from the forum. Note: This will only apply to username or email bans. It will not work with IP bans.
Main Footer:
<script type="text/javascript"> <!-- var banned = []; banned[0]=['badguy','You have been banned from this forum for Spamming']; banned[1]=['anotheruser','Your account is frozen until the end of the month']; banned[2]=['Username','Message']; banned[3]=['Username','Message'];
if(document.loginform) { document.loginform.onsubmit=function() { user = document.loginform.username.value; for(j=0; j<banned.length; j++) if(user == banned[j][0]) { alert(banned[j][1]); return false; } } } //--> </script>
Edit the lines that look like this where the blue number increases by 1 each time and you fill in the members username and the message to alert when they try to login.
banned[3]=['Username','Message'];
|
|
g0alieb0y
Junior Member
My Squiggle ~~~ !
Posts: 79
|
Post by g0alieb0y on Oct 30, 2005 12:01:44 GMT
Simple, but good. I could of made this but i am not really sure on how to use arrays.
|
|
Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Oct 30, 2005 12:56:35 GMT
|
|
captmaniac
Junior Member
Anything and Everything Forums - One of the best talk about anything forums around!
Posts: 62
|
Post by captmaniac on Oct 31, 2005 16:29:36 GMT
Can you edit/make a new one to work with IP bans?
And also, when do they receive this message? Right when they view the forum, when they try to log in, when they try to create a new account, or at another time?
thanks.
captmaniac
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Oct 31, 2005 16:40:23 GMT
Can you edit/make a new one to work with IP bans? And also, when do they receive this message? Right when they view the forum, when they try to log in, when they try to create a new account, or at another time? thanks. captmaniac since it only works with email/username bans, i assume when they try to login it'll appear.
|
|
Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Oct 31, 2005 16:56:40 GMT
Can you edit/make a new one to work with IP bans? And also, when do they receive this message? Right when they view the forum, when they try to log in, when they try to create a new account, or at another time? thanks. captmaniac There's no way to tell the IP address without using some kind of server side script. And since I don't know any server side languages, no And yes, it will appear when they enter their username and click the 'Login' button
|
|
rozer
New Member
Posts: 4
|
Post by rozer on Feb 20, 2006 20:17:25 GMT
This is a wicked code nice one.
|
|