/* =========================================================
FICHA · SEO / META / JSON-LD
========================================================= */
if (!function_exists('cez_seo_clean_text')) {
function cez_seo_clean_text($value, int $limit = 0): string {
$text = trim(preg_replace('/\s+/u', ' ', strip_tags((string)$value)));
if ($limit > 0 && function_exists('mb_strlen') && mb_strlen($text, 'UTF-8') > $limit) {
$text = rtrim(mb_substr($text, 0, $limit - 1, 'UTF-8')) . '…';
} elseif ($limit > 0 && strlen($text) > $limit) {
$text = rtrim(substr($text, 0, $limit - 1)) . '…';
}
return $text;
}
}
if (!function_exists('cez_seo_companies_from_row')) {
function cez_seo_companies_from_row(array $r, int $max = 3): array {
$out = [];
foreach (['compania','compania2','compania3','compania4','compania5','compania6'] as $field) {
foreach (explode(',', (string)($r[$field] ?? '')) as $name) {
$name = trim($name);
if ($name !== '' && !in_array($name, $out, true)) { $out[] = $name; }
}
}
return array_slice($out, 0, $max);
}
}
if (!function_exists('cez_seo_platforms_from_codes')) {
function cez_seo_platforms_from_codes(array $codes, array $sisToSistemaMap = [], int $max = 6): array {
$out = [];
foreach ($codes as $code) {
$code = trim((string)$code);
if ($code === '') { continue; }
$label = trim((string)($sisToSistemaMap[$code] ?? $code));
if ($label !== '' && !in_array($label, $out, true)) { $out[] = $label; }
}
return array_slice($out, 0, $max);
}
}
if (!function_exists('cez_ficha_meta_description')) {
function cez_ficha_meta_description(array $r, array $context = []): string {
$isEn = (($context['l'] ?? null) === 'en');
$pg = trim((string)($context['pg'] ?? ''));
$item = trim((string)($context['itemDescription'] ?? ''));
$name = trim((string)($r['nombre'] ?? ''));
$subtitle = trim((string)($r['subtitulo'] ?? ''));
$fullName = trim($name . ($subtitle !== '' ? ' - ' . $subtitle : ''));
$companies = cez_seo_companies_from_row($r, 2);
$companyText = implode(' / ', $companies);
$yearText = trim((string)($context['anos_string'] ?? ''));
$platforms = cez_seo_platforms_from_codes((array)($context['platforms'] ?? []), (array)($context['sisToSistemaMap'] ?? []), 5);
$platformText = implode(', ', $platforms);
$features = [];
if ($pg === '') {
if (!empty($r['comentario'])) { $features[] = $isEn ? 'review' : 'análisis'; }
if ((int)($context['totalDescargasFicha'] ?? 0) > 0) { $features[] = $isEn ? 'downloads' : 'descargas'; }
if ((int)($r['rscreens'] ?? 0) > 0) { $features[] = $isEn ? 'screenshots' : 'pantallas'; }
if ((int)($r['rcovers'] ?? 0) > 0) { $features[] = $isEn ? 'covers' : 'carátulas'; }
if ((int)($r['rmanual'] ?? 0) > 0) { $features[] = $isEn ? 'manuals' : 'manuales'; }
if ((int)($context['rmags'] ?? 0) > 0) { $features[] = $isEn ? 'magazine reviews' : 'revistas'; }
$features[] = $isEn ? 'credits' : 'créditos';
}
if ($pg !== '' && $item !== '') {
$desc = $isEn
? $item . ' of ' . $fullName . '. Additional material and information from Computer Emuzone'
: $item . ' de ' . $fullName . '. Material e información complementaria en Computer Emuzone';
} else {
$featureText = implode(', ', array_values(array_unique($features)));
$desc = $isEn
? 'Game card of ' . $fullName . ($featureText ? ': ' . $featureText : '')
: 'Ficha de ' . $fullName . ($featureText ? ': ' . $featureText : '');
}
$tail = [];
if ($companyText !== '') { $tail[] = $companyText; }
if ($yearText !== '') { $tail[] = $yearText; }
if ($platformText !== '') { $tail[] = ($isEn ? 'for ' : 'para ') . $platformText; }
if ($tail) { $desc .= '. ' . implode(', ', $tail) . '.'; }
return cez_seo_clean_text($desc, 165);
}
}
if (!function_exists('cez_ficha_jsonld')) {
function cez_ficha_jsonld(array $r, array $context = []): array {
$isEn = (($context['l'] ?? null) === 'en');
$name = trim((string)($r['nombre'] ?? ''));
$subtitle = trim((string)($r['subtitulo'] ?? ''));
$fullName = trim($name . ($subtitle !== '' ? ' - ' . $subtitle : ''));
$companies = cez_seo_companies_from_row($r, 6);
$platforms = cez_seo_platforms_from_codes((array)($context['platforms'] ?? []), (array)($context['sisToSistemaMap'] ?? []), 12);
$canonical = trim((string)($context['canonical'] ?? ''));
$imageUrl = trim((string)($context['imageUrl'] ?? ''));
$description = trim((string)($context['description'] ?? ''));
$json = [
'@context' => 'https://schema.org',
'@type' => 'VideoGame',
'name' => $fullName !== '' ? $fullName : $name,
'url' => $canonical,
'inLanguage' => $isEn ? 'en' : 'es',
'publisher' => [
'@type' => 'Organization',
'name' => 'Computer Emuzone',
'url' => 'https://computeremuzone.com/'
],
];
if ($description !== '') { $json['description'] = $description; }
if ($imageUrl !== '') { $json['image'] = [$imageUrl]; }
if ($canonical !== '') { $json['mainEntityOfPage'] = ['@type' => 'WebPage', '@id' => $canonical]; }
if ($platforms) { $json['gamePlatform'] = $platforms; }
if ($companies) {
$json['creator'] = array_map(static fn($name) => ['@type' => 'Organization', 'name' => $name], $companies);
}
$years = preg_split('/[^0-9]+/', (string)($context['anos_string'] ?? ''), -1, PREG_SPLIT_NO_EMPTY);
if (!empty($years)) { $json['datePublished'] = (string)min(array_map('intval', $years)); }
$genreLabels = [];
foreach ((array)($context['genres'] ?? []) as $g) {
$label = trim((string)($g[$isEn ? 'nombre_en' : 'nombre'] ?? $g['nombre'] ?? ''));
if ($label !== '' && !in_array($label, $genreLabels, true)) { $genreLabels[] = $label; }
}
foreach ((array)($context['subgenres'] ?? []) as $g) {
$label = trim((string)($g[$isEn ? 'nombre_en' : 'nombre'] ?? $g['nombre'] ?? ''));
if ($label !== '' && !in_array($label, $genreLabels, true)) { $genreLabels[] = $label; }
}
if ($genreLabels) { $json['genre'] = $genreLabels; }
$dateModified = trim((string)($context['dateModified'] ?? ''));
if ($dateModified !== '' && preg_match('/^\d{4}-\d{2}-\d{2}/', $dateModified)) { $json['dateModified'] = substr($dateModified, 0, 10); }
$votos = (int)($context['votos'] ?? 0);
$media = (float)($context['media'] ?? 0);
if ($votos > 0 && $media > 0) {
$json['aggregateRating'] = [
'@type' => 'AggregateRating',
'ratingValue' => round($media, 1),
'ratingCount' => $votos,
'bestRating' => 10,
'worstRating' => 1
];
}
$cezScore = isset($context['cezScore']) && $context['cezScore'] !== '' ? (float)$context['cezScore'] : 0.0;
$reviewBody = cez_seo_clean_text($r['comentario'] ?? '', 500);
if ($reviewBody !== '') {
$review = [
'@type' => 'Review',
'reviewBody' => $reviewBody,
'author' => ['@type' => 'Organization', 'name' => 'Computer Emuzone']
];
if ($cezScore > 0) {
$review['reviewRating'] = [
'@type' => 'Rating',
'ratingValue' => round($cezScore, 1),
'bestRating' => 10,
'worstRating' => 1
];
}
$json['review'] = $review;
}
return array_filter($json, static fn($v) => $v !== '' && $v !== [] && $v !== null);
}
}
Imperivm RTC - HD Edition "Great Battles of Rome" (FX Interactive / Dinamic / Imperivm World 2021) :: Computer Emuzone
@
🌓
PR
Review • Manual Adverts Magazines Maps Screenshots Covers Media Videos Development Cheats Walkthrough Credits • Comments
Card in progress
Working on it
Want to help us?
You can send us a review, information to complete the card, or game material (screenshots, covers, magazines, manuals...). Choose the type of contribution and tell us below.
RATINGS
related
comment
thanks
There are no registered contributions for this card yet.