Sin resultados críticos
No hemos encontrado eventos que coincidan con estos criterios. Intenta expandir tu búsqueda o limpiar los filtros.
Reiniciar Inteligenciaglobal $mysqli, $DBprefix, $gth_config, $page_url, $hub_root_path, $root_path, $view_node_id, $view_hilo_id, $view_cat_id, $view_tag_id, $view_medio_id, $view_author, $view_date, $view_multimedia, $search_query, $view_hour, $user_current_id, $json_ld; // Base URLs y Configuraciones Estrellas de Indexación $canonical_url = $page_url . "index.php?mod=Hub"; $amp_url = $canonical_url . "&=1"; $seo_title = $gth_config['default_seo_title']; $seo_desc = $gth_config['default_seo_desc']; $seo_image = $page_url . "incspt/compartir-facebook.png"; $seo_robots = "index,follow,max-image-preview:large"; // Reconstruir canónica por defecto $base_params = ['mod' => 'Hub']; if (isset($_GET['p']) && (int) $_GET['p'] > 1) { $base_params['p'] = (int) $_GET['p']; if ((int) $_GET['p'] > 5) $seo_robots = "noindex,follow"; } $canonical_url = $page_url . "index.php?" . http_build_query($base_params); $is_filtered = ($view_cluster_id || $view_hilo_id || $view_cat_id || $view_tag_id || $view_medio_id || $view_author || $view_date || $view_multimedia || !empty($search_query)); // --- MOTOR DE BREADCRUMBS INTELIGENTES --- $breadcrumb_data = [ ['name' => 'Inicio', 'item' => $page_url, 'icon' => 'fa-house'], ['name' => 'Hub', 'item' => $page_url . "index.php?mod=Hub", 'icon' => 'fa-newspaper'] ]; if ($view_node_id) { $node_res = $mysqli->query("SELECT n.*, m.nombre as medio_nombre, c.nombre as cat_nombre, h.nombre as hilo_nombre, (SELECT COUNT(DISTINCT IFNULL(cluster_id, id)) FROM {$DBprefix}Hub_noticias WHERE hilo_id = n.hilo_id AND estado_hub != -1) as hilo_count FROM {$DBprefix}Hub_noticias n LEFT JOIN {$DBprefix}Hub_medios m ON n.medio_id = m.id LEFT JOIN {$DBprefix}Hub_categorias c ON n.categoria_id = c.id LEFT JOIN {$DBprefix}Hub_hilos h ON n.hilo_id = h.id WHERE n.id = $view_node_id AND n.estado_hub != -1"); $node = $node_res->fetch_assoc(); if ($node && !empty($node['hilo_id']) && (int) $node['hilo_count'] < 2) { $mysqli->query("UPDATE {$DBprefix}Hub_noticias SET hilo_id = NULL WHERE hilo_id = {$node['hilo_id']}"); $mysqli->query("DELETE FROM {$DBprefix}Hub_hilos WHERE id = {$node['hilo_id']}"); $node['hilo_id'] = null; $node['hilo_count'] = 0; $node['hilo_nombre'] = null; } if ($node) { if (!isset($brain)) { require_once $hub_root_path . 'incspt/brain.php'; $brain = new GTH_Brain($mysqli, $DBprefix); } $session_id = session_id(); $user_id = $user_current_id ?? null; if (isset($brain->ext)) { $brain->ext->track_reading_behavior($node['id'], $user_id, $session_id, 0, 0); $recommendations = $brain->ext->get_personalized_recommendations($user_id, $session_id, 5); $story_timeline = $brain->ext->build_story_timeline($node['id']); $entities = $brain->ext->extract_named_entities($node['titulo'] . " " . $node['sumario']); } $seo_title = $node['titulo'] . " | Global Trend Hub"; $seo_desc = mb_strimwidth(strip_tags($node['sumario'] ?? $node['contenido_limpio'] ?? ''), 0, 155, "..."); $seo_image = resolve_hub_image($node['foto_destacada'], $page_url); $canonical_url = $page_url . "index.php?mod=Hub&view_nota=" . $view_node_id; $amp_url = $canonical_url . "&=1"; $json_ld = [ "@context" => "https://schema.org", "@type" => "NewsArticle", "headline" => htmlspecialchars($node['titulo']), "image" => [htmlspecialchars($seo_image)], "datePublished" => date('c', strtotime($node['fecha_origen'] ?? 'now')), "dateModified" => date('c', strtotime($node['fecha_registro_hub'] ?? $node['fecha_origen'] ?? 'now')), "author" => ["@type" => "Person", "name" => htmlspecialchars($node['autor'] ?: "Redacción GTH")], "publisher" => ["@type" => "Organization", "name" => "Global Trend Hub", "logo" => ["@type" => "ImageObject", "url" => htmlspecialchars($page_url . "favicon.ico")]], "mainEntityOfPage" => ["@type" => "WebPage", "@id" => htmlspecialchars($canonical_url)], "url" => htmlspecialchars($canonical_url) ]; $breadcrumb_data[] = ['name' => ($node['cat_nombre'] ?: "Noticia"), 'item' => $page_url . "index.php?mod=Hub&cat=" . $node['categoria_id'], 'icon' => 'fa-folder-open']; if (!empty($node['hilo_id'])) { $breadcrumb_data[] = ['name' => $node['hilo_nombre'], 'item' => $page_url . "index.php?mod=Hub&hilo=" . $node['hilo_id'], 'icon' => 'fa-timeline', 'badge' => 'Historia']; } $dynamic_badge = 'Lectura Recomendada'; if (($node['es_contenido_completo'] ?? 0)) $dynamic_badge = ' Cobertura Completa'; elseif (($node['cluster_id'] ?? 0)) $dynamic_badge = ' Multiperspectiva'; elseif (($node['sentimiento'] ?? '') == 'negativo') $dynamic_badge = ' Alerta Crítica'; elseif (($node['likes'] ?? 0) > 10) $dynamic_badge = ' Tendencia Viral'; $breadcrumb_data[] = ['name' => mb_strimwidth($node['titulo'], 0, 30, '...'), 'item' => $canonical_url, 'icon' => 'fa-file-lines', 'badge' => $dynamic_badge]; } else { http_response_code(404); header("X-Robots-Tag: noindex", true); $seo_title = "Noticia no encontrada | Global Trend Hub"; $seo_desc = "El contenido que buscas ya no se encuentra disponible o fue removido."; } } elseif ($view_hilo_id) { $hilo_res = $mysqli->query("SELECT nombre, descripcion FROM {$DBprefix}Hub_hilos WHERE id = $view_hilo_id"); $h_data = $hilo_res ? $hilo_res->fetch_assoc() : null; if ($h_data) { $h_name = $h_data['nombre']; $seo_title = "Narrativa: $h_name | Global Trend Hub"; $seo_desc = ($h_data['descripcion'] ?? '') ?: "Sigue la evolución cronológica y los hilos de la historia sobre $h_name."; $canonical_url = $page_url . "index.php?mod=Hub&hilo=" . $view_hilo_id . (isset($_GET['p']) ? "&p=" . (int) $_GET['p'] : ""); $amp_url = $canonical_url . "&=1"; $breadcrumb_data[] = ['name' => $h_name, 'item' => $canonical_url, 'icon' => 'fa-timeline', 'badge' => 'Historia']; } else { http_response_code(404); $seo_title = "Historia no encontrada | Global Trend Hub"; header("X-Robots-Tag: noindex", true); } } elseif ($view_cat_id) { $first_cat = is_array($view_cat_id) ? reset($view_cat_id) : $view_cat_id; $cat_res = $mysqli->query("SELECT nombre FROM {$DBprefix}Hub_categorias WHERE id = " . (int) $first_cat); $cat_data = $cat_res ? $cat_res->fetch_assoc() : null; $cat_name = $cat_data['nombre'] ?? 'Categoría'; if (is_array($view_cat_id) && count($view_cat_id) > 1) $cat_name .= " y " . (count($view_cat_id) - 1) . " más"; $seo_title = "Tendencias en $cat_name | Global Trend Hub"; $cat_param = is_array($view_cat_id) ? implode('&cat[]=', $view_cat_id) : $view_cat_id; $canonical_url = $page_url . "index.php?mod=Hub&cat=" . $cat_param . (isset($_GET['p']) ? "&p=" . (int) $_GET['p'] : ""); $amp_url = $canonical_url . "&=1"; $breadcrumb_data[] = ['name' => $cat_name, 'item' => $canonical_url, 'icon' => 'fa-layer-group', 'badge' => 'Tendencia']; } elseif ($view_tag_id) { $first_tag = is_array($view_tag_id) ? reset($view_tag_id) : $view_tag_id; $tag_res = $mysqli->query("SELECT nombre FROM {$DBprefix}Hub_etiquetas WHERE id = " . (int) $first_tag); $tag_data = $tag_res ? $tag_res->fetch_assoc() : null; $tag_name = $tag_data['nombre'] ?? 'Tag'; if (is_array($view_tag_id) && count($view_tag_id) > 1) $tag_name .= " (Mix)"; $seo_title = "Explorar #$tag_name | Global Trend Hub"; $tag_param = is_array($view_tag_id) ? implode('&tag[]=', $view_tag_id) : $view_tag_id; $canonical_url = $page_url . "index.php?mod=Hub&tag=" . $tag_param . (isset($_GET['p']) ? "&p=" . (int) $_GET['p'] : ""); $amp_url = $canonical_url . "&=1"; $breadcrumb_data[] = ['name' => "#" . $tag_name, 'item' => $canonical_url, 'icon' => 'fa-hashtag', 'badge' => 'Viral']; } elseif ($view_author) { $seo_title = "Artículos de $view_author | Global Trend Hub"; $author_param = is_array($view_author) ? implode('&author[]=', array_map('urlencode', $view_author)) : urlencode($view_author ?? ''); $canonical_url = $page_url . "index.php?mod=Hub&author=" . $author_param . (isset($_GET['p']) ? "&p=" . (int) $_GET['p'] : ""); $amp_url = $canonical_url . "&=1"; $breadcrumb_data[] = ['name' => "Autor: " . $view_author, 'item' => $canonical_url, 'icon' => 'fa-user-pen', 'badge' => 'Verificado']; } elseif ($view_date) { $seo_title = "Archivo: " . date('d M, Y', strtotime($view_date)) . ($view_hour !== null ? " " . sprintf('%02d:00', $view_hour) : "") . " | Global Trend Hub"; $canonical_url = $page_url . "index.php?mod=Hub&date=" . $view_date . ($view_hour !== null ? "&h=" . $view_hour : "") . (isset($_GET['p']) ? "&p=" . (int) $_GET['p'] : ""); $seo_robots = "noindex,follow"; $breadcrumb_data[] = ['name' => date('d M, Y', strtotime($view_date)) . ($view_hour !== null ? " " . sprintf('%02d:00', $view_hour) : ""), 'item' => $canonical_url, 'icon' => 'fa-calendar-day', 'badge' => 'Archivo']; } elseif (!empty($search_query)) { $search_display = is_array($search_query) ? implode(', ', array_map('htmlspecialchars', $search_query)) : htmlspecialchars($search_query); $search_param = is_array($search_query) ? implode('&q[]=', array_map('urlencode', $search_query)) : urlencode($search_query); $seo_title = "Resultados para: " . strip_tags($search_display) . " | Global Trend Hub"; $canonical_url = $page_url . "index.php?mod=Hub&q=" . $search_param . (isset($_GET['p']) ? "&p=" . (int) $_GET['p'] : ""); $seo_robots = "noindex,follow"; $breadcrumb_data[] = ['name' => "Búsqueda: " . $search_display, 'item' => $canonical_url, 'icon' => 'fa-magnifying-glass']; } $breadcrumb_schema = gth_build_breadcrumb_json_ld($breadcrumb_data); $json_ld = is_array($json_ld) ? array_merge($json_ld, [$breadcrumb_schema]) : [$breadcrumb_schema];
No hemos encontrado eventos que coincidan con estos criterios. Intenta expandir tu búsqueda o limpiar los filtros.
Reiniciar Inteligencia