$folder, 'name' => $displayName, 'description' => $metadata['description'] ?? '', 'category' => trim($metadata['category'] ?? 'other'), 'order' => $metadata['order'] ?? 999, 'icon' => $icon ]; } // Sort alphabetically by name within categories usort($categories, function($a, $b) { if ($a['category'] !== $b['category']) { // Keep category grouping (game, mods, other) return strcmp($a['category'], $b['category']); } // Sort alphabetically by name (case-insensitive) return strcasecmp($a['name'], $b['name']); }); return $categories; } // Get all categories $categories = getDocCategories($docsDir); // Group by category $grouped = []; foreach ((array)$categories as $cat) { $category = $cat['category']; if (!isset($grouped[$category])) { $grouped[$category] = []; } $grouped[$category][] = $cat; } // Category labels - can be extended via JSON $categoryLabels = [ 'todo' => 'TODO', 'game' => 'Game Servers', 'mods' => 'Mods & Plugins', 'panel' => 'Panel Documentation', 'troubleshooting' => 'Troubleshooting', 'other' => 'Other' ]; // Define category display order $categoryOrder = ['todo', 'panel', 'game', 'mods', 'troubleshooting', 'other']; // Sort categories by defined order uksort($grouped, function($a, $b) use ($categoryOrder) { $posA = array_search($a, $categoryOrder); $posB = array_search($b, $categoryOrder); // If not in order array, put at end if ($posA === false) $posA = 999; if ($posB === false) $posB = 999; return $posA - $posB; }); ?>
Browse our comprehensive documentation for game servers, panel features, and troubleshooting guides.
No documentation available yet. Documentation folders should contain:
index.php - The documentation contentmetadata.json - Category and ordering informationicon.png or icon.jpg - Category icon