Post by Peter on Oct 29, 2004 12:26:39 GMT
Code created by Uchiha Sasuke[/color]
lol, already made a v2.0 ^_^
well, this is basically the same as the first one, execpt you can send a message to more than one user
what this code does is allow you to send secret messages within a post to other users
Features:
Send secret messages to other users within posts
Multiple user selection for messages
Admin and G-mod able to view all secret messages
Quote bug fixed
Directions:
so, lets say you want to just send a secret message to jeo
you'd type
well, lets say you want to send the same message to jeo, jake, and jerry
you'd type
Code goes in BOARD FOOTERS
lol, already made a v2.0 ^_^
well, this is basically the same as the first one, execpt you can send a message to more than one user
what this code does is allow you to send secret messages within a post to other users
Features:
Send secret messages to other users within posts
Multiple user selection for messages
Admin and G-mod able to view all secret messages
Quote bug fixed
Directions:
so, lets say you want to just send a secret message to jeo
you'd type
[whisper=jeo]THE MESSAGE[/whisper]
well, lets say you want to send the same message to jeo, jake, and jerry
you'd type
[whisper=jeo,jake,jerry]THE MESSAGE[/whisper]
Code goes in BOARD FOOTERS
<script>
/*
Send Secret Message v2.0 (Multiple User Selection)
Coded by NCGI (Uchiha Sasuke)
Please do NOT remove this credit, or else your board will be in violation of copyright laws
This code may NOT be reposted without express permission of the creator
*/
var TD = document.getElementsByTagName("TD");
for (t=0;t<TD.length;t++) {
function alertit() {
alert('When putting in the username for the person you want to send the secret message to\nRemember that the username has to be the name that that person logs in with\n\nTo Send A Secret To Multiple People\nAll you have to do is put the first username in, then after the first, put a cama, then the next name.\nFor Example: I want to send a message to john, joe, and green, it would look like this\n\n[whisper=john,joe,green]Message[/whisper]');
}
if (location.href.indexOf("=post") != -1 || location.href.indexOf("=reply") != -1 || location.href.indexOf("=modify") != -1 || location.href.indexOf("=createpoll") != -1 ) {
if (TD[t].innerHTML.match(/Add Smileys:/) && TD[t].className=="windowbg2" && TD[t].width=="23%") {
var inner = TD[t+1].innerHTML.split('</SCR'+'IPT>');
var code = inner[1].split('<NOSCR'+'IPT>');
TD[t+1].innerHTML = inner[0]+"</scri"+"pt>"+code[0]+"<br/><a href=\"javascript:add('[whisper=USERNAME(s)]Message[/whisper]')\"><span onclick=\"alertit()\">Secret</span></a><noscript>"+code[1];}
}
function FixQuote() {
if (document.postmodify.message.innerHTML.match(/\[whisper=(.+?)\](.+?)\[\/whisper\]/i)) {
quoteto = RegExp.$1
quotemessage = RegExp.$2
quotereplacement = "[whisper="+quoteto+"]"+quotemessage+"[/whisper]"
document.postmodify.message.innerHTML = document.postmodify.message.innerHTML.replace(quotereplacement,'')
}}
if (location.href.indexOf("quote=") != -1) {FixQuote()}
if (location.href.indexOf("=display") != -1) {
if (TD[t].innerHTML.match(/\[whisper=(.+?)\](.+?)\[\/whisper\]/i)) {
var to = RegExp.$1
var replacehidden = RegExp.$2
var secondto = to; var thirdto = to
if (secondto.match(/,/)) {secondto = secondto.replace(/,/gi,'|username='); }
if (thirdto.match(/,/)) {thirdto = thirdto.replace(/,/gi,', ')}
hiddento = '(action=admin|username='+secondto+')'
if (TD[2].innerHTML.match(/Welcome/)) {message = ""}
else if (TD[5].innerHTML.match(hiddento)) {
message = '<br/><br/><b>Whispered Message To: '+thirdto+'</b><table class="bordercolor" cellspacing="1" width="90%" name="secret"><tr><td width="100%"><table cellpadding="2" cellspacing="0" class="quote" width="100%"><tr><td width="100%"><font face="Arial,Helvetica" class="quote" size="1">'+replacehidden+'</font></td></tr></table></td></tr></table><br/><br/>'}
else {message = ""}
replaceit = "[whisper="+to+"]"+replacehidden+"[/whisper]"
TD[t].innerHTML = TD[t].innerHTML.replace(replaceit,message)
}}}
</script>
#nosmileys#nosmileys#nosmileys#nosmileys#nosmileys#nosmileys#nosmileys#nosmileys