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; $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 (!$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.

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.