Custom Report Mod

Started by d3vcho, June 02, 2011, 09:27:17 AM

Previous topic - Next topic

Joker™

Quote from: Sefket on December 07, 2011, 08:36:39 PM
Quote from: Joker™ on November 22, 2011, 05:15:13 PM
Quote from: Sefket on November 22, 2011, 05:06:40 PM
- [Report Solved]/[Report Unsolved]
This button appears in 1st post of report topics in report board. Only people having permission 'Can mark reports as solved/unsolved', can see this button.

Can you put this in for SMF 1.1.15?
Sorry mate I'm not back-porting any of my work to SMF 1.x branch as SMF has already released a stable version of SMF 2.0.

Aww :( .
try updating your forum to SMF 2.0. It's not that hard ;).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

afv

Hi Joker™,

Thank you for all the work on this mod! :D I've been using the old vReportBoard Mod but will soon upgrade my forum to the new SMF 2, so I'll have to use your mod. :)

I was taking a look at the source code and noticed this on the modification.xml file, that I'm not sure if it's correct (shouldn't the red parts be switched with the green ones?):

Quote
[...]
   <file name="$sourcedir/ManageBoards.php">
      <operation>
         <search position="replace"><![CDATA[   $recycle_boards = array('');
   $request = $smcFunc['db_query']('order_by_board_order', '
      SELECT hxxp:b.id [nonactive]_board, hxxp:b.name [nonactive] AS board_name, hxxp:c.name [nonactive] AS cat_name
      FROM {db_prefix}boards AS b
         LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = hxxp:b.id [nonactive]_cat)
      WHERE redirect = {string:empty_string}',
      array(
         'empty_string' => '',
      )
   );
   while ($row = $smcFunc['db_fetch_assoc']($request))
      $recycle_boards[$row['id_board']] = $row['cat_name'] . ' - ' . $row['board_name'];
   $smcFunc['db_free_result']($request);
]]></search>
         <add><![CDATA[   $recycle_boards = array('');
   $request = $smcFunc['db_query']('order_by_board_order', '
      SELECT hxxp:b.id [nonactive]_board, hxxp:b.name [nonactive] AS board_name, hxxp:c.name [nonactive] AS cat_name
      FROM {db_prefix}boards AS b
         LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = hxxp:b.id [nonactive]_cat)
      WHERE redirect = {string:empty_string}' . (!empty($modSettings[ 'report_board']) && $modSettings[ 'report_board_id'] > 0 ? '
      AND hxxp:b.id [nonactive]_board != {int:report_board_id}' : ''),
      array(
         'empty_string' => '',
         'report_board_id' => $modSettings[ 'report_board_id'],
      )
   );
   while ($row = $smcFunc['db_fetch_assoc']($request))
      $recycle_boards[$row['id_board']] = $row['cat_name'] . ' - ' . $row['board_name'];
   $smcFunc['db_free_result']($request);
   
   $report_boards = array('');
   $request = $smcFunc['db_query']('order_by_board_order', '
      SELECT hxxp:b.id [nonactive]_board, hxxp:b.name [nonactive] AS board_name, hxxp:c.name [nonactive] AS cat_name
      FROM {db_prefix}boards AS b
         LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = hxxp:b.id [nonactive]_cat)
      WHERE redirect = {string:empty_string}' . (!empty($modSettings[ 'recycle_enable']) && $modSettings[ 'recycle_board'] > 0 ? '
      AND hxxp:b.id [nonactive]_board != {int:recycle_board_id}' : ''),
      array(
         'empty_string' => '',
         'recycle_board_id' => $modSettings[ 'recycle_board'],
      )
   );
   while ($row = $smcFunc['db_fetch_assoc']($request))
      $report_boards[$row['id_board']] = $row['cat_name'] . ' - ' . $row['board_name'];
   $smcFunc['db_free_result']($request);

]]></add>
      </operation>
[...]

Thanks! :)

Joker™

Quote from: afv on January 26, 2012, 11:59:37 PM
Hi Joker™,

