ComusThumbz 文档
管理员登录

Blacklist Control Center

Blacklist Control Center - User Guide

Page Location: ct/admin/blacklist.php
Menu Path: Admin Panel → Tools → Blacklist
Access Level: Administrator (requires login)
Last Updated: 2026-01-01


Overview

The Blacklist Control Center allows administrators to manage banned IPs, domains, and email addresses. This powerful moderation tool helps protect your site from spam submissions, malicious users, and unwanted content by blocking specific identifiers at multiple levels. It includes bulk blocking via keyword/domain lists, database scanning to retroactively mark existing blacklisted content, and individual entry management.

[Screenshot: blacklist-main-interface]


Getting to This Page

  1. Log in to the admin panel at ct/admin/ctlogin.php
  2. In the left sidebar, click Tools
  3. Click Blacklist or navigate directly to ct/admin/blacklist.php

 

Note:
This page is used for site moderation and content control. Blacklisted galleries are automatically marked and can be deleted in bulk.

 


System Requirements

 

Configuration Required:
This page requires the following system dependencies to function properly.

 

PHP Requirements

Requirement Minimum Recommended Notes
PHP Version 7.4 8.2+ Uses null coalescing operators
memorylimit 64M 128M Standard page
maxexecutiontime 30 60 For database scanning

Required PHP Extensions

Extension Required Purpose
mysqli Yes Database connectivity

Required PHP Functions

Function Required For Notes
fileexists() Loading bulk blacklist file Core functionality
fopen() Reading/writing blacklist file Core functionality
fread() Reading blacklist file Core functionality
fwrite() Saving blacklist file Core functionality
fputs() Saving blacklist file Core functionality
fclose() File handle cleanup Core functionality

Folder Permissions

Folder Path Permission Owner Purpose
ct/dat/ 755 www-data Blacklist text file storage

File Permissions

File Path Permission Notes
ct/dat/theblacklist.txt 644 Created if doesn't exist

Server Requirements

Component Requirement
Web Server Apache 2.4+ with modrewrite OR Nginx
Database MySQL 5.7+ / MariaDB 10.3+

Installation Requirements

External Dependencies

Dependency Type Required Version Notes
Font Awesome 6 CDN Yes 6.5.1+ Icons

Page Layout

Header Section

The page header displays:

  • Title: "Blacklist Control Center" with ban icon
  • Breadcrumb: Dashboard > Blacklist Control Center
  • Description: "Manage banned IPs, domains, and email addresses"

 

[Screenshot: blacklist-header]

Statistics Cards

Three statistics cards show current blacklist status:

Card Color Description
Blacklist Entries Red Total entries in tblBlacklist
Blacklisted Galleries Yellow Galleries with accept='Blacklisted'
Bulk List Entries Green Entries in theblacklist.txt file

[Screenshot: blacklist-stats-cards]


Features & UI Elements

Add to Blacklist Form

Purpose: Quickly add an IP, domain, or email to the blacklist.

Element Description
Input Field Enter IP address, domain name, or email address
Add to Blacklist Button Submit the entry (matches against Any type)

Behavior:

  • Entry is added to tblBlacklist with type='All'
  • Matching galleries are updated to accept='Blacklisted'
  • Success message shows affected gallery count

[Screenshot: blacklist-add-form]

Purpose: Scan all galleries against the bulk blacklist and mark matches.

Button: "Scan & Blacklist Gallery Database"

Behavior:

  1. Reads entries from theblacklist.txt
  2. Scans tblTgp for matching URLs, emails, IPs, or domain IPs
  3. Updates matching galleries to accept='Blacklisted'
  4. Displays results table with options to delete or pardon each

 

[Screenshot: blacklist-scan-results]

Blacklist Entries Table

Purpose: View and manage individual blacklist entries.

Column Description
Email / IP / Domain Editable text field with current value
Actions Remove link, Contact link (for emails)

