"; if (!$online) return $img; return "$img"; } public static function role_badge( $role ) { // Dynamisch aus WBF_Roles — deckt alle Rollen inkl. superadmin ab return WBF_Roles::badge( $role ); } public static function render_prefix( $thread ) { if ( empty($thread->prefix_label) ) return ''; $label = esc_html($thread->prefix_label); $color = esc_attr($thread->prefix_color ?? '#fff'); $bg = esc_attr($thread->prefix_bg ?? '#475569'); return "{$label}"; } public static function render_tags( $tags, $small = false ) { if ( empty($tags) ) return ''; $cls = $small ? 'wbf-tag wbf-tag--sm' : 'wbf-tag'; $out = '
'; } private static function like_btn( $object_id, $type, $count, $liked = false ) { // Keep for thread likes (header area) $cls = $liked ? ' wbf-liked' : ''; return sprintf( '', $cls, $object_id, $type, $count ); } private static function reaction_bar( $object_id, $object_type, $current_user ) { $emojis = WBF_DB::get_allowed_reactions(); $user_id = $current_user ? (int)$current_user->id : 0; $data = WBF_DB::get_reactions($object_id, $object_type, $user_id); $counts = $data['counts']; $mine = $data['mine']; $total = array_sum($counts); $out = ''; return $out; } private static function mod_tools_thread( $thread, $current ) { if (!$current) return ''; // Only show mod bar to users who have at least one mod-level permission $can_pin = WBF_DB::can($current, 'pin_thread'); $can_close = WBF_DB::can($current, 'close_thread'); $can_delete = WBF_DB::can($current, 'delete_thread'); $can_move = WBF_DB::can($current, 'manage_cats'); if ( !$can_pin && !$can_close && !$can_delete && !$can_move ) return ''; $is_archived = $thread->status === 'archived'; $pin_label = $thread->pinned ? ' Entpinnen' : ' Pinnen'; $pin_action = $thread->pinned ? 'unpin_thread' : 'pin_thread'; $arch_action = $is_archived ? 'unarchive_thread' : 'archive_thread'; $arch_label = $is_archived ? ' Wiederherstellen' : ' Archivieren'; // Close/Open only makes sense on non-archived threads $cls_btn = ''; if ( !$is_archived && $can_close ) { $cls_action = $thread->status==='closed' ? 'open_thread' : 'close_thread'; $cls_label = $thread->status==='closed' ? ' Öffnen' : ' Schließen'; $cls_btn = ''; } $move_btn = $can_move ? '' : ''; $del_btn = $can_delete ? '' : ''; return ''; } private static function mod_tools_post( $post_id, $current ) { if (!$current || !WBF_DB::can($current,'delete_post')) return ''; return ''; } // ── Router ──────────────────────────────────────────────────────────────── public static function forum_main( $atts ) { // Server-seitiger Logout-Fallback if (isset($_GET['wbf_do_logout'])) { WBF_Auth::logout(); wp_redirect( wbf_get_forum_url() ); exit; } // ── Wartungsmodus — zentraler Check vor allem anderen ──────────────── $wbf_current_user = WBF_Auth::get_current_user(); $wbf_maint = wbf_get_settings()['maintenance_mode'] ?? '0'; if ( $wbf_maint === '1' ) { $is_staff = $wbf_current_user && WBF_Roles::level($wbf_current_user->role) >= 50; if ( ! $is_staff ) { return self::view_maintenance(); } } if (isset($_GET['forum_members'])) return self::view_members(); // Einladungscode aus URL vorausfüllen if (isset($_GET['wbf_invite'])) { $inv_code = strtoupper(sanitize_text_field($_GET['wbf_invite'])); if (!WBF_DB::verify_invite($inv_code)) { // Ungültiger Code — zeige Meldung ob_start(); ?>description); ?>
Noch keine Threads. Starte die Diskussion!
Thread nicht gefunden.
'; // Kategorie-Zugang prüfen (Gäste + Min-Rolle) $cat6 = WBF_DB::get_category($thread->category_id); if ($cat6 && !self::can_see_category($cur6, $cat6)) { ob_start(); ?>
Gemäß DSGVO Art. 17 (Recht auf Vergessenwerden) kannst du die vollständige Löschung deines Kontos und aller personenbezogenen Daten beantragen.
Deine Beiträge bleiben anonymisiert sichtbar. Direktnachrichten, Likes, Profilinformationen und alle persönlichen Daten werden dauerhaft gelöscht.
Noch keine Beiträge.
content), 0, 130 ) ); $more = mb_strlen( strip_tags($up->content) ) > 130 ? '…' : ''; $is_thread = isset($up->entry_type) && $up->entry_type === 'thread'; $anchor = $is_thread ? '?forum_thread=' . (int)$up->thread_id : '?forum_thread=' . (int)$up->thread_id . '#post-' . (int)$up->id; ?>Noch keine Lesezeichen.
Keine Threads mit diesem Tag.
Wähle eine Konversation aus oder starte eine neue Nachricht.
Keine Ergebnisse.
Ergebnis(se) gefunden.
Gib deine E-Mail ein — wir schicken dir einen Reset-Link.
Keine Mitglieder gefunden.
' . $para . '
'; } } return $out; } } WBF_Shortcodes::init();