Gallery Review
Gallery Administration (admin.php)
Overview
The Gallery Administration page (admin.php) is the central hub for managing photo galleries in ComusThumbz. This comprehensive page provides tools for browsing, searching, filtering, reviewing, and batch processing galleries. It features both Card View and List View display modes, advanced filtering capabilities, bulk operations, integrated AI review tools, multi-threading support for background operations, and a full gallery scheduler.
Location: Navigate to Admin Panel → Galleries → Gallery Admin
[Screenshot: gallery-admin-main-view]
System Requirements
PHP Extensions Required
PHP Functions Required
PHP Version
- Minimum: PHP 8.0+
- Recommended: PHP 8.2+
php.ini Settings
# For large galleries and batch operations
memorylimit = 256M
maxexecutiontime = 300
maxinputvars = 10000
postmaxsize = 50M
Performance Note: Multi-threaded operations require sufficient memory. For sites with 10,000+ galleries, increase
memorylimit to 512M.
Folder Permissions Required
Installation Requirements
Database Tables Used
The Gallery Administration page uses the following database tables:
Config Variables Required
From ct/dat/config.inc.php:
// Database connection
$dbhost = 'localhost';
$db = 'admincomus';
$dbuser = 'youruser';
$dbpasswd = 'yourpassword';
// Site paths
$domainname = 'yourdomain.com';
$sitepath = '/ct';
$basepath = '/path/to/ct';
// Thumbnail settings
$wsize = 220; // Default thumbnail width
$hsize = 180; // Default thumbnail height
$minimgsize = 5000; // Minimum image size for auto-thumb
// Threading settings
$threads = 4; // Number of parallel threads for batch ops
// Auto-scan robot settings
$thumbstograb = 10; // Max thumbs to grab per gallery
$aspectratio = 0.75; // Thumbnail aspect ratio
File Dependencies
PHP Includes:
ct/admin/includes/inc.php- Core admin functionsct/includes/scanning.php- URL scanning functionsct/includes/grabthumb.inc.php- Thumbnail grabbingct/admin/autothumb.php- Auto-thumbnail processing
JavaScript:
ct/admin/ajaxgalleryupdate.php- AJAX updatesct/admin/ajaxcategoryupdate.php- Category managementct/admin/ajaxmodelupdate.php- Model management
CSS:
- Inline styles for modern card/list view UI
- Admin green theme styling
Features & UI Elements
Header Controls Bar
[Screenshot: gallery-admin-header-controls]
The sticky header contains primary controls:
Stats Cards
[Screenshot: gallery-admin-stats-cards]
Five statistic cards display real-time gallery counts:
View Toggle & Column Customizer
Search & Filter Controls
[Screenshot: gallery-admin-search-filters]
Search Options
Toggle Controls
Category Filters
[Screenshot: gallery-admin-category-filters]
Displays all categories with checkboxes. When Show Stats is enabled, shows:
Gallery Type Filters
Filter galleries by status and attributes:
Status Filters:
- Waiting, Pending, Approved, Archived
- Blacklisted, Disapproved
Attribute Filters:
- Has Photo / No Photo
- Explicit / Non-Explicit
- 404 / Has 302
- Used, On Site, Reviewed/Unreviewed
- Has Video / No Video
- Not Resizable, In Starters
Special Commands Dropdown
[Screenshot: gallery-admin-special-commands]
Bulk Actions Panel
Located next to Special Commands:
Gallery Scheduler
[Screenshot: gallery-admin-scheduler]
When Show Schedule is enabled, displays a 30/60/90 day calendar grid:
Click a day to filter galleries scheduled for that date.
Gallery Card View
[Screenshot: gallery-card-view-detail]
Each gallery card contains:
Card Header
- Checkbox - Select for bulk operations
- [ID] - Gallery database ID
- Batch AI - Link to AI batch review
- Review AI - AI single gallery analysis
- Quick Actions: Approve (â), Delete (â), URL, Scan, Upload, Blog, Ban
Thumbnail Section
- Gallery thumbnail image (80x60 preview)
- File size indicator
- Configured dimensions display
Control Fields
Statistics Row
- Clks (period clicks), Tot (total clicks), Min (minimum clicks)
- Blds (build periods), Days (periods shown), Used, Rating
- CTR (click-through rate), Reciprocal status
Plus Buttons (+)
Each field has a (+) button to apply that value to ALL galleries on the page.
Use the (+) buttons to quickly apply the same category, model, keywords, or status to multiple galleries during bulk editing sessions.
List View
[Screenshot: gallery-list-view]
Compact table format with sortable columns:
Default Columns
- Checkbox, ID, Thumbnail, Title, Categories, Status
- Vote, Pics, Clicks, Impressions, CTR, Rating
- Reviewed, Explicit, Video, 404, Featured, Date
Column Customization
Click Customize Columns to:
- Check/uncheck columns to show/hide
- Drag columns to reorder
- Yellow items are mandatory (cannot hide)
- Click Apply to save changes
- Click Reset to Default to restore
Sortable Headers
Click any column header to sort. Arrows indicate:
- ↑ Ascending order
- ↓ Descending order
Search & Replace
[Screenshot: gallery-search-replace]
When Search & Replace is enabled:
Available Fields: Category, Clicks, Click Power, CPR, CTR, Date, Description, Email, Explicit, Exposure, EPR, ETR, Has Video, Num Pic, IP, Keywords, Last Modified, Nickname, Desc Two, Title, On Site, On Page, Rating, Recip, Reports, Status, Thumb Height, Thumb Size, Thumb Width, Total Clicks, TPR, URL, Src URL, Used, Vote
Search & Replace operates on ALL galleries matching current filters. Test with a small subset first.
Batch Operations
Scanning Operations
Thumbnail Operations
Metadata Operations
Multi-Threading
Batch operations support multi-threading when $threads > 1 in config:
[Screenshot: gallery-admin-multithreading]
- Displays thread status (Idle, Processing, Completed)
- Shows progress: Total to Process, Started, Finished
- Average speed calculation per gallery
- Supports Ignore User Abort - operations continue after browser close
Multi-threaded operations create control files in
ct/dat/auto/. These are automatically cleaned up on completion.
Export Functions
Export Selected
Exports galleries matching current search criteria to:
Export All
Same formats but exports entire database.
Export Fields
URL, Category, Description, NumPic, Vote, Thumbnail URL, Keywords, Hash, Clicks, Click Periods, Rating, Date, Status, Click Power, Source coords (srcx, srcy, srcw, srch, srcu), Has Video, Explicit, 404 Error, Reviewed, Sponsor Code, Title, Description2, Path As File
Duplicate Removal
The Remove Dupes command:
- Scans all galleries for matching URLs
- Keeps the most recently modified entry
- Deletes older duplicates
- Cleans up model and category associations
- Displays detailed report:
- [R] = Removed
- [S] = Skipped (unique)
Duplicate removal is permanent. Create a database backup before running on large datasets.
AI Integration
Review AI Button
Links to aigalleryreview.php?id={galleryid} for single gallery AI analysis.
Batch AI Button
Links to aibatchreview.php for processing multiple galleries.
Visual Indicators:
- Green with pulse animation = Not yet reviewed
- Red = Already reviewed
See the AI Gallery Review and AI Batch Review user guides for detailed AI features.
Quick Update Functions
AJAX Quick Actions
These use AJAX (admin.php with action=quickupdatestatus) for instant updates without page reload.
JavaScript Functions
setapps(status) // Set all status dropdowns
quickUpdateStatus(id, status, token) // AJAX single update
applyToAll(id, field) // Apply field value to all
toggleCardViewSelectAll(checkbox) // Select/deselect all
Step-by-Step Usage
Finding Galleries
- Navigate to Admin Panel → Galleries → Gallery Admin
- Select search field (All Fields, URL Only, etc.)
- Enter search term
- Optionally select category checkboxes
- Optionally select gallery type filters
- Click Search
Reviewing Galleries
- Search for pending galleries (check "Pending" filter)
- For each gallery:
- Review thumbnail and URL
- Set appropriate status (Approved/Disapproved)
- Assign categories using multi-category selector
- Add models if applicable
- Mark as Explicit if needed
- Click Save Changes
Bulk Approval Workflow
- Search for galleries to review
- Review thumbnails visually
- Use Approve bulk action for acceptable galleries
- Or select individual galleries and use (+) button on status
Scheduling Galleries
- Enable Show Schedule checkbox
- Click a future date on the scheduler
- Or use the date picker on individual gallery cards
- Galleries with future refresh delay appear on scheduled date
Removing Duplicates
- Search for galleries (or select all)
- Select Remove Dupes from Special Commands
- Click Execute
- Review the report showing kept vs. removed entries
- Click link to continue
Exporting Data
- Filter galleries to export (or leave blank for all)
- Select Export or Export All
- Click Execute
- Download from provided links:
export.txt- CSVexport.tar.gz- Compressedexportdata.html- HTML table
Troubleshooting
Common Errors
"Query preparation failed"
Cause: MySQL syntax error or missing table
Solution: Check that all required tables exist. Run database installation script.
"Failed to create directory: ct/dat/auto"
Cause: Permission denied for temp directory
Solution: Set permissions: chmod 775 ct/dat/auto
"Cannot write to file"
Cause: Thread control file write failed
Solution: Check folder permissions for ct/dat/auto/0/ through ct/dat/auto/N/
Multi-threading stuck on "All slots used"
Cause: Thread workers not responding
Solution:
- Clear temp files: Delete all
.thdfiles inct/dat/auto/ - Check that
grabthumb.inc.phpis accessible via web URL - Verify
$domainnameand$sitepathin config
Thumbnails not displaying
Cause: Incorrect $sitepath or missing files
Solution:
- Check
ct/thumbs/folder exists and is readable - Verify thumbnail filenames in database match actual files
- Check
$sitepathconfiguration
Session Issues
Filters not persisting between page loads
Cause: Session not starting or being destroyed
Solution:
- Ensure
sessionstart()called before output - Check PHP session configuration
- Verify session cookie settings
Performance Issues
Page loads slowly with large galleries
Solutions:
- Reduce records per page (use 20 instead of 100)
- Disable Show Stats checkbox
- Use List View instead of Card View
- Add database indexes on frequently filtered columns
AJAX Endpoints
Translatable Strings
The following strings should be added to backendtranslations.md:
galleryadmintitle = "Gallery Administration"
galleryadminsave = "Save Changes"
galleryadminapprove = "Approve"
galleryadmindisapprove = "Disapprove"
galleryadmindelete = "Delete"
galleryadmintotal = "Total Galleries"
galleryadminpending = "Pending Review"
galleryadminapproved = "Approved"
galleryadmindisapproved = "Disapproved"
galleryadminunreviewed = "Unreviewed"
galleryadmincardview = "Card View"
galleryadminlistview = "List View"
galleryadmincustomize = "Customize Columns"
galleryadminsearch = "Search"
galleryadminexecute = "Execute"
galleryadminapplyall = "Apply to All Results"
galleryadminselectall = "Select All on This Page"
galleryadminselectnone = "Select None"
galleryadmininvert = "Invert Selection"
galleryadminselected = "selected"
galleryadminscheduler = "Gallery Scheduler"
galleryadminshowall = "Show All"
galleryadminbulkactions = "Bulk Actions"
galleryadminspecialcommands = "Special Commands"
galleryadmindetailed = "Detailed"
galleryadminbulkreview = "Bulk Review"
galleryadminexport = "Export"
galleryadminexportall = "Export All"
galleryadminremovedupes = "Remove Dupes"
galleryadminreplace = "Replace"
galleryadminscanurls = "Scan URLs"
galleryadminautoscan = "Auto Scan"
galleryadminautothumb = "Auto Thumb"
galleryadminresize = "Resize"
galleryadmin404check = "404 Check"
galleryadmin302check = "302 Check"
Version History
Related Documentation
Turbo Cropper (thumbscan.md) - Manual thumbnail scanning
- AI Gallery Review (aigalleryreview.md) - AI-powered gallery analysis
- AI Batch Review (aibatchreview.md) - Batch AI processing
- Category Management - Category administration
- Model Management - Model/performer administration