ComusThumbz Documentation
Admin Login

Creator Posts

Creator Posts Administration (creatorpostsadmin.php)

Overview

The Creator Posts Administration page (creatorpostsadmin.php) is the central management interface for all creator-posted content in the ComusThumbz platform. This page allows administrators to browse, filter, moderate, and perform bulk actions on creator posts. It features both Card View and List View display modes, advanced filtering capabilities, bulk status management, and direct integration with creator profiles and media management.

Location: Navigate to Admin Panel → Creators → Creator Posts

[Screenshot: creator-posts-admin-main-view]


System Requirements

PHP Extensions Required

Extension Purpose Required
mysqli Database operations Yes
session Session management, CSRF tokens Yes
json JSON encoding for JavaScript data Yes
mbstring Multi-byte string handling Yes

PHP Functions Required

Function Purpose Notes
randombytes() CSRF token generation PHP 7.0+
jsonencode() Data serialization for JS Required
numberformat() Statistics formatting Required

PHP Version

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

php.ini Settings

# For large post collections
memorylimit = 256M
maxexecutiontime = 120
maxinputvars = 3000
postmaxsize = 10M

 

Configuration Required:
Performance Note: With 50,000+ creator posts, consider increasing memorylimit to 512M and using List View for faster page loads.

 


Installation Requirements

Database Tables Used

Table Purpose Created By
tblCreatorPosts Main posts table (content, status, lock type) Phase 11
tblCreatorProfiles Creator profile data Phase 11
tblCreatorPostMedia Media attachments per post Phase 11
tblCreatorPostComments Post comments Phase 11
tblCreatorProducts Merchandise linked to posts Phase 11
tblCMSUsers User accounts Core install
tblCMSUserProfiles Extended user profiles Core install

Config Variables Required

From ct/dat/config.inc.php:

// Database connection
$dbhost = 'localhost';
$db = 'admincomus';
$dbuser = 'youruser';
$dbpasswd = 'yourpassword';

// Site paths (for avatar URLs)
$domain = 'yourdomain.com';
$sitepath = '/ct';

 

File Dependencies

PHP Includes:

  • ct/admin/adminauth.php - Authentication
  • ct/dat/config.inc.php - Database configuration
  • ct/includes/header.php - Page header
  • ct/includes/annotateftr.php - Page footer

 

External CSS:

  • Font Awesome 6.5.1 (CDN) - Icons

 


Features & UI Elements

Stats Dashboard

[Screenshot: creator-posts-stats-dashboard]

Six statistic cards display real-time post counts:

Card Description
Total Posts Complete post count in database
Active Posts Published and active posts
Total Views Cumulative views across all posts
Total Likes Cumulative likes across all posts
Merchandise Posts Posts with linked products
Total Comments Comment count across all posts

Filter Controls

[Screenshot: creator-posts-filter-controls]

Filter Options
Creator Search Search by creator username or display name
Post Type All Types, Text, Image, Video, Audio, Mixed
Lock Type All Lock Types, Free, Paid, Subscribers Only
Status All Status, Active, Suspended, Deleted
Merchandise All Posts, Merchandise Only, No Merchandise
Sort By Newest First, Oldest First, Most Views, Most Likes
Search Full-text search in post content
Per Page 20, 50, 100 records per page

Bulk Actions Bar

[Screenshot: creator-posts-bulk-actions]

Element Description
Bulk Actions Dropdown Activate Selected, Suspend Selected, Delete Selected
Apply Button Execute selected bulk action
Select All Select all posts on current page
Deselect All Clear all selections
Selected Count Shows number of selected posts
Warning: Bulk actions affect ALL selected posts. The "Delete" action sets status to 'deleted' - it does not permanently remove records from the database.

View Toggle

Button Description
Card View Visual cards with thumbnails and full details
List View Compact table format with sortable columns

Column Customization (List View)

[Screenshot: creator-posts-column-customizer]

Click to expand the column customizer accordion:

Feature Description
Drag to Reorder Drag column items to change order
Check/Uncheck Show/hide columns
Yellow Items Mandatory columns (cannot hide)
Apply Button Save column configuration
Reset to Default Restore default column layout

Available Columns:

  • Select (mandatory), Post ID, Creator (mandatory), Content (mandatory)
  • Type, Lock Type, Status (mandatory), Media Count
  • Views, Likes, Comments, Created Date, Actions (mandatory)

Post Card View

[Screenshot: creator-posts-card-detail]

Each post card displays:

Card Header

  • Checkbox - Selection for bulk actions
  • Creator Avatar - Profile image with green border
  • Creator Name - Display name with verified badge (✓)
  • Username - @username format
  • Lock Badge - FREE (green), PAID (yellow), SUBSCRIBERS (blue)
  • Status Badge - ACTIVE (green), SUSPENDED (red), DELETED (gray)

Card Content

  • Post text content (truncated to 150 characters)
  • "No text content" indicator for media-only posts

Card Metadata

Field Description
ID Post database ID
Type Post type (Text, Image, Video, Audio, Mixed)
Media Number of media files attached
Comments Comment count
Views View count
Likes Like count
Created Creation date
Price Unlock price in tokens (paid posts only)
Pinned Pin indicator (if pinned)
Merchandise Product name and price (if hasproduct)

Card Actions

Button Description
View Media Opens Creator Media Admin filtered by post
View Comments Opens post comments page (if comments exist)
API View Opens API endpoint for post data
View Creator Opens creator's user details page

