S// MODUL 18 - KINSKI ZITATE - NUR IM VORLETZEN ABSATZ if (isset($rates['module_18']) && $rates['module_18'] > 0) { $kinski_file = plugin_dir_path(__FILE__) . 'zitate-kinski.txt'; $kinski_quotes = []; if (file_exists($kinski_file)) { $file_content = file_get_contents($kinski_file); if ($file_content !== false) { $file_content = str_replace(["\r\n", "\r"], "\n", $file_content); $lines = explode("\n", $file_content); foreach ($lines as $line) { $line = trim($line); if (!empty($line) && strlen($line) > 50) { $kinski_quotes[] = $line; } } } } if (!empty($kinski_quotes)) { // Ermittle alle Absatz-Endpositionen $paragraph_end_positions = []; $offset = 0; while (($pos = strpos($text, '

', $offset)) !== false) { $paragraph_end_positions[] = $pos; $offset = $pos + 4; } $paragraph_count = count($paragraph_end_positions); // Prüfe ob genügend Absätze vorhanden sind // Schütze Absätze 0, 1, 2, 3 und den letzten - benötigen mindestens 6 Absätze if ($paragraph_count >= 6) { // Berechne den vorletzten Absatz (paragraph_count - 2) $penultimate_paragraph_index = $paragraph_count - 2; // Hole einen zufälligen Kinski-Zitat $global_quote_counter = get_option('kinski_quote_counter', 0); $quote_index = $global_quote_counter % count($kinski_quotes); $random_quote = $kinski_quotes[$quote_index]; $global_quote_counter++; // Erstelle das Kinski-Zitat Element $h3_title = "⚔️ Triggert mich wie der Directors Cut vom Irrsinn"; $emoji = "🔥"; $kinski_paragraph = '

' . $h3_title . ' ' . $emoji . '

' . $random_quote; // Füge das Zitat nach dem vorletzen Absatz ein $insert_position = $paragraph_end_positions[$penultimate_paragraph_index] + 4; $text = substr_replace($text, $kinski_paragraph, $insert_position, 0); // Aktualisiere den globalen Counter update_option('kinski_quote_counter', $global_quote_counter); } } } FritzBox-Update: Wenn die Technik endlich aufhört zu trödeln! 🚀 – Muhsin.de


Fatal error: Uncaught ArgumentCountError: 6 arguments are required, 2 given in /var/customers/webs/Muhsin/muhsin.de/wp-content/themes/minformatik/lib/breadcrumb-trail/inc/breadcrumbs.php:253 Stack trace: #0 /var/customers/webs/Muhsin/muhsin.de/wp-content/themes/minformatik/lib/breadcrumb-trail/inc/breadcrumbs.php(253): sprintf() #1 /var/customers/webs/Muhsin/muhsin.de/wp-content/themes/minformatik/lib/breadcrumb-trail/inc/breadcrumbs.php(43): Breadcrumb_Trail->trail() #2 /var/customers/webs/Muhsin/muhsin.de/wp-content/themes/minformatik/inc/template-functions.php(321): breadcrumb_trail() #3 /var/customers/webs/Muhsin/muhsin.de/wp-content/themes/minformatik/inc/template-functions.php(282): covernews_get_breadcrumb_trail() #4 /var/customers/webs/Muhsin/muhsin.de/wp-includes/class-wp-hook.php(324): covernews_get_breadcrumb() #5 /var/customers/webs/Muhsin/muhsin.de/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #6 /var/customers/webs/Muhsin/muhsin.de/wp-includes/plugin.php(517): WP_Hook->do_action() #7 /var/customers/webs/Muhsin/muhsin.de/wp-content/themes/minformatik/header.php(41): do_action() #8 /var/customers/webs/Muhsin/muhsin.de/wp-includes/template.php(810): require_once('...') #9 /var/customers/webs/Muhsin/muhsin.de/wp-includes/template.php(745): load_template() #10 /var/customers/webs/Muhsin/muhsin.de/wp-includes/general-template.php(48): locate_template() #11 /var/customers/webs/Muhsin/muhsin.de/wp-content/themes/minformatik/single.php(10): get_header() #12 /var/customers/webs/Muhsin/muhsin.de/wp-includes/template-loader.php(106): include('...') #13 /var/customers/webs/Muhsin/muhsin.de/wp-blog-header.php(19): require_once('...') #14 /var/customers/webs/Muhsin/muhsin.de/index.php(17): require('...') #15 {main} thrown in /var/customers/webs/Muhsin/muhsin.de/wp-content/themes/minformatik/lib/breadcrumb-trail/inc/breadcrumbs.php on line 253