Demo Buy Toplist Script
Documentation

πŸ“„Docs for Toplist Script

Install, configure, and run your toplist site. 18 sections covering admin, content, affiliates, and troubleshooting.

Quick start

New to Toplist Script? Upload the files, edit config/config.php, run install/install.php, delete the install folder, and log in at /admin/. Change the default password before you publish anything.

Introduction

A self-hosted PHP CMS built specifically for ranked comparison and affiliate toplist sites.

Toplist Script is a PHP-based toplist CMS for ranked comparison and directory sites. The public site shows a category grid homepage, category listing pages, and individual review pages for each ranked entry. The admin panel handles content, layout, affiliates, analytics, and AI-assisted publishing.

What you get out of the box:

  • Homepage grid layout with drag-and-drop editor
  • Categories and ranked entries (manual sort order)
  • Per-entry review pages with pros, cons, ratings, and thumbnails
  • Affiliate link fields and site-wide outbound tracking
  • Self-hosted analytics (pageviews and outbound clicks)
  • AI Generator for categories and website discovery
  • Light/dark theme, color schemes, popups, and info pages

There is no Composer install and no .env file. Configuration is config/config.php plus a MySQL settings table managed from admin.

Server requirements

What your host needs before you upload the script.

RequirementDetails
PHP8.0 or higher (8.3+ recommended). Uses strict types, PDO, curl, GD
DatabaseMySQL 5.7+ or MariaDB with InnoDB, utf8mb4
Web serverApache with mod_rewrite (or equivalent URL rewriting)
PHP extensionspdo_mysql (required), curl (AI, thumbnails, favicons), gd (image uploads)
Writable foldersassets/images/thumbs/, assets/uploads/, storage/favicons/

Optional: OpenAI API key for AI Generator; ScreenshotOne or Site-Shot keys for thumbnail capture on protected sites.

Installation

From ZIP upload to first admin login β€” typically under five minutes on standard shared hosting.

  1. Upload the script to your web root (e.g. public_html or htdocs/toplist).
  2. Edit config/config.php β€” set DB_HOST, DB_NAME, DB_USER, DB_PASS.
  3. If the site is not in a subfolder, ensure RewriteBase in .htaccess matches your path (default /toplist/).
  4. Visit https://yourdomain.com/install/install.php (adjust path if not in /toplist/).
  5. The installer creates the database from database/schema.sql, seeds sample content if empty, creates default settings, and adds an admin user if none exists.
  6. Delete the install/ folder when installation succeeds.
  7. Log in at /admin/login.php and change the default password immediately.

Default credentials (first install only): username admin, password admin123. Change this under Account β†’ Password before going live.

Example β€” edit before running the installer

// config/config.php
define('DB_HOST', '127.0.0.1');
define('DB_NAME', 'toplist_cms');
define('DB_USER', 'your_db_user');
define('DB_PASS', 'your_db_password');

After updates to the script, run /install/migrate.php once to apply database migrations (v2 through v11).

Configuration

File-based database credentials plus admin-managed site settings.

config/config.php

File path: config/config.php

  • DB_HOST, DB_NAME, DB_USER, DB_PASS β€” database connection
  • APP_NAME, APP_TAGLINE β€” defaults; usually overridden by admin settings
  • BASE_PATH and BASE_URL β€” auto-detected from the request (strips /admin, /install, /api)

Settings table (admin-managed)

Most site behavior is stored in the settings table and edited under Admin β†’ Settings and related Site screens. Key groups:

  • Site identity β€” site name, meta description, contact email, Telegram, social follow URL
  • Outbound link tracking β€” query parameter name (default ref) and value; leave value empty to disable
  • Analytics β€” enable/disable, retention days (7–365)
  • Thumbnails β€” screenshot API keys, proxy list, capture preferences
  • AI β€” OpenAI API key (stored encoded), model selection

Admin panel

Everything you manage after install β€” content, layout, affiliates, and site settings.

URL: {your-site}/admin/

Navigation is grouped into four areas:

GroupScreens
ContentDashboard, Categories, Entries, Reports, Analytics, Layout editor
ToolsAI Generator
SiteSettings, Links, Appearance, Site images, Colors, Homepage, Pages, Info pages, Popups
AccountPassword

Dashboard shows setup health, recent entries, KPIs, and a short analytics chart. Use it to spot missing thumbnails, descriptions, or meta fields before launch.

Reports lists problems visitors submit from entry pages (broken links, outdated info, etc.). Requires the entry_reports table from migrations β€” run install/migrate.php if the screen shows a setup warning.

Top bar actions: View site, + New entry, username menu.

Toplist Script admin Reports inbox with New, Reviewing, Resolved, and Dismissed status filters for visitor-submitted broken link reports
Reports inbox β€” triage visitor-flagged broken links by status.

Categories

Homepage grid blocks β€” each category is a ranked list with its own URL.

Categories are the homepage grid blocks and listing sections (e.g. β€œBest VPNs”, β€œProject management tools”). Each category has its own public URL: /{slug}/

Admin β†’ Categories β†’ Add category

