PDA

View Full Version : Improved Moderator Alert System


Overgrow
06 Feb 2003, 18:36
IMPROVED MODERATOR ALERT v.1.1

Goal: Improve the way staff handles junk posts. Speed up processing time of moderator alerts from users. Make the forum meta-moddable.

Usefuleness: The default moderator alerts are useless. Why rely on email to a few people when you have a perfectly good forum system? This hack will have you create a thread in your private Moderators forum. Then as users click "Moderator Alert" under any post, the system will add a new post to your thread in the private room-- allowing all staff to see and discuss the problem immediately instead of relying on the old style email functions.


Requirements:

-Existing private moderator/admin forum
-Annoying users that violate your TOS
-Useful users that will report them


Installation:

-Create and upload one file to your forum directory
-Make one addition in functions.php
-Upload one gif
-Make one addition to the postbit template
-Add two templates


Difficulty: Somewhat Easy

Speed: Not too bad

Release: 1.1-- Feb 07, 2003

Added option to put all alerts in one post or in mutiple threads

Fixed bugs and tested both versions


Michael Knight: https://www.vbulletin.org/forum/

Overgrow
06 Feb 2003, 18:37
Screenshot 1 - Report this post?

Overgrow
06 Feb 2003, 18:38
Screenshot 2 - Yes, that post sucked.

Overgrow
06 Feb 2003, 18:39
Screenshot 3 - ALL mods and admins instantly alerted to post that sucked. They can discuss or take action.

TECK
06 Feb 2003, 18:40
Is about time for you to release a hack. :D

Overgrow
06 Feb 2003, 18:41
:rolleyes: you! ...my new archive is slowing the site down with all the robotic action :)

Dean C
06 Feb 2003, 18:54
This is a very good idea buddy :)

- miSt

Logik
06 Feb 2003, 19:05
This isnt just a good idea, its a great idea. :)

Overgrow
06 Feb 2003, 19:18
KITT says: Michael, this hack has already decreased our response time and Moderator workload. Staff happiness is bound to be inversely proportional and increase as well.

http://www.overgrow.com/edge/gallery/33897/Knight-Rider---Background--Wallpaper-.jpg

Davey
06 Feb 2003, 21:02
lol nice idea mate.
I love the way you post those freaky pictures to make us smile while we're downloading your hack ;):).

Dave.

PS:
/me installs :D

Mystic Gohan
06 Feb 2003, 21:24
this will be very usefull I will install later when I have access to my forum.

alkatraz
06 Feb 2003, 22:57
Great idea!!!!!!

Neo
07 Feb 2003, 08:48
Originally posted by Overgrow
IMPROVED MODERATOR ALERT v.1.0


Michael Knight: http://www.overgrow.com/edge/images/smilies/davidsmiliekr.gif


O_____________________O;;

fonzerelli_79
07 Feb 2003, 10:48
this is a fantastic idea

well done:)

ethics
07 Feb 2003, 13:52
Everyone got this to work? For some reason my $modalert is not showing up in postbit (not the code, but forum).

Overgrow
07 Feb 2003, 14:17
4) open /admin/functions.php. Find:

