News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

ALERT FOR PMing STAFF

Started by SMdot™, April 28, 2007, 09:53:07 PM

Previous topic - Next topic

SMdot™

As you can see in the following code when a message is to be sent to one of the names listed "admin|tianming" end etc. A message will popup alerting the sender that the post can be of any relation to said "alert"


<!--ALERT FOR PMING STAFF-->
<script type="text/javascript">

if(location.href.match('action=pmsend')){
document.postForm.onsubmit=function() {
if(document.postForm.to.value.match(/(admin|tianming|settra|kazu|forgotten|visigoth|tyrantlytamale)/) && !pb_username.match(/admin|tianming|morpheus|settra|kazu|forgotten|visigoth|tyrantlytamale/)){
alert('Do not send me a PM requesting help on a support related issue, how to design or code your board, or other issues that can be dealt with in the Contact Staff board, unless I specifically asked you to do so. Please post all support problems in the Contact Staff board.\n\nThanks');
var okay = confirm ("Do you want to continue sending the PM?")
if(okay)
return true ;
else
return false ;
}
}
}

</script>


that code works in a forum called proboards (free cgi boards) I want a script similar to the above script to work for my SMF installation.

I won't be needing a script for multiple names or anything, and I can implement the codes into the proper places myself, in fact I can probably do alot of it myself, I just need to know if theres anyone who's already made a script like this, or if theres a certain string i should know of that says is_username then get/display etc.



I did look through the SMF Function DB to see if there was anything like is_username, and i found is_admin but thats a bit different I think. =??

Advertisement: