ComusThumbz ドキュメント
管理者ログイン

Video Review

Video Administration (video.admin.php)

Overview

The Video Administration page (video.admin.php) is the central hub for managing all video content in ComusThumbz. This comprehensive page provides tools for browsing, searching, filtering, reviewing, and batch processing videos. It features both Card View and List View display modes, advanced filtering capabilities, comprehensive bulk operations, model and category management, analytics dashboard, filter presets, CSV export, and integrated AI review tools.

Location: Navigate to Admin Panel → Videos → Video Admin

[Screenshot: video-admin-main-view]


System Requirements

PHP Extensions Required

Extension Purpose Required
mysqli Database operations Yes
session Session management for filters/preferences Yes
json JSON encoding for JavaScript data and AJAX Yes
gd Image processing for thumbnails Yes
curl URL validation, remote file checks Recommended
mbstring Multi-byte string handling Yes

PHP Functions Required

Function Purpose Notes
fileputcontents() Logging operations Required
fileexists() File checks Required
jsonencode() / jsondecode() Data serialization Required
mkdir() Log directory creation Required

PHP Version

  • Minimum: PHP 8.0+
  • Recommended: PHP 8.2+

php.ini Settings

# For large video collections and batch operations
memorylimit = 256M
maxexecutiontime = 300
maxinputvars = 5000
postmaxsize = 50M

 

Configuration Required:
Performance Note: For sites with 50,000+ videos, increase memorylimit to 512M and consider using List View for faster performance.

 

Folder Permissions Required

Folder Permission Purpose
ct/logs/ 755 Video admin log files
ct/uploads/videos/ 755 Video file storage
ct/uploads/thumbnails/ 755 Thumbnail storage

Installation Requirements

Database Tables Used

The Video Administration page uses the following database tables:

Table Purpose Created By
tblVideos Main video table (all video metadata) Core install
tblCategories Category definitions Core install
tblVideoCategories Multi-category junction table Core install
tblModels Model/performer definitions Core install
tblVideoModels Video-to-model associations Core install
tblVideoThumbnails Video thumbnail records Core install
tblVideoFiles Video file storage locations Core install
tblStorageFileLocations CDN/remote file tracking Phase 10
tblStorageServers Storage server configurations Phase 10
tblContentImpressions Impression tracking Phase 9
tblClickTracking Click analytics Phase 9
tblVideoAdminNotes Admin notes per video video.admin.php (auto-create)
tblVideoAdminPresets Saved filter presets video.admin.php (auto-create)

Auto-Created Tables

The following tables are automatically created if they don't exist:

-- Video Admin Notes Table
CREATE TABLE IF NOT EXISTS tblVideoAdminNotes (
  noteid INT(11) NOT NULL AUTOINCREMENT,
  videoid INT(11) NOT NULL,
  userid INT(11) NOT NULL,
  notetext TEXT NOT NULL,
  priority ENUM('low', 'medium', 'high') DEFAULT 'low',
  createdat DATETIME DEFAULT CURRENTTIMESTAMP,
  updatedat DATETIME DEFAULT CURRENTTIMESTAMP ON UPDATE CURRENTTIMESTAMP,
  PRIMARY KEY (noteid),
  INDEX idxvideoid (videoid),
  INDEX idxuserid (userid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Video Admin Presets Table
CREATE TABLE IF NOT EXISTS tblVideoAdminPresets (
  id INT(11) NOT NULL AUTOINCREMENT,
  user
id INT(11) NOT NULL,
  presetname VARCHAR(100) NOT NULL,
  filters JSON NOT NULL,
  created
at DATETIME DEFAULT CURRENTTIMESTAMP,
  updated
at DATETIME DEFAULT CURRENTTIMESTAMP ON UPDATE CURRENTTIMESTAMP,
  PRIMARY KEY (id),
  INDEX idxuserid (userid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

 

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';
$base
path = '/path/to/ct';


// Video settings (optional but recommended)
$videouploadmax = 5368709120;  // 5GB max upload
$thumbnailwidth = 320;
$thumbnail
height = 180;

 

File Dependencies

PHP Includes:

  • ct/admin/includes/inc.php - Core admin functions
  • ct/admin/adminauth.php - Authentication
  • ct/includes/header.php - Page header
  • ct/admin/includes/videocardfunctions.php - Video card utilities

 

JavaScript Files:

  • ct/admin/css/videocardenhancements.css - Card styling
  • Chart.js (CDN) - Analytics dashboard charts

 

AJAX Endpoints:

  • ct/admin/ajax/savevideofield.php - Field updates
  • ct/admin/ajax/searchmodelsvideo.php - Model search
  • ct/admin/ajax/videoadminnotes.php - Note management

 


Features & UI Elements

Stats Dashboard

[Screenshot: video-admin-stats-dashboard]

Four statistic cards display real-time video counts:

Card Description
Total Videos Complete video count in database
Active Published and active videos
Pending Videos awaiting moderation
Processing Videos being processed

View Toggle & Column Customizer

Button Description
Card View Video cards with thumbnail, all fields visible
List View Compact table format with sortable columns
Customize Columns Opens panel to show/hide and reorder list columns
Analytics Opens analytics dashboard modal
Tip: List View is faster for managing large video libraries. Card View provides better visual context for thumbnail and metadata assessment.

Search & Filter Controls

[Screenshot: video-admin-search-filters]

Search Options

Field Description
Search Input Text to search for
Search In All Fields, Video ID, Title, Description, Filename, Tags, Models
Status All Statuses, Pending, Processing, Active, Error, Deleted
Sort By Date, Title, Engagement, Technical (24 sort options)
Per Page 20, 50, 100, 250, 1000 records per page
Search Button Execute the search

Sort Options

Date Sorting:

  • Newest First (ID), Oldest First (ID)
  • Upload Date (Newest/Oldest)
  • Publish Date (Newest/Oldest)
  • Recently Updated

 

Title Sorting:

  • Title A-Z, Title Z-A

 

Engagement Sorting:

  • Most/Least Views, Most Likes
  • Highest Rated, Most Downloads

 

Technical Sorting:

  • Longest/Shortest Duration
  • Largest/Smallest File Size
  • Highest/Lowest Resolution

 

Category Filters

[Screenshot: video-admin-category-filters]

Displays all categories with checkboxes. When Hide Stats is unchecked, shows:

Color Meaning
[Black] Total videos in category
[Red] Pending videos in category
[Brown] Active videos in category

Model Filter

[Screenshot: video-admin-model-filter]

Type-ahead search for filtering by model name:

  • Case-insensitive search
  • Auto-complete dropdown
  • Click to select and filter

 

Advanced Filters Section

[Screenshot: video-admin-advanced-filters]

Filter Description
Upload Date From/To Date range filter
Video Quality SD, 480p, 720p, HD, 1440p, 4K, 8K, VR
Min/Max Duration Duration range in seconds
Access Type Free, Members, Premium, Paid, Subscription, PPV, Private
Featured Videos Featured Only, Non-Featured Only
HLS Streaming HLS Enabled, HLS Disabled
Resolution Range Min/Max Width and Height
Language Filter by language (12 languages)
Creator Content Creator Videos Only, Exclude Creator Videos
AI Review Status AI Reviewed, Not Reviewed, High Score (≥80), Low Score (<50)

Filter Presets

[Screenshot: video-admin-filter-presets]

Button Description
Save Current Filters Save current filter configuration
Load Saved Preset Dropdown to load previously saved filters
Refresh Refresh presets list
Manage Presets Open modal to rename/delete presets

Search History

Button Description
Search History View recent searches
Save This Search Save current search parameters
Load Saved Search Dropdown to load saved searches
Clear History Clear search history

CSV Export

[Screenshot: video-admin-csv-export]

  • Export to CSV - Export filtered results (max 10,000 records)
  • Includes all visible columns and metadata
  • Downloads as CSV file

Bulk Actions Bar

[Screenshot: video-admin-bulk-actions]

When videos are selected, a sticky bulk actions bar appears:

Primary Actions

Element Description
Selected Count Number of videos selected
Change Status Dropdown: Active, Pending, Processing, Deleted
Apply Status Apply selected status to videos
More Actions Expand additional bulk actions
Apply To Scope: Selected, All Search Results, All in Database
Clear Selection Deselect all videos

Extended Bulk Actions Menu

[Screenshot: video-admin-bulk-actions-expanded]

Action Panel Description
Add Category Add a category to selected videos
Add Tag Add a tag to selected videos
Add Model Search and add model to selected videos
Randomize Views Set random view counts (min-max range)
Randomize Likes Set random like counts (min-max range)
Randomize Rating Set random rating (1-5) and count (min-max)
Schedule Publishing Set random publish dates within range
Toggle Featured Set featured status on/off
Change Access Type Bulk update access type
Warning: Creator Content Warning: When bulk actions affect videos uploaded by creators (linked to creator posts), a warning dialog appears. Modifying creator videos may affect their content and earnings.

Video Card View

[Screenshot: video-card-view-detail]

Each video card contains:

Card Header

  • Checkbox - Select for bulk operations
  • Video ID - Unique identifier
  • AI Review Badge - Shows if AI reviewed (with score)
  • Creator Badge - Shows if uploaded by creator
  • Quick Actions: Edit, View, AI Review, Delete

Preview Section

  • Preview/Thumbnail - Animated preview or poster image
  • Duration - Video length overlay
  • Quality Badge - HD/4K/etc. indicator
  • Play Button - Preview video

Thumbnail Grid

  • Timeline thumbnails from the video
  • Click to set as poster
  • Lightbox view on click

Basic Information Fields

Field Description
Title Editable video title
Description Editable video description
Status Dropdown: pending, processing, active, error, deleted
Access Type Dropdown: free, members, premium, paid, subscription, ppv, private
Featured Checkbox to mark as featured
Publish Date Date/time picker for scheduling

Categories Section

  • Multi-category selector with search
  • Add/remove categories with badges
  • Auto-save on change

Models Section

  • Model search with auto-complete
  • Add/remove models with badges
  • Create new models inline
  • Auto-save on change

Tags Section

  • Current tags displayed as badges
  • Remove tags by clicking ×
  • Add tags via input field
  • Tag suggestions button

Statistics Row

Stat Description
Views Total view count
Likes Total likes
Duration Formatted duration
Resolution Width × Height
FPS Frames per second
Uploaded Upload date
Status Status badge
Access Access type badge

Metrics Row

[Screenshot: video-admin-metrics-row]

Widget Description
Metadata Completeness Progress bar showing metadata score (0-100%)
Engagement Metrics Impressions, Clicks, CTR, Plays
SEO Score Circle indicator with search optimization factors
Admin Notes Notes system with add/view/delete
Scheduling Info Publish countdown, conflict warnings

List View

[Screenshot: video-admin-list-view]

Compact table format with sortable columns:

Default Columns

  • Select, ID, Thumbnail, Title, Status, Duration, Views, Quality, Uploaded, Actions

All Available Columns

  • select, videoid, thumbnail, title, status, duration, categories, tags, models
  • views, impressions, clicks, ctr, likes, rating, quality, uploaddate
  • hls, featured, sponsor, dmca, copyright, reports, actions

Column Customization

Click Customize Columns to:

  1. Check/uncheck columns to show/hide
  2. Drag columns to reorder
  3. Yellow items are mandatory (cannot hide)
  4. Click Apply to save changes
  5. Click Reset to Default to restore

 

Sortable Headers

Click any column header to sort. Arrows indicate:

  • ↑ Ascending order
  • ↓ Descending order

Analytics Dashboard

[Screenshot: video-admin-analytics]

Click Analytics button to open the dashboard modal:

Summary Stats

  • Total Videos, Total Views, Total Duration, Average Rating

Charts

Chart Description
Status Distribution Pie chart of video statuses
Quality Distribution Bar chart of video qualities
Import Mode Distribution Source of videos (upload, embed, hotlink)
Upload Trend Line chart of uploads (last 30 days)
Top Categories Bar chart of top 10 categories
Top Models Bar chart of top 10 models

AJAX Handlers

The page includes numerous AJAX endpoints for real-time updates:

Action Method Purpose
bulkupdatestatus POST Bulk status change
bulkaddcategory POST Add category to videos
bulkaddtag POST Add tag to videos
bulkaddmodel POST Add model to videos
bulkupdateviews POST Randomize view counts
bulkupdatelikes POST Randomize like counts
bulkupdaterating POST Randomize ratings
bulkschedule POST Schedule publish dates
bulktogglefeatured POST Toggle featured status
bulkupdateaccess POST Change access type
exportcsv GET Export to CSV file
getfilterpresets GET Load saved presets
savefilterpreset POST Save new preset
deletefilterpreset POST Delete preset
getanalyticsdata GET Load analytics data
createmodel POST Create new model
getstats GET Get pending count

Step-by-Step Usage

Finding Videos

  1. Navigate to Admin Panel → Videos → Video Admin
  2. Enter search term in the Search field
  3. Select search field (All Fields, Title, etc.)
  4. Optionally select category checkboxes
  5. Optionally configure advanced filters
  6. Click Search

Reviewing Videos

  1. Search for pending videos (select "Pending" status)
  2. For each video card:

   - Review thumbnail and preview    - Set appropriate status (Active/Delete)    - Assign categories using multi-category selector    - Add models if applicable    - Update title and description if needed

  1. Changes auto-save, or click Save All Changes

Bulk Status Change

  1. Select videos using checkboxes
  2. Bulk Actions bar appears at top
  3. Select new status from dropdown
  4. Choose scope (Selected/Search Results/All)
  5. Click Apply Status
  6. Confirm if creator videos detected

Adding Categories to Multiple Videos

  1. Select videos for categorization
  2. Click More Actions to expand menu
  3. In "Add Category" panel, select category
  4. Click Add to Selected
  5. Confirm success toast notification

Scheduling Videos

  1. Select videos to schedule
  2. Click More Actions to expand menu
  3. In "Schedule Publishing" panel:

   - Set Start Date    - Set End Date

  1. Click Apply Schedule
  2. Videos receive random publish dates within range

Using Filter Presets

Save a Preset:

  1. Configure desired filters
  2. Click Save Current Filters
  3. Enter preset name
  4. Click Save

 

Load a Preset:

  1. Select preset from dropdown
  2. Filters automatically apply
  3. Click Search to execute

 

Exporting to CSV

  1. Configure filters to select desired videos
  2. Click Export to CSV
  3. Download starts automatically
  4. Max 10,000 records per export

Troubleshooting

Common Errors

 

Error:
"Authentication required"


Cause: Session expired or not logged in
Solution: Log in again at the admin panel login page

 

 

Error:
"Invalid security token"


Cause: CSRF token mismatch (page stale or opened in multiple tabs)
Solution: Refresh the page and try again

 

 

Error:
"No videos found"


Cause: Search criteria too restrictive
Solution: Clear filters or broaden search terms

 

 

Error:
"Failed to save models"


Cause: Database connection issue or model already exists
Solution: Check database connection; model may already be assigned

 

 

Error:
Videos stuck in "processing" status


Cause: video
processor.php cron job not running
Solution: Verify cron jobs are configured:

/5    * php /path/to/ct/admin/cron/videoprocessor.php

 

Performance Issues

 

Warning:
Page loads slowly with large video library


Solutions:

  1. Use List View instead of Card View
  2. Reduce records per page (20 instead of 100)
  3. Check Hide Stats to skip category counts
  4. Check Hide Filters to collapse filter section
  5. Add database indexes on frequently filtered columns

 

Model Search Not Working

 

Error:
Model autocomplete returns no results


Cause: AJAX endpoint not accessible
Solution:

  1. Check ct/admin/ajax/searchmodelsvideo.php exists
  2. Verify file permissions (755)
  3. Check browser console for JavaScript errors

 


JavaScript Classes

MultiCategorySelector

Handles multi-category selection with search and badges.

ModelSelector

Handles model search, selection, and creation.

VideoAdminNotes

Manages admin notes (add, view, delete) per video.


Translatable Strings

The following strings should be added to backendtranslations.md:

videoadmintitle = "Video Administration"
videoadminsave = "Save All Changes"
videoadmintotal = "Total Videos"
videoadminactive = "Active"
videoadminpending = "Pending"
videoadminprocessing = "Processing"
videoadmincardview = "Card View"
videoadminlistview = "List View"
videoadmincustomize = "Customize Columns"
videoadminanalytics = "Analytics"
videoadminsearch = "Search"
videoadminsearchin = "Search In"
videoadminallfields = "All Fields"
videoadminstatus = "Status"
videoadminsortby = "Sort By"
videoadminperpage = "Per Page"
videoadminexportcsv = "Export to CSV"
videoadminsavefilters = "Save Current Filters"
videoadminloadpreset = "Load Saved Preset"
videoadminmanagepresets = "Manage Presets"
videoadminbulkactions = "Bulk Actions"
videoadminmoreactions = "More Actions"
videoadminapplyto = "Apply to"
videoadminselectedonly = "Selected Videos Only"
videoadminallsearch = "All Videos in Search Results"
videoadminalldatabase = "All Videos in Database"
videoadminclearselection = "Clear Selection"
videoadminchangestatus = "Change Status"
videoadminapplystatus = "Apply Status"
videoadminaddcategory = "Add Category"
videoadminaddtag = "Add Tag"
videoadminaddmodel = "Add Model"
videoadminrandomizeviews = "Randomize Views"
videoadminrandomizelikes = "Randomize Likes"
videoadminrandomizerating = "Randomize Rating"
videoadminschedulepublish = "Schedule Publishing"
videoadmintogglefeatured = "Toggle Featured"
videoadminchangeaccess = "Change Access Type"
videoadminmetadatascore = "Metadata Completeness"
videoadminengagement = "Engagement Metrics"
videoadminseoscore = "SEO Score"
videoadminadminnotes = "Admin Notes"
videoadminscheduling = "Scheduled Publish"
videoadmincreatorwarning = "Creator Content Warning"
videoadminnovideos = "No videos found"
videoadminadjustcriteria = "Try adjusting your search criteria"

Version History

Version Date Changes
3.0 2025-01 Analytics dashboard, filter presets, bulk actions expansion
2.5 2024-12 AI review integration, creator content warnings
2.0 2024-11 Card/List view toggle, column customization
1.5 2024-10 Multi-category, multi-model selectors
1.0 Original Initial video administration