Thank you for all the work on this mod! :D I've been using the old vReportBoard Mod but will soon upgrade my forum to the new SMF 2, so I'll have to use your mod. :)

I was taking a look at the source code and noticed this on the modification.xml file, that I'm not sure if it's correct (shouldn't the red parts be switched with the green ones?):

First question first, have you seen some visual error with the present code?

That code picks up the board which you can use as a report board, so in that case you don't want recycle/trash board to be used as the report board.
Also the mod code is simple replacing the original code, hence the code you have marked in red is same as original one.

  $request = $smcFunc['db_query']('order_by_board_order', '
      SELECT b.id_board, b.name AS board_name, c.name AS cat_name
      FROM {db_prefix}boards AS b
         LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
      WHERE redirect = {string:empty_string}' . (!empty($modSettings[ 'report_board']) && $modSettings[ 'report_board_id'] > 0 ? '
      AND b.id_board != {int:report_board_id}' : ''),
      array(
         'empty_string' => '',
         'report_board_id' => $modSettings[ 'report_board_id'],
      )
   );
   while ($row = $smcFunc['db_fetch_assoc']($request))
      $recycle_boards[$row['id_board']] = $row['cat_name'] . ' - ' . $row['board_name'];
   $smcFunc['db_free_result']($request);


Talking about this code.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

afv

Quote from: Joker™ on January 27, 2012, 05:49:45 AM
First question first, have you seen some visual error with the present code?

That code picks up the board which you can use as a report board, so in that case you don't want recycle/trash board to be used as the report board.
Also the mod code is simple replacing the original code, hence the code you have marked in red is same as original one.

[...]

Talking about this code.

Thanks for the response. I haven't tried it yet. :)

There's something I'm missing on that code, because it seems to me that it's assigning the report_board_id to the $recycle_boards (on the while loop) and then, on the next select, assigning the recycle to the $report_boards. That's why I thought they were switched. :-[

dimspace

Excellent mod, thank you. combined it with the portal so that the latest thread in the board appears at the top of the page for mods and admin and works lovely. (2.0.2)

rogerzilla

Is there any way to have a different target for reports from a particular board?  We'd like the board moderator to be able to see reports for him, without having access to the same area as global moderators.

Thanks

Joker™

Quote from: rogerzilla on February 14, 2013, 02:52:39 PM
Is there any way to have a different target for reports from a particular board?  We'd like the board moderator to be able to see reports for him, without having access to the same area as global moderators.

Thanks
Can you elaborate this?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

NekoJonez

In SMF 2.0.4 with 1.4RC , I have two lines above the "save" button. How can I fix this?
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Mooby The Golden Sock

Quote from: Joker™ on February 15, 2013, 04:29:24 AM
Quote from: rogerzilla on February 14, 2013, 02:52:39 PM
Is there any way to have a different target for reports from a particular board?  We'd like the board moderator to be able to see reports for him, without having access to the same area as global moderators.

Thanks
Can you elaborate this?
I'm pretty sure he's saying that he wants to set up his forum like:

- General Discussion (Moderator: Luke Skywalker)
-- Reports: General Discussion (Moderator: Luke Skywalker)

- Talking About The Weather (Moderator: Han Solo)
-- Reports: Talking About The Weather (Moderator: Han Solo)

- Water Cooler (Moderator: Chewbacca)
-- Reports: Water Cooler (Moderator: Chewbacca)

- Things Related To Other Things (Moderator: R2D2)
-- Reports: Things Related To Other Things (Moderator: R2D2)

Basically, a function to set up a report board for each board in the forum.  Like, in the menu, have the normal drop down box for selecting the general report board, with an option to use individual board settings.  If the latter is chosen, then have an additional report board drop down on the board settings page for each individual board.

Joker™

Quote from: Mooby The Golden Sock on February 08, 2014, 01:58:06 PM
I'm pretty sure he's saying that he wants to set up his forum like:

- General Discussion (Moderator: Luke Skywalker)
-- Reports: General Discussion (Moderator: Luke Skywalker)

- Talking About The Weather (Moderator: Han Solo)
-- Reports: Talking About The Weather (Moderator: Han Solo)

- Water Cooler (Moderator: Chewbacca)
-- Reports: Water Cooler (Moderator: Chewbacca)

- Things Related To Other Things (Moderator: R2D2)
-- Reports: Things Related To Other Things (Moderator: R2D2)

Basically, a function to set up a report board for each board in the forum.  Like, in the menu, have the normal drop down box for selecting the general report board, with an option to use individual board settings.  If the latter is chosen, then have an additional report board drop down on the board settings page for each individual board.
That would create a lot of boards, which is not good for a forum's health, as the SMF structure don't play very well with a lot of boards. I'll try to implement this with something else.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Growing2LoveSiMaFo

I am on version 2.0.7.  While installing I get an error trying to do a Find/Replace operation in the Display.php file, specifically

t.id_member_started, hxxp:t.id [nonactive]_first_msg, hxxp:t.id [nonactive]_last_msg, t.approved, t.unapproved_posts,
t.id_member_started, hxxp:t.id [nonactive]_first_msg, hxxp:t.id [nonactive]_last_msg, t.approved, t.unapproved_posts, c.solved,

At this point, I don't know if other errors will show up, but this is where it has presently errored out.

Any idea why?  TIA.

Joker™

Quote from: Growing2LoveSiMaFo on May 25, 2014, 05:13:29 PM
I am on version 2.0.7.  While installing I get an error trying to do a Find/Replace operation in the Display.php file, specifically

t.id_member_started, t.id_first_msg, t.id_last_msg, t.approved, t.unapproved_posts,
t.id_member_started, t.id_first_msg, t.id_last_msg, t.approved, t.unapproved_posts, c.solved,

At this point, I don't know if other errors will show up, but this is where it has presently errored out.

Any idea why?  TIA.
Can you copy paste the exact error, as it must have been shown in error logs in admin panel.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Skaty

Hi, thanks for the mod i'm still using it.  But this is bothering me for a long time. Can we add a link to the reported post? When i see the report, if i need to interfering the post i'm starting to search it, where is it? 

Maybe i did something when installation process, or this feature is missing really.

hcfwesker

When the topic/post is created in your "board targeted for reported posts" (after the reported post is sent) , it will say who reported it at the top of the message, and a link to the post (where the 'quote' link takes you to the post, and the body of the reported message in the quote box.

This isn't a MOD for the moderation center, if that's what you're referring to.


Skaty

Quote from: hcfwesker on September 09, 2014, 10:23:17 PM
When the topic/post is created in your "board targeted for reported posts" (after the reported post is sent) , it will say who reported it at the top of the message, and a link to the post (where the 'quote' link takes you to the post, and the body of the reported message in the quote box.

This isn't a MOD for the moderation center, if that's what you're referring to.

Hi Bro :)

Mine doesn't have link  :o  Can you tell me which file and which code is these so i can check and edit them.


hcfwesker

#95
Check the SMF default theme, first, and see if the feature is there.  Your custom theme you're using may just not link back to quotes or something.

And, best advice would be to uninstall then reinstall the MOD.

Joker™

Anyone still interested in this mod, as Joker is having some nice ideas related to mod enhancement. But, I'm willing to work on them only if community is still interested in this mod :)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

hcfwesker

This MOD is a must for our site, so of course I'm interested :)

Joker™

Quote from: hcfwesker on October 22, 2014, 04:12:55 PM
This MOD is a must for our site, so of course I'm interested :)
Nice to know. So currently I'm making the following changes in to the mod

- Separate admin section for the mod, so that its easier for admins to make mod related settings
- Email to moderators when a post is reported (a long pending feature)
- 'Solved' button to be shown only to the moderators related to post, i.e moderators of the boards

Do you guys like to add something to the list?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

hcfwesker

The reason we prefer this MOd over default, is because it bypasses the email send feature.  If you do add it, hopefully it can be turned off to not get reported emails.

One thing that would be great, but not sure how extensive it could be ... is for mods able to handle reports, can see in the original post that it has been reported, and a button they can click to change it to "report solved" when they handle it, so other staff know it's been handled when they view it. 

Advertisement: