Документация ComusThumbz
Вход для Администратора

Models Bulk Import

Overview

The Models Bulk Import page allows administrators to import multiple model/performer profiles at once from CSV-formatted data. This tool supports comprehensive field mapping through saveable "playlists," automatic profile image downloading, duplicate detection, and asynchronous batch processing with real-time progress tracking.

[Screenshot: models-bulk-import-main-form]


Getting to This Page

  1. Log in to the admin panel at ct/admin/ctlogin.php
  2. In the left sidebar, click Models
  3. Click Bulk Import or navigate directly to ct/admin/modelsbulkimport.php

 

Note:
This page is designed for importing model profile data from external sources, agency databases, or CSV exports. All data is previewed before final import.

 


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 256M 512M For large CSV files
maxexecutiontime 3000 3000 Set internally via iniset
defaultsockettimeout 30 30 Set internally for downloads
maxinputvars 1000 5000 For large field mapping forms
postmaxsize 10M 50M For pasting large CSV data

Required PHP Extensions

Extension Required Purpose
mysqli Yes Database connectivity
session Yes Data passing between fetch/review/save steps
curl Yes Image downloading
json Yes Progress file handling, playlist storage
fileinfo Recommended MIME type detection for images
gd Recommended Image resize functionality

Required PHP Functions

 

Warning:
These functions must NOT be in disablefunctions in php.ini:

 

Function Required For Notes
fileputcontents() Progress tracking, logging Core functionality
filegetcontents() Reading progress files, CSV files Core functionality
rename() Atomic file writes For progress updates
curlinit() Image downloading Profile pictures
curlexec() Executing downloads Profile pictures
mkdir() Creating temp/logs directories First-time setup
touch() Creating log files First-time setup
chmod() Setting permissions First-time setup

Folder Permissions

Folder Path Permission Owner Purpose
ct/admin/temp/ 755 www-data Progress tracking files
ct/logs/ 755 www-data Import logging
ct/uploads/modelimages/ 755 www-data Downloaded profile images

Server Requirements

Component Requirement
Web Server Apache 2.4+ with modrewrite OR Nginx
Database MySQL 5.7+ / MariaDB 10.3+
cURL Required for image downloads

Installation Requirements

Folders Required

Folder Path Permission Created By Notes
ct/admin/temp/ 755 Script (auto-create) Progress tracking files
ct/logs/ 755 Install Script Import logging
ct/uploads/modelimages/ 755 Install Script Profile image storage

External Dependencies

Dependency Type Required Version Notes
Bootstrap 5.3 CDN Yes 5.3.0+ UI framework
Font Awesome 6 CDN Yes 6.5.1+ Icons

Page Layout

Header Section

The page header displays:

  • Title: "Model Bulk Import" with a users icon
  • Breadcrumb: Dashboard > Models > Bulk Import
  • Description: "Import multiple model profiles from CSV data"

 

[Screenshot: models-bulk-import-header]

Playlist Section

The playlist section allows you to save and load field mapping configurations:

Element Description
Load Existing Playlist Dropdown to select and auto-load saved configurations
Playlist Name Input field for naming new playlists
New Button Reset form for new playlist
Save Button Save current mappings to database
Delete Button Remove selected playlist

[Screenshot: models-bulk-import-playlist-section]

 

Tip:
Save commonly used import configurations as playlists to speed up future imports from the same data source.

 

Field Mapping Section

The dynamic field mapping section lets you configure how CSV columns map to database fields:

Element Description
Column Number Sequential column identifier (1, 2, 3...)
Field Select Dropdown to choose which database field this column maps to
Field Description Contextual help showing field purpose and format
Add Column Add another column mapping (max 30)
Remove Column Remove a column mapping row

[Screenshot: models-bulk-import-field-mapping]

Available Field Mappings

# Field Name Description
0 Model Name Performer stage name (required)
1 Alias/Real Name Real name or alternative name
2 Gender Female, Male, Trans, Couple, Non-binary
3 Body Type Slim, Athletic, BBW, Curvy, Petite, MILF
4 Ethnicity Caucasian, Latina, Asian, Ebony, Japanese, Mixed
5 Eye Color Blue, Brown, Green, Hazel, Gray
6 Hair Color Blonde, Brunette, Black, Redhead, Auburn
7 Weight (kg) Weight in kilograms
8 Height (cm) Height in centimeters
9 Age Current age (integer)
10 Date of Birth YYYY-MM-DD format
11 Measurements Bust-Waist-Hips (e.g., 34-24-34)
12 Cup Size A, B, C, D, DD, DDD, E, F, G, H
13 Pubic Hair Shaved, Trimmed, Natural, Landing Strip, Full Bush
14 City Current city
15 Country Current country
16 Tags Comma-separated keywords
17 About Me Biography or description
18 Status Active, Inactive, Retired, Deceased
19 Profile Image URL URL to download profile picture
20 Cover Image URL URL to download cover/banner image
21 Twitter URL Twitter profile link
22 Instagram URL Instagram profile link
23 Website URL Personal website link
24 OnlyFans URL OnlyFans page link
25 Hash System hash for deduplication
26 Rating Initial rating value (1-10)
27 Views Initial view count
28 n/a Ignore this column

Import Options Section

Option Description
Delimiter Field separator character (comma, tab, pipe, etc.)
Status Set all imports to: Active, Inactive, Pending
Check Duplicates Reject entries matching existing model name or hash
Download Images Download profile/cover images from URLs
Resize Images Create standardized thumbnail sizes

[Screenshot: models-bulk-import-options]

Import Data Section

Element Description
Model Data Textarea Paste CSV data, one entry per line
CSV File Path Alternative: server path to CSV file

Features & Functions

Field Mapping Playlists

Purpose: Save and reuse field mapping configurations for repeated imports from the same source.

How to use:

  1. Configure your field mappings using the column dropdowns
  2. Enter a unique name in the "Playlist Name" field
  3. Click Save to store the configuration
  4. Future imports can load this configuration instantly via the dropdown

Playlist data stored:

  • Field mappings (which column = which field)
  • Delimiter setting
  • All import options (status, check duplicates, etc.)

 

 

Tip:
Create separate playlists for different data sources: "Agency A Export", "CamModelDB CSV", "Manual Entry", etc.

 

Duplicate Detection

Purpose: Prevent duplicate model entries from being imported.

Detection methods:

  • Model name comparison (case-insensitive)
  • Hash value comparison (if provided)

 

Behavior:

  • If duplicate found, entry is skipped
  • Log message shows rejection reason
  • Count tracked in duplicates stat

 

Profile Image Download

Purpose: Automatically download model profile and cover images during import.

How it works:

  1. Map a CSV column to field #19 (Profile Image URL) or #20 (Cover Image URL)
  2. During import, each URL is:
  • Downloaded via cURL
  • Saved to ct/uploads/modelimages/
  • Filename: model{id}profile.jpg or model{id}cover.jpg
  • Database updated with local path

 

Warning:
Image download significantly increases import time. For large imports, consider downloading images separately after initial data import.

 

Asynchronous Processing

The import runs asynchronously with real-time progress tracking:

  1. Preview Step: Data is validated and temp files created
  2. Run Step: AJAX call triggers background processing
  3. Status Polling: Frontend polls for progress every 500ms
  4. Progress File: JSON file tracks done/total/logs

Progress tracking files:

  • ct/admin/temp/modelimportprogress.json - Current status
  • ct/admin/temp/modelimportdata - Raw import data
  • ct/admin/temp/modelimportxlat - Field mappings (serialized)
  • ct/admin/temp/modelimportopts.json - Import options

 


Step-by-Step Usage

Task 1: Basic CSV Import

 

Note:
This workflow imports model profiles from simple CSV data with name and basic attributes.

 

Steps:

  1. Navigate to Admin Panel → Models → Bulk Import
  1. Configure field mappings:
  • Column 1: Select "Model Name"
  • Column 2: Select "Gender"
  • Column 3: Select "Country"
  • Click Add Column for additional fields
  1. Paste your CSV data in the textarea:
Jane Doe,Female,United States
   Anna Smith,Female,United Kingdom
   Maria Garcia,Female,Spain
  1. Verify delimiter is set correctly (comma, tab, etc.)
  1. Set Status to "Active" or "Inactive"
  1. Check Check Duplicates to prevent duplicate entries
  1. Click Preview Import
  1. Review the preview table showing parsed data
  1. Click Confirm & Start Import
  1. Monitor real-time progress bar and log messages

Result: Models are added to tblModels with specified status.

[Screenshot: models-bulk-import-progress-screen]

