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)
-   -   Improved Post Report System (https://vborg.vbsupport.ru/showthread.php?t=76582)

Diana Notacat 03-11-2005 12:20 AM

Thank you very much! This is going to be a beautiful addition for my mods! <3

HabboForum 06-23-2005 10:03 AM

Will this be converted so it is compatible with vBulletin 3.5?

Thanks.

Ghanem 06-24-2005 06:35 PM

Hi,

Thank you for the wounderfull job
there is a small problem..

All the modeaters and admins view all the reports and can update and change the status of the report.
In other words, the moderator should view only the rports that belongs to his forum..

Regards.

Ghanem 07-06-2005 10:48 PM

up :disappointed:

Ghanem 07-14-2005 10:11 PM

Another up but with request..

Each time I have to log to CP to chk if there is any report..
Could you do somthing to show number of reports say in the welcome panel under the private message numbers.
Ex:

Welcome, unicorn.
You last visited: Today at 01:25
Private Messages: 0 Unread, Total 2
Post Reports : 2 new, 3 pinding

Regards,
Ghanem.

King Kovifor 07-14-2005 10:56 PM

This would be useful... Going to bring it up to the "master"

boozehound 07-15-2005 04:19 PM

Quote:

Originally Posted by unicorn
All the modeaters and admins view all the reports and can update and change the status of the report.
In other words, the moderator should view only the rports that belongs to his forum..

I'm doing a new version (as well as converting for 3.5). You will be able to select one of three modes, in the admincp settings:

1) All moderators can see and edit all reports
2) All moderators can see all reports, but can only edit reports in their forums
3) Moderators can only see and edit reports in their forums

Quote:

Each time I have to log to CP to chk if there is any report..
Could you do somthing to show number of reports say in the welcome panel under the private message numbers.
Ex:

Welcome, unicorn.
You last visited: Today at 01:25
Private Messages: 0 Unread, Total 2
Post Reports : 2 new, 3 pinding
Next version.

If you want to add it now, you can do this (but it only shows open reports not pending, but you could easily modify that). This is a bit hacky, but it works and it's been used on a site I admin for months:

In global.php find:
Code:

$vbphrase['total_x_nav_compiled'] = construct_phrase($vbphrase['total_x_nav'], $bbuserinfo['pmtotal']);
Add below that:
Code:

$reportcount = 0;
if(can_moderate())
{
    $reports = $DB_site->query_first("
        SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "postreport AS pr
        WHERE pr.status = 0
    ");
    $reportcount = intval($reports['count']);
}

Then you just need to do something with $reportcount in the navbar template. I did the following:

In navbar template, find:
Code:

                                                        <if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if>
Add below that:
Code:

<if condition="can_moderate()">
<if condition="$reportcount == 1">
<a href="modcp/postreports.php?do=list"><br/><strong>1 post report</strong></a>
</if>
<if condition="$reportcount > 1">
<a href="modcp/postreports.php?do=list"><br/><strong>$reportcount post reports</strong></a>
</if>
</if>


Ghanem 07-15-2005 04:44 PM

Quote:

Originally Posted by boozehound
Next version.
If you want to add it now, you can do this (but it only shows open reports not pending, but you could easily modify that). This is a bit hacky, but it works and it's been used on a site I admin for months:

Tested working perfect on V3.0.7

Thanks a million, very nice neat jop.

Kindest Regards.

Jinovich 07-16-2005 07:19 AM

Is there any way that I can substitute the Modification for the standard VB email for certain usergroups?

Basically, we have the hack installed and the Moderators can use it, however our forum Vip's get their own subforum which they moderate but I would rather them being sent the standard Vbulletin email rather then them using the Modcp?

Also when is the new version coming out it sounds great!

boozehound 07-17-2005 01:43 AM

If anyone is interested, in my development version I have replaced, in report.php
Code:

        $mods = array();

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

with
Code:

                $mods = array();

                while ($moderator = $DB_site->fetch_array($moderators))
                {
                        if(can_moderate($foruminfo['forumid'], null, $moderator['userid']))
                        {
                                $mods[] = $moderator;
                        }
                }

which means moderators are only sent emails from reports in the fora they moderate, if you have emailing switching on. Otherwise, all moderators get the emails.

Quote:

Originally Posted by Jinovich
Is there any way that I can substitute the Modification for the standard VB email for certain usergroups?

Basically, we have the hack installed and the Moderators can use it, however our forum Vip's get their own subforum which they moderate but I would rather them being sent the standard Vbulletin email rather then them using the Modcp?

I'm not sure if you mean 'for certain usergroups' or 'for certain forums'. Do you want reports forums like this 'VIP' forum to be 'email-only' and not go into modcp at all, or something else?

Quote:

Also when is the new version coming out it sounds great!
Probably a week or so for a new version for 3.0.x, and a bit longer for 3.5 since I haven't really looked at that yet.

Jinovich 07-21-2005 07:50 AM

Quote:

Originally Posted by boozehound
I'm not sure if you mean 'for certain usergroups' or 'for certain forums'. Do you want reports forums like this 'VIP' forum to be 'email-only' and not go into modcp at all, or something else?

Well if it can be made so that certain forum reports wont be sent to the MODCP but instead be sent via email to the moderator of that forum that would work just as well.

MThornback 07-22-2005 05:30 AM

I'm getting this error in the AdminCP Installer...help :speechless:

Database error in vBulletin 3.0.7:

Invalid SQL:
CREATE TABLE vb3_postreport (reportid INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
postid INTEGER NOT NULL, userid INTEGER NOT NULL, reporttext MEDIUMTEXT, status INTEGER,
modid INTEGER, dateline INTEGER, updatetime INTEGER, modtext MEDIUMTEXT);

mysql error: Table 'vb3_postreport' already exists

mysql error number: 1050

Marco van Herwaarden 07-22-2005 05:41 AM

Looks like you tried to run the installer twice.

MThornback 07-22-2005 06:30 AM

So if I drop the table I should have no problems then?

Edit:

OK...I dropped the table...and have a new error:

Database error in vBulletin 3.0.7:

Invalid SQL:
INSERT INTO vb3_phrasetype (phrasetypeid, fieldname, title, editrows) VALUES (183, 'postreports', 'Post Reports', 3);

mysql error: Duplicate entry '183' for key 1

mysql error number: 1062

boozehound 07-28-2005 06:46 PM

Quote:

Originally Posted by MThornback
So if I drop the table I should have no problems then?

Edit:

OK...I dropped the table...and have a new error:

Database error in vBulletin 3.0.7:

Invalid SQL:
INSERT INTO vb3_phrasetype (phrasetypeid, fieldname, title, editrows) VALUES (183, 'postreports', 'Post Reports', 3);

mysql error: Duplicate entry '183' for key 1

mysql error number: 1062

If you've already got the phrases and settings added, but have dropped the table, just recreate the table. The SQL for that is in your previous post.

question? 08-11-2005 05:28 PM

When can we see this for 3.5 as a plugin or extension??

Bakie 08-29-2005 12:19 PM

Here is a really noobish question (I am new to vB) but how do I install the templates?

It says here:
3) Add the templates found in the templates folder.

postreports.txt -> postreports
postreportbits.txt -> postreportbits

How do I do this? I think that I know where but I just dont know how, it it under Style Manager -> Edit templte -> Postbit Templates and after here I am lost...

can anyone help?

boozehound 08-30-2005 10:29 PM

Quote:

Originally Posted by Bakie
Here is a really noobish question (I am new to vB) but how do I install the templates?

It says here:
3) Add the templates found in the templates folder.

postreports.txt -> postreports
postreportbits.txt -> postreportbits

How do I do this? I think that I know where but I just dont know how, it it under Style Manager -> Edit templte -> Postbit Templates and after here I am lost...

can anyone help?

In the main 'style manager' page, where each style is listed, there is a dropdown next to each style. In that dropdown is an option called 'add new template'. Use that.

Ghanem 10-14-2005 10:23 PM

Hi..

Not yet for 3.5 :rolleyes:

Delphiprogrammi 12-13-2005 04:52 PM

hi people,

i like this hack and i modified this hack so it would work with vbulletin 3.5x so far so good.The MySQL stuff is done the "look" from the hack is there and so far it's working just getting a few syntax error but i will try to sort it out

here's a little "preview"

ignore that empty empty fields it's just an INSERT query i did to testto see if it's working

Ghanem 12-13-2005 05:13 PM

Quote:

Originally Posted by Delphiprogrammi
hi people,

God bless you
I was waiting for it

Delphiprogrammi 12-14-2005 11:04 AM

hi,

Just cleared out some dirty MySQL errors.There is still a problem with the script in the modcp for some reason it says it can't find the phrases used but they are there.I'm guessing it's because the 3.xx script uses some old vb function not supported in 3.5.x anymore when i got the time i will check the api docs at members.vbulletin.com.

A thing new to this hack is an automated uninstaller.Just hit the unintall button and all database modifications used are deleted (you get no warnings so think twice before hitting delete)

the problem with script in the modcp is solved.No unsupported functions but for some reason jelsoft moved the control panel stop message phrases to the error messages phraseid group

two thing to test out the cron script and the report.php modification after that ..... done (well as a beta to testdrive)

update

report.php modification done seems to be ok (no error messages or MySQL errors) but some things aren't set as they should be like for example the timestamp... i'm checking this.Also finische the cron script no problems with that

Delphiprogrammi 12-14-2005 05:26 PM

hi,
Well i don't get it where the hell is my dateline ?????? it's in the database show ......

PHP Code:

$db->query_first("INSERT INTO " TABLE_PREFIX "postreport(postid,userid,reporttext,status,dateline)VALUES($postid,$userid,'" .addslashes(htmlspecialchars_uni($reason)) . "',0," TIMENOW ")"); 

ok need a break now :speechless:

problem with timestamps solved all is working except for the thing "user comment" for some reason i didn't found yet that is staying empty

PHP Code:

$db->query_first("INSERT INTO " TABLE_PREFIX "postreport(postid,userid,reporttext,status,dateline)VALUES($postid,$userid,'" .addslashes(htmlspecialchars_uni($reason)) . "',0," TIMENOW ")"); 

htmlspecialchars_uni is still supported according to http://members.vbulletin.com/api so why on earth is that staying empty ??

Delphiprogrammi 12-15-2005 08:18 AM

hi,

Problem solved the user comment filed is properly filled in now

PHP Code:

$reason =& $vbulletin->GPC['reason']; 

but while testing i found another problem.If you have that redirection messages enabled you're redirected to an empty white page after you've submitted a report.Again i'm looking into this stay tuned ;)

Ghanem 12-15-2005 08:39 AM

Quote:

Originally Posted by Delphiprogrammi
stay tuned ;)

waiting :)

Delphiprogrammi 12-15-2005 09:27 AM

hi,

redirection trouble solved to.I'm gonna put it on my live site and let it run for a while if now new problems show up .... i can share it with others

Ghanem 12-15-2005 09:36 AM

congratulation :)
shouldn't you post it now in vb35x forum :cheeky:

Delphiprogrammi 12-15-2005 10:57 AM

Quote:

Originally Posted by unicorn
congratulation :)
shouldn't you post it now in vb35x forum :cheeky:

Yeah release will be in vb3.5.x code modifications.But i'm doing some more tests.You don't want a thing that crashes your database or server do you ? :rolleyes: i'm also playing with an idea to put the thread from the reported post(s) into the moderation que but that could cause a security issue.I don't know about you but let's say for example your forum is hit by spammers url don't you wanna take action as fast you possibly can ? putting such threads into the moderation que would make them invisible (except for moderators and admins offcource) and the spammers won't get hits from your forums but like i said that could cause abuse

Ghanem 12-15-2005 12:23 PM

Quote:

Originally Posted by Delphiprogrammi
Yeah release will be in vb3.5.x code...

I meant discussing it there will bring the 3.5.x coders and users while here the interested will be only 3.0.x :)

Delphiprogrammi 12-19-2005 01:06 PM

hi,

Everything is ready for release but i need to wait for the original author permission before that i'm not allowed to release anything yeah the rules of the opensource playground

Ghanem 12-19-2005 02:14 PM

Quote:

Originally Posted by Delphiprogrammi
but i need to wait for the original author permission

hope he is still arround :up:

Delphiprogrammi 01-06-2006 01:03 PM

i was bored.... and i ported this to the vb plugin system so no file modifications are needed.The only thing that refuses to work is to also email when the custom reporting system is active.But i can't take accept a non working function i will find what's wrong .... the good news is the the product xml installs and uninstalls fine ....

Ghanem 01-06-2006 01:53 PM

Quote:

Originally Posted by Delphiprogrammi
the good news is that the product xml installs and uninstalls fine ....

cool :up:

boozehound 01-08-2006 10:11 AM

Here is a beta of this hack ported to 3.5.x. It should function similarly to the 3.0.x hack, with a couple of exceptions listed below. I have not included instructions on how to add a link to the user post report page (for example in the quick links menu). The installer does however add the links to the modcp index/navigation page.

Install from the product manager in admincp. If you already have the database table the 3.0.x version added (postreport) the installer will cope and the product will use the existing data. If you uninstall, the postreport table will be dropped.

The beta does not feature the options page that the 3.0.x version did - if you install it, it is 'on' and there is no option to optionally email the moderators as in the previous version - the email is sent always.

The product adds two hooks: one in report_send_process and the other in mod_index_navigation; two templates 'postreports' and 'postreportbits'; several phrases and a phrase group. Two files need to be uploaded: postreports.php in the forum root directory and a different postreports.php to the modcp directory.

Issues: some of the phrases in the modcp page do not work. They will be included in the final version.

I have posted this here because I can't see a beta section in the 3.5 forum, and the people reading this are the people most likely to want to beta test this.

boozehound 01-12-2006 07:17 PM

3.5 port: https://vborg.vbsupport.ru/showthread.php?t=105165

parash 05-20-2008 07:10 PM

is this hack coming for 3.7 version


All times are GMT. The time now is 07:56 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.01323 seconds
  • Memory Usage 1,840KB
  • 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
  • (6)bbcode_code_printable
  • (3)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (36)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