ComusThumbz 文档
管理员登录

Settings Control

Overview

The Settings Control Center is the master configuration page for ComusThumbz. It provides comprehensive control over MySQL database settings, site information, admin controls, operational modes, page building, text links, thumbnail processing, submission forms, and scanning options. This is one of the most critical pages in the admin panel and has additional IP-based security requirements.

[Screenshot: config-setup-main-interface]


Getting to This Page

  1. Log in to the admin panel at ct/admin/ctlogin.php
  2. In the left sidebar, click Settings
  3. Click Settings Control Center or navigate directly to ct/admin/config.setup.php

 

Warning:
This page requires your IP address to be whitelisted in ct/accesscontrol.php. If you see an "Access for this address is banned" message, follow the instructions to create/update the access control file.

 


System Requirements

 

Configuration Required:
This page has strict security requirements. Ensure your IP is whitelisted before accessing.

 

PHP Requirements

Requirement Minimum Recommended Notes
PHP Version 7.4 8.2+ Uses null coalescing operators
memorylimit 128M 256M For config processing
maxexecutiontime 3000 3000 Set internally via iniset
defaultsockettimeout 3 3 Set internally

Required PHP Extensions

Extension Required Purpose
mysqli Yes Database connectivity
ftp Optional FTP sync functionality
gd Recommended Image processing settings

Required PHP Functions

 

Warning:
These functions should NOT be in disable
functions for full functionality:

 

Function Required For Notes
passwordhash() Secure password hashing Core functionality
passwordverify() Password validation Core functionality
fileputcontents() Config file saving Core functionality
fileexists() Config loading Core functionality
ftpconnect() FTP sync feature Optional
ftplogin() FTP sync feature Optional

Folder Permissions

Folder Path Permission Owner Purpose
ct/dat/ 755 www-data Config file storage
ct/thumbs/ 755 www-data Thumbnail storage

File Permissions

File Path Permission Notes
ct/dat/config.inc.php 644 Main config file - MUST be writable
ct/accesscontrol.php 644 IP whitelist - should NOT be 777

Server Requirements

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

Installation Requirements

Required Files

File Path Permission Purpose
ct/accesscontrol.php 644 IP whitelist for settings access
ct/dat/config.inc.php 644 Main configuration storage

External Dependencies

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

IP Whitelist Security

 

Warning:
This page has additional IP-based security. You must create ct/accesscontrol.php with your IP before accessing settings.

 

Creating accesscontrol.php

If you see the "Access for this address is banned" message:

  1. Create a file called accesscontrol.php in your ct/ folder
  1. Add the following content (replace with your IP):
<?php
$enablepageediting = 1;
$onlyallowedips = '123.45.67.89';
?>
  1. Set file permissions to 644 (NOT 777)
  1. Refresh the settings page

Multiple IPs

You can allow multiple IPs by separating them with spaces:

$onlyallowedips = '123.45.67.89 98.76.54.32';

IP Range

You can allow an IP range by using a partial IP:

$onlyallowedips = '123.45.';  // Allows 123.45..
$onlyallowedips = '.';  // A single dot allows all IPs

 

Error:
Never set permissions to 777 on access
control.php. This is a security risk.

 


Page Layout

Quick Navigation

A quick-nav bar at the top provides jump links to each section:

  • MySQL - Database settings
  • Site Info - Site name, title, email
  • Admin - Admin control settings
  • Operation - Operational modes
  • Build - Page building options
  • Text - Text link settings
  • Thumb - Thumbnail processing
  • Submit - Submission form settings
  • Scanning - URL scanning options

[Screenshot: config-setup-quick-nav]


Settings Sections

MySQL Setup

Anchor: #mysql

Core database and error handling settings:

Setting Description
MySQL Host Database server hostname
MySQL Database Database name
MySQL User Database username
MySQL Password Database password
Auto Database Repairs Enable automatic table repairs on builds
Admin Password Change admin password (with confirmation)
Database Error URL Redirect URL for database errors
Max 404s before disable Threshold before disabling gallery
404 Error URL Redirect URL for 404 errors
Fusker Error URL Redirect URL for fusker attempts
Bad Referer Error URL Redirect URL for bad referers
On Click Number URL Nth-click redirect URL
Click Pattern Comma-separated click numbers for redirect
No Cookie Error URL Redirect for cookie-blocked users
FTP Port Alternate FTP port (21, 121, 80)
Bypass system() calls Enable if system() is disabled
FTP Host/Login/Password/Path Remote thumbnail server settings
Click Flood Limit Max click score per IP
Click Flood Error URL Redirect for flood violators
Click Flood White List IPs exempt from flood protection
HTACCESS Path Location of .htaccess file

[Screenshot: config-setup-mysql-section]

 

Tip:
Use password-type fields for sensitive database credentials. They're hidden from view but still editable.

 

Site Information

Anchor: #siteinfo

Basic site identity settings:

Setting Description
Your Site Title SEO title for the site
Your Site Description Meta description
Your Domain Domain without http://www. (e.g., testing.com)
Reciprocal Link Full URL with http:// for reciprocal links
Your Email Admin contact email
Your Name Site owner name

[Screenshot: config-setup-siteinfo-section]

Admin Control Settings

Anchor: #admin

Settings that control admin panel behavior:

Setting Description
Preview Page Maps to Preview Site button (e.g., ../index.php)
Galleries in Review Number of galleries per page in Review
GD Version GD library version (1, 2, or Off)
GIF Support GD GIF support, gif2png, or None
ImageMagick Enable/disable ImageMagick
ImageMagick Path Path to ImageMagick binaries
ImageMagick Default Filter Default filter for processing
Help System Enable/disable help popups
Debug Mode Enable/disable debug messages
Verbose Mode Detailed logging

[Screenshot: config-setup-admin-section]

Operation Settings

Anchor: #operation

Runtime operational modes:

Setting Description
User Mode Enable user registration features
Accept Partner Apps Allow partner application submissions
Block Proxy Block proxy users
Track Proxy Track proxy usage
Proxy Limit Proxy score threshold
First Click Enable first-click tracking
Count Clicks Enable click counting
Hack Protect Enable hack protection
Allow 302 Allow 302 redirects
Allow Hotlinking Allow external hotlinking

Page Building Settings

Anchor: #build

Settings for page generation:

Setting Description
Rebuild Click Level Minimum clicks for rebuild
Rebuild Hit Level Minimum hits for rebuild
Date Format Date display format
Normal Gallery Days Days for normal galleries
Partner Gallery Days Days for partner galleries
Server Speed Processing speed limit
Fast Mode Enable fast processing mode
Threads Number of processing threads

Anchor: #text

Text link handling:

Setting Description
Max Links Maximum links per submission
CJ String ClickJacking detection string
CJ String 2 Secondary CJ detection
Partner CJ String Partner CJ detection
Partner CJ String 2 Secondary partner CJ

Thumbnail Settings

Anchor: #thumb

Thumbnail processing configuration:

Setting Description
Width Size Default thumbnail width (max 3 digits)
Height Size Default thumbnail height (max 3 digits)
Image Quality JPEG quality (1-100)
Aspect Ratio Enforce aspect ratio restriction
Auto Crop From Thumbs Enable auto-cropping
Auto Crop Method Crop method (Largest, Center, etc.)
Auto Crop Randomize Randomize crop position
Auto Overlay Overlay image path
Gallery Framing Enable gallery framing
Allow GIF Allow GIF thumbnails
Minimum Image File Size Reject images smaller than this

[Screenshot: config-setup-thumb-section]

Submission Form Settings

Anchor: #submit

Gallery submission form options:

Setting Description
Use Email Require email on submissions
Use Confirm Send confirmation emails
Use Blacklist Check submissions against blacklist
Use Dupe Check Check for duplicate URLs
Use Preferred Enable preferred partner system
Require Reciprocal Require reciprocal link
Auto Approve Auto-approve certain submissions
Auto Thumb Submits Auto-process submitted thumbnails
Block Auto Submitters Block automated submissions
Gallery Min Pictures Minimum pictures required
Gallery Max Pictures Maximum pictures allowed
Description Length Max description length
Submit Period Submission cooldown period
Refresh Period Resubmission refresh period

Scanning Settings

Anchor: #scanning

URL and content scanning options:

Setting Description
Auto Scan On/Off Enable automatic scanning
Auto Scan Settings Scan configuration
Scan Site Enable site scanning
Scan Language Accept-Language header
Scan Referrer Referer header value
User Agent HTTP user agent string
Default Connection Connection header value
Default Cookies Cookie header value
Thumbs to Grab Number of thumbnails to grab
Iframe Check Detect iframes
Javascript Check Detect javascript
Object Check Detect objects/embeds
Popup Check Detect popups
Thumbnail Check Verify thumbnails
Advanced Gallery Check Deep gallery inspection
Bad Word Check Content filtering
Bad Words Words to block
HTML Mail Send HTML emails
Accept Text Acceptance email text
Accept Thumbs Include thumbs in acceptance

Step-by-Step Usage

Task 1: Change Admin Password

Steps:

  1. Navigate to Admin Panel → Settings → Settings Control Center
  1. Scroll to the MySQL Setup section
  1. Find the "Admin Password" field
  1. Enter your new password
  1. Enter the same password in "Admin Password (Confirm)"
  1. Scroll down and click Submit
  1. Verify the "Update Complete" message

 

