|
Post by Simpsons Rule on Feb 1, 2004 16:52:50 GMT -5
To see this code in action, try to PM me.
This is my first JavaScript code ever, as I'm just learning it now, but it works great.
It goes in all of your Headers. Edit the red for the message you want it to say. Edit the blue for the usernames. Reply here if you're having trouble with the script.
<script language="javascript"> <!-- //PM Admin Alert Box
if(location.href.indexOf("=imsend&to=username1")!=-1 || location.href.indexOf("=imsend&to=username2")!=-1) { alert('Do not PM the Admins here unless you follow our guidelines for PMing.'); } //--> </script>
You have to add || location.href.indexOf("=imsend&to=username")!=-1 for each member of your staff. The blue is where you place their username, which is case sensative.
For example, say I wanted to make john and admin get the alerts:
<script language="javascript"> <!-- //PM Admin Alert Box
if(location.href.indexOf("=imsend&to=admin")!=-1 || location.href.indexOf("=imsend&to=john")!=-1) { alert('Do not PM the Admins here unless you follow our guidelines for PMing.'); } //--> </script>
|
|