Post by Bradley on Aug 31, 2005 16:04:54 GMT -8
The code here before has been removed & replaced with the code below. The reason for this is that the previous code didn't work. This thread will be reposted and deleted at some stage in the near future.
Global Footer
If you want to add other staff, find this part of the code:
var reportTo = "admin";
Then, enter their usernames. Use an apostrophe to separate each name. Eg:
var reportTo = "admin,craig,soe";
Global Footer
<script type="text/javascript">
<!--
/*
Report to Admin v1
For Support: http://support.proboards.com
*/
var reportLink = "[REPORT POST]";
var reportSubject = "Reporting User: ";
var reportTo = "admin,craig,soe";
var tds = document.getElementsByTagName("td");
function enc(sStr) {
return escape(sStr).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27').replace(/\&/g, '%26');
}
if(location.href.match(/action=display/i)){
pageLink = (location.href.match(/#/)) ? location.href.split(/#/i)[0] : location.href;
for(i=0; i<tds.length; i++){
if (tds[i].width == "20%" && (tds[i].getElementsByTagName('a')[0] && tds[i].getElementsByTagName('a')[0].name && tds[i].getElementsByTagName('a')[0].name.match(/^\d+$/))) {
postId = tds[i].getElementsByTagName('a')[0].name;
memberName = ((tds[i].getElementsByTagName('a')[2] && tds[i].getElementsByTagName('a')[2].href.match(/=viewprofile/)) ? (tds[i].getElementsByTagName('a')[2].getElementsByTagName('font')[0] ? tds[i].getElementsByTagName('a')[2].getElementsByTagName('font')[0].innerHTML : tds[i].getElementsByTagName('a')[2].innerHTML) : 'Guest');
memberLink = (tds[i].getElementsByTagName('a')[2] && tds[i].getElementsByTagName('a')[2].href.match(/=viewprofile/)) ? '[url='+tds[i].getElementsByTagName('a')[2].href+']'+ memberName +'[/url]' : 'a Guest';
pmLink = '/?action=pmsend&to='+ reportTo +'&subject='+ enc(reportSubject) + memberName +'&message=I am reporting '+ enc(memberLink) +' for making [url=' + enc(pageLink) + '%23' + postId +']this post[/url]';
// add link to post body
postBody = tds[i].nextSibling;
plinks = postBody.getElementsByTagName('a');
for (b=plinks.length-1;b>=0;b--)
if (plinks[b].innerHTML.match(/Link to Post/) && plinks[b+1].href.match(/#/))
plinks[b].parentNode.innerHTML= '<a href="'+ pmLink +'">'+ reportLink +'</a> - '+ plinks[b].parentNode.innerHTML;
}
}
}
//-->
</script>
If you want to add other staff, find this part of the code:
var reportTo = "admin";
Then, enter their usernames. Use an apostrophe to separate each name. Eg:
var reportTo = "admin,craig,soe";