Task 2: Import with Profile Images

Steps:

  1. Add a column mapping for field #19 (Profile Image URL)
  1. Include image URLs in your CSV:
Jane Doe,Female,https://example.com/janeprofile.jpg
   Anna Smith,Female,https://example.com/annaprofile.jpg
  1. Check Download Images option
  1. Run the import

Result: Models are created AND profile images are downloaded and saved locally.

Task 3: Using Saved Playlists

Steps:

  1. Configure all field mappings and options
  1. Enter a playlist name (e.g., "Agency A Export")
  1. Click Save
  1. For future imports, select the playlist from the dropdown
  1. Settings are automatically loaded
  1. Paste new data and proceed with import

Progress Interface

During import, the progress interface displays:

Progress Bar

  • Animated striped bar showing percentage complete
  • Percentage text (e.g., "45%")

Status Line

  • Shows "Processed X of Y" count
  • Indicates "Complete" when finished

Log Panel

  • Scrollable list of import events
  • Color-coded messages:
  • Green: Success messages
  • Yellow: Warnings
  • Red: Errors

Statistics Cards

Card Description
Models Added Total successfully imported
Images Saved Profile images downloaded
Duplicates Skipped duplicate entries
Failed Entries that failed to import

Navigation Buttons

  • Admin Home: Return to dashboard
  • New Import: Start a fresh import

[Screenshot: models-bulk-import-progress-stats]


Error Messages & Troubleshooting

Common Errors

Error Message Cause Solution
"Import data not found" Preview files missing Go back and run Preview step again
"Cannot create temp dir" Permission issue Ensure ct/admin/temp/ is writable (755)
"Duplicate model: Name" Dupe detection triggered Entry exists; disable dupe check or skip
"Missing model name" Required field empty Every row must have a model name
"DB error" Database insert failed Check field lengths, special characters
"Playlist already exists" Duplicate playlist name Choose a different name
"Failed to download image" Image URL unreachable Verify URL is accessible, check network

Troubleshooting

Problem: Import stalls at 0%
Solution:

Check browser console for JavaScript errorsVerify ct/admin/temp/ folder exists and is writable

  • Check ct/logs/modelbulkimport.log for PHP errors

 

Problem: Profile images not saving
Solution:

  • Verify ct/uploads/modelimages/ folder exists with write permissions
  • Check if image URLs are accessible
  • Review log for cURL errors

 

Problem: Progress bar shows but logs are empty
Solution:

  • Session may have expired; re-login
  • Progress JSON file may be corrupted; delete temp files and retry

 


  • Models (ct/admin/models.php) - Manage model records
  • AI Model Data Update (ct/admin/aimodeldataupdate.php) - AI-powered data enhancement

Tips & Best Practices

 

Tip:
Use unique model names: Model name is the primary identifier. Ensure each model has a unique stage name to avoid duplicate issues.

 

 

Tip:
Create playlists for each source: Save time by creating dedicated playlists for each data source you regularly import from.

 

 

Tip:
Test with small batches first: Before importing hundreds of models, test with 5-10 rows to verify field mappings are correct.

 

 

Warning:
Check data encoding: Ensure your CSV file is UTF-8 encoded. Special characters may cause issues with other encodings.

 

 

Tip:
Download images separately: For large imports (100+ models), import basic data first, then run a separate batch to download images.

 


Translatable Strings

The following text elements should be added to backend translations:

Key Default Text
modelbulkimport Model Bulk Import
fieldmappingplaylists Field Mapping Playlists
loadexistingplaylist Load Existing Playlist
playlistname Playlist Name
fieldmappingconfig Field Mapping Configuration
columnsmapped Columns mapped
addcolumn Add Column
importdata Import Data
modeldata Model Data (one entry per line)
delimiter Delimiter
csvfilepath Or Use CSV File (server path)
checkduplicates Check for duplicates
downloadimages Download profile images
status Status
previewimport Preview Import
confirmstartimport Confirm & Start Import
processingimport Processing Model Import
donotclose Please do NOT close this window until complete
modelsadded Models Added
imagessaved Images Saved
duplicatesskipped Duplicates Skipped
adminhome Admin Home
newimport New Import
playlistsaved Playlist saved
playlistloaded Loaded playlist
playlistdeleted Deleted playlist
import_complete Import complete

Changelog

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