Success:
Password changed successfully. You'll need to use the new password next time you log in.

 

Task 2: Configure Thumbnail Sizes

Steps:

  1. Navigate to Admin Panel → Settings → Settings Control Center
  1. Click the Thumb link in the quick nav (or scroll to thumbnail section)
  1. Set Width Size (e.g., 220)
  1. Set Height Size (e.g., 180)
  1. Set Image Quality (e.g., 80)
  1. Click Submit

 

Tip:
Higher quality values (80-100) produce better images but larger file sizes. 70-80 is usually a good balance.

 

Task 3: Enable ImageMagick

Steps:

  1. Verify ImageMagick is installed on your server:
which convert
  1. Navigate to Settings Control Center
  1. Set ImageMagick to "ImageMagick On"
  1. Enter the ImageMagick Path (e.g., /usr/bin/)
  1. Optionally set a Default Filter
  1. Click Submit

Task 4: Configure Click Flood Protection

Steps:

  1. Navigate to Settings Control Center
  1. In MySQL Setup section, find:
  • Click Flood Limit: Set max click score (e.g., 180)
  • Click Flood Error URL: Where to redirect violators
  • Click Flood White List: IPs exempt from protection
  1. Ensure HTACCESS Path is set correctly
  1. Click Submit

Error Messages & Troubleshooting

Common Errors

Error Message Cause Solution
"Access for this address X.X.X.X is banned" IP not in whitelist Create/update accesscontrol.php
"Web Based Page Editing is disabled" enablepageediting = 0 Set $enablepageediting = 1 in accesscontrol.php
"Passwords do not match" Password confirmation mismatch Enter same password in both fields
"Invalid Thumb Quality" Quality not 1-100 Use a value between 1 and 100
"Invalid Thumbnail Width/Height" Width/height not valid Use 1-3 digit numbers only
"ERROR: Failed to update tblSettings" Database error Check database connection, table exists
"Warning: Failed to write config.inc.php" File permission issue Ensure ct/dat/config.inc.php is writable

Troubleshooting

Problem: Settings not saving
Solution:

  • Verify ct/dat/config.inc.php is writable (644)
  • Check database connection is working
  • Look for SQL errors in the debug output

 

Problem: IP blocked after update
Solution:

  • Edit ct/accesscontrol.php via FTP
  • Add your new IP to the whitelist
  • Refresh the page

 

Problem: Debug messages appearing
Solution:

  • This is normal during development
  • Set Debug Mode to "Debug Off" to hide them

 

Problem: ImageMagick not working
Solution:

  • Verify path is correct (include trailing slash)
  • Test command line: which convert
  • Ensure server has ImageMagick installed

 


Main Dashboard (ct/admin/main.php) - System overviewLicense (ct/admin/license.php) - License management

  • Database Manager (ct/admin/databasemanager.php) - Direct database access

Tips & Best Practices

 

Tip:
Always test after changes: After changing settings, verify your site still works correctly by visiting the frontend.

 

 

Warning:
Backup before major changes: Export your tblSettings table before making significant changes, so you can restore if needed.

 

 

Tip:
Use the quick nav: The jump links at the top save time when editing specific sections.

 

 

Tip:
Keep accesscontrol.php secure: Never set it to 777 permissions. Use 644 and keep your IP list minimal.

 

 

Note:
Password changes update config.inc.php: When you change the admin password, both the database and the config file are updated.

 

 

Tip:
Click Submit frequently: Submit changes section by section rather than making many changes and submitting once.

 


Translatable Strings

The following text elements should be added to backend translations:

Key Default Text
settingscontrolcenter Settings Control Center
configuresitesettings Configure your site settings, database, and system options
mysqlsetup MySQL Setup
siteinformation Site Information
admincontrolsettings Admin Control Settings
operationsettings Operation Settings
pagebuilding Page Building
textlinks Text Links
thumbnails Thumbnails
submissionsettings Submission Settings
scanningsettings Scanning Settings
mysqlhost MySQL Host
mysqldatabase MySQL Database
mysqluser MySQL User
mysqlpassword MySQL Password
adminpassword Admin Password
confirmpassword Confirm Password
updatecomplete Update Complete
passwordsdonotmatch Passwords do not match
invalidthumbquality Invalid Thumb Quality. Must be between 1 and 100.
invalidthumbnailwidth Invalid Thumbnail Width. Must be a number up to 3 digits.
invalidthumbnailheight Invalid Thumbnail Height. Must be a number up to 3 digits.
failedwriteconfig Warning: Failed to write config.inc.php. Check file permissions.
submit Submit
top (top)
accessbanned Access for this address is banned
pageediting_disabled Web Based Page Editing is disabled for this IP
yes Yes
no No
on On
off Off

Changelog

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