// KORRIGIERTE FUNKTION - KINSKI 2 POSITIONEN SPĂ„TER function rss_bulletpoints_humanizer_process($content, $enabled = true, $rate_per_h3 = 1) { rss_bulletpoints_log("🚀 KINSKI 2 POSITIONEN SPĂ„TER - KORRIGIERT"); if (!$enabled) { return $content; } // 1. FINDE KINSKI-TEXT ZUERST $kinski_pattern = '/]*>.*?(?:Klaus-Kinski|sinngemäß).*?<\/p>/is'; if (!preg_match($kinski_pattern, $content, $kinski_match)) { rss_bulletpoints_log("❌ Kein Kinski gefunden"); return $content; } $kinski_full_tag = $kinski_match[0]; preg_match('/]*>(.*?)<\/p>/is', $kinski_full_tag, $content_match); $kinski_content = $content_match[1]; // 2. ERSTELLE KINSKI-BULLET-LISTE $kinski_bullets = create_kinski_bullet_list($kinski_content); // 3. ENTFERNE URSPRĂśNGLICHEN KINSKI $cleaned_kinski = remove_kinski_markers($kinski_full_tag); $content = str_replace($kinski_full_tag, $cleaned_kinski, $content); // 4. FINDE ALLE H3-ABSCHNITTE $h3_sections = preg_split('/(]*>.*?<\/h3>)/', $content, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); // 5. SAMMLE H3-POSITIONEN $h3_positions = array(); foreach ($h3_sections as $index => $section) { if (preg_match('/]*>/', $section)) { $h3_positions[] = $index; } } $total_h3 = count($h3_positions); rss_bulletpoints_log("📊 " . $total_h3 . " H3-Tags gefunden"); // 6. BERECHNE KORREKTE POSITION if ($total_h3 >= 3) { // NEUE FORMEL: Bei 4 H3s → Position 3 (nicht 2!) // Das ist: letzter H3 - 1 = vorletzter H3 $targetS Israel-GrĂĽndung: Ein Weltkrieg als Geburtshilfe eines Staates – Geschichtelerneneinfach.de

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert