Is there a way to set this feature to also notify administrators? Or even to just notify admins and not the mods. That is without adding the admins on as moderators as well.
Announcement
Collapse
No announcement yet.
report this thread to a mod... question
Collapse
X
-
Not sure if it works but find this in report.php:PHP Code:// get mods for forum
$post=getpostinfo($postid);
$thread=getthreadinfo($post[threadid]);
$forumlist=getforumlist($thread[forumid],"forumid");
$moderators=$DB_site->query("SELECT user.email FROM moderator,user WHERE user.userid=moderator.userid AND $forumlist");
$thread[title]=unhtmlspecialchars($thread[title]);
if ($DB_site->num_rows($moderators)==0) {
// get admins if no mods
$moderators=$DB_site->query("SELECT user.email FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1");
}
PHP Code:// get mods for forum
$post=getpostinfo($postid);
$thread=getthreadinfo($post[threadid]);
$forumlist=getforumlist($thread[forumid],"forumid");
$moderators=$DB_site->query("SELECT user.email FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1");
$thread[title]=unhtmlspecialchars($thread[title]);
I deleted the if section which checks if there is a moderatr for thsi forum, and if not send an email to the admin.
Then I copy the database querry for the admin and replaced the moderator querry with it!
Think it should work....let me know if it does or not!The Sisko
SciFi-Forum.de
-
Not sure if I am allowed to post so much code but here another try for those of you who wouldn't like to add the admin to the moderators, but also want the admin to get an email to.
Then again in report.php:PHP Code:// get mods for forum
$post=getpostinfo($postid);
$thread=getthreadinfo($post[threadid]);
$forumlist=getforumlist($thread[forumid],"forumid");
$moderators=$DB_site->query("SELECT user.email FROM moderator,user WHERE user.userid=moderator.userid AND $forumlist");
$thread[title]=unhtmlspecialchars($thread[title]);
if ($DB_site->num_rows($moderators)==0) {
// get admins if no mods
$moderators=$DB_site->query("SELECT user.email FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1");
}
while ($moderator=$DB_site->fetch_array($moderators)) {
eval("\$message = \"".gettemplate("email_reportbadpost",1,0)."\";");
eval("\$subject = \"".gettemplate("emailsubject_reportbadpost",1,0)."\";");
mail ($moderator[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
}
PHP Code:// get mods for forum
$post=getpostinfo($postid);
$thread=getthreadinfo($post[threadid]);
$forumlist=getforumlist($thread[forumid],"forumid");
$moderators=$DB_site->query("SELECT user.email FROM moderator,user WHERE user.userid=moderator.userid AND $forumlist");
$admins=$DB_site->query("SELECT user.email FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1");
$thread[title]=unhtmlspecialchars($thread[title]);
while ($moderator=$DB_site->fetch_array($moderators)) {
eval("\$message = \"".gettemplate("email_reportbadpost",1,0)."\";");
eval("\$subject = \"".gettemplate("emailsubject_reportbadpost",1,0)."\";");
mail ($moderator[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
}
while ($admins=$DB_site->fetch_array($admins)) {
eval("\$message = \"".gettemplate("email_reportbadpost",1,0)."\";");
eval("\$subject = \"".gettemplate("emailsubject_reportbadpost",1,0)."\";");
mail ($admins[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
}
!
The Sisko
SciFi-Forum.de
Comment
-
I tried it, it gave me a parse error, something about code 1.
The good news is that it sent an email to both the admins and the mods! Although they were blank, lol! But it's getting closer. Thank you for helping!! I do hope you don't get in trouble at work for working on this.
Comment
-
So here is a tested and working version of it:
In report.php find:PHP Code:// get mods for forum
$post=getpostinfo($postid);
$thread=getthreadinfo($post[threadid]);
$forumlist=getforumlist($thread[forumid],"forumid");
$moderators=$DB_site->query("SELECT user.email FROM moderator,user WHERE user.userid=moderator.userid AND $forumlist");
$admins=$DB_site->query("SELECT user.email FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1");
$thread[title]=unhtmlspecialchars($thread[title]);
while ($moderator=$DB_site->fetch_array($moderators)) {
eval("\$message = \"".gettemplate("email_reportbadpost",1,0)."\";");
eval("\$subject = \"".gettemplate("emailsubject_reportbadpost",1,0)."\";");
mail ($moderator[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
}
while ($admin=$DB_site->fetch_array($admins)) {
eval("\$message = \"".gettemplate("email_reportbadpost",1,0)."\";");
eval("\$subject = \"".gettemplate("emailsubject_reportbadpost",1,0)."\";");
mail ($admin[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
}
eval("standardredirect(\"".gettemplate("redirect_reportthanks")."\",\"$url\");");
}
PHP Code:// get mods for forum
$post=getpostinfo($postid);
$thread=getthreadinfo($post[threadid]);
$forumlist=getforumlist($thread[forumid],"forumid");
$moderators=$DB_site->query("SELECT user.email FROM moderator,user WHERE user.userid=moderator.userid AND $forumlist");
$thread[title]=unhtmlspecialchars($thread[title]);
if ($DB_site->num_rows($moderators)==0) {
// get admins if no mods
$moderators=$DB_site->query("SELECT user.email FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1");
}
while ($moderator=$DB_site->fetch_array($moderators)) {
eval("$message = \"".gettemplate("email_reportbadpost",1,0)."\";");
eval("$subject = \"".gettemplate("emailsubject_reportbadpost",1,0)."\";");
mail ($moderator[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
}
BTW: No, I don't get in trouble for doing this while I'm working. I had to do some rendering today and as you as this took some time. SO I spend my time on the vBulletin forumThe Sisko
SciFi-Forum.de
Comment
-
It gave me an error 'parse error on eval code line 1' or similar.
it looked like this was left out, so i added this back:
Code:eval("standardredirect(\"".gettemplate("redirect_reportthanks")."\",\"$url\");"); }
I'm so sorry to put you to so much trouble. I truly appreciate your help here
Comment
-
I don't have moderators assigned to different forums. Instead I have a moderator team that helps in every forum.
All I did was put them all in one group (Super Moderator) and changed:
Code:$moderators=$DB_site->query("SELECT user.email FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1");
Code:$moderators=$DB_site->query("SELECT user.email FROM user,usergroup WHERE user.usergroupid IN (5,6)");
Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 API
Comment
-
You only need the:
PHP Code:eval("standardredirect(\"".gettemplate("redirect_reportthanks")."\",\"$url\");");
}
But wht wluke said is a good solution, but without usergroups the way I change is ok I think.
BTW: Which beta do you run? I run vB2.0 beta 2 on my test board and it works!The Sisko
SciFi-Forum.de
Comment
-
Could you please provide the whole error message you get?
Or try to ICQ me.....The Sisko
SciFi-Forum.de
Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment