• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • ๐Ÿ˜Œ This community is user driven. Be polite with other users.
    • ๐Ÿ‘‰ Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • ๐Ÿ’ธ Purchase a Pro Subscription to get access to active software support and faster ticket response times.

ModerateContent Chevereto Plugin

Yes, it block the upload on my site for 8 hours until I remove the modifications.
 
moderatecontent.com is unreachable right now and it does seem to be the case
 

Attachments

  • Screenshot 2020-04-09 at 10.34.19.png
    Screenshot 2020-04-09 at 10.34.19.png
    29.9 KB · Views: 13
[CODE lang="php" title="app/vendor/moderatecontent/moderatecontent.php"] if ($curl_response === false){
$response->error_msg = 'Moderation server could not be reached';
$response->error_code = 1402;[/CODE]

[CODE lang="php" title="app/lib/classes/class.upload.php"] if ($response->error_code > 0){
throw new UploadException($response->error_msg, $response->error_code);[/CODE]

The code checks for any error, and pass it as an exception making your websites unusable for image uploading. The code should detect code 1402 (their code for server unreachable) and don't pass the exception in such cases as it blocks the upload functionality.
 
  • Like
Reactions: rdn
I have emailed them (about 10 hours ago now) asking if it can allow uploads if their servers are unreachable, no reply as yet.
 
They sent the solution last night, Modify file app/lib/classes/class.upload.php was at line 427 for me.

The original code was from step 1 was,

Code:
    if (intval(Settings::get('moderatecontent')) != 0 && intval(Settings::get('moderatecontent_action_block_upload')) != 0){
      require_once CHV_APP_PATH_LIB_VENDOR . 'moderatecontent/moderatecontent.php';
      $response = ModerateContent::moderate_image($this->downstream);
      if ($response->error_code > 0){
        throw new UploadException($response->error_msg, $response->error_code);
      } else {
        if ($response->moderation->rating_letter == "a"){
          throw new UploadException("This image contains adult content", 1404);
        }
      }
    }


Replace with,

Code:
    if (intval(Settings::get('moderatecontent')) != 0 && intval(Settings::get('moderatecontent_action_block_upload')) != 0){
      require_once CHV_APP_PATH_LIB_VENDOR . 'moderatecontent/moderatecontent.php';
      $response = ModerateContent::moderate_image($this->downstream);
        if ($response->moderation->rating_letter == "a"){
          throw new UploadException("This image contains adult content", 1404);
        }
    }

I have added to my site, will have to see how it goes ;)
 
  • Like
Reactions: rdn
They have changed this code again, some people (including me) where reporting blocking images was not working, only mark as NSFW, this change addresses that, you should now use.

[CODE lang="php" title="app/lib/classes/class.upload.php"] if (intval(Settings::get('moderatecontent')) != 0 && intval(Settings::get('moderatecontent_action_block_upload')) != 0){
require_once CHV_APP_PATH_LIB_VENDOR . 'moderatecontent/moderatecontent.php';
$response = ModerateContent::moderate_image($this->downstream);
if ($response->error_code == 0 && $response->moderation->rating_letter == "a"){
throw new UploadException("This image contains adult content", 1404);
}
}[/CODE]


New code on the right.
 
  • Like
Reactions: rdn
Mh... my test works today. No problems uploading, and detect porn pics correctly.
You have integrated everything correctly as written in the documentation?
 
Mh... my test works today. No problems uploading, and detect porn pics correctly.
You have integrated everything correctly as written in the documentation?
I'm behind a paranoid pfsense firewall and I think it kinda worked at first then I removed it them put it back and made sure everything is correct but didin work this time, might be due to a bad reverse proxy.
I'm adjusting me reverser proxy & trying to fix the issues I have for now, I'll get back to it later.
 
They have added a new option to include images scored as "teen" now, seems to work well.
 

Attachments

  • moderatecontent.png
    moderatecontent.png
    36.1 KB · Views: 18
Just updated to 3.15.2 and checked SHA checksum before and after, no changes so keep and copy of existing edited files and overwrite once update complete :)
 
I have been in touch with ModerateContent.com team and they have now developed a plugin for Chevereto.

Implementation is a little tricky as several custom code needs to be added, however, good to see they have taken Chevereto community seriously and spend time to develop this.

The problem with most plugins is that it makes the browser slow specially when the the task is very high. I did not try your plugin yet, but I think as everyone is using this, it might be good. Lets see.
 
Works perfectly. I ordered the enterprise plan for the minimum of $100 /month you get 1 million images per month and a much faster API.
 
I just upgrade from free to paid Chevereto license (after backup of the files class.upload.php, class.image.php and dashboard.php) and ModerateContent plugin dont' work anymore... I edited dashboard.php but I can no more find the lines to be modified so there is no more content filtering :confused:
 
Back
Top