Features:

  • In-line editing of entries
  • Update Blacklist button (saves all changes)
  • Remove individual entries
  • Contact link for email addresses

[Screenshot: blacklist-entries-table]

Bulk Blacklist (FreeHosts & Keywords)

Purpose: Manage a comma-separated list of domains, keywords, and patterns to block in bulk.

Element Description
Textarea Comma-separated list of items to block
Update Bulk List Button Save changes to theblacklist.txt
Export List (readonly) Current entries formatted for copying

Stored in: ct/dat/theblacklist.txt

 

Note:
The bulk list scans URLs only. The individual entries table scans URLs, email addresses, IPs, hostnames, domains, and page HTML.

 

 

Tip:
You can add sponsor codes or partial paths like smutserver.com/~username/ for targeted blocking.

 

[Screenshot: blacklist-bulk-list]


Step-by-Step Usage

Task 1: Block a Specific Domain

 

Note:
This workflow blocks a specific domain and marks all related galleries.

 

Steps:

  1. Navigate to Admin Panel → Tools → Blacklist
  1. In the "Add to Blacklist" section, enter the domain:
spammer-domain.com
  1. Click Add to Blacklist
  1. Review the success message showing how many galleries were affected

Result:

  • Domain is added to tblBlacklist
  • All galleries with URLs containing this domain are marked as Blacklisted

 

Task 2: Bulk Block Multiple Domains

Steps:

  1. Scroll down to Bulk Blacklist (FreeHosts & Keywords) section
  1. Add domains/keywords to the textarea, separated by commas:
spammer1.com,spammer2.com,badkeyword,freehost.example.net/~baduser/
  1. Click Update Bulk List
  1. Click Scan & Blacklist Gallery Database to apply the new rules
  1. Review the scan results showing affected galleries

Result: All matching galleries are marked as Blacklisted.

Task 3: Delete All Blacklisted Galleries

 

Warning:
This action permanently deletes all blacklisted galleries. This cannot be undone.

 

Steps:

  1. Click Scan & Blacklist Gallery Database to see all blacklisted galleries
  1. Review the results table to verify the galleries should be deleted
  1. Click the link "Click here to delete them all"
  1. Confirm the deletion in the popup dialog

Result: All galleries with accept='Blacklisted' are permanently deleted.

Steps:

  1. Click Scan & Blacklist Gallery Database
  1. Find the gallery in the results table
  1. Click Pardon in the Actions column
  1. Confirm the pardon action

Result: Gallery status is changed from 'Blacklisted' to 'Approved'.

Task 5: Remove an Entry from the Blacklist

Steps:

  1. Find the entry in the Blacklist Entries table
  1. Click Remove in the Actions column
  1. Confirm the removal

Result: Entry is deleted from tblBlacklist (but previously blacklisted galleries remain blacklisted).


Actions Reference

Action Effect Reversible
Delete Permanently removes gallery from database No
Pardon Changes status from Blacklisted to Approved Yes (can re-blacklist)

Entry Actions

Action Effect
Remove Deletes entry from tblBlacklist
Contact Opens mailto: link for email addresses
Update Blacklist Saves all inline edits

Bulk Actions

Action Effect
Delete All Removes ALL galleries with accept='Blacklisted'
Scan & Blacklist Scans database and marks matching galleries

How Blacklisting Works

Individual Entries (tblBlacklist)

When you add an entry to the blacklist:

  1. Entry is stored in tblBlacklist with a type field
  2. All galleries matching the criteria are updated:
  • accept is set to 'Blacklisted'
  • newpost is set to 'BlackList'

Matching logic by type:

  • email: Matches gallery's email field exactly
  • ip: Matches gallery's IP field exactly
  • domain: Matches if gallery URL contains the entry
  • Any/All: Matches email, URL, or IP containing the entry

 

Bulk List (theblacklist.txt)

When you run Scan & Blacklist Gallery Database:

  1. Reads all comma-separated entries from theblacklist.txt
  2. For each entry (if length > 5 characters):
  • Checks domip field
  • Checks if url contains entry
  • Checks if email matches entry
  • Checks if ip matches entry
  1. Updates matching galleries to accept='Blacklisted'

Error Messages & Troubleshooting

Common Errors

Error Message Cause Solution
"ERROR: [SQL error]" Database query failed Check database connection, table exists
Blank scan results No matches found Verify bulk list has entries > 5 characters
Entry not saving File permission issue Ensure ct/dat/theblacklist.txt is writable

Troubleshooting

Problem: Bulk list changes not saving
Solution:

  • Verify ct/dat/theblacklist.txt exists and is writable (644)
  • Check for trailing commas that may cause parsing issues
  • Ensure entries are properly comma-separated

 

Problem: Galleries not getting blacklisted
Solution:

  • Verify entries are longer than 5 characters
  • Check that the entry matches actual gallery data
  • Use exact matches for IPs and emails
  • Use partial strings for domain blocking

 

Problem: "Remove" not working
Solution:

  • Verify JavaScript is enabled
  • Check browser console for errors
  • Ensure the entry has a valid ID in the database

 


  • Gallery Review (ct/admin/admin.php) - View and manage blacklisted galleries
  • Partner Control (ct/admin/preferred.php) - Manage trusted partners (opposite of blacklist)

Tips & Best Practices

 

Tip:
Use partial domain names: For broad blocking, use badsite.com instead of http://www.badsite.com/page. This catches all variations of the domain.

 

 

Tip:
Regular scans: Run "Scan & Blacklist Gallery Database" periodically to catch any galleries that were added before you added a blacklist entry.

 

 

Warning:
Be careful with generic keywords: Blocking common words like "free" or "hot" may catch legitimate galleries. Use specific terms.

 

 

Tip:
Export before changes: Copy the Export List before making major changes to the bulk list. This lets you restore if needed.

 

 

Note:
Blacklisting vs Deleting: Blacklisting marks galleries for review; you can pardon them later. Deleting is permanent.

 


Translatable Strings

The following text elements should be added to backend translations:

Key Default Text
blacklistcontrolcenter Blacklist Control Center
managebanned Manage banned IPs, domains, and email addresses
blacklistentries Blacklist Entries
blacklistedgalleries Blacklisted Galleries
bulklistentries Bulk List Entries
addtoblacklist Add to Blacklist
enteripdomainemail Enter IP, domain, or email
scanblacklistdatabase Scan & Blacklist Gallery Database
scanresults Scan Results
scanningdatabase Scanning the database for blacklisted data...
blacklistedgalleriesfound blacklisted galleries found in the database
clickdeleteall Click here to delete them all
noblacklistedfound No blacklisted galleries found in the database
delete Delete
pardon Pardon
remove Remove
contact Contact
updateblacklist Update Blacklist
bulkblacklist Bulk Blacklist (FreeHosts & Keywords)
bulkinstructions If any of these domains or keywords appear in URLs, emails, or IPs, the gallery will be blacklisted.
updatebulklist Update Bulk List
exportlist Export List (copy for use on other sites)
bulknote This bulk list scans URLs only. The individual entries above scan URLs, email addresses, IPs, hostnames, domains, and page HTML.
confirmdeletegallery Are you SURE you want to delete this gallery
confirmpardongallery Are you SURE you want to pardon this gallery
confirmdeleteall Are you SURE you want to delete all these galleries?
confirmremoveentry Are you SURE you want to Remove {entry} from the blacklist?
galleriesblacklisted gallery records were blacklisted
blacklistupdated Blacklist updated successfully
gallerypardoned Gallery pardoned successfully
entryremoved Entry removed from blacklist
gallerydeleted Gallery deleted successfully
allblacklisteddeleted All blacklisted galleries deleted
bulklistupdated Bulk blacklist updated successfully
noentries_found No blacklist entries found. Add your first entry above.

Changelog

Date Version Changes
2026-01-01 1.0 Initial guide created