$post['message'] = preg_replace("/\b_([a....

and AFTER IT add:

// HACK MODALERT

if ($bbuserinfo['userid']>0) {


That's in functions, building the postbit. Make sure that is in the right place and you've uploaded the new functions.php.

Anyone else have this problem?

This is a hack of a hack that I wrote.. it's extracted functionality from a bigger hack on my site so I'm not 100% about the install.

Mark Hewitt
07 Feb 2003, 14:51
Can this be modified to start a new thread per reported post?

I would like to create a private forum just for reported posts.

Mark Hewitt
07 Feb 2003, 15:06
I have the same problem with the moderator link not appearing. In fact the text you specified in your install file does not exist in functions.php

I found something similar and put this[

$post['message']=preg_replace("#(^| |\n|\r|\t|\]|>|\")(".$val.")(([\.,]+[ $\n\r\t])|$|\"|<|\[| |\n|\r|\t)#si", "\\1<highlight>\\2</highlight>\\3", $post['message']);

// HACK MODALERT

if ($bbuserinfo['userid']>0) {
$modalert="<a href=\"modalert.php?s=$session[sessionhash]&postid=$post[postid]&username=$post[username]\"><img src=\"{imagesfolder}/modalert.gif\" border=\"0\" alt=\"Alert Moderators\"></a>&nbsp;&nbsp;";
}

// END HACK


But that does not work.

Overgrow
07 Feb 2003, 16:02
Ahgeez.. ok I was high when I released this, I admit it.

The line you look for in functions.php is:
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);

Then paste the // HACK MODALERT below that... fixing the zip file above.

wooolF[RM]
07 Feb 2003, 16:18
Originally posted by Overgrow
Ahgeez.. ok I was high when I released this, I admit it.
looking at your hair :paranoid: :rolleyes:

WebMasterAJ
07 Feb 2003, 16:59
Just installed it... and it doesn't display the modalert icon :(

Overgrow
07 Feb 2003, 17:07
Under this in functions:
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);

You put the Hack?

and in postbit you put $modalert ?

I can't see any reason why it wouldn't show..?

WebMasterAJ
07 Feb 2003, 17:19
Yes, in the admin/functions.php.. I have:

$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);
// HACK MODALERT

if ($bbuserinfo['userid']>0) {
$modalert="<a href=\"modalert.php?s=$session[sessionhash]&postid=$post[postid]&username=$post[username]\"><img src=\"{imagesfolder}/modalert.gif\" border=\"0\" alt=\"Alert Moderators\"></a>&nbsp;&nbsp;";
}

// END HACK


And this is what my postbit template looks like:

<smallfont> $modalert | <a href="report.php?s=$session[sessionhash]&amp;postid=$post[postid]">Report
this post to a moderator</a> | $post[iplogged]</smallfont>


However, when you view a post... I just see:
| Report this post to a moderator | IP: Logged

I'm looking around for errors, but don't see any... yet... any ideas?

ethics
07 Feb 2003, 17:22
Will try the new code tonight Over. :)

Thanks for the fix.

WebMasterAJ
07 Feb 2003, 17:23
Nevermind... I won't even tell you why it didn't work... stupid me... lol

Thanks for your time...

WORKS GREAT! :D

Overgrow
07 Feb 2003, 17:26
Yea I just installed a totally clean test board... went through all my instructions.... and I realize why it didn't work for you :D

Don't forget to upload modalert.gif to your images directory! hehe

WebMasterAJ
07 Feb 2003, 17:37
Just curious, is it possible for this to replace the "Report this post to a moderator" link and make it also send an email to the moderators?

Meaning, can you combine your hack (to copy the post to a thread in a private forum) and also send an email to the moderators?

That would be a great addition...

If not... thanks for the great hack anyways man :cool:

EchoHype.com
07 Feb 2003, 18:02
For some reason, after I set it and all.

It posts in the wrong forum, and as a new user not registered.

Any help?

Overgrow
07 Feb 2003, 18:09
Sure, just remove the "Report this post to a moderator" link wherever that is. I don't know myself, I've never used it..

Then if you want the mods to be emailed just have them subscribe to the Mod Alert thread.


Mark>> Can this be modified to start a new thread per reported post?

Yes, download again and copy out the new modalert.php of your choice.

Overgrow
07 Feb 2003, 18:11
Echo: all bugs have been fixed, I've tested both installs and versions now.. I needed a clean test board anyway!

If you re-do the modalert.php part of the install and still have problems then you should carefully check the $variables at the top of modalert.php to make sure they are set to the right user/forum/thread.

EchoHype.com
07 Feb 2003, 18:34
Alright, I set them to the new user I made just for it. Is that correct?

Because I noticed it posted with an entirely new unregistered user?

Overgrow
07 Feb 2003, 20:25
Did you re-download the zip and save out modalert.php again? Everyone should.

X-Fan
07 Feb 2003, 22:26
When I tested this out and sent an alert to the moderators for a post, it changed the lastposter in the thread to modalert. Is there any way to stop that from happening? I don't want to end up with dozens of threads all with lastposter modalert!

