Post by Todge on May 3, 2009 8:00:40 GMT -8
This will give a member a dedicated staff member.
The members associated to the staff member are listed in their profiles and each member will get a link in their mini-profiles linking them directly to the PM page, with the staff member's name already added and hidden..
Put it in your Global Footer..
Edit and add to this part of the code...
mods[0] = 'moderator's DISPLAY NAME|moderator's USERNAME|member1|member2|member3';
mods[1] = 'moderator's DISPLAY NAME|moderator's USERNAME|member1|member2|member3|member4';
Red is the display name of the staff member..
Blue is the username of the staff member..
Green is the display names of the members associated to that member of staff..
You can have as many members associated to as many staff as you like.
Make sure all names are separated with the '|' character and you can continue with mods[2], mods[3] etc..[/code]
The members associated to the staff member are listed in their profiles and each member will get a link in their mini-profiles linking them directly to the PM page, with the staff member's name already added and hidden..
Put it in your Global Footer..
<script type="text/javascript">
<!--
/*
Member dedicated staff
by Todge
Copyright © 2009
Please keep this header intact
*/
var mods = new Array();
// Edit below...
mods[0] = 'moderator's DISPLAY NAME|moderator's USERNAME|member1|member2|member3';
mods[1] = 'moderator's DISPLAY NAME|moderator's USERNAME|member1|member2|member3|member4';
// Edit above...
// Add list of moderatees to moderator profile pages..
if(location.href.match(/action=viewprofile/))
{
for(m=0; m<mods.length; m++)
{
if(location.href.match(new RegExp('=('+mods[m].split('|')[1]+')$')) || (!location.href.match(/user=/) && pb_username.match(new RegExp('^('+mods[m].split('|')[1]+')$'))))
{
var profile = document.getElementsByTagName('font');
for(p=0; p<profile.length; p++)
{
if(profile[p].innerHTML.match(/Bio/) && profile[p].firstChild.nodeName == 'B')
{
profile = profile[p].parentNode.parentNode.parentNode;
}}
var ptr = document.createElement('TR');
var ptd = document.createElement('TD');
with (ptd){colSpan = '2'; innerHTML = '<font size="2"><b>Moderator to</b><hr size="1"></font>';};
ptr.appendChild(ptd);
profile.appendChild(ptr);
var ptr = document.createElement('TR');
var ptd = document.createElement('TD');
var mList = '';
for(l=2; l<mods[m].split('|').length; l++)
{
mList += mods[m].split('|')[l]+'<br>';
}
ptd.innerHTML = '<font size="2">'+mList+'</font>';
ptr.appendChild(document.createElement('TD'));
ptr.appendChild(ptd);
profile.appendChild(ptr);
}}}
// Add moderator to mini-profiles..
if(location.href.match(/action=display/))
{
var mini = document.getElementsByTagName('td');
for(m=0; m<mini.length; m++)
{
if(mini[m].width == '20%' && mini[m].vAlign == 'top' && mini[m].getElementsByTagName('a').length > 2)
{
var peep = mini[m].getElementsByTagName('a')[2].innerHTML;
for(mod=0; mod<mods.length; mod++)
{
if(peep.match(new RegExp('^('+mods[mod]+')$')) && peep != mods[mod].split('|')[0] && peep != mods[mod].split('|')[1])
{
var moderator = 'Representative: <a href="/index.cgi?action=pmsend&to='+mods[mod].split('|')[1]+'&tomod=yes">';
moderator += mods[mod].split('|')[0]+'</a><br>Joined:';
mini[m].innerHTML = mini[m].innerHTML.split('Joined:').join(moderator);
}}}}}
// Remove 'to' line in PM page..
if(document.postForm && location.href.match(/tomod=yes/))
{
document.postForm.to.parentNode.parentNode.style.display = 'none';
}
// -->
</script>
Edit and add to this part of the code...
mods[0] = 'moderator's DISPLAY NAME|moderator's USERNAME|member1|member2|member3';
mods[1] = 'moderator's DISPLAY NAME|moderator's USERNAME|member1|member2|member3|member4';
Red is the display name of the staff member..
Blue is the username of the staff member..
Green is the display names of the members associated to that member of staff..
You can have as many members associated to as many staff as you like.
Make sure all names are separated with the '|' character and you can continue with mods[2], mods[3] etc..[/code]