List View

[Screenshot: creator-posts-list-view]

Compact table format with:

Default Columns

  • Select, Post ID, Creator, Content, Type, Lock Type, Status, Views, Likes, Created, Actions

Table Features

  • Sortable columns (client-side)
  • Truncated content with ellipsis
  • Creator avatar thumbnails
  • Verified badge indicators
  • Color-coded status and lock type badges

Step-by-Step Usage

Finding Posts by Creator

  1. Navigate to Admin Panel → Creators → Creator Posts
  2. Enter creator username or name in "Creator Search" field
  3. Click Filter
  4. View matching posts

Moderating Posts

  1. Search for posts to review
  2. Review post content and media
  3. For each post needing action:
  • Check the checkbox to select
  • Or use quick actions in card footer
  1. Select bulk action (Activate/Suspend/Delete)
  2. Click Apply

Filtering by Lock Type

  1. Open the page
  2. Select lock type from dropdown:
  • Free - Posts available to all users
  • Paid - PPV posts requiring token purchase
  • Subscribers Only - Posts for subscribers only
  1. Click Filter

Viewing Post Media

  1. Find the post you want to inspect
  2. Click View Media button
  3. Opens creatormediaadmin.php?postid={id}
  4. All media for that post displayed

Customizing List View Columns

  1. Switch to List View
  2. Click accordion header "Customize List Columns"
  3. Check/uncheck columns to show/hide
  4. Drag columns to reorder
  5. Click Apply
  6. Settings saved to localStorage

Bulk Actions

Activate Selected

Sets status to 'active' for all selected posts. Posts become visible to users.

Suspend Selected

Sets status to 'suspended' for all selected posts. Posts hidden from users but retained in database.

Delete Selected

Sets status to 'deleted' for all selected posts. Soft delete - records remain in database.

 

Note:
All bulk actions are protected by CSRF tokens. Invalid tokens will be rejected with "Invalid CSRF token" error.

 


Troubleshooting

Common Errors

 

Error:
"Invalid CSRF token"


Cause: Session expired or page opened in multiple tabs
Solution: Refresh the page and try again

 

 

Error:
"Connection failed"


Cause: Database connection error
Solution: Verify database credentials in ct/dat/config.inc.php

 

 

Error:
Posts not appearing after filter


Cause: Filter criteria too restrictive
Solution: Click Reset to clear all filters

 

 

Error:
Avatar images not loading


Cause: Incorrect $sitepath or $domain configuration
Solution: Verify paths in config.inc.php match your installation

 

Performance Issues

 

Warning:
Page loads slowly with many posts


Solutions:

  1. Use List View instead of Card View
  2. Reduce records per page (20 instead of 100)
  3. Add specific filters to narrow results
  4. Ensure database indexes exist on tblCreatorPosts

 


JavaScript Features

LocalStorage Keys

Key Purpose
creatorpostsview Stores view preference (card/list)
creatorpostscolumns Stores column configuration for list view

Client-Side Functions

Function Purpose
setView(mode) Toggle between card and list views
toggleAccordion() Expand/collapse column customizer
applyColumnSettings() Save and apply column configuration
resetColumnSettings() Reset to default columns
renderDynamicTable() Render list view table based on settings
updateSelectedCount() Update selection counter

Translatable Strings

The following strings should be added to backendtranslations.md:

creatorpostsadmintitle = "Creator Posts Management"
creatorpostsadminbreadcrumb = "Creator Posts"
creatorpoststotal = "Total Posts"
creatorpostsactive = "Active Posts"
creatorpostsviews = "Total Views"
creatorpostslikes = "Total Likes"
creatorpostsmerchandise = "Merchandise Posts"
creatorpostscomments = "Total Comments"
creatorpostsfilter = "Filter"
creatorpostsreset = "Reset"
creatorpostssearchcreator = "Search by creator username or name..."
creatorpostsalltypes = "All Types"
creatorpostsalllock = "All Lock Types"
creatorpostsallstatus = "All Status"
creatorpostsallposts = "All Posts"
creatorpostsmerchandiseonly = "Merchandise Only"
creatorpostsnomerchandise = "No Merchandise"
creatorpostsnewest = "Newest First"
creatorpostsoldest = "Oldest First"
creatorpostsmostviews = "Most Views"
creatorpostsmostlikes = "Most Likes"
creatorpostssearch = "Search posts..."
creatorpostsbulkactions = "Bulk Actions"
creatorpostsactivate = "Activate Selected"
creatorpostssuspend = "Suspend Selected"
creatorpostsdelete = "Delete Selected"
creatorpostsapply = "Apply"
creatorpostsselectall = "Select All"
creatorpostsdeselectall = "Deselect All"
creatorpostsselected = "post(s) selected"
creatorpostscardview = "Card View"
creatorpostslistview = "List View"
creatorpostscustomizecolumns = "Customize List Columns"
creatorpostsviewmedia = "View Media"
creatorpostsviewcomments = "View Comments"
creatorpostsviewcreator = "View Creator"
creatorpostsapiview = "API View"
creatorpostsnoposts = "No posts found"
creatorpostsadjustfilters = "Try adjusting your filters or search criteria."
creatorpostsshowing = "Showing"
creatorpostsof = "of"
creatorpostsposts = "posts"

Version History

Version Date Changes
1.0 2024-11 Initial release with Task 11.3.2
1.1 2024-12 Added Card/List view toggle, column customization
1.2 2025-01 Added merchandise post support, product display