getById($id); if (!$pub || $pub['status'] !== 'published') { http_response_code(404); echo '

' . t('error_publication_not_found') . '

'; echo '

' . t('error_publication_not_found_description') . '

'; exit; } // Get related publications $relatedPublications = []; if ($pub['categories_array']) { $firstCategory = $pub['categories_array'][0]; $relatedPublications = $publication->getByCategory($firstCategory, 'published'); // Remove current publication from related list $relatedPublications = array_filter($relatedPublications, function($p) use ($id) { return $p['id'] != $id; }); // Limit to 3 related publications $relatedPublications = array_slice($relatedPublications, 0, 3); } // Get approved comments for this publication $comments = $comment->getApprovedByPublication($id); $commentCount = $comment->getCountByPublication($id); ?> <?php echo htmlspecialchars($pub['title']); ?> - <?php echo SITE_TITLE; ?>

isAdmin()): ?> ✏️
By Published

()