Erwin
07 Feb 2003, 22:42
Nice to see you're still in action, Overgrow. :)

I see you are a Hasselhoff fan... must be only when you're stoned... hehe

It's a great idea. :)

Erwin
07 Feb 2003, 23:33
I've integrated your hack into my forum now -

when a user reports a post, the report is sent via EMAIL, PM, and a new THREAD is opened in my admin forum at the same time. :) It's just editing the report.php file.

WebMasterAJ
07 Feb 2003, 23:43
Erwin,

Could you please share this? I've really been looking for something like that...

If not, I completely understand... :cool:

Thanks...

Erwin
08 Feb 2003, 00:15
To integrate this into your usual reporting methods, you do NOT have to make a new file or make new templates up, or add any extra queries to search the message - everything is in report.php already.

To achieve the same result, while being able to email mods (and if you have the PM mod hack, PM mods as well), just do this (no need to do anything else):

Open report.php.

Find:


$url = str_replace("\"", "", $url);


ABOVE this, ADD:


$modforum="100";
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastpos ter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$modforum','1','0','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."','".time()."','$iconid','1','0')");
$threadid=$DB_site->insert_id();
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignatu re,ipaddress,iconid,visible) VALUES (NULL,'$threadid','Post Alert - $postinfo[username]','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='$bbuserinfo[username]' WHERE forumid='$modforum'");


Change:

$modforum="100";

To the forumid of your admin forum.

Done! :)

P.S. I hope Overgrow doesn't mind me posting this here - I could post this in a separate hack, but after all, it's his idea, and he should get the credit. :)

Brad
08 Feb 2003, 00:22
Very nice ~s~, i will be using this..when im not on overgrow that is LOL

ethics
09 Feb 2003, 04:12
Guys, anyway that this can have a small text box that the user (complainer) will be able to state their reasons for their report?

If not no biggie, great hack and thank you very much to not only you but all of the hackers and the members. :)

hukgwai
13 Feb 2003, 18:24
i created a new user and put it's userid in modalert.php.. but ends up me posting the alerts in the mod forum

any reason why this is happening? i changed the variable to someone else, still posts under me.

wierd.. please help

hukgwai
13 Feb 2003, 18:47
i think im confused.. is the person who is reporting the post going to be the poster in mods only forum? the actual "robot" is not the poster?

ethics
13 Feb 2003, 20:09
Originally posted by hukgwai
i created a new user and put it's userid in modalert.php.. but ends up me posting the alerts in the mod forum


Not sure what you mean.

Anytime a user presses the modalert, you will get a post in the mod forum, alerting all the mods for the thread/post in question.

Kamakazy
12 Mar 2003, 19:02
i get a parse error...

Parse error: parse error in mysite/forum/admin/functions.php on line 818

and a Fatal error...

Fatal error: Call to undefined function: vbdate() in mysite/forum/admin/sessions.php on line 400

what am i doing wrong?

this happens once i add the functions.php code hack...

i am using version 2.2.9

Ghostsuit
14 Mar 2003, 15:25
02-09-03 at 05:12 AM ethics said this in Post #39 (http://www.vbulletin.org/forum/showthread.php?postid=352095#post352095)
Guys, anyway that this can have a small text box that the user (complainer) will be able to state their reasons for their report?

If not no biggie, great hack and thank you very much to not only you but all of the hackers and the members. :) That would be an excellent feature it's the only things my mods have asked.

drumsy
14 Mar 2003, 17:02
02-13-03 at 02:47 PM hukgwai said this in Post #41 (http://www.vbulletin.org/forum/showthread.php?postid=353785#post353785)
i think im confused.. is the person who is reporting the post going to be the poster in mods only forum? the actual "robot" is not the poster?


You specify in modalert.php which user ID you want to post the Alert thread in the forum that you also specify in the same place! :)

Sanni
15 Mar 2003, 05:06
sounds like an awesome hack :)

