PDA

View Full Version : Improved Moderator Alert System


Overgrow
02-05-2003, 10:00 PM
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://vborg.vbsupport.ru/

Overgrow
02-06-2003, 05:37 PM
Screenshot 1 - Report this post?

Overgrow
02-06-2003, 05:38 PM
Screenshot 2 - Yes, that post sucked.

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

TECK
02-06-2003, 05:40 PM
Is about time for you to release a hack. :D

Overgrow
02-06-2003, 05:41 PM
:rolleyes: you! ...my new archive is slowing the site down with all the robotic action :)

Dean C
02-06-2003, 05:54 PM
This is a very good idea buddy :)

- miSt

Logik
02-06-2003, 06:05 PM
This isnt just a good idea, its a great idea. :)

Overgrow
02-06-2003, 06:18 PM
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
02-06-2003, 08:02 PM
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:
* Davey installs :D

Mystic Gohan
02-06-2003, 08:24 PM
this will be very usefull I will install later when I have access to my forum.

alkatraz
02-06-2003, 09:57 PM
Great idea!!!!!!

Neo
02-07-2003, 07:48 AM
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
02-07-2003, 09:48 AM
this is a fantastic idea

well done:)

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

Overgrow
02-07-2003, 01:17 PM
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
02-07-2003, 01:51 PM
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
02-07-2003, 02:06 PM
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
02-07-2003, 03:02 PM
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]
02-07-2003, 03:18 PM
]Originally posted by Overgrow
Ahgeez.. ok I was high when I released this, I admit it.
looking at your hair :paranoid: :rolleyes:

WebMasterAJ
02-07-2003, 03:59 PM
Just installed it... and it doesn't display the modalert icon :(

Overgrow
02-07-2003, 04:07 PM
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
02-07-2003, 04:19 PM
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
02-07-2003, 04:22 PM
Will try the new code tonight Over. :)

Thanks for the fix.

WebMasterAJ
02-07-2003, 04:23 PM
Nevermind... I won't even tell you why it didn't work... stupid me... lol

Thanks for your time...

WORKS GREAT! :D

Overgrow
02-07-2003, 04:26 PM
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
02-07-2003, 04:37 PM
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
02-07-2003, 05:02 PM
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
02-07-2003, 05:09 PM
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
02-07-2003, 05:11 PM
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
02-07-2003, 05:34 PM
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
02-07-2003, 07:25 PM
Did you re-download the zip and save out modalert.php again? Everyone should.

X-Fan
02-07-2003, 09:26 PM
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
02-07-2003, 09:42 PM
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
02-07-2003, 10:33 PM
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
02-07-2003, 10:43 PM
Erwin,

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

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

Thanks...

Erwin
02-07-2003, 11:15 PM
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,p ostusername,postuserid,lastposter,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,pa getext,allowsmilie,showsignature,ipaddress,iconid, visible) VALUES (NULL,'$threadid','Post Alert - $postinfo[username]','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconi d','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
02-07-2003, 11:22 PM
Very nice ~s~, i will be using this..when im not on overgrow that is LOL

ethics
02-09-2003, 03:12 AM
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
02-13-2003, 05:24 PM
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
02-13-2003, 05:47 PM
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
02-13-2003, 07:09 PM
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
03-12-2003, 06:02 PM
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
03-14-2003, 02:25 PM
02-09-03 at 05:12 AM ethics said this in Post #39 (https://vborg.vbsupport.ru/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
03-14-2003, 04:02 PM
02-13-03 at 02:47 PM hukgwai said this in Post #41 (https://vborg.vbsupport.ru/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
03-15-2003, 04:06 AM
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
03-17-2003, 10:20 AM
for some reason no matter who I use as the robot poster.. it always posts as user id 1

Master Computer
04-05-2003, 05:58 PM
Thanks man

mvigod
04-07-2003, 10:20 PM
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
04-08-2003, 06:53 PM
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,p ostusername,postuserid,lastposter,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
04-10-2003, 10:28 PM
02-07-03 at 09:09 PM Erwin said this in Post #37 (https://vborg.vbsupport.ru/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,p ostusername,postuserid,lastposter,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,pa getext,allowsmilie,showsignature,ipaddress,iconid, visible) VALUES (NULL,'$threadid','Post Alert - $postinfo[username]','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconi d','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
04-11-2003, 06:36 AM
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
04-11-2003, 11:02 AM
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
04-11-2003, 11:06 AM
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
04-11-2003, 11:10 AM
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
04-11-2003, 12:18 PM
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
04-11-2003, 10:10 PM
Try this code:

Find:


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


Above, add:


$modforum="xx";
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastposter,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,pa getext,allowsmilie,showsignature,ipaddress,iconid, visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconi d','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,p ostusername,postuserid,lastposter,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,pa getext,allowsmilie,showsignature,ipaddress,iconid, visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconi d','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
04-11-2003, 10:10 PM
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
04-12-2003, 03:45 PM
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
04-12-2003, 07:16 PM
Ditto here, using 2.2.8

Figment
04-15-2003, 08:28 PM
Can anyone help on this please?

heynurse
04-19-2003, 12:38 AM
04-11-03 at 06:02 AM yzztik said this in Post #53 (https://vborg.vbsupport.ru/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
04-19-2003, 01:36 AM
02-07-03 at 06:33 PM Erwin said this in Post #35 (https://vborg.vbsupport.ru/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
04-20-2003, 01:26 PM
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
04-22-2003, 02:24 PM
04-11-03 at 11:10 PM Erwin said this in Post #57 (https://vborg.vbsupport.ru/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,p ostusername,postuserid,lastposter,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,pa getext,allowsmilie,showsignature,ipaddress,iconid, visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconi d','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,p ostusername,postuserid,lastposter,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,pa getext,allowsmilie,showsignature,ipaddress,iconid, visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($message))."','$allowsmilie','$signature','$ipaddress','$iconi d','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
05-06-2003, 04:01 PM
Cheers for the code Erwin
Works flawlessly on a severly hacked up vb 2.3.0
:)

Shepski
05-26-2003, 12:04 PM
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
06-25-2003, 04:26 AM
How can I add a box for the user to place a reason for the alert?

Holidazed
06-26-2003, 03:06 PM
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
06-30-2003, 07:43 PM
Hello? Anybody home?

Holidazed
07-08-2003, 02:11 PM
Does ANYBODY check this thread at all?

cnczone
07-08-2003, 05:10 PM
I guess they all fell off the earth. :(

discussfitness
10-13-2003, 11:28 AM
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
11-26-2003, 11:24 PM
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
11-27-2003, 02:00 AM
Wow, thanks a ton, works great! Thanks for sharing.

Rezin
12-18-2003, 02:58 PM
I have a heavily modded forum, and this worked flawlessly!

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

Prince
12-18-2003, 08:31 PM
Nice hack!

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

Randomlove
01-18-2004, 03:01 PM
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
01-22-2004, 09:14 PM
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
01-26-2004, 08:11 PM
great hack! easy install.
*clicks install*