Panel/Panel/modules/website/README.md

5.3 KiB

Gameservers.World Website Module

This module is the public Gameservers.World sales and documentation website.

Purpose

  • Keep the public site inside the GSP repository at Panel/modules/website/
  • Remove location-dependent include logic from the old standalone Website/ tree
  • Keep marketing pages working even when billing configuration is missing
  • Centralize URL and filesystem path handling so the site is portable

Structure

Panel/modules/website/
  index.php
  serverlist.php
  docs.php
  login.php
  pricing.php
  locations.php
  support.php
  doc_asset.php
  includes/
    bootstrap.php
    footer.php
    header.php
    navigation.php
    paths.php
  assets/
    css/
    js/
    images/
  pages/
    home.php
    game_servers.php
    documentation.php
    pricing.php
    locations.php
    support.php
  config/
    config.example.php
    pricing.php

URL helpers

The website uses a central bootstrap instead of scattered relative paths.

  • website_url('serverlist.php')
  • website_asset('css/site.css')
  • panel_url()
  • login_url()
  • billing_url('order.php?service_id=1')
  • documentation_url('minecraft')

Billing and database behavior

The public site does not include Panel/modules/billing/includes/config.inc.php directly.

Instead it:

  1. Parses Panel/includes/config.inc.php when present
  2. Parses Panel/modules/billing/includes/config.inc.php when present
  3. Uses the discovered database values only for pages that need catalog data
  4. Falls back cleanly when no usable billing or panel DB config is available

Effects:

  • index.php, docs.php, locations.php, pricing.php, and support.php still load
  • serverlist.php shows a clean fallback message instead of a fatal include error
  • shared navigation never crashes because billing config is missing

Documentation source

Customer documentation is read from the existing billing docs directory:

  • Panel/modules/billing/docs/

This keeps the website portable without duplicating the documentation tree.

Deployment

Preferred Apache approach:

  1. Point the Gameservers.World vhost DocumentRoot to Panel/modules/website
  2. Expose billing separately under /billing/ with an Apache Alias
  3. Set panel_url, login_url, and billing_base_url in config/config.php or config/config.local.php

Example:

<VirtualHost *:80>
    ServerName gameservers.world
    ServerAlias www.gameservers.world
    DocumentRoot /var/www/html/GSP/Panel/modules/website

    <Directory /var/www/html/GSP/Panel/modules/website>
        AllowOverride All
        Require all granted
        DirectoryIndex index.php
    </Directory>

    Alias /billing /var/www/html/GSP/Panel/modules/billing
    <Directory /var/www/html/GSP/Panel/modules/billing>
        AllowOverride All
        Require all granted
        DirectoryIndex index.php
    </Directory>
</VirtualHost>

Alternate front-controller approach:

  • Keep a tiny public index.php outside the repo tree that requires Panel/modules/website/index.php
  • Do not duplicate the full website into a second location

Configuration

  1. Copy config/config.example.php to config/config.php or config/config.local.php
  2. Set:
    • public_base_url
    • billing_base_url
    • panel_url
    • login_url
    • support links
  3. Keep any environment-specific config out of Git

Pricing and Platform Reference

Internal pricing planning remains in:

  • pricing/gameservers_world_pricing_catalog.xlsx

Public website summary values are centralized in:

  • Panel/modules/website/config/pricing.php

Optional environment-specific overrides can be placed in:

  • Panel/modules/website/config/config.php
  • Panel/modules/website/config/config.local.php

Public pricing guidance currently exposes:

  • standard hosting starts at $0.50 per slot
  • selected lightweight legacy servers can start around $4 per month
  • most standard plans use a 16-slot minimum
  • fixed-cap or small co-op games may use different slot limits
  • custom development and complex integration work are quoted separately

Platform wording is also centralized in config/pricing.php so hardware references stay secondary and easy to update. The website should keep customization, legacy-game support, fair pricing, backups, and monitored capacity as the primary sales message. Hardware copy should remain a small platform note rather than a headline feature.

Pages currently displaying pricing or platform summary copy:

  • index.php
  • serverlist.php
  • pricing.php

If pricing or example host details change later:

  1. Update the workbook if it is the internal reference source
  2. Update config/pricing.php with the approved public summary
  3. Override values in config.php or config.local.php only when deployment-specific differences are required
  4. Recheck homepage, server catalog, and pricing page copy for consistency

Verify:

  1. index.php
  2. serverlist.php
  3. docs.php
  4. pricing.php
  5. locations.php
  6. support.php
  7. login.php
  8. header navigation
  9. footer links
  10. mobile navigation
  11. asset URLs
  12. billing_url() destinations

Portability notes

  • No /var/www/html/... filesystem assumptions
  • No gameservers.world/panel assumptions
  • No repeated ../../../ path climbing
  • Internal page links and assets route through helpers
  • Database config is optional for non-catalog pages