|
Post by Wormopolis on Dec 19, 2008 14:40:06 GMT -8
Browser Tested: IE and FF Location: main footer puts a link at the bottom of PMs to allow user to forward a protected copy of a "naughty" PM to the admin (or whoever you list as a recipient). variables also allow recipients to be edited or not. <script type="text/javascript"> <!-- /* Report PM To Admin v1.35 By Wormopolis Do Not Repost */
var rptLinkText = "Report to Admin"; var rptSubject = "Reporting User: "; var rptBody = "I am reporting this user for what he sent me in the following PM:"; var rptTo = "admin, sobhraj"; // EDIT THIS LIST FOR ALL THE RECIPIENTS. IMPORTANT IT IS ACCURATE! var allowRecipientEdit = false; //EDIT true or false if you want user to be able to change recipients var allowSubjectEdit = false; //EDIT true or false if you want user to be able to change subject
// shouldnt need to edit below
function stripTags(nStr) { if(nStr.match(/<FONT/i)) { start=nStr.indexOf(">")+1; end=nStr.indexOf("</",start); nStr=nStr.substring(start,end); } return nStr; }
function URLencode(sStr) { return escape(sStr).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27'); }
var tds = document.getElementsByTagName("td"); var i; var recentName; var recentDate; var pmRptLink;
if (location.href.match("REP0RTING=1")) { if (document.postForm) { var temp=unescape(location.href.split("subject=")[1].split("&quo")[0]); document.postForm.subject.value=temp.split("::")[0]; Qdate=temp.split("::")[1]; please=document.createElement("textarea"); please.rows=document.postForm.message.rows; please.cols=document.postForm.message.cols; postForm.message.rows=3; please.style.background="#CCCCCC"; if (!allowRecipientEdit) document.postForm.to.disabled=true; if (!allowSubjectEdit) document.postForm.subject.disabled=true; please.value=document.postForm.message.value; document.postForm.message.value=rptBody; regMessage=document.postForm.message.parentNode.firstChild; regMessage.parentNode.appendChild(please) if (document.addEventListener) { please.addEventListener('focus',function() {document.postForm.message.focus();},false); please.disabled="disabled"; } else { please.attachEvent('onfocus',function() {document.postForm.message.focus();}); }
function addBackQuote(){ if (document.postForm.to.disabled) document.postForm.to.disabled=false; if (document.postForm.subject.disabled) document.postForm.subject.disabled=false; postForm.message.value+=please.value+Qdate; } if(document.addEventListener){ postForm.addEventListener('submit',addBackQuote,false); } else { postForm.attachEvent('onsubmit',addBackQuote); } btns=document.getElementsByTagName('input'); for (b=0; b<btns.length; b++) { if (btns[b].type=="submit" && btns[b].value=="Send Personal Message") btns[b].value="Report User"; if (btns[b].type=="submit" && btns[b].value=="Preview") btns[b].style.display="none"; } } }
if(location.href.match(/action=pmview/i) ){ for(i=0; i<tds.length; i++){ if(tds.item(i).align == "right" && tds.item(i).firstChild.nodeName.match(/font/i)){ if(tds.item(i).lastChild.firstChild.nodeName.match(/img/i) && tds.item(i).lastChild.firstChild.alt.match(/IP:/i)){ msgLink=location.href.split("id=")[1]; tds.item(i).firstChild.replaceChild(document.createTextNode(" - "), tds.item(i).firstChild.lastChild); pmRptLink = document.createElement("a"); pmRptLink.href = "/index.cgi?action=pmsend&to="+rptTo+"&subject="; pmRptLink.href+=URLencode(rptSubject+recentName+"::"+recentDate)+"&quo"+"te="+msgLink; pmRptLink.href+="&view=1&REP0RTING=1"; pmRptLink.innerHTML=rptLinkText; tds.item(i).firstChild.appendChild(pmRptLink); tds.item(i).firstChild.appendChild(document.createTextNode(" ")); } } else { if(tds.item(i).width == "20%") { if (tds.item(i).firstChild.nodeName.match(/b/i)){ if (tds.item(i).firstChild.firstChild.nodeName=='A') { recentName = tds.item(i).firstChild.firstChild.innerHTML; recentName=stripTags(recentName); recentDate= tds.item(i).nextSibling.getElementsByTagName('td')[1].getElementsByTagName('font')[1].innerHTML; var dt= new Date(); var ydt= new Date(); ydt.setDate(ydt.getDate()-1); recentDate=recentDate.replace(/yesterday/i,ydt.toDateString()).replace(/<b>today<\/b>/i,dt.toDateString()); } } } } } }
// --> </script>
Preview: PMs will have a "report to admin" link at the bottom (green circle). Click that link to notify admin (or whoever you set up to be recipient). A response form will be generated. if you choose to protect recipients, the box will be greyed out (green circle). The quoted message will be in its own protected box that cannot be edited (red circle). at the bottom of the report, the preview button will be gone and there will be a "Report User" button. This is what the report looks like to the recipients.
|
|
|
Post by Wormopolis on Apr 23, 2009 23:04:26 GMT -8
updated to allow protection of subject line.
|
|
|
Post by Wormopolis on Apr 25, 2009 14:16:23 GMT -8
fixed a bug that popped up with the new subject protect mod.
|
|
cadfael
Not New Member
Posts: 3
cadfael said 0 great things
|
Post by cadfael on Apr 25, 2009 22:38:33 GMT -8
Nice!
|
|
osieorb18
Not New Member
Posts: 2
osieorb18 said 0 great things
|
Post by osieorb18 on Dec 23, 2012 0:25:50 GMT -8
Could there also be a variant of this that is actually a report function?
|
|
|
Post by Wormopolis on Dec 23, 2012 4:06:21 GMT -8
like to make a PM into a message that all the mods can see? no that would never be possible since it basically makes a post public. but you can make it send to multiple recipients. the report feature only works off regular pposts because they are already (basically) public
|
|
osieorb18
Not New Member
Posts: 2
osieorb18 said 0 great things
|
Post by osieorb18 on Dec 28, 2012 20:23:30 GMT -8
How about making a special user that converts a message into a post in a specific board, then reports that post?
|
|
|
Post by Wormopolis on Dec 29, 2012 16:56:42 GMT -8
unlike posts, the message system doesnt provide a way to change destination. I have a code that lets you change a post destination because that editor has a place you can modify. the message system doesnt have that because they are sent to recipients.
short of copy pasting, it just wouldnt be possible to make a private message public.
|
|
Deathstrike
Not New Member
Posts: 12
Deathstrike said 0 great things
|
Post by Deathstrike on May 1, 2013 8:58:25 GMT -8
Does this work for V5?
|
|
|
Post by Wormopolis on May 1, 2013 19:37:39 GMT -8
not out of the box. it would have to be rewritten
|
|
Deathstrike
Not New Member
Posts: 12
Deathstrike said 0 great things
|
Post by Deathstrike on May 2, 2013 14:22:31 GMT -8
Would that be possible by chance?
|
|
|
Post by Wormopolis on May 4, 2013 10:04:19 GMT -8
definately possible.. just not very soon. Im working on 3 already
|
|
Deathstrike
Not New Member
Posts: 12
Deathstrike said 0 great things
|
Post by Deathstrike on May 5, 2013 7:13:20 GMT -8
As I said on my other one I'll be happy to wait =)
|
|
Deathstrike
Not New Member
Posts: 12
Deathstrike said 0 great things
|
Post by Deathstrike on Sept 6, 2013 12:23:04 GMT -8
Just wondering if you're less busy by now =)
|
|
|
Post by Wormopolis on Sept 6, 2013 21:02:13 GMT -8
well it turns out.. waiting paid off. because now its a built in feature. you can forward messages to someone else already in the native conversations, and you cant edit what they said.
|
|