getThesisById($thesisId); if (!$data) { header('Location: index.php'); exit; } } catch (Exception $e) { error_log("Error loading thesis: " . $e->getMessage()); header('Location: index.php'); exit; } } else { header('Location: index.php'); exit; } $currentNav = ''; $_tfeAuthor = $data['authors'] ?? ''; $pageTitle = $data['title'] . (!empty($_tfeAuthor) ? ' – ' . $_tfeAuthor : '') . ' – Posterg'; // Build meta description: strip markdown/HTML from synopsis, truncate to ~160 chars $_synopsisRaw = strip_tags($data['synopsis'] ?? ''); $metaDescription = mb_strlen($_synopsisRaw) > 160 ? mb_substr($_synopsisRaw, 0, 157) . '…' : (empty($_synopsisRaw) ? 'Mémoire de fin d\'études – Posterg, répertoire des TFE de l\'erg.' : $_synopsisRaw); unset($_tfeAuthor, $_synopsisRaw); // --- Open Graph / Twitter Card tags ------------------------------------------ $_ogBaseUrl = 'https://posterg.erg.be'; // Resolve OG image: banner → first image file → none $_ogImage = ''; if (!empty($data['banner_path'])) { $_ogImage = $_ogBaseUrl . '/media.php?path=' . rawurlencode($data['banner_path']); } elseif (!empty($data['files'])) { foreach ($data['files'] as $_f) { $_ext = strtolower(pathinfo($_f['file_path'], PATHINFO_EXTENSION)); if (in_array($_ext, ['jpg', 'jpeg', 'png', 'gif', 'webp'])) { $_ogImage = $_ogBaseUrl . '/media.php?path=' . rawurlencode($_f['file_path']); break; } } unset($_f, $_ext); } $ogTags = [ 'type' => 'article', 'title' => $data['title'] . (!empty($data['authors']) ? ' – ' . $data['authors'] : ''), 'description' => $metaDescription, 'url' => $_ogBaseUrl . '/tfe.php?id=' . $thesisId, 'image' => $_ogImage, 'image_alt' => $data['title'] . (!empty($data['authors']) ? ' par ' . $data['authors'] : ''), 'site_name' => 'Posterg – ERG', 'article_author' => $data['authors'] ?? '', 'article_published_time' => !empty($data['year']) ? $data['year'] . '-01-01' : '', ]; unset($_ogBaseUrl, $_ogImage); // --- End Open Graph ---------------------------------------------------------- $extraCss = ['/assets/css/tfe.css']; ?>
← Retour

Orientation :
Atelier pluridisciplinaire :
Date :
Langue :
Format :
Durée :
Mots-clés :
Président·e du jury :
Promoteur·ice :
Lecteur·ices :
Accès :
Licence :
Note :
Contact :
(ouvre dans un nouvel onglet)