$folder, 'name' => $metadata['name'] ?? ucfirst($folder), 'description' => $metadata['description'] ?? '', 'category' => $metadata['category'] ?? 'other', 'order' => $metadata['order'] ?? 999, 'icon' => $icon ]; } // Sort by category, then order, then name usort($categories, function($a, $b) { if ($a['category'] !== $b['category']) { return strcmp($a['category'], $b['category']); } if ($a['order'] !== $b['order']) { return $a['order'] - $b['order']; } // Sort alphabetically by name return strcmp(strtolower($a['name']), strtolower($b['name'])); }); return $categories; } // Get all categories $categories = getDocCategories($docsDir); // Group by category $grouped = []; foreach ($categories as $cat) { $category = $cat['category']; if (!isset($grouped[$category])) { $grouped[$category] = []; } $grouped[$category][] = $cat; } // Category labels - can be extended via JSON $categoryLabels = [ 'game' => 'Game Servers', 'panel' => 'Panel Documentation', 'mods' => 'Mods & Addons', 'troubleshooting' => 'Troubleshooting', 'other' => 'Other' ]; // Sort categories by number of items (fewest to most) uksort($grouped, function($a, $b) use ($grouped) { $countA = count($grouped[$a]); $countB = count($grouped[$b]); if ($countA !== $countB) { return $countA - $countB; // ascending order (fewest first) } return strcmp($a, $b); }); ?>
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