Well, this code was made to help the Administrator.
Many times, the administrator gets a mess of PM's, some of which are important, and others of which are not. It is tedious to look into every PM to detirmine which are worth replying to and which aren't.
This code helps with that problem. On a board where this code is implemented, the PM screen is slightly changed. If the member is PM'ing anyone except the admin, it seems like a normal PM screen. But as soon as they enter the Admin's username into the Send To box (or select it from the Address Book), a section appears above the "Code Buttons" section that makes them choose a topic of the PM.
As long as the PM is going to the Admin, that topic is added to the begining of the message subject when the user presses Send, so the Admin can quickly glance through the topic subjects of his/her PM's to decide which are of an important nature.
Anyway, here's the code:
- Quote:
-
Board Wrappers>>Footer (At The Very Bottom):- Quote:
-
<script language="JavaScript" type="text/JavaScript">
function SetPMName() {
if (document.REPLIER.from_contact) { document.REPLIER.entered_name.value=document.REPLIER.from_contact.options[document.REPLIER.from_contact.selectedIndex].text; }
ShowOptions();
}
function CheckOpts() {
if (mytr.style.display!="none") {
document.REPLIER.msg_title.value=document.REPLIER.adminopts.options[document.REPLIER.adminopts.selectedIndex].text+": "+document.REPLIER.msg_title.value;
}
return true;
}
function ShowOptions() {
namer="IceMetalPunk";
if (document.REPLIER.entered_name.value.toLowerCase()==namer.toLowerCase()) { okay=""; } else { okay="none"; }
mytr.style.display=okay;
mytr2.style.display=okay;
}
if (window.location.href.toLowerCase().indexOf("act=msg")!=-1 && window.location.href.toLowerCase().indexOf("code=04")!=-1) {
trs=document.getElementsByTagName("tr");
for (p=0; p<trs.length; p++) {
if (trs[p].innerHTML.toLowerCase().indexOf("enter your message")!=-1 && trs[p+1].innerHTML.toLowerCase().indexOf("message title")!=-1) {
mytr=trs[p+2].parentNode.insertRow(trs[p+2].rowIndex);
mytd1=mytr.insertCell(0);
mytd1.className="pformstrip";
mytd1.colSpan='2';
mytr.width="100%";
mytd1.width="100%";
mytd1.innerHTML="Administrator PM Options";
mytr2=trs[p+3].parentNode.insertRow(trs[p+3].rowIndex);
mytd21=mytr2.insertCell(0);
mytd22=mytr2.insertCell(1);
mytd21.className="pformleft";
mytd22.className="pformright";
mytd21.innerHTML="<b>Select Purpose of PM</b>";
mytd22.innerHTML="<select name='adminopts'><option>Other</option><option>Personal PM</option><option>Board PM</option><option>Forum Bug</option><option>Board Skin</option></select>";
mytr.style.display="none";
mytr2.style.display="none";
}
}
if (document.REPLIER.from_contact) { document.REPLIER.from_contact.setAttribute("onChange","SetPMName()"); }
document.REPLIER.entered_name.onblur=ShowOptions;
document.REPLIER.onsubmit=CheckOpts;
SetPMName();
}
</script>
Change the
RED to the name of the administrator on your board.
The
BLUE can be changed to allow for different topic subjects for the members to choose from, but each one must be surrounded by <option> and </option> tags. The default topic subject is the first one listed.
For example, the default above is Other, while all the options in the example above are Other, Personal PM, Board PM, Forum Bug, and Board Skin. You can change those, remove them, and/or add your own.
Preview:
Preview BoardGo to the preview board and send yourself a PM. Notice how it seems like a normal PM and normal Compose PM screen. Then try to send a PM to IceMetalPunk.
As soon as you finish entering my username there and go to a different box (or click a button, such as a Code button or the Send button), the "Administrator PM Options" section will appear for you to choose one. Sending that PM will add that topic subject to the begining of your PM's subject. Also notice that if you type the admin's name in the box to make the Administrator Options section appear, then you change the name and click a button or switch boxes, the Administrator PM Options section will disappear.
And, one last thing before you guys try this: The new section of the PM screen uses the CSS classes, so it will automatically fit your board's skin.
Post any questions/comments/critisizm here.
-IMP ;) :)
*EDIT* All Bugs Fixed, And It's Now Cross-Browser! Enjoy! :D :D :D