vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB Report Manager 2.0 (Admin CP) - Report to Email, PM, Staff Forum as a new Thread! (https://vborg.vbsupport.ru/showthread.php?t=59709)

Erwin 01-04-2004 10:00 PM

vB Report Manager 2.0 (Admin CP) - Report to Email, PM, Staff Forum as a new Thread!
 
vB Report Manager 2.1 (Admin CP) - Report to Email, PM, Staff Forum as a new Thread!

By Dr Erwin Loh

What does this hack do?

When a member reports a post, the report goes to:

1) Email (as per normal)
2) PM
3) A new thread in your private Staff Forums
4) In the report, there will be a link to the new thread in your private Staff Forums

Or ANY of the above combination!

The thread title now has the Date/ Time of Report, Originating Forum and Reported Poster!

There is now Admin CP support under vBulletin Options - you can choose to switch on or off any of the notification methods, and set the FORUM ID for the Staff Forum you want the posts to appear in.

All you need to do is run install_vbreport.php and modify 1 file - report.php.

Update Version 2.0

1. Added Admin CP support - choose to switch on and off each notification method. Also specify your Staff Forum ID in Admin CP.

2. Added more info to the THREAD TITLE - now with NAME OF FORUM, USERNAME OF POSTER, AND DATE/ TIME OF REPORT!

Update Version 2.1

1. Fixed email option bug

2. Fixed URL parsing bug

To upgrade, it's easiest just to reinstall this hack over a CLEAN REPORT.PHP file.

Admin CP installer and install instructions in HTML file in ZIP below.
Screenshots attached. :)

Enjoy!

deathemperor 01-05-2004 03:46 AM

nice one ! once more hack will be installed :D

Morgalis 01-05-2004 03:46 AM

i'd REALLY love to get this feature back on our super busy board

can i ask though, is it possible to have the option to post in one thread rather than a new thread each report as the vb2.x hack did? it is so well used on our site, that 10 reports a day is the minimum and i don't want my staff forums cluttered

thanks so much in advance

tomshawk 01-05-2004 05:09 AM

I'm getting this error

Quote:

Invalid SQL: INSERT INTO pm (pmtextid, userid, messageread) VALUES (31, , 0)
mysql error: 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 ' 0)' at line 1
mysql error number: 1064

Date: Monday 05th of January 2004 12:07:37 AM
Script: http://www.tomshawk.com/forums/report.php
Referer: http://www.tomshawk.com/forums/report.php?p=39
Any ideas?

VB3 RC1

Erwin 01-05-2004 05:17 AM

Did you do step (b) properly? The userid is not being sent.

I've been running this hack for almost a year now. :) Since vB2. It's worked with no problems since.

Erwin 01-05-2004 05:17 AM

Please be aware, sometimes the code is replaced, sometimes new code is added below, or ABOVE. PLEASE READ THE INSTRUCTIONS PROPERLY. :)

MindTrix 01-05-2004 05:23 AM

Nice addition Erwin :) Glad to see more hacks comming from you again :) Thanks.!

tomshawk 01-05-2004 05:28 AM

Quote:

Originally Posted by Erwin
Please be aware, sometimes the code is replaced, sometimes new code is added below, or ABOVE. PLEASE READ THE INSTRUCTIONS PROPERLY. :)

Yes, and just for good measure, I re-did the whole thing again, same problem.

[EDIT]
BTW, It does create the post in the forum, but does not send the email and gives this error
[/EDIT]

Vile 01-05-2004 06:37 AM

Very cool hack. I'll give this a shot :)

Erwin 01-05-2004 06:54 AM

Quote:

Originally Posted by tomshawk
Yes, and just for good measure, I re-did the whole thing again, same problem.

[EDIT]
BTW, It does create the post in the forum, but does not send the email and gives this error
[/EDIT]

Mmm... I rechecked my code - it's the same as what I've got. You've got RC1 right? Mmm... I don't understand.

tomshawk 01-05-2004 06:59 AM

Quote:

Originally Posted by Erwin
Mmm... I rechecked my code - it's the same as what I've got. You've got RC1 right? Mmm... I don't understand.

Yes, It is RC1

Dunno, It's wierd

tomshawk 01-05-2004 07:36 AM

Quote:

Originally Posted by Erwin
Mmm... I rechecked my code - it's the same as what I've got. You've got RC1 right? Mmm... I don't understand.