Just one question, I have about 50 different forums all moderated by different people and each forum category has it's own admin forum (to get an idea of what I'm talking about you can see the forums here: http://www.ozforums.com )

With this hack can it be set such that the alert gets placed in the relevant admin forum for that post? (considering there are about 50 admin forums :) Or is it possible to apply this hack so it only works on one particular forum (as opposed to all of them?

SgtSling
17 Mar 2003, 11:20
for some reason no matter who I use as the robot poster.. it always posts as user id 1

Master Computer
05 Apr 2003, 18:58
Thanks man

mvigod
07 Apr 2003, 23:20
Great hack..worked fine under 2.3.0.

Would be even nicer if the user could add a short comment about why he/she was reporting the post though so the mods don't have to figure out exactly why it was reported.

Figment
08 Apr 2003, 19:53
I've just installed this on 2.2.8, to create a new thread in my moderators forum for each alert. It seems to be working as intended, I have a couple of points that need clarifying.

1. The Name that appears in "Started By" (and the thread author) in the moderators forum is the user reporting the post - not the userid set up in modalert.php. Is this correct or have I forgotten something.

2. When a new thread is added to the moderators forum via ModAlert, the moderators do not get email notification. However if I post a thread manually into the moderators forum they do.

3. I attempted to change over to Erwins suggested method, by editing report.php. This gives a parse error, unexpected ')' in report.php on line 61, which is this:

$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastpos ter,dateline,iconid,visible,attach) VALUES (NULL,'".$subject))."','".time()."','$modforum','1','0','".$bbuserinfo[username])."','$bbuserinfo[userid]','".$bbuserinfo[username])."','".time()."','$iconid','1','0')");

so I changed back to the original, but still do not have emails going to the moderators.
Thanks in advance for your help.

yzztik
10 Apr 2003, 23:28
02-07-03 at 09:09 PM Erwin said this in Post #37 (http://www.vbulletin.org/forum/showthread.php?postid=351667#post351667)
To integrate this into your usual reporting methods, you do NOT have to make a new file or make new templates up, or add any extra queries to search the message - everything is in report.php already.

To achieve the same result, while being able to email mods (and if you have the PM mod hack, PM mods as well), just do this (no need to do anything else):

Open report.php.

Find:


$url = str_replace("\"", "", $url);


ABOVE this, ADD:


$modforum="100";
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastpos ter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$modforum','1','0','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."','".time()."','$iconid','1','0')");
$threadid=$DB_site->insert_id();
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignatu re,ipaddress,iconid,visible) VALUES (NULL,'$threadid','Post Alert - $postinfo[username]','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='$bbuserinfo[username]' WHERE forumid='$modforum'");


Change:

$modforum="100";

To the forumid of your admin forum.

Done! :)

P.S. I hope Overgrow doesn't mind me posting this here - I could post this in a separate hack, but after all, it's his idea, and he should get the credit. :)


When I try this, I get a parse error:

Parse error: parse error, unexpected ')' in /home/friend/public_html/forum/report.php on line 64

Any ideas? :-s

Figment
11 Apr 2003, 07:36
Exactly the same error I get if I adopt Erwins suggestion.

I'd like to get this sorted one way or other - either by finding the fix for Erwins method or getting help on making the email to mods work in Overgrows original set up.


TIA

yzztik
11 Apr 2003, 12:02
With Erwins suggestion, the post that gets made, does it include the post they are reporting and their reason too? Also, does it only do the new thread thing, or can it post to an existing thread?

Figment
11 Apr 2003, 12:06
As it uses the existing report.php file, I would presume it works in the same way as the original vB reports, with the addition of a post into the admin/mods forum. I am not sure whether it allows you to choose between new thread per reported post or all reports into one thread, and I have yet to find out whether it includes a copy of the original post, as I cannot test it because of the parse error.

yzztik
11 Apr 2003, 12:10
Yeah same here ... I cannot for the life of me figure out the parse error, I mean it seems there is an extra ) somewhere, but I tried removing some and still got the error, so I am not certain of what it is. It seems to be in the first line of code.

Figment
11 Apr 2003, 13:18
Hmm, just tried replying by email but it hasn't appeared. So apologies if this posts twice