Important fields:

  • Name and Slug β€” public title and URL
  • Description and Intro headline β€” category page copy
  • Icon β€” CSS icon class or emoji
  • Accent / title line / button colors β€” RGB values for the block
  • Grid column (1–4) and Sort order β€” homepage position
  • Visible rows β€” how many entries show on the homepage block
  • Meta title and Meta description β€” SEO for the category page
  • Active β€” hide without deleting
Toplist Script admin Categories screen β€” 14 categories with column, entry count, and status columns
Categories list β€” column position, entry counts, and status in one table.

Entries

Individual ranked sites with reviews, thumbnails, and affiliate outbound links.

Entries are the ranked sites inside a category. Ranking is controlled by Sort order (lower number = higher rank). There is no public voting β€” order is set in admin.

Admin β†’ Entries β†’ + New entry or use the layout editor / AI Generator.

Important fields:

  • Category, Name, Slug
  • URL β€” destination website
  • Affiliate link β€” optional; overrides outbound URL when valid (see Affiliates)
  • Thumbnail β€” auto-captured screenshot or manual upload
  • Description β€” short summary
  • Review content β€” full HTML review (rich editor)
  • Rating, Pros, Cons
  • NEW / Featured badges
  • nofollow on outbound links (default on)
  • Meta title / Meta description
  • Active, Skip snapshot

Public URLs:

  • Review page: /{entry-id}/{slug}/
  • Outbound β€œVisit site” uses affiliate URL when set, otherwise the entry URL

Entries list supports filtering by category, completeness flags (missing thumb, description, review, etc.), drag reorder when filtered to one category, and bulk AI fill.

Layout editor

Drag-and-drop homepage editing on the live site β€” no separate builder screen.

The layout editor is not a separate admin page β€” it runs on the live homepage while you are logged in as admin.

Open it: Admin β†’ Layout editor (or visit the homepage while logged in).

You will see a β€œHomepage layout” bar with:

  • Drag category blocks to reposition and resize on the 4-column grid
  • Drag β Ώ handles on entry rows to reorder rankings
  • Hover entry row β†’ Γ— to remove from the block
  • Category colors β€” bulk overwrite line and button colors
  • Background β€” light/dark page patterns
  • Footer block, social icons, and footer links at the bottom of the page
  • Previews β€” welcome modal, promo bubble, chat widget, and other overlays
  • Save layout β€” commits grid position, visible rows, colors, and entry order

Changes are saved via POST /api/admin-layout.php. Always click Save layout before leaving.

Toplist Script layout editor β€” drag boxes for resizing and reordering homepage category blocks in light theme
Drag boxes on every category block β€” resize columns, reorder rankings, save.

AI Generator

Discover categories, find websites, and enrich copy with OpenAI β€” directly in admin.

Admin β†’ AI Generator (/admin/ai.php)

Setup

Add your OpenAI API key and choose a model (GPT-5.4 mini is recommended in the UI for cost/quality). Test connection, then save.

Categories tab

  1. Discover categories β€” enter topic/niche, language, count (3–20)
  2. Review proposals β€” approve, skip, or regenerate
  3. Enrich with content β€” slug, headline, description, meta fields
  4. Save to site

Entries tab (Website Finder)

  1. Select a category and enter site topic context
  2. AI discovers real URLs, or paste your own URL list
  3. Accept or reject each site
  4. Enrich β€” descriptions, reviews, pros/cons, meta
  5. Save entries β€” optional Publish immediately; thumbnails capture in background

You can also enrich a single category from Category form or fill entry gaps from the Entries list. Prompt chips (e.g. β€œNo AI slop”, β€œKeyword-rich”) adjust generation style.

Affiliate links & tracking

Per-entry partner URLs plus optional site-wide outbound click tagging.

Per-entry affiliate links

On each entry, set Affiliate link to your tracking URL from Impact, CJ, ShareASale, or a direct program. When valid, every β€œVisit site” button uses this URL instead of the plain destination URL.

Affiliate links are marked so site-wide ref tracking is not appended on top of partner URLs (avoids broken double tracking).

Site-wide outbound tracking

Admin β†’ Settings β†’ Site identity β†’ Outbound link tracking

  • Query parameter name β€” default ref
  • Parameter value β€” e.g. your site identifier; leave empty to disable

When enabled, external clicks on category links get ?ref=yourvalue appended client-side. This is separate from affiliate network links and from self-hosted analytics.

Analytics

Built-in pageview and outbound click tracking β€” no third-party script required.

Admin β†’ Analytics β€” self-hosted pageview and click tracking. No Google Analytics required.

  • Enable under Settings β†’ Site identity β†’ Enable analytics tracking
  • Set Raw data retention (7–365 days)
  • View trends for pageviews, outbound clicks, and top pages/entries

Data is collected via POST /api/analytics-collect.php from the front-end. Admin pages are not indexed and use noindex, nofollow.

Toplist Script admin Analytics page showing pageviews, unique visitors, entry clicks, category clicks, outbound clicks, and a traffic trend chart
Pageviews, outbound clicks, and top entries β€” self-hosted, no third-party script.

