Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Report Post
Minisweeper
New
Report Post
0
This discussion has been closed.
Comments
You can change the text of the email by editing report.txt, and you can use the placeholders COMMENTLINK and REPORTERNAME to add information to the email.
You must grant ROLES the permission to recieve the emails, and the USERS in the selected ROLES must then select the PREFERENCE to recieve the reports on their forum preferences page.
Thanks to WallPhone for his Who's Online and Hutstein for his Notify extensions, from which certain code has been taken or followed.
I have tested it on FF2 on XP though I dont believe there should be any kind of browser incompatability. I have not tested it in great detail but again I dont think there's much to go wrong.
Try it and let me know what you think.
ISSUE:
Note: I know I can do this myself in the code (line 22 in default.php:) but these make sense to me:
...id=\"CommentID_".$Comment->CommentID."\">Report Post</a>";
"Report Post" text probably belongs in the definitions to support other language versions.While you're there consider:
- Changing it to lowercase to conform with UI standard in default vanilla theme (so not "Report Post" but "report post")
- Abbreviating it to "report" to eliminate clutter (link shown each comment, hence intrinsic). Also, my suggestion below would reports both user & post/comment... ;-)
UI SUGGESTION:
Confirm report action via JS alert? ("Thank you, this comment has been reported.")
EMAIL VARIABLES & SUGGESTIONS:
Add direct link from REPORTERNAME to reporter REPORTERPROFILE
Add COMMENTPOSTERNAME (+ link to profile)
Add DISCUSSIONTOPIC
Add COMMENTFULLTEXT and/or (COMMENTABSTRACT) to reduce need to *visit* the forum
Add single-click HIDECOMMENT or DELETECOMMENT variable (links) Note: delete is 'hide' in reality anyhow...
*edit: added code excerpt*
That should be in the dictionary you're right. So should the JS popup which checks you want to report it. I'll change those later on tonight if i remember (i could do it now but i'm on the apathetic and lazy part of my night)
As for the email variables, I guess the link would be easy enough, the others would take a bit more work. Shouldnt be too difficult though. Again i'll do it later if i get round to it. Keep bugging me about it if you want it done
Cheers for the feedback
I appreciate all your time/effort... (and I'm never shy asking about things that would make my life easier because I don't have to implement them, hehe)
Are you sure you want to report this comment? [cancel] [OK]
Then I get this error in an alert box...
Failed: (undefined) undefined [OK]
Posted: Monday, 26 March 2007 at 8:59AM (AEDT)
You're running v1.1.2? Tried a hard refresh? Can you check whether the rp.js file is included in the page load?
As is: /extensions/ReportPost/report.php?CommentID=327&u=1
Posted: Monday, 26 March 2007 at 10:19AM (AEDT)
I also get no error in Mac Firefox 2.
Will check when I get home to see if it actually sent the email.
Later...
Nope, nothing received.
Edited: Monday, 26 March 2007 at 3:04PM (AEDT)
function callReport(URL,CommentID,ReportUserID) { if (confirm("Are you sure you want to report this comment?")) { var param = "?CommentID="+CommentID+"&u="+ReportUserID; var dm = new DataManager(); dm.RequestCompleteEvent = finishReport; dm.RequestFailedEvent = HandleFailure; dm.LoadData(URL+param); } } function finishReport() { alert("This comment has now been reported to the forum administrators."); RefreshPage(); }
No error in Mac Firefox and I do get your confirmation alert but no email is sent.
Posted: Monday, 26 March 2007 at 3:40PM (AEDT)
The method used to send the email uses vanillas inbuilt email classes so if your forum can send other emails then it should be pretty waterproof. A way to test it would be to browse to domain.com/extensions/ReportPost/report.php?CommentID=REALCOMMENTID and see whether it sends the email then...?
I tried browsing directly to report.php and, although I got no error, (because the .js was by-passed I suppose), but I received no emails.
Posted: Tuesday, 27 March 2007 at 12:32AM (AEDT)
No change though, Firefox goes through the motions but no email is sent (at least not received).
Safari still gives this error...
Failed: (undefined) undefined [OK]
Also tried browsing directly to report.php
Posted: Tuesday, 27 March 2007 at 8:18AM
I turned mine on and yes I got the email, but why do all the members have the option to receive these reports? (Later: OK, I have now turned that option off for members).
Surely they should only go to the admins?
Also, the email received by the admin has a CC to all members who turned the option on, but they don't actually get a copy of the email! Are they supposed to? (Later: Not really an issue, I turned the option off for members)
The read-me needs work mate :-)
And... Safari still has the failed: undefined error, but it still sends the email.
Later still: Should Guests be allowed to report posts? When they do, the report is received as reported by me (admin).
Last Edited: Tuesday, 27 March 2007 at 9:48AM
Guests probably shouldnt be allowed to report posts, no. I'll need to stop that from happening.
No idea what safari's bitching about if it works ok...
I'm trying to disable the error message, not an ideal solution but a work-around so as not to confuse users.
Posted: Tuesday, 27 March 2007 at 11:12AM
if ($Context->Session->UserID > 0) ..... {
...which took the Report Post link away from non-members.
I also commented this line out in the .js file...
//dm.RequestFailedEvent = HandleFailure; //Stop error message in Safari
...and the cry-wolf error went away.
Posted: Tuesday, 27 March 2007 at 6:53PM
If a client hits Report Post on their post, it would send me the email (being the admin/moderator). But, if I hit report post on my post, I'd want to have the ability to send it to the client. Basically, to replace the notify extension that currently is not working.
Your thoughts?