Yes, I've tried that too. Not too hot on PHP, but I tried removing/replacing them one by one, adding an extra '(' here and there all without success. Seem to recall with some combinations the actual error message changed, but I could not get it to work no matter what I tried.

Erwin
11 Apr 2003, 23:10
Try this code:

Find:


$url = str_replace("\"", "", $url);


Above, add:


$modforum="xx";
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastpos ter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$modforum','1','0','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."','".time()."','$iconid','1','0')");
$threadid=$DB_site->insert_id();
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignatu re,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='".addslashes($bbuserinfo[username])."' WHERE forumid='$modforum'");


Replace xx with your mod forum.

This is the code I am using.

If you have the LAST TITLE ON FORUM HOME hack, use this code instead (which updates the forum title too).


$modforum="xx";
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastpos ter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$modforum','1','0','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."','".time()."','$iconid','1','0')");
$threadid=$DB_site->insert_id();
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignatu re,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='".addslashes($bbuserinfo[username])."',lasttitle='".addslashes(htmlspecialchars($subject))."' WHERE forumid='$modforum'");


Again, replace xx with your mod forum.

Erwin
11 Apr 2003, 23:10
Sorry to Overgrow for hijacking his thread, but I don't want to release a hack that does the same thing... unless you want me to do so. :)

yzztik
12 Apr 2003, 16:45
I can't find this string:

$url = "\"", "", $url);

All I have is this:

$url = str_replace("\"", "", $url);


When I add it above that, still get a parse error :(

I am using 2.2.9

Figment
12 Apr 2003, 20:16
Ditto here, using 2.2.8

Figment
15 Apr 2003, 21:28
Can anyone help on this please?

heynurse
19 Apr 2003, 01:38
04-11-03 at 06:02 AM yzztik said this in Post #53 (http://www.vbulletin.org/forum/showthread.php?postid=380530#post380530)
With Erwins suggestion, the post that gets made, does it include the post they are reporting and their reason too? Also, does it only do the new thread thing, or can it post to an existing thread?

Nice Hack! Just installed.

I agree the feature that I would like to see would be to let the reporting users give comments as to why they think the post is bad. Has anyone added this option?

heynurse
19 Apr 2003, 02:36
02-07-03 at 06:33 PM Erwin said this in Post #35 (http://www.vbulletin.org/forum/showthread.php?postid=351650#post351650)
I've integrated your hack into my forum now -

when a user reports a post, the report is sent via EMAIL, PM, and a new THREAD is opened in my admin forum at the same time. :) It's just editing the report.php file.

Erwin,

I tried using both of your codes so that the mods get an e-mail with the reported post, but neither of them are sending e-mails?

Is there a setting that will send it to all the supermods, mods and admins?

Any ideas? Thanks

yzztik
20 Apr 2003, 14:26
ok, I am thinking of using the original of this that simply posts the thread in the mod forum, but is there any way at all to allow the user to give a reason for reporting it? This feature is installed at another board I mod and some of the reported posts without a reason make no sense.

mtha
22 Apr 2003, 15:24
04-11-03 at 11:10 PM Erwin said this in Post #57 (http://www.vbulletin.org/forum/showthread.php?postid=380818#post380818)
Try this code:

Find:


$url = str_replace("\"", "", $url);


Above, add:


$modforum="xx";
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastpos ter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$modforum','1','0','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."','".time()."','$iconid','1','0')");
$threadid=$DB_site->insert_id();
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignatu re,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='".addslashes($bbuserinfo[username])."' WHERE forumid='$modforum'");


Replace xx with your mod forum.

This is the code I am using.

If you have the LAST TITLE ON FORUM HOME hack, use this code instead (which updates the forum title too).


$modforum="xx";
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastpos ter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$modforum','1','0','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."','".time()."','$iconid','1','0')");
$threadid=$DB_site->insert_id();
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignatu re,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='".addslashes($bbuserinfo[username])."',lasttitle='".addslashes(htmlspecialchars($subject))."' WHERE forumid='$modforum'");


