"; 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_tags( $tags, $small = false ) { if ( empty($tags) ) return ''; $cls = $small ? 'wbf-tag wbf-tag--sm' : 'wbf-tag'; $out = '
'; foreach ( $tags as $tag ) { $out .= '' . '' . esc_html($tag->name) . ''; } return $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 = ['👍','❤️','😂','😮','😢','😡']; $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 = '
'; // Summary of existing reactions (clickable) if ($total > 0) { $out .= '
'; foreach ($emojis as $e) { if (!empty($counts[$e])) { $active = ($mine === $e) ? ' wbf-reaction-active' : ''; $out .= ''; } } $out .= '
'; } // Picker trigger (only for logged-in users with 'like' perm) if ($current_user && WBF_DB::can($current_user, 'like')) { $out .= '
' . '' . '
'; foreach ($emojis as $e) { $active = ($mine === $e) ? ' wbf-reaction-active' : ''; $out .= ''; } $out .= '
'; } $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 '
Mod '.( $can_pin ? '' : '').' '.$cls_btn.' '.( $can_close ? '' : '').' '.$move_btn.' '.$del_btn.'
'; } 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; } if (isset($_GET['forum_members'])) return self::view_members(); if (isset($_GET['wbf_reset_token'])) return self::view_reset_password(); if (isset($_GET['forum_thread'])) return self::view_thread(); if (isset($_GET['forum_cat'])) return self::view_category(); if (isset($_GET['forum_profile'])) return self::view_profile(); if (isset($_GET['forum_search'])) return self::view_search(); if (isset($_GET['forum_tag'])) return self::view_tag(); if (isset($_GET['forum_dm'])) return self::view_dm(); return self::view_home(); } // ── HOME ────────────────────────────────────────────────────────────────── private static function view_home() { $current = WBF_Auth::get_current_user(); $tree = WBF_DB::get_categories_tree(); $stats = WBF_DB::get_stats(); $recent = WBF_DB::get_recent_threads(5); ob_start(); ?>

name); ?>

description); ?>

thread_count; ?> post_count; ?> min_role??'member') !== 'member'): ?> min_role)); ?>+
children)): ?>
children as $child): ?>
name); ?> description); ?>
thread_count; ?> post_count; ?> last_thread_title): ?> last_thread_title,0,30)); ?>…
Kategorie nicht gefunden.

'; $page = max(1,(int)($_GET['fp']??1)); $threads = WBF_DB::get_threads($cat->id, $page); $total = WBF_DB::count_threads($cat->id); $pages = ceil($total / 20) ?: 1; $current = WBF_Auth::get_current_user(); $children = WBF_DB::get_child_categories($cat->id); $crumbs = WBF_DB::get_category_breadcrumb($cat); ob_start(); ?>

name); ?>

description); ?>

Noch keine Threads. Starte die Diskussion!

id,$t->id,'thread') : false; ?>
avatar_url,$t->display_name); ?>
pinned): ?> status==='closed'): ?> Geschlossen title); ?>
von display_name); ?> author_role); ?> created_at); ?>
id); echo self::render_tags($row_tags, true); ?>
reply_count; ?> views; ?> id,'thread',$t->like_count,$liked); ?>
1): ?>
id, 1, 50); $arch_count = WBF_DB::count_archived_threads($cat->id); if ($arch_count > 0): ?>
Archivierte Threads
avatar_url,$at->display_name); ?>
Archiviert title); ?>
von display_name); ?> author_role); ?> created_at); ?>
reply_count; ?>
id); ?>
Thread nicht gefunden.

'; global $wpdb; $wpdb->query($wpdb->prepare("UPDATE {$wpdb->prefix}forum_threads SET views=views+1 WHERE id=%d",$id)); $page = max(1,(int)($_GET['tp']??1)); $posts = WBF_DB::get_posts($id,$page,15); $total = WBF_DB::count_posts($id); $pages = ceil($total/15) ?: 1; $current = WBF_Auth::get_current_user(); $cat = WBF_DB::get_category($thread->category_id); $crumbs = $cat ? WBF_DB::get_category_breadcrumb($cat) : []; $t_liked = $current ? WBF_DB::has_liked($current->id,$id,'thread') : false; ob_start(); ?>

pinned): ?> status==='closed'): ?> status==='archived'): ?> Archiviert title); ?>

