pdo(); $userId = $_SESSION['user_id'] ?? null; $error = ''; $info = ''; $search = trim((string)($_GET['q'] ?? '')); $boardSlug = trim((string)($_GET['board'] ?? '')); $communityCfg = require __DIR__ . '/../../../config/community.php'; $community = $pdo ? new \App\Community($pdo, $communityCfg) : null; $access = $pdo ? new \App\CommunityAccess($pdo, $communityCfg) : null; $systemSettings = $pdo ? new \App\SystemSettings($pdo) : null; $forumMaintenanceMode = $systemSettings ? $systemSettings->getBool('forum_maintenance_mode') : false; $isForumAdmin = ($access && $userId) ? $access->canModerateForum((int)$userId) : false; $forumCategories = $community ? $community->listForumCategories() : []; $selectedBoard = ($community && $boardSlug !== '') ? $community->getBoardBySlug($boardSlug) : null; if ($_SERVER['REQUEST_METHOD'] === 'POST' && $community && $access) { $action = (string)($_POST['action'] ?? ''); try { if ($action === 'thread_create') { if (!$userId) { throw new \RuntimeException('Bitte einloggen, um Themen zu erstellen.'); } if ($forumMaintenanceMode && !$isForumAdmin) { throw new \RuntimeException('Die Community ist aktuell im Wartungsmodus. Neue Themen sind vorübergehend deaktiviert.'); } if (!$access->canCreateThread((int)$userId)) { $state = $access->getRestrictionState((int)$userId); throw new \RuntimeException($state['reason'] ?: 'Du darfst aktuell keine Themen erstellen.'); } $community->createThreadInBoard((int)$userId, (string)($_POST['board_slug'] ?? ''), (string)($_POST['title'] ?? ''), (string)($_POST['body'] ?? '')); redirect('/community' . ($boardSlug !== '' ? '?board=' . rawurlencode($boardSlug) : '')); } } catch (\Throwable $e) { $error = $e->getMessage(); } } $threads = $community ? ($search !== '' ? $community->searchThreads($search, 50, $boardSlug !== '' ? $boardSlug : null) : $community->listThreads(50, $boardSlug !== '' ? $boardSlug : null)) : []; ?>
Home / Community /

Community

Fragen stellen, Erfahrungen teilen, Antworten finden und gemeinsam weiterdenken.

Einloggen und schreiben
Die Community ist aktuell im Wartungsmodus. Lesen bleibt möglich, neue Themen und Antworten sind für normale Nutzer vorübergehend deaktiviert.
Thema Antworten Letzte Aktivität
computePoints((int)$t['uid']) : 0.0; $lvl = $community ? $community->membershipLevel($pts) : ['label'=>'','icon'=>'']; $preview = mb_substr((string)$t['body'], 0, 220); ?>

220 ? '…' : '' ?>

Antworten
In diesem Bereich gibt es noch keine Themen.

Themen: Beiträge:
Noch keine Themen

Neueste Themen

Hier siehst du die zuletzt erstellten oder zuletzt aktiven Themen aus der Community.

Thema Antworten Letzte Aktivität
computePoints((int)$t['uid']) : 0.0; $lvl = $community ? $community->membershipLevel($pts) : ['label'=>'','icon'=>'']; $preview = mb_substr((string)$t['body'], 0, 220); ?>

220 ? '…' : '' ?>

Antworten
Keine Themen gefunden.