OK, I got it working

but...

If you report a post in a forum that has a Moderator, it works fine

If you report a post in a forum that does not have a moderator, this is when you get the error.

Though it says in the email

Quote:

This message has been sent to all moderators of this forum, or all administrators if there are no moderators.

Please respond to this post as applicable.
Is there a way to fix this

It also puts bogus info in the new thread

Mainly the stuff in the quotes below

Who is upgrading
http://www.tomshawk.com/forums/show...tid=228#post228

This is part of this thread:
Who is upgrading
This is the reason that the user gave:
Testing new report system

This message has been sent to all moderators of this forum, or all administrators if there are no moderators.

Please respond to this post as applicable.

The Report Thread in the Staff Forum is here:

Erwin 01-05-2004 07:43 AM

[post not relevant anymore]

Erwin 01-05-2004 07:44 AM

That email is just what vB3 normally says. :) You can change it if you want.

Chris Gwynne 01-05-2004 08:35 AM

Great hack, Erwin! :)

shorty 01-05-2004 10:14 AM

Pah.. I made my own version of this last week and was gonna release it :(

Oh well.. Il have to think of something else ;)

tomshawk 01-05-2004 12:29 PM

Thanks Erwin, It is a kewl hack, Clicks install

tomshawk 01-05-2004 01:33 PM

I figured out what these are

The first is a link to the thread where the bad post is.
the second is a link to the new thread in the Mods forum

But, they are missing the ? and the =

They should read

Does anybody know where to fix this, or at least where to look?

Is it in the report.php or in a template?

Any help would be great!

Erwin 01-05-2004 07:22 PM

Quote:

Originally Posted by tomshawk
I figured out what these are

The first is a link to the thread where the bad post is.
the second is a link to the new thread in the Mods forum

But, they are missing the ? and the =

They should read


Does anybody know where to fix this, or at least where to look?

Is it in the report.php or in a template?

Any help would be great!

First post updated to Version 1.1.

Sorry!!! Those are my private forums special URLs! This is what happens when I release hacks from my site.

Okay, I've updated the FIRST POST.

To fix the URLs, just COPY AND PASTE the new phrase (ie. repeat the last step).

Sorry again. It should work fine now.

tomshawk 01-06-2004 12:26 AM

Works perfectly now

Thank you very much for your work on this

I look forward to seeing more great hacks from you ;)

MGM 01-06-2004 12:28 AM

great hack! glad I waited before downloading this one ;)

but I don't have mods on all my forums, so idk if ill install it just yet..... perhaps ill wait for that update you "might" do ;)

[high]* MGM clicks Install for the hell of it
[/high]

MGM out

tomshawk 01-06-2004 12:45 AM

Quote:

Originally Posted by MetalGearMaster
great hack! glad I waited before downloading this one ;)

but I don't have mods on all my forums, so idk if ill install it just yet..... perhaps ill wait for that update you "might" do ;)

[high]* MetalGearMaster clicks Install for the hell of it
[/high]

MGM out

Hey MetalGearMaster, to get around that, I made a Supermod the mod of all the Catagories

This would work for an Admin or a regular mod as well, Just make them the mod of the Catagory, then bingo, works like a champ

;)

Michael2 01-06-2004 05:03 AM

I installed it. It was a pain in the ass having to go through and add a bogus mod to each forum but I appreciate the work you did on it.

MGM 01-07-2004 12:14 AM

In the first post it says that the admin will be PMed if no mod exists.... does that even work?

MGM out

Erwin 01-07-2004 01:09 AM

Quote:

Originally Posted by MetalGearMaster
In the first post it says that the admin will be PMed if no mod exists.... does that even work?

MGM out

That's just the default message in vB3. :)

MGM 01-07-2004 01:16 AM

ahhhh...... i knew that :D

lol, smods modding all of my forums would work..... or maybe my newly created Pmods :D

MGM out

wrongful 01-07-2004 07:23 PM

Could someone tell me what to take out to stop the reported post from being emailed and PMed to me? At least the PMs because I find this kind of redundant.

Ok nevermind I figured out what step to take out.

carloshax 01-07-2004 08:41 PM

w00t another great hack clicks install again \o/

Carl

M1th 01-11-2004 02:46 AM

Hmm, 'Search Index' isnt getting updated after new thread/post now, is it? It would be a good idea to add the funtion. :)