Again, replace xx with your mod forum.


somehow, the code has a bunch of extra "))"

:( couldnt get this to work in report.php.
if I remove those extra ), it give me

mysql error number: 1062
mysql error: Duplicate entry '68995' for key 1

where '68995' should be the new postid (which doesnt exist yet)

SemperFidelis
06 May 2003, 17:01
Cheers for the code Erwin
Works flawlessly on a severly hacked up vb 2.3.0
:)

Shepski
26 May 2003, 13:04
Is there a way to make this send an email to ALL moderators? The new thread gets posted in my moderators room but it would be very handy if the email gets sent to everyone as opposed to just the moderators of the forum that the post has been reported from.

cnczone
25 Jun 2003, 05:26
How can I add a box for the user to place a reason for the alert?

Holidazed
26 Jun 2003, 16:06
It has obviously been requested before, but I would like to see the following:

A spot for a user to state the reason for the Report.

I can easily add the textarea required to the modalert template. How do I make it so the contents of the comment field are posted to the ALERT thread.

Holidazed
30 Jun 2003, 20:43
Hello? Anybody home?

Holidazed
08 Jul 2003, 15:11
Does ANYBODY check this thread at all?

cnczone
08 Jul 2003, 18:10
I guess they all fell off the earth. :(

discussfitness
13 Oct 2003, 12:28
I guess they all fell off the earth. :(
It would be great if you could give a reason. I prefer this hack compared to filburt1's one, but at least with his you can add a reason, even if you can't discuss it. I want to be able to discuss and see the reason... lol :(

discussfitness
27 Nov 2003, 00:24
Hehe... I can't believe this - I found a way to include a reason It's so simple, no wonder the author didn't reply, he must have thought we were all fools. Anyway...

Just add something like:

<input type="text" name="reason" size="25" maxlength="50">
To your modalert template in the Admin CP

Then in your modalert.php file, put the variable

$reason
Where you want their reason to appear, i.e. somewhere within

$message = "Alerting user: $bbuserinfo[username]\nPost ID: $postid - $bburl/showthread.php?postid=$postid#post$postid \n\nPost Message: $postinfo[pagetext]\n\nTheir reason was:\n $reason";

Lol... didn't realise it was that simple, but I thought I should do the right thing and report my findings for the good of the community :) Let me know if you like it and congrats to original author.

heynurse
27 Nov 2003, 03:00
Wow, thanks a ton, works great! Thanks for sharing.

Rezin
18 Dec 2003, 15:58
I have a heavily modded forum, and this worked flawlessly!

Thanks Overgrow! (Great board BTW, I'm one of your members ;))

Prince
18 Dec 2003, 21:31
Nice hack!

the added "reason" for reporting the post option worked great too!

Randomlove
18 Jan 2004, 16:01
Great hack, I also added reason, very handy indeed. As for the modifiying admin/functions.php to insert the URL and image for modalert.php

This is the code:


$modalert="<a href=\"modalert.php?s=$session[sessionhash]&postid=$post[postid]&username=$post[username]\"><img src=\"{imagesfolder}/modalert.gif\" border=\"0\" alt=\"Alert Moderators\"></a>&nbsp;&nbsp;";


The hack then tells us to put the variable $modalert in postbit, why not just insert that variable vaule into postbit directly? is a there a way to modify template postbit only and omit source code modifications?

Thanks.

DarkSavior
22 Jan 2004, 22:14
Great hack! But for me it doesn't use the specific account which would post the reported post to the mod forum. I made a super moderator account for that, but it always uses my own.

And I don't know if it could be more clearer than my userid for modbot is 10, and that's what I set it to in modalert.php also. But still it uses only my admin account. :(

EDIT: Got it working by doing some edits to the modalert.php file.

Added $postingusername field there, which I filled with the mod reporter bot name.
Then I changed all $bbuserinfo[userid] fields to $postinguser and all $bbuserinfo[username] to $postingusername.

Now it's working perfectly. :)

ricker
26 Jan 2004, 21:11
great hack! easy install.
*clicks install*