like_count,$t_liked); ?> reply_count; ?> Antworten views; ?> Views
id, $id, 'thread') : false; $op_can_edit = $current && ((int)$current->id === (int)$thread->user_id || WBF_DB::can($current,'delete_post')); ?>
content); ?>
signature)): ?>
signature)); ?>
id,$post->id,'post') : false; self::render_single_post($post,$current,$p_liked); endforeach; ?>
1): ?>
status==='open'): ?>

Antworten

avatar_url,$current->display_name,44); ?>
0 Zeichen
oder Registrieren um zu antworten.
Dieser Thread ist geschlossen.
id, $post->id, 'post') : false; ?>
user_id); echo self::avatar($post->avatar_url,$post->display_name,52,$p_online); ?> display_name); ?> author_role); ?> author_posts); ?>
Neu
content); ?>
signature)): ?>
signature)); ?>
Profil nicht gefunden.

'; $is_own = $current && $current->id == $profile->id; $user_posts = WBF_DB::get_user_posts( $profile->id, 50 ); ob_start(); ?>
Profil bearbeiten
signature??''); ?>/300
Beiträge

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; ?>
Thread Antwort thread_title, 0, 60) ); ?> cat_name); ?> created_at); ?>

Tag nicht gefunden.

'; $current = WBF_Auth::get_current_user(); $page = max(1,(int)($_GET['fp']??1)); $threads = WBF_DB::get_threads_by_tag($slug, $page, 20); $total = WBF_DB::count_threads_by_tag($slug); $pages = ceil($total/20) ?: 1; ob_start(); ?>

name); ?> Thread

Keine Threads mit diesem Tag.

id,$t->id,'thread') : false; $t_tags = WBF_DB::get_thread_tags($t->id); ?>
avatar_url,$t->display_name); ?>
von display_name); ?> author_role); ?> created_at); ?>
reply_count; ?> views; ?> id,'thread',$t->like_count,$liked); ?>
1): ?>

Alle Tags

Bitte um Nachrichten zu lesen.

Wähle eine Konversation aus oder starte eine neue Nachricht.

Neue Nachricht

= 2 ? WBF_DB::search($query, 40) : []; ob_start(); ?>

Suchergebnisse für „

Keine Ergebnisse.

result_type === 'thread'; $url = $is_thread ? '?forum_thread='.(int)$r->id : '?forum_thread='.(int)$r->id; $preview = esc_html(mb_substr(strip_tags($r->content), 0, 200)); $more = mb_strlen(strip_tags($r->content)) > 200 ? '…' : ''; ?>
Thread Antwort cat_name); ?> avatar_url, $r->display_name, 18); ?> display_name); ?> created_at); ?>
title, 0, 80)); ?>

Ergebnis(se) gefunden.

id) : 0; ?>
Passwort vergessen?

Gib deine E-Mail ein — wir schicken dir einen Reset-Link.

Forum Zugang

(int)$c->parent_id === 0); $children_map = []; foreach ($categories as $c) { if ((int)$c->parent_id > 0) $children_map[$c->parent_id][] = $c; } ?>

Thread verschieben

Beitrag melden

(int)$c->parent_id === 0); $children_map = []; foreach ($categories as $c) { if ((int)$c->parent_id > 0) $children_map[$c->parent_id][] = $c; } ?>

Neuen Thread erstellen

Passwort zurücksetzen

Dieser Link ist ungültig oder abgelaufen. Bitte fordere einen neuen an.
Zurück zum Forum
Bitte um die Mitgliederliste zu sehen.
prepare("WHERE (display_name LIKE %s OR username LIKE %s)", '%'.$search.'%', '%'.$search.'%') : ''; $order = $sort === 'display_name' ? 'ASC' : 'DESC'; $total = (int)$wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}forum_users $where"); $members = $wpdb->get_results($wpdb->prepare( "SELECT id, username, display_name, avatar_url, role, post_count, registered, last_active FROM {$wpdb->prefix}forum_users $where ORDER BY $sort $order LIMIT %d OFFSET %d", $per_page, $offset )); $pages = ceil($total / $per_page) ?: 1; ob_start(); ?>

Mitglieder ()

Zurücksetzen
role); $is_online = WBF_DB::is_online($m->id); ?>
avatar_url, $m->display_name, 64); ?>
display_name); ?>
@username); ?>
role); ?>
post_count); ?> registered)); ?>

Keine Mitglieder gefunden.

1): ?>