PHP Code:

require_once('./includes/functions_databuild.php');
    
build_post_index($post['postid'], $foruminfo10); 

is the above code correct?

shad-gt 01-15-2004 01:33 PM

Quote:

Originally Posted by Erwin
Since I do have moderators for every forum, I am not going to modify this hack. It does work.

Ensure a MODERATOR is assigned to every forum.

Presumably you can add moderators to parent forums, so that this hack works. If I find time I may fix this, but not at the moment. :)


here a fix for your hack. With it all works correct with no moderators set on a forum....

replace:

Code:

        if (empty($mods) OR $foruminfo['options'] & $_FORUMOPTIONS['warnall'])
        {
                // get admins if no mods or if this forum notifies all
                $moderators = $DB_site->query("
                        SELECT user.email, user.languageid
                        FROM " . TABLE_PREFIX . "user AS user
                        INNER JOIN " . TABLE_PREFIX . "usergroup AS usergroup USING (usergroupid)
                        WHERE usergroup.adminpermissions <> 0
                ");

                while ($moderator = $DB_site->fetch_array($moderators))
                {
                        $mods[] = $moderator;
                }
        }

with:

Code:

        if (empty($mods) OR $foruminfo['options'] & $_FORUMOPTIONS['warnall'])
        {
                // get admins if no mods or if this forum notifies all
                $moderators = $DB_site->query("
                        SELECT user.email, user.languageid, user.userid
                        FROM " . TABLE_PREFIX . "user AS user
                        INNER JOIN " . TABLE_PREFIX . "usergroup AS usergroup USING (usergroupid)
                        WHERE usergroup.adminpermissions <> 0
                ");

                while ($moderator = $DB_site->fetch_array($moderators))
                {
                        $mods[] = $moderator;
                }
        }

, user.userid is new.


greets,
shAd

Erwin 01-15-2004 11:11 PM

Update Version 1.2

Thanks to shad-gt - no need to add moderators to every forum - if there is no moderator, the PM will go to an administrator.

The new step is step (d) in the install file, and the code is all in black.

Otherwise, just follow shad-gt's instructions in the post above this one. :)

M1th 01-15-2004 11:44 PM

Quote:

Originally Posted by Erwin
Update Version 1.2

Thanks to shad-gt - no need to add moderators to every forum - if there is no moderator, the PM will go to an administrator.

The new step is step (d) in the install file, and the code is all in black.

Otherwise, just follow shad-gt's instructions in the post above this one. :)

sorry to be so picky but you've missed the "add newpost_usernamecode to $globaltemplates" step.:)

Erwin 01-16-2004 02:44 AM

Quote:

Originally Posted by M1th
sorry to be so picky but you've missed the "add newpost_usernamecode to $globaltemplates" step.:)

Sorry? If a template is missing that would be a vB3 bug. :) My hack requires no additional templates.

M1th 01-16-2004 03:22 PM

Quote:

Originally Posted by Erwin
Sorry? If a template is missing that would be a vB3 bug. :) My hack requires no additional templates.

My bad.. I didnt realise the uncached template before installing your hack. :)

Aaron1 01-22-2004 05:32 AM

This hack sounds wonderfull, but is there also a vb2.* version of this hack somewhere Erwin?
I searched here but no luck :(

Aaron1 01-22-2004 06:15 AM

I found it! Sorry ignore my previous post, thanks!

https://vborg.vbsupport.ru/showthrea...=report+thread

heynurse 02-11-2004 07:31 AM

Congrats on another fine Hack Erwin!

I have a couple questions/modification request to anyone.

1. Is there a way to have the contents of the reported post that is being reported to be included in the staff forum thread that is created?

2. Is it possible to have the username that is being reported to be included in the title of the thread created in the staff forum?

Thanks

Christine 02-15-2004 11:00 PM

Nice hack! *installs*

I am the only person assigned to our comments forum, so I sent a test "report post to mod" from there, yet all admins and mods on the team received the PM, not just me.

Any thoughts on that?

gmarik 02-16-2004 03:03 PM

This, I'm sure, should be in the Gold by default, nice.

M1th 02-18-2004 06:40 PM

I've had a look at the database and it seems that the column 'touserarray' is left empty (ie 'N;') in the database (table pmtext) for a reported post pm. The $tostring var has to return something, but its not, am i correct?


All times are GMT. The time now is 08:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01534 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete