Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Report System Mod - PM instead of email Details »»
Report System Mod - PM instead of email
Version: 1.00, by rossco_2005 rossco_2005 is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 3.5.0 RC1 Rating:
Released: 07-29-2005 Last Update: 07-29-2005 Installs: 10
DB Changes Uses Plugins Template Edits
Code Changes  
No support by the author.

[high]THIS MOD IS NOT SUPPORTED ANYMORE[/high]

This hack is a rerelease of Sebastian's report system mod found here: https://vborg.vbsupport.ru/showthread.php?t=59927

But it's been changed a bit.
There is no warning system in my mod, I added a "report fulfilled" system to it, and i removed the emailing mods so all it does is PM them.


[high]What is it?[/high]

This mod replaces the vbulletin report system with a new system featuring the folowing features:
  • The report post form has been redone to have user selectable "reason" for reporting, as well as an "other" box where they can type the reason
  • Reports are then PMed instead of emailed to mods and/or admins
  • vBulletin keeps the status of the report through the database...when a mod fulfills the report's request they can then change the report's status to "true"
  • The status of the report is show in the private message

[high]Installation[/high]

File Edits

Open report.php.

Find:
PHP Code:
    $forumperms fetch_permissions($threadinfo['forumid']);
    if (!(
$forumperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
    {
        
print_no_permission();
    }


    if (!
$threadinfo['threadid'] OR !$postinfo['visible'] OR !$threadinfo['visible'] OR !$postinfo['postid'] OR $threadinfo['isdeleted'] OR $postinfo['isdeleted'])
    {
        eval(
standard_error(fetch_error('invalidid'$vbphrase['post'], $vbulletin->options['contactuslink'])));
    } 
Replace with:
PHP Code:
if ($_GET['do'] != 'fulfilled' and $_GET['do'] != 'notfulfilled' and $_GET['do'] != 'img')
{

    
$forumperms fetch_permissions($threadinfo['forumid']);
    if (!(
$forumperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
    {
        
print_no_permission();
    }


    if (!
$threadinfo['threadid'] OR !$postinfo['visible'] OR !$threadinfo['visible'] OR !$postinfo['postid'] OR $threadinfo['isdeleted'] OR $postinfo['isdeleted'])
    {
        eval(
standard_error(fetch_error('invalidid'$vbphrase['post'], $vbulletin->options['contactuslink'])));
    }
    

Find:
PHP Code:
// draw nav bar 
Above it add:
PHP Code:
// Report System Mod
$sendto = array();
$tostring = array();
// / Report System Mod 
Find:
PHP Code:
'reason'    => TYPE_STR
Replace with:
PHP Code:
// Report System Mod
'other'     => TYPE_STR,
// / Report System Mod 
Find:
PHP Code:
if ($vbulletin->GPC['reason'] == '')
{
    eval(
standard_error(fetch_error('noreason')));
        

Replace with:
PHP Code:
if ($reason == '' and $other != '')
{
    
$reason $other;
}
elseif (
$reason == '' and $other == '')
{
    eval(
standard_error(fetch_error('noreason')));

In 2 places Find:
PHP Code:
$moderators $db->query_read("
    SELECT DISTINCT user.email, user.languageid 
Replace with:
PHP Code:
$moderators $db->query_read("
    SELECT DISTINCT user.email, user.languageid, user.userid, user.username 
In 2 places Find:
PHP Code:
while ($moderator $db->fetch_array($moderators))
{
    
$mods[] = $moderator
Replace with:
PHP Code:
while ($moderator $db->fetch_array($moderators))
{
    
$mods[] = $moderator;
    
// Report System Mod
    
$tostring["$moderator[userid]"] = $moderator['username'];
    
$sendto["$moderator[userid]"] = $moderator['userid'];
    
// / Report System Mod 
Find:
PHP Code:
foreach ($mods AS $index => $moderator)
{
    if (!empty(
$moderator['email']))
    {
        
$email_langid = ($moderator['languageid'] > $moderator['languageid'] : $vbulletin->options['languageid']);

        (
$hook vBulletinHook::fetch_hook('report_send_email')) ? eval($hook) : false;

        eval(
fetch_email_phrases('reportbadpost'$email_langid));
        
vbmail($moderator['email'], $subject$messagetrue);
    }

Replace with:
PHP Code:
// Report System Mod
$db->query("
        INSERT INTO " 
TABLE_PREFIX "`reportfulfilled`
        (status) VALUES ('false')
        "
);
$id $db->insert_id();

eval(
'$message = "' fetch_template('report_msg') . '";');

$db->query("
    INSERT INTO " 
TABLE_PREFIX " `pmtext` 
    (fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie) 
    VALUES 
    (
$vbphrase[fromuserid], '$vbphrase[fromusername]', 'Reported Post by "  .  $vbulletin->userinfo['username']  .  "', '"  .  addslashes($message)  .  "', '" addslashes(serialize($tostring)) . "', 0, " time() . ", 0, 1)");

    
$pmtextid $db->insert_id();

foreach (
$mods AS $index => $moderator)
{
        
$db -> query("
        INSERT INTO " 
TABLE_PREFIX "`pm`
                (pmtextid, userid)
                VALUES
                (
$pmtextid$moderator[userid])
                "
);

        
$db -> query("
        UPDATE " 
TABLE_PREFIX "`user` SET
                pmtotal=pmtotal+1,
                pmunread=pmunread+1
                WHERE userid=
$moderator[userid]
                "
);
}

// / Report System Mod 
Templates

Replace the template Reportbadpost with this code:

PHP Code:
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
<
title>$vboptions[bbtitle] - $vbphrase[report_bad_post]</title>
$headinclude
</head>
<
body>
$header
$navbar


<form action="report.php" method="post">
<
input type="hidden" name="s" value="$session[sessionhash]/>
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" 

align="center">
<
tr>
    <
td class="tcat" align="$stylevar[right]">
        <
span style="float:$stylevar[left]">$vbphrase[report_bad_post]</span>
        <
span class="smallfont"><strong>$vbphrase[forum]</strong>: <a href="forumdisplay.php?$session[sessionurl]f=$foruminfo[forumid]">$foruminfo[title]</a></span>        
    </
td>
</
tr>
<
tr>
    <
td class="panelsurround" align="center">
    <
div class="panel">$usernamecode
    
<div style="width:640px" align="left">
        
  <
fieldset class="fieldset">
    <
legend>Reason</legend>
   <
table cellpadding="0" cellspacing="3" border="0">
    <
tr>
    <
td><input type="radio" name="reason" value="offensive language" /></td>
    <
td width="96%"><b>offensive language</b></td>
  </
tr>
  <
tr>
    <
td><input type="radio" name="reason" value="blatant trolling" /></td>
    <
td width="96%"><b>blatant trolling</b></td>
  </
tr>
  <
tr>
    <
td><input type="radio" name="reason" value="harassing another user" /></td>
    <
td width="96%"><b>harassing another user</b></td>
  </
tr>
  <
tr>
    <
td><input type="radio" name="reason" value="illegal warez / crack sites" /></td>
    <
td width="96%"><b>illegal warez crack sites</b></td>
  </
tr>
  <
tr>
    <
td><input type="radio" name="reason" value="repeating and or advertising" /></td>
    <
td width="96%"><b>repeating and or advertising</b></td>
  </
tr>
  <
tr>
    <
td><input type="radio" name="reason" value="pornographic material" /></td>
    <
td width="96%"><b>pornographic material</b></td>
  </
tr>
                </
table>
            </
fieldset>
            
            <
fieldset class="fieldset">
                <
legend>Other?</legend>
                <
div style="padding:3px">
                    
            <
textarea name="other" rows="6" cols="$textareacolswrap="virtual"></textarea>
            </
fieldset>
            
            </
div>
    </
div>
    
    <
div style="margin-top:6px">
        <
input type="hidden" name="p" value="$postid/>
        <
input type="hidden" name="do" value="sendemail" />
        <
input type="hidden" name="url" value="$url/>
        <
input type="submit" class="button" value="$vbphrase[send_report]accesskey="s" />
    </
div>
    </
td>
</
tr>
</
table>

</
form>

$footer

</body>
</
html
Then create a new template called report_msg with the following code:

PHP Code:
[url=$vboptions[bburl]/member.php?u=$bbuserinfo[userid]]$bbuserinfo[username][/urlhas reported this [b]post:[/b]

[
b]?[/b] [url=$vboptions[bburl]/showpost.php?p=$postinfo[postid]&postcount=$postinfo[postid]]$threadinfo[title][/url]

In this [b]Thread:[/b]

[
b]?[/b] [url=$vboptions[bburl]/showthread.php?p=$postinfo[postid]]$threadinfo[title][/url]

This is the reason that the user gave:
[
b$reason [/b]

Fulfilled Status: [phpimg]$vboptions[bburl]/report.php?id=$id&do=img[/phpimg]
Change Status to: [url=$vboptions[bburl]/report.php?do=fulfilled&id=$id]true[/url

Please respond to this post as applicable
DB Query

Run this query from either PHPmyadmin or in vbulletin to add the reportfulfilled table:
PHP Code:
CREATE TABLE `reportfulfilled` (
  `
idint(10NOT NULL auto_increment,
  `
statusvarchar(10NOT NULL default '',
  
PRIMARY KEY  (`id`)
ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1
Other

Create a new bbcode called PHP Images, where the tag is "phpimg" and description can be whatever you want, with this code:
PHP Code:
<img src="{param}" alt="" border="" /> 
Create a new member on your forum called "Reporter" or whatever you'd like. He does not have to have any special privileges or anything.

Now just import the included file "Report System Mod.xml" in the product manager to add the phrases and plugins automatically.

[high]Configuration[/high]

Edit the phrases "fromuserid" and "fromusername" to the username and userid of the reporter member you created in the installation.

You can change what images are used to 'report fulfilled' and 'report not fulfilled' in the plugin added.

If you want a "false" link for the fulfill status.. (set it back to not fulfilled) replace this in report_msg:
PHP Code:
[url=$vboptions[bburl]/report.php?do=fulfilled&id=$id]true[/url
with this:
PHP Code:
[url=$vboptions[bburl]/report.php?do=fulfilled&id=$id]true[/url] | [url=$vboptions[bburl]/report.php?do=notfulfilled&id=$id]false[/url
That should be all, enjoy!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-24-2005, 12:36 PM
rossco_2005's Avatar
rossco_2005 rossco_2005 is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, that wasn't suppsoed to be there.
Reply With Quote
  #13  
Old 10-02-2005, 08:17 PM
Jinovich Jinovich is offline
 
Join Date: Mar 2005
Location: England
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I try and send a report I get prompted with "Please enter a reason for reporting this post" and I can seem to figure out why :S As I have a reason stated

*fixed*

but now it sends the post report but still via email could this be possible of previously installed hacks on the 3.0.7 which still exist such as Erwins Post Report hack? Boozehounds Modcp post reports which still exists in our MySQL database?
Reply With Quote
  #14  
Old 10-10-2005, 09:34 PM
rossco_2005's Avatar
rossco_2005 rossco_2005 is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure if that might be the problem, sounds more like you missed a step when installing. :unsure:
Reply With Quote
  #15  
Old 10-22-2005, 07:32 PM
itisonlyatest itisonlyatest is offline
 
Join Date: Jan 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The mySQL query isn't working for me!

This is what I get:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at line 5
Reply With Quote
  #16  
Old 10-23-2005, 03:33 PM
rossco_2005's Avatar
rossco_2005 rossco_2005 is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know if it will work but try this:
Code:
CREATE TABLE `reportfulfilled` (
  `id` int(10) NOT NULL auto_increment,
  `status` varchar(10) NOT NULL default '',
  PRIMARY KEY  (`id`)
)
Shouldn't have any problem with that, let me know.
Reply With Quote
  #17  
Old 10-24-2005, 08:55 PM
itisonlyatest itisonlyatest is offline
 
Join Date: Jan 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Your SQL query has been executed successfully (Query took 0.0086 sec)
SQL query:
CREATE TABLE `reportfulfilled` (
`id` int( 10 ) NOT NULL AUTO_INCREMENT ,
`status` varchar( 10 ) NOT NULL default '',
PRIMARY KEY ( `id` )
)
Thanks, it worked!
Reply With Quote
  #18  
Old 10-24-2005, 09:14 PM
rossco_2005's Avatar
rossco_2005 rossco_2005 is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by itisonlyatest
Thanks, it worked!
neat.


I'm thikning of stopping trying to support this mod as im not going to be using it on my forums anymore so i'm not gonna be able to work out the bugs in it. :ermm:
I definately wont be converting it to a plugin.
Reply With Quote
  #19  
Old 10-26-2005, 09:18 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this works on 3.5.0 Gold?
Reply With Quote
  #20  
Old 10-30-2005, 02:12 AM
itisonlyatest itisonlyatest is offline
 
Join Date: Jan 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Parse error: parse error, unexpected $ in /home/hilaryd/public_html/report.php on line 185

I get that error!
Reply With Quote
  #21  
Old 10-30-2005, 02:13 AM
itisonlyatest itisonlyatest is offline
 
Join Date: Jan 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do I do?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05336 seconds
  • Memory Usage 2,444KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (20)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete