Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report Center #556

Closed
DiogoParrinha opened this issue May 27, 2014 · 23 comments
Closed

Report Center #556

DiogoParrinha opened this issue May 27, 2014 · 23 comments
Labels
b:1.8 Branch: 1.8.x t:feature Type: Feature. Implements new functionality
Milestone

Comments

@DiogoParrinha
Copy link
Contributor

Original issue on 1.8 private repo: https://github.com/mybb/MyBB18/issues/36
What needs to be done: check if it's been finished or not.

To quote:

There are currently suggestions to group together reports (and prevent 'duplicate' reports for the same post), being able to report a profile and being able to report a profile comment.

To meet these suggestions, a Report Center should be added to replace Reported Posts. This is, in fact, a 2.0 feature (see mock ups) that will be brought forward into 1.8; albeit, in a lesser form. In 1.8, the Report Center will track Posts, Profiles and Reputation Comments. It will prevent users being able to report content that has already been reported before; instead, it will simply add an extra 'vote' to the content's original report. It should not allow commenting on the report itself and relatively keep the same database schema.

We should also add specific categories for reasons for reporting content; Spam, Breaks Forum Rules, Wrong Forum and Inappropriate Content (maybe 'Other' too?). Users should be able to add more via the ACP (so a new setting will be needed). Translations of this setting's options should also be made available to handle multiple locales.

@Starpaul20
Copy link
Member

We should rename the pid, tid and fid columns in the reportedposts table to something a little more generic (like id, id2 and id3). We have a $db->rename_column option for that very purpose...

@DiogoParrinha
Copy link
Contributor Author

Why? Aren't they pid's, tid's and fid's ?

@Starpaul20
Copy link
Member

Not if you report a reputation or a profile

@DiogoParrinha
Copy link
Contributor Author

That is right - I'm not too much into this feature as you know - but isn't there a 'uid' and 'rid' field for profiles and reputation reports?

@Starpaul20
Copy link
Member

No, they're inserted to the pid, tid and fid columns at the moment

@DiogoParrinha
Copy link
Contributor Author

Well then your assumption is right, we should definitely rename them.

Starpaul20 added a commit that referenced this issue May 27, 2014
Renamed pid, tid and fid columns to id, id2 and id3
@Starpaul20
Copy link
Member

Done.

Maybe we should rename the table while we're at it. Maybe something like reportedcontent

@DiogoParrinha
Copy link
Contributor Author

Have you tested the upgrade? The table renaming sounds good to but I'm not sure if we have a routine to do it - and I'm not sure if query's syntax is the same across the different database engines we support.

@Starpaul20
Copy link
Member

Yes, I've tested the upgrade routine and it came out perfect. This includes the table renaming.

As for renaming the table, I can add a routine to do it, the syntax is simple for all database types.

Starpaul20 added a commit that referenced this issue May 27, 2014
Updated the column name in a few places I missed previously
@Starpaul20
Copy link
Member

This commit updates a few places I missed in my last commit. It also updates them to work with the current report center design.

Starpaul20 added a commit that referenced this issue May 27, 2014
Added $db->rename_table routine
Renamed reportedposts table to reportedcontent
Renamed reportedposts cache to reportedcontent
@Starpaul20
Copy link
Member

This commit changes several things. First it adds a $db->rename_table routine, allowing you to change the name of a table easily.

Second, it changes the name of the reportedposts table to reportedcontent.

Third it renames the reportedposts cache to reportedcontent (found the first use of the new $cache->delete method).

@DiogoParrinha
Copy link
Contributor Author

Sounds good :) Needs some testing by SQA though.

Starpaul20 added a commit that referenced this issue May 28, 2014
Just a few things I missed
@Starpaul20
Copy link
Member

This commit fixed one last column rename I spotted just now.

@DiogoParrinha
Copy link
Contributor Author

What else needs to be done here?

@Starpaul20
Copy link
Member

Nothing I know of.

Maybe add a few hooks so plugin authors can expand the report center.

@DiogoParrinha
Copy link
Contributor Author

Feel free to add hooks where you think they are necessary and then you can close this :)

Starpaul20 added a commit that referenced this issue May 28, 2014
Added plugin hooks in report.php
@Starpaul20
Copy link
Member

Added some hooks in report.php. Mod CP hooks look fine.

Closing this.

ATofighi pushed a commit to MyBBIr/mybb that referenced this issue May 29, 2014
Renamed pid, tid and fid columns to id, id2 and id3
ATofighi pushed a commit to MyBBIr/mybb that referenced this issue May 29, 2014
Updated the column name in a few places I missed previously
ATofighi pushed a commit to MyBBIr/mybb that referenced this issue May 29, 2014
Added $db->rename_table routine
Renamed reportedposts table to reportedcontent
Renamed reportedposts cache to reportedcontent
ATofighi pushed a commit to MyBBIr/mybb that referenced this issue May 29, 2014
Just a few things I missed
ATofighi pushed a commit to MyBBIr/mybb that referenced this issue May 29, 2014
Added plugin hooks in report.php
@xykul
Copy link

xykul commented May 30, 2014

This error is normal?
1.7 upgrade, 1.6.13 marked and error ..

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1146 - Table 'alpha18.mybb_reportedposts' doesn't exist
Query:
SHOW COLUMNS FROM mybb_reportedposts LIKE 'type'

Please contact the MyBB Group for technical support.

@Stefan-MyBB
Copy link
Contributor

@xykul No, however I haven't experienced any similar issue yet.

@Polarbear541
Copy link
Contributor

@xykul Have you re-installed/re-run the upgrader as these commits change the DB table names?

@xykul
Copy link

xykul commented May 30, 2014

1.7 new installation, upgrade
error

@Polarbear541
Copy link
Contributor

And you're definitely running the latest code from the feature branch?

@Stefan-MyBB
Copy link
Contributor

mybb_reportedposts is a table that exists in MyBB 1.6. If it's missing your existing database may be broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x t:feature Type: Feature. Implements new functionality
Projects
None yet
Development

No branches or pull requests

5 participants