• 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.

Moderate images before they appear in Explore or show Ads

mkerala

👽 Chevereto Freak
Adult content upload is the biggest threat to any image hosting site, especially site which relay on Google Adsense for revenue. The only way to overcome this threat is to moderate all images uploaded to the site. However, monitoring a website 24x7 is not practical and we need a moderation system before images go public.

The image moderation feature is yet to be implemented in Chevereto, but this can be easily implemented with few code editing. This method will automatically flag all uploaded images as NSFW by default instead of asking users to mark it. Only once it is flagged as safe it will appear in Explore or ads displayed.

Phase 1: Mark all images uploaded as NSFW by default

Add $_REQUEST['nsfw'] = 1; after line 82 of /app/routes/route.json.php and upload the new file to to /app/routes/overrides

Code:
// Upload to website
$_REQUEST['nsfw'] = 1;
$uploaded_id = CHV\Image::uploadToWebsite($source, $logged_user, $_REQUEST);

Phase 2: Remove NSFW option from anywhere uploader and replace it with a warning.

Replace line 153 of /app/themes/Peafowl/snippets/anywhere_upload.php with below code. Upload the new file to /app/themes/Peafowl/overrides/snippets.
Code:
<div class="margin-10"><span rel="tooltip" data-tiptip="top" title="<?php _se('Adult contents uploaded will be deleted'); ?>"><name="upload-nsfw" id="upload-nsfw" class="margin-right-5" value="1"><label for="upload-nsfw"><?php _se('Note: Adult content not allowed'); ?></label></span></div>

Phase 3: Moderating large number of images

My site gets around 5K images uploaded every day and to bulk moderate these images I follow below steps.

Step 1: Temporarily increase no: of images to show in listing to 500.
Step 2: Access the admin image explore page via this URL http://yourdomain.com/explore/?list=images&sort=date_desc&page=1
Step 3: Scroll down the page to find any adult content.
Step 4: Once you have removed the Adult contents, use the select all images options and mark all images as Safe from drop down option.
Step 5: At bottom of page, click on next page button and repeat the steps till you flag all newly uploaded images as safe.
Step 6: Once all images are moderated, reset the listing setting to previous value.

I have been using this method on my site for the past 6 months and help me removing all adult content and keep the site clean. Every day I have to spend around only 20 mins to mark 5K images as safe.

Hope this will help others too.

Update: I am retiring this in favour of new AI-based image moderation technique.
 
Last edited:
@mkerala2 where can we put these "fixes" so they are easily searchable? Forum is not the right place for this in my opinion? Github?
 
@mkerala2 where can we put these "fixes" so they are easily searchable? Forum is not the right place for this in my opinion? Github?

Not that hard to search as there is dedicated section for user mods here. All Chevereto site owners has better chance finding it here than gethub.
 
Does not work in latest v3 of chevereto, whenever i replace line 140 with your code for line 140, my website goes blank with black background. So i hope you got a fix.
 
Does not work in latest v3 of chevereto, whenever i replace line 140 with your code for line 140, my website goes blank with black background. So i hope you got a fix.
Yes it does work, but the code lines have changed over time.

Try line 153 for latest version. You should look for line containing the term "Mark this if upload is not family safe".
 
Back
Top