Appearance, colors & themes

Light/dark mode, color schemes, logos, and UI image overrides.

Light / dark mode

Visitors can toggle light/dark theme. Configure separate background patterns for each mode under Appearance or from the layout editor Background control.

Color schemes

Admin β†’ Colors β€” preset schemes (Classic Orange, Ocean Breeze, Forest Trust, Royal Violet, Ember Sunset, Graphite Pro, etc.) plus per-token overrides for brand, footer, browser chrome, and more.

Toplist Script admin Colors panel with Classic Orange, Ocean Breeze, Forest Trust, Royal Violet, Ember Sunset, and Graphite Pro color scheme presets
Six ready-made color schemes plus per-token overrides for brand and footer colors.

Logos & images

Appearance β€” site logo, mobile logo, favicon, backgrounds, footer banner.
Site images β€” replace UI sprites, badges, OG default image, toggle icons.

Homepage footer block

Admin β†’ Homepage β€” rich HTML footer/FAQ section, gradient colors, bottom bar styling.

Info pages & popups

Legal pages, footer links, and on-site overlays like welcome modals and chat widgets.

Info pages

Admin β†’ Info pages β€” About, FAQ, legal pages at /{slug}/ (routed via route.php). Each page has title, slug, HTML body, and meta fields.

Pages (entry templates)

Admin β†’ Pages β€” entry disclaimer text, mobile toolbar, bottom promo block settings.

Popups

Admin β†’ Popups β€” welcome modal, promo bubble, chat widget, language suggest, review disclaimer, report review, saved drawer, β€œBuy this Script” overlay. Preview from the layout editor Previews menu.

Links

Admin β†’ Links β€” footer social icons, footer link columns, promo/copyright JSON config.

Toplist Script admin Links panel β€” social icons, footer links, and promo and copyright settings with drag-to-reorder rows
Social icons, footer links, and promo/copyright rows β€” drag to reorder, toggle per surface.

SEO

Clean URLs, per-page meta, canonical tags, and Open Graph out of the box.

Built-in SEO features:

  • Clean URLs: /{category-slug}/, /{id}/{entry-slug}/
  • Per-page meta title and meta description on homepage, categories, entries, and info pages
  • <link rel="canonical"> on all public pages
  • Open Graph tags (og:title, og:description, og:url, og:image)
  • BreadcrumbList schema on category pages
  • Configurable nofollow on outbound entry links
  • On-site search (/search.php)
  • Related entries β€” a "Sites like {entry}" module on every review page, linking to other entries in the same category
  • Performance: critical CSS, deferred stylesheets, cache-busted assets
Toplist Script related-entries internal linking module β€” Sites Like Photopea grid of 24+ Creative and Design alternatives
Every review page links to related entries in the same category β€” automatic internal linking.

Not included: automatic XML sitemap generator or robots.txt file β€” add these at server level if needed.

URL structure

How public routes map to pages and JSON APIs.

URLPage
/Homepage (category grid)
/{slug}/Category listing or info page
/{id}/{slug}/Entry review page
/search.php?q=Search results
/admin/Admin dashboard
/json/{slug}/Category entries JSON API

Rewrite rules live in .htaccess. If you deploy to domain root instead of /toplist/, update RewriteBase accordingly.

Updates & migrations

How to safely update the script and apply database changes.

After uploading a new version of the script:

  1. Back up your database and assets/uploads/ folder
  2. Overwrite PHP files (keep config/config.php and uploaded assets)
  3. Visit /install/migrate.php once
  4. Confirm admin dashboard loads and run a quick front-end check

Migrations add features incrementally (entry pros/cons, affiliate URLs, info pages, analytics tables, skip snapshot, etc.).

Troubleshooting

The most common setup issues and where to look first.

ProblemWhat to check
404 on all pages except homepagemod_rewrite enabled; RewriteBase in .htaccess matches install path
Blank page / 500 errorPHP version β‰₯ 8.0; PDO MySQL enabled; check server error log
Database connection failedconfig/config.php credentials; MySQL user privileges on database
Thumbnails not generatingcurl enabled; outbound HTTP allowed; optional screenshot API keys in Settings β†’ Thumbnails
AI Generator errorsOpenAI key saved in AI Generator β†’ Setup; server can reach api.openai.com
Layout changes not savingLogged in as admin; click Save layout; check browser console for API errors
Affiliate links not usedAffiliate URL field valid on entry; clear site ref conflict β€” affiliate links exclude double params automatically

Key files reference

Important paths when debugging or deploying updates.

PathPurpose
config/config.phpDatabase and base URL config
database/schema.sqlFull database schema
install/install.phpOne-time installer
install/migrate.phpMigration runner
.htaccessURL rewriting
admin/login.phpAdmin login
admin/ai.phpAI Generator UI
api/admin-layout.phpLayout editor save API
api/admin-ai.phpAI Generator API
includes/ai.phpAI generation logic
includes/analytics.phpAnalytics rollup logic
Step 2 β€” Get Toplist Script live

Questions after purchase? Email [email protected] with your license email.

Toplist Script product illustration