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
Milestone

Comments

@DiogoParrinha
Copy link
Contributor

@DiogoParrinha DiogoParrinha commented May 27, 2014

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.

@DiogoParrinha DiogoParrinha added the 1.8 label May 27, 2014
@DiogoParrinha DiogoParrinha added this to the 1.8 Beta 1 milestone May 27, 2014
@PaulBender
Copy link
Member

@PaulBender PaulBender commented May 27, 2014

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

@DiogoParrinha DiogoParrinha commented May 27, 2014

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

@PaulBender
Copy link
Member

@PaulBender PaulBender commented May 27, 2014

Not if you report a reputation or a profile

@DiogoParrinha
Copy link
Contributor Author

@DiogoParrinha DiogoParrinha commented May 27, 2014

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?

@PaulBender
Copy link
Member

@PaulBender PaulBender commented May 27, 2014

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

@DiogoParrinha
Copy link
Contributor Author

@DiogoParrinha DiogoParrinha commented May 27, 2014

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

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

@PaulBender PaulBender commented May 27, 2014

Done.

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

@DiogoParrinha
Copy link
Contributor Author

@DiogoParrinha DiogoParrinha commented May 27, 2014

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.

@PaulBender
Copy link
Member

@PaulBender PaulBender commented May 27, 2014

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.

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

@PaulBender PaulBender commented May 27, 2014

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

PaulBender 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
@PaulBender
Copy link
Member

@PaulBender PaulBender commented May 27, 2014

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

@DiogoParrinha DiogoParrinha commented May 27, 2014

Sounds good :) Needs some testing by SQA though.

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

@PaulBender PaulBender commented May 28, 2014

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

@DiogoParrinha
Copy link
Contributor Author

@DiogoParrinha DiogoParrinha commented May 28, 2014

What else needs to be done here?

@PaulBender
Copy link
Member

@PaulBender PaulBender commented May 28, 2014

Nothing I know of.

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

@DiogoParrinha
Copy link
Contributor Author

@DiogoParrinha DiogoParrinha commented May 28, 2014

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

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

@PaulBender PaulBender commented May 28, 2014

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

Closing this.

@PaulBender PaulBender closed this May 28, 2014
ATofighi added a commit to MyBBIr/mybb that referenced this issue May 29, 2014
Renamed pid, tid and fid columns to id, id2 and id3
ATofighi added a commit to MyBBIr/mybb that referenced this issue May 29, 2014
Updated the column name in a few places I missed previously
ATofighi added 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 added a commit to MyBBIr/mybb that referenced this issue May 29, 2014
Just a few things I missed
ATofighi added a commit to MyBBIr/mybb that referenced this issue May 29, 2014
Added plugin hooks in report.php
@xykul
Copy link

@xykul 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-ST
Copy link
Contributor

@Stefan-ST Stefan-ST commented May 30, 2014

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

@Polarbear541
Copy link
Contributor

@Polarbear541 Polarbear541 commented May 30, 2014

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

@xykul
Copy link

@xykul xykul commented May 30, 2014

1.7 new installation, upgrade
error

@Polarbear541
Copy link
Contributor

@Polarbear541 Polarbear541 commented May 30, 2014

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

@Stefan-ST
Copy link
Contributor

@Stefan-ST Stefan-ST commented May 30, 2014

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.