This will add a button in your post area that will in turn add [whisper][/whisper] tags into your post
Put it in your Global Footer or the footer of the board you want it to work on..
Put it in your Global Footer..
insert code he<script type="text/javascript">
<!--
/*
Whisper Tags (V2)
by Todge
Copyright © 2009
Please keep this header intact
*/
// Edit Below...
var whisperButton = 'URL OF IMAGE';
// Edit Above...
// Add button to posting page..
if(document.postForm && !location.href.match(/tion=pmsend/))
{
function getPeeps()
{
var wPeeps = '';
wPeeps = prompt('Please enter the USERNAMES of the poeple you want to whisper to, seperated by commas.. (admin,Guest,'+pb_username+')','');
if(wPeeps != null && wPeeps != '')
{
add('[whisper='+wPeeps+']','[/whisper]');
return;
}
else if(wPeeps == '')
{
alert('You have to whisper to someone..');
getPeeps();
}
return;
}
var newButton = document.createElement('a');
newButton.innerHTML = '<img src="'+whisperButton+'" border="0">';
newButton.href='javascript:getPeeps()';
document.postForm.color.parentNode.appendChild(newButton);
}
// Remove whispers from quotes..
if(document.postForm && location.href.match(/"e/))
{
var rW = document.postForm.message.value.split(/\[\/whisper\]/);
for(r=0; r<rW.length; r++)
{
rW[r] = rW[r].replace(/\[whisper=(.)+/,'');
}
document.postForm.message.value = rW.join('');
}
// Find and hide whispers...
if(location.href.match(/tion=(display|post&thread|recent|pmview)/))
{
var posts = document.getElementsByTagName('font');
for(p=0; p<posts.length; p++)
{
if((posts.innerHTML.match(/google_ad_section_start/) || (document.postForm && posts.size=="1")) && posts.innerHTML.match(/\[whisper=/))
{
var whispers = posts.innerHTML.split(/\[whisper=/);
for(w=1; w<whispers.length; w++)
{
var thisW = whispers[w].split(/\]/)[1].split(/\[\/whisper/)[0];
var shPeeps = whispers[w].split(/\]/)[0];
if(shPeeps.match(pb_username))
{
posts.innerHTML = posts.innerHTML.replace('[whisper='+shPeeps+']'+thisW+'[/whisper]','<font color="red"><i>'+thisW+'</i></font>');
}
else if(!shPeeps.match(pb_username))
{
posts.innerHTML = posts.innerHTML.replace('[whisper='+shPeeps+']'+thisW+'[/whisper]','');
}}}}}
// -->
</script>re[p]
Edit the line at the top.
var whisperButton = 'URL OF IMAGE';
with the URL of the image you want as the Whisper Button..
Any whispers will appear red and italic if the viewer is one of the receivers, otherwise they will not appear at all..
Please note..
Any staff member that can modify a member's post will be able to see all whispers when modifying..
!PLEASE BE AWARE THAT NO CODE IS TOTALLY SECURE..
I DON'T RECOMMEND SENSITIVE OR PERSONAL INFO BE USED WITH THIS CODE![/p][p][/p][p][/p][p][/p][p][/p][p][/p][p][/p][p][/p]