This commit is contained in:
2025-11-24 01:40:19 +01:00
parent 09ab7bad59
commit 71b0a4c72a
21 changed files with 118 additions and 34 deletions

View File

@@ -3,6 +3,20 @@ if (!defined('ASSET_VERSION')) {
define('ASSET_VERSION', '2024-11-22'); // oder deine aktuelle Version define('ASSET_VERSION', '2024-11-22'); // oder deine aktuelle Version
} }
// Domain-Konfiguration (kann pro Umgebung angepasst werden)
if (!defined('APP_DOMAIN_PRIMARY')) {
define('APP_DOMAIN_PRIMARY', 'usbcheck.it');
}
if (!defined('APP_URL_PRIMARY')) {
define('APP_URL_PRIMARY', 'https://' . APP_DOMAIN_PRIMARY);
}
if (!defined('APP_DOMAIN_FAKECHECK')) {
define('APP_DOMAIN_FAKECHECK', 'ismyusbfake.com');
}
if (!defined('APP_URL_FAKECHECK')) {
define('APP_URL_FAKECHECK', 'https://' . APP_DOMAIN_FAKECHECK);
}
// Matomo Einstellungen // Matomo Einstellungen
define('MATOMO_URL', 'https://matomo.my-statistics.info/'); define('MATOMO_URL', 'https://matomo.my-statistics.info/');
define('MATOMO_ENABLED', true); define('MATOMO_ENABLED', true);

View File

@@ -3,6 +3,20 @@ if (!defined('ASSET_VERSION')) {
define('ASSET_VERSION', time()); // oder deine aktuelle Version define('ASSET_VERSION', time()); // oder deine aktuelle Version
} }
// Domain-Konfiguration (kann pro Umgebung angepasst werden)
if (!defined('APP_DOMAIN_PRIMARY')) {
define('APP_DOMAIN_PRIMARY', 'staging.usbcheck.it');
}
if (!defined('APP_URL_PRIMARY')) {
define('APP_URL_PRIMARY', 'https://' . APP_DOMAIN_PRIMARY);
}
if (!defined('APP_DOMAIN_FAKECHECK')) {
define('APP_DOMAIN_FAKECHECK', 'staging.ismyusbfake.com');
}
if (!defined('APP_URL_FAKECHECK')) {
define('APP_URL_FAKECHECK', 'https://' . APP_DOMAIN_FAKECHECK);
}
// Matomo Einstellungen // Matomo Einstellungen
define('MATOMO_URL', 'https://matomo.my-statistics.info/'); define('MATOMO_URL', 'https://matomo.my-statistics.info/');
define('MATOMO_ENABLED', false); define('MATOMO_ENABLED', false);

View File

@@ -173,6 +173,6 @@
</p> </p>
</aside> </aside>
</div> </div>
</div> </div>
</div> </div>
</section> </section>

View File

@@ -32,7 +32,7 @@
<li data-i18n="features_free_li4"> Auswahl verschiedener Teststufen (z. B. 200&nbsp;MB, 2&nbsp;GB)</li> <li data-i18n="features_free_li4"> Auswahl verschiedener Teststufen (z. B. 200&nbsp;MB, 2&nbsp;GB)</li>
<li data-i18n="features_free_li5"> Keine Registrierung erforderlich</li> <li data-i18n="features_free_li5"> Keine Registrierung erforderlich</li>
</ul> </ul>
<a href="https://usbcheck.it/fakecheck/" <a href="<?= htmlspecialchars(app_primary_url() . '/fakecheck/') ?>"
class="inline-flex mt-3 items-center text-sm font-semibold text-brand-primary hover:text-blue-300" class="inline-flex mt-3 items-center text-sm font-semibold text-brand-primary hover:text-blue-300"
data-i18n="features_free_cta"> data-i18n="features_free_cta">
Start free quick check Start free quick check

View File

@@ -1,3 +1,4 @@
<?php $primaryFakecheckUrl = app_primary_url() . '/fakecheck/'; ?>
<section id="hero" class="hero-section relative overflow-hidden"> <section id="hero" class="hero-section relative overflow-hidden">
<div class="relative px-4 sm:px-6 lg:px-8"> <div class="relative px-4 sm:px-6 lg:px-8">
<div class="section-shell hero-shell items-center"> <div class="section-shell hero-shell items-center">
@@ -15,7 +16,7 @@
<!-- CTAs --> <!-- CTAs -->
<div class="flex flex-col sm:flex-row gap-3 sm:gap-4"> <div class="flex flex-col sm:flex-row gap-3 sm:gap-4">
<a href="https://usbcheck.it/fakecheck/" <a href="<?= htmlspecialchars($primaryFakecheckUrl) ?>"
class="inline-flex items-center justify-center rounded-full bg-brand-primary px-6 py-3 text-sm font-semibold text-brand-bg shadow-soft hover:bg-blue-400 transition-colors" class="inline-flex items-center justify-center rounded-full bg-brand-primary px-6 py-3 text-sm font-semibold text-brand-bg shadow-soft hover:bg-blue-400 transition-colors"
data-i18n="cta_quick"> data-i18n="cta_quick">
Start free quick check Start free quick check
@@ -109,7 +110,7 @@
</div> </div>
</div> </div>
<a href="https://usbcheck.it/fakecheck/" <a href="<?= htmlspecialchars($primaryFakecheckUrl) ?>"
class="block text-center rounded-full bg-brand-primary px-4 py-2.5 text-sm font-semibold text-brand-bg hover:bg-blue-400 transition-colors" class="block text-center rounded-full bg-brand-primary px-4 py-2.5 text-sm font-semibold text-brand-bg hover:bg-blue-400 transition-colors"
data-i18n="quick_cta"> data-i18n="quick_cta">
Go to free quick check Go to free quick check

View File

@@ -18,7 +18,7 @@
<div> <div>
<h3 class="font-semibold text-brand-text" data-i18n="how_step1_title">Browser-Test starten</h3> <h3 class="font-semibold text-brand-text" data-i18n="how_step1_title">Browser-Test starten</h3>
<p data-i18n="how_step1_text"> <p data-i18n="how_step1_text">
Du öffnest den Schnelltest unter <strong>usbcheck.it/fakecheck/</strong>, wählst deinen USB-Stick bzw. einen Ordner darauf aus und definierst, wie viel Daten getestet werden sollen. Du öffnest den Schnelltest unter <strong><?= htmlspecialchars(app_primary_url()) ?>/fakecheck/</strong>, wählst deinen USB-Stick bzw. einen Ordner darauf aus und definierst, wie viel Daten getestet werden sollen.
</p> </p>
</div> </div>
</li> </li>

View File

@@ -3,7 +3,7 @@
?> ?>
<footer class="border-t border-brand-border/70"> <footer class="border-t border-brand-border/70">
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-6 flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-brand-muted"> <div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-6 flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-brand-muted">
<p>© <?= date('Y') ?> usbcheck.it</p> <p>© <?= date('Y') ?> <?= htmlspecialchars(app_primary_domain()) ?></p>
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<a href="/impressum.php" class="hover:text-brand-primary transition-colors" data-i18n="footer_imprint"></a> <a href="/impressum.php" class="hover:text-brand-primary transition-colors" data-i18n="footer_imprint"></a>

View File

@@ -3,7 +3,7 @@
// Aktuelle Domain + Protokoll // Aktuelle Domain + Protokoll
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; $scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$host = $_SERVER['HTTP_HOST'] ?? 'usbcheck.it'; $host = $_SERVER['HTTP_HOST'] ?? app_primary_domain();
$baseUrl = $scheme . '://' . $host; $baseUrl = $scheme . '://' . $host;
// Wenn $navAnchors NICHT gesetzt ist → leeres Array // Wenn $navAnchors NICHT gesetzt ist → leeres Array
@@ -52,12 +52,12 @@ if ($isLoggedIn) {
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<a href="/?lang=<?= htmlspecialchars($lang ?? 'de') ?>" class="flex items-center gap-3"> <a href="/?lang=<?= htmlspecialchars($lang ?? 'de') ?>" class="flex items-center gap-3">
<img src="<?= $baseUrl ?>/assets/img/logo_slogan.png" <img src="<?= $baseUrl ?>/assets/img/logo_slogan.png"
alt="usbcheck.it Logo" alt="<?= htmlspecialchars(app_primary_domain()) ?> Logo"
class="h-9 w-auto"> class="h-9 w-auto">
<div class="hidden sm:flex flex-col leading-tight"> <div class="hidden sm:flex flex-col leading-tight">
<span class="font-heading font-bold text-sm uppercase tracking-[0.18em] text-brand-muted"> <span class="font-heading font-bold text-sm uppercase tracking-[0.18em] text-brand-muted">
usbcheck.it <?= htmlspecialchars(app_primary_domain()) ?>
</span> </span>
<span class="text-xs text-brand-muted" data-i18n="header_slogan"> <span class="text-xs text-brand-muted" data-i18n="header_slogan">
Test USB drives Test USB drives

View File

@@ -13,7 +13,7 @@ if (!isset($lang) || !in_array($lang, ['de', 'en', 'it', 'fr'], true)) {
} }
if (!isset($pageTitle) || !is_string($pageTitle) || $pageTitle === '') { if (!isset($pageTitle) || !is_string($pageTitle) || $pageTitle === '') {
$pageTitle = 'usbcheck.it'; $pageTitle = app_primary_domain();
} }
if (!isset($pageDescription) || !is_string($pageDescription)) { if (!isset($pageDescription) || !is_string($pageDescription)) {
@@ -110,6 +110,12 @@ foreach ($GLOBALS['page_header_scripts'] as $script) {
<script> <script>
window.currentLang = "<?= htmlspecialchars($lang) ?>"; window.currentLang = "<?= htmlspecialchars($lang) ?>";
window.assetsBase = "/assets"; // falls du das noch nicht hast window.assetsBase = "/assets"; // falls du das noch nicht hast
window.appDomains = <?= json_encode([
'primaryDomain' => app_primary_domain(),
'primaryUrl' => app_primary_url(),
'fakecheckDomain' => app_fakecheck_domain(),
'fakecheckUrl' => app_fakecheck_url(),
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?>;
</script> </script>
<!-- Eigenes CSS --> <!-- Eigenes CSS -->
<link rel="stylesheet" href="/assets/css/main.css"> <link rel="stylesheet" href="/assets/css/main.css">

View File

@@ -1,10 +1,19 @@
<?php if (!defined('MATOMO_SITE_ID')) return; ?> <?php if (!defined('MATOMO_SITE_ID')) return; ?>
<?php if (!defined('MATOMO_ENABLED') || !MATOMO_ENABLED) return; ?> <?php if (!defined('MATOMO_ENABLED') || !MATOMO_ENABLED) return; ?>
<?php
$matomoDomains = [];
$primaryDomain = app_primary_domain();
$fakecheckDomain = app_fakecheck_domain();
$matomoDomains[] = '*.' . $primaryDomain;
$matomoDomains[] = '*.' . $fakecheckDomain;
$matomoDomains[] = '*.' . $primaryDomain . '/fakecheck';
?>
<!-- Matomo --> <!-- Matomo -->
<script> <script>
var _paq = window._paq = window._paq || []; var _paq = window._paq = window._paq || [];
_paq.push(["setDomains", ["*.usbcheck.it","*.ismyusbfake.com","*.usbcheck.it/fakecheck"]]); _paq.push(["setDomains", <?= json_encode($matomoDomains, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?>]);
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);

View File

@@ -8,7 +8,7 @@ $lang = $_GET['lang'] ?? 'de';
$lang = in_array($lang, ['de','en','it','fr']) ? $lang : 'de'; $lang = in_array($lang, ['de','en','it','fr']) ? $lang : 'de';
// Titel & Description // Titel & Description
$pageTitle = 'Seite nicht gefunden usbcheck.it'; $pageTitle = 'Seite nicht gefunden ' . app_primary_domain();
$pageDescription = 'Die angeforderte Seite wurde nicht gefunden.'; $pageDescription = 'Die angeforderte Seite wurde nicht gefunden.';
$navAnchors = []; // Navigation auf der 404 deaktiviert $navAnchors = []; // Navigation auf der 404 deaktiviert

View File

@@ -11,7 +11,7 @@
}, },
"brand": { "brand": {
"brand_wordmark": "usbcheck.it", "brand_wordmark": "{{primary_domain}}",
"brand_subtitle": "USB-Sticks auf Fakes testen" "brand_subtitle": "USB-Sticks auf Fakes testen"
}, },
@@ -56,7 +56,7 @@
"how_title": "Schnelltest im Browser, Pro-Modus mit Tiefenanalyse.", "how_title": "Schnelltest im Browser, Pro-Modus mit Tiefenanalyse.",
"how_intro": "USBCheck wurde entwickelt, um zwei Welten zu verbinden: einen einfachen Schnelltest für alle und einen tiefgehenden Pro-Modus für Power-User, Techniker und Admins. Der Schnelltest läuft direkt im Browser, ohne Installation. Für den Pro-Modus wird ein kleines Helfer-Tool verwendet, das auf Wunsch F3- / badblocks-ähnliche Tests ausführt und damit Kapazitäts-Fakes sicher enttarnt.", "how_intro": "USBCheck wurde entwickelt, um zwei Welten zu verbinden: einen einfachen Schnelltest für alle und einen tiefgehenden Pro-Modus für Power-User, Techniker und Admins. Der Schnelltest läuft direkt im Browser, ohne Installation. Für den Pro-Modus wird ein kleines Helfer-Tool verwendet, das auf Wunsch F3- / badblocks-ähnliche Tests ausführt und damit Kapazitäts-Fakes sicher enttarnt.",
"how_step1_title": "Browser-Test starten", "how_step1_title": "Browser-Test starten",
"how_step1_text": "Du öffnest den Schnelltest unter <strong>usbcheck.it/fakecheck/</strong>, wählst deinen USB-Stick bzw. einen Ordner darauf aus und definierst, wie viel Daten getestet werden sollen.", "how_step1_text": "Du öffnest den Schnelltest unter <strong>{{primary_url}}/fakecheck/</strong>, wählst deinen USB-Stick bzw. einen Ordner darauf aus und definierst, wie viel Daten getestet werden sollen.",
"how_step2_title": "Schreib-, Lese- und Integritätsprüfung", "how_step2_title": "Schreib-, Lese- und Integritätsprüfung",
"how_step2_text": "Der Browser erstellt Testdateien, misst Schreib- und Leserate und vergleicht Hash-Werte, um Datenfehler zu erkennen alles lokal und ohne Übertragung deiner Inhalte.", "how_step2_text": "Der Browser erstellt Testdateien, misst Schreib- und Leserate und vergleicht Hash-Werte, um Datenfehler zu erkennen alles lokal und ohne Übertragung deiner Inhalte.",
"how_step3_title": "Optional: Pro-Modus für Vollscan", "how_step3_title": "Optional: Pro-Modus für Vollscan",
@@ -135,7 +135,7 @@
"footer": { "footer": {
"footer_imprint": "Impressum", "footer_imprint": "Impressum",
"footer_privacy": "Datenschutz", "footer_privacy": "Datenschutz",
"footer_copy": "© {year} usbcheck.it. Alle Rechte vorbehalten." "footer_copy": "© {year} {{primary_domain}}. Alle Rechte vorbehalten."
}, },
"fake": { "fake": {
"fake_hero_kicker": "FakeCheck Browser-Modus", "fake_hero_kicker": "FakeCheck Browser-Modus",

View File

@@ -11,7 +11,7 @@
}, },
"brand": { "brand": {
"brand_wordmark": "usbcheck.it", "brand_wordmark": "{{primary_domain}}",
"brand_subtitle": "Test USB drives for fakes" "brand_subtitle": "Test USB drives for fakes"
}, },
@@ -56,7 +56,7 @@
"how_title": "Browser quick test, Pro mode for deep analysis.", "how_title": "Browser quick test, Pro mode for deep analysis.",
"how_intro": "USBCheck was built to combine two worlds: a simple quick test for everyone and a deep Pro mode for power users, technicians and admins. The quick test runs directly in your browser, no install required. The Pro mode uses a small helper tool that can run F3 / badblocks-like checks and reliably detect capacity fakes.", "how_intro": "USBCheck was built to combine two worlds: a simple quick test for everyone and a deep Pro mode for power users, technicians and admins. The quick test runs directly in your browser, no install required. The Pro mode uses a small helper tool that can run F3 / badblocks-like checks and reliably detect capacity fakes.",
"how_step1_title": "Start browser test", "how_step1_title": "Start browser test",
"how_step1_text": "Open the quick check at <strong>usbcheck.itcom/fakecheck/</strong>, select your USB drive or a folder on it and define how much data should be tested.", "how_step1_text": "Open the quick check at <strong>{{primary_url}}/fakecheck/</strong>, select your USB drive or a folder on it and define how much data should be tested.",
"how_step2_title": "Write, read &amp; integrity check", "how_step2_title": "Write, read &amp; integrity check",
"how_step2_text": "The browser creates test files, measures write and read speed and compares hash values to detect data errors all locally, without uploading your content.", "how_step2_text": "The browser creates test files, measures write and read speed and compares hash values to detect data errors all locally, without uploading your content.",
"how_step3_title": "Optional: Pro mode full scan", "how_step3_title": "Optional: Pro mode full scan",
@@ -135,7 +135,7 @@
"footer": { "footer": {
"footer_imprint": "Imprint", "footer_imprint": "Imprint",
"footer_privacy": "Privacy policy", "footer_privacy": "Privacy policy",
"footer_copy": "© {year} usbcheck.it. All rights reserved." "footer_copy": "© {year} {{primary_domain}}. All rights reserved."
}, },
"fake": { "fake": {
"fake_hero_kicker": "FakeCheck Browser mode", "fake_hero_kicker": "FakeCheck Browser mode",

View File

@@ -11,7 +11,7 @@
}, },
"brand": { "brand": {
"brand_wordmark": "usbcheck.it", "brand_wordmark": "{{primary_domain}}",
"brand_subtitle": "Tester les clés USB contrefaites" "brand_subtitle": "Tester les clés USB contrefaites"
}, },
@@ -56,7 +56,7 @@
"how_title": "Test rapide dans le navigateur, mode Pro pour une analyse approfondie.", "how_title": "Test rapide dans le navigateur, mode Pro pour une analyse approfondie.",
"how_intro": "USBCheck a été conçu pour réunir deux mondes : un test rapide simple pour tous et un mode Pro avancé pour les utilisateurs experts, techniciens et administrateurs. Le test rapide sexécute dans le navigateur sans installation. Le mode Pro utilise un petit outil pouvant effectuer des tests similaires à F3/badblocks pour détecter les capacités truquées.", "how_intro": "USBCheck a été conçu pour réunir deux mondes : un test rapide simple pour tous et un mode Pro avancé pour les utilisateurs experts, techniciens et administrateurs. Le test rapide sexécute dans le navigateur sans installation. Le mode Pro utilise un petit outil pouvant effectuer des tests similaires à F3/badblocks pour détecter les capacités truquées.",
"how_step1_title": "Démarrer le test dans le navigateur", "how_step1_title": "Démarrer le test dans le navigateur",
"how_step1_text": "Ouvrez le test rapide sur <strong>usbcheck.it/fakecheck/</strong>, sélectionnez votre clé ou un dossier puis définissez la quantité de données à tester.", "how_step1_text": "Ouvrez le test rapide sur <strong>{{primary_url}}/fakecheck/</strong>, sélectionnez votre clé ou un dossier puis définissez la quantité de données à tester.",
"how_step2_title": "Écriture, lecture et contrôle dintégrité", "how_step2_title": "Écriture, lecture et contrôle dintégrité",
"how_step2_text": "Le navigateur crée des fichiers de test, mesure les vitesses décriture/lecture et compare les hash pour détecter les erreurs le tout localement, sans envoyer vos contenus.", "how_step2_text": "Le navigateur crée des fichiers de test, mesure les vitesses décriture/lecture et compare les hash pour détecter les erreurs le tout localement, sans envoyer vos contenus.",
"how_step3_title": "Optionnel : mode Pro avec analyse complète", "how_step3_title": "Optionnel : mode Pro avec analyse complète",
@@ -135,7 +135,7 @@
"footer": { "footer": {
"footer_imprint": "Mentions légales", "footer_imprint": "Mentions légales",
"footer_privacy": "Confidentialité", "footer_privacy": "Confidentialité",
"footer_copy": "© {year} usbcheck.it. Tous droits réservés." "footer_copy": "© {year} {{primary_domain}}. Tous droits réservés."
}, },
"fake": { "fake": {
"fake_hero_kicker": "FakeCheck Mode navigateur", "fake_hero_kicker": "FakeCheck Mode navigateur",

View File

@@ -11,7 +11,7 @@
}, },
"brand": { "brand": {
"brand_wordmark": "usbcheck.it", "brand_wordmark": "{{primary_domain}}",
"brand_subtitle": "Controlla le chiavette USB contraffatte" "brand_subtitle": "Controlla le chiavette USB contraffatte"
}, },
@@ -56,7 +56,7 @@
"how_title": "Test rapido nel browser, modalità Pro per analisi profonde.", "how_title": "Test rapido nel browser, modalità Pro per analisi profonde.",
"how_intro": "USBCheck è pensato per unire due mondi: un test rapido semplice per tutti e una modalità Pro avanzata per utenti esperti, tecnici e amministratori. Il test rapido gira nel browser senza installazione. La modalità Pro usa un piccolo tool che può eseguire test simili a F3/badblocks e individuare capacità contraffatte.", "how_intro": "USBCheck è pensato per unire due mondi: un test rapido semplice per tutti e una modalità Pro avanzata per utenti esperti, tecnici e amministratori. Il test rapido gira nel browser senza installazione. La modalità Pro usa un piccolo tool che può eseguire test simili a F3/badblocks e individuare capacità contraffatte.",
"how_step1_title": "Avvia il test nel browser", "how_step1_title": "Avvia il test nel browser",
"how_step1_text": "Apri il test rapido su <strong>usbcheck.it/fakecheck/</strong>, seleziona la chiavetta o una cartella e definisci quanta quantità di dati deve essere testata.", "how_step1_text": "Apri il test rapido su <strong>{{primary_url}}/fakecheck/</strong>, seleziona la chiavetta o una cartella e definisci quanta quantità di dati deve essere testata.",
"how_step2_title": "Scrittura, lettura e controllo integrità", "how_step2_title": "Scrittura, lettura e controllo integrità",
"how_step2_text": "Il browser crea file di test, misura la velocità di scrittura/lettura e confronta gli hash per individuare errori tutto in locale, senza caricare i tuoi contenuti.", "how_step2_text": "Il browser crea file di test, misura la velocità di scrittura/lettura e confronta gli hash per individuare errori tutto in locale, senza caricare i tuoi contenuti.",
"how_step3_title": "Opzionale: modalità Pro con scansione completa", "how_step3_title": "Opzionale: modalità Pro con scansione completa",
@@ -135,7 +135,7 @@
"footer": { "footer": {
"footer_imprint": "Note legali", "footer_imprint": "Note legali",
"footer_privacy": "Privacy", "footer_privacy": "Privacy",
"footer_copy": "© {year} usbcheck.it. Tutti i diritti riservati." "footer_copy": "© {year} {{primary_domain}}. Tutti i diritti riservati."
}, },
"fake": { "fake": {
"fake_hero_kicker": "FakeCheck Modalità browser", "fake_hero_kicker": "FakeCheck Modalità browser",

View File

@@ -29,6 +29,23 @@
return target; return target;
} }
function applyDomainPlaceholders(text) {
if (typeof text !== "string") return text;
const domains = window.appDomains || {};
const replacements = {
"{{primary_domain}}": domains.primaryDomain || "usbcheck.it",
"{{primary_url}}": domains.primaryUrl || ("https://" + (domains.primaryDomain || "usbcheck.it")),
"{{fakecheck_domain}}": domains.fakecheckDomain || "ismyusbfake.com",
"{{fakecheck_url}}": domains.fakecheckUrl || ("https://" + (domains.fakecheckDomain || "ismyusbfake.com")),
};
return Object.keys(replacements).reduce((acc, token) => {
const value = replacements[token];
return acc.split(token).join(value);
}, text);
}
function getInitialLang() { function getInitialLang() {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
const paramLang = urlParams.get("lang"); const paramLang = urlParams.get("lang");
@@ -72,6 +89,8 @@
value = value.replace("{year}", year); value = value.replace("{year}", year);
} }
value = applyDomainPlaceholders(value);
node.innerHTML = value; node.innerHTML = value;
}); });
} }

View File

@@ -10,7 +10,7 @@ $lang = in_array($lang, ['de','en','it','fr']) ? $lang : 'en';
$userInitials = null; $userInitials = null;
// Seitentitel & Description für das Layout // Seitentitel & Description für das Layout
$pageTitle = 'usbcheck.it Test USB-Sticks'; $pageTitle = app_primary_domain() . ' Test USB-Sticks';
$pageDescription = 'Prüfe deine USB-Sticks auf Geschwindigkeit, Integrität und mögliche Fakes direkt im Browser.'; $pageDescription = 'Prüfe deine USB-Sticks auf Geschwindigkeit, Integrität und mögliche Fakes direkt im Browser.';
$navAnchors = [ $navAnchors = [
[ 'href' => '#how', 'key' => 'nav_how' ], [ 'href' => '#how', 'key' => 'nav_how' ],

View File

@@ -26,7 +26,7 @@ if (!$isLoggedIn) {
} }
// Seitentitel & Description // Seitentitel & Description
$pageTitle = 'Dashboard usbcheck.it'; $pageTitle = 'Dashboard ' . app_primary_domain();
$pageDescription = 'Verwalte deine USB-Tests, Geräte und Pro-Einstellungen in deinem USBCheck-Dashboard.'; $pageDescription = 'Verwalte deine USB-Tests, Geräte und Pro-Einstellungen in deinem USBCheck-Dashboard.';
// Navigation kannst du für das Dashboard leer lassen oder anpassen // Navigation kannst du für das Dashboard leer lassen oder anpassen

View File

@@ -11,21 +11,20 @@ $lang = in_array($lang, ['de','en','it','fr']) ? $lang : 'en';
$userInitials = null; $userInitials = null;
// Seitentitel & Description (SEO) // Seitentitel & Description (SEO)
$pageTitle = 'usbcheck.it Fake USB Check'; $pageTitle = app_primary_domain() . ' Fake USB Check';
$pageDescription = 'Fake USB-Sticks erkennen: Browser-basierter Schnelltest für Kapazität, Schreib-/Lesegeschwindigkeit und Datenintegrität ohne Installation.'; $pageDescription = 'Fake USB-Sticks erkennen: Browser-basierter Schnelltest für Kapazität, Schreib-/Lesegeschwindigkeit und Datenintegrität ohne Installation.';
// Header-Navigation: auf dieser Seite KEINE Onepager-Anchors anzeigen // Header-Navigation: auf dieser Seite KEINE Onepager-Anchors anzeigen
$navAnchors = []; $navAnchors = [];
// Basis-URL für Reports etc. (staging/prod/dev/ismyusbfake-kompatibel)
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; $scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$host = $_SERVER['HTTP_HOST'] ?? 'usbcheck.it'; $host = $_SERVER['HTTP_HOST'] ?? app_primary_domain();
$baseUrl = $scheme . '://' . $host; $baseUrl = $scheme . '://' . $host;
$lang = $_GET['lang'] ?? 'en'; $lang = $_GET['lang'] ?? 'en';
$lang = in_array($lang, ['de','en','it','fr']) ? $lang : 'en'; $lang = in_array($lang, ['de','en','it','fr']) ? $lang : 'en';
// Basis-URL für Reports // Basis-URL für Reports
$baseUrl = "https://usbcheck.it"; $baseUrl = app_primary_url();
if (function_exists('tpl_add_script')) { if (function_exists('tpl_add_script')) {
tpl_add_script('/assets/js/fakecheck.js', 'footer', true, false, '', null); tpl_add_script('/assets/js/fakecheck.js', 'footer', true, false, '', null);

View File

@@ -9,7 +9,7 @@ $lang = in_array($lang, ['de','en','it','fr']) ? $lang : 'en';
// später: echte Session // später: echte Session
$userInitials = null; $userInitials = null;
$pageTitle = 'Login usbcheck.it'; $pageTitle = 'Login ' . app_primary_domain();
$pageDescription = 'Melde dich bei USBCheck an, um Tests zu speichern, Pro-Modus zu nutzen und mehrere Geräte zu verwalten.'; $pageDescription = 'Melde dich bei USBCheck an, um Tests zu speichern, Pro-Modus zu nutzen und mehrere Geräte zu verwalten.';
// Navigation ausblenden: // Navigation ausblenden:

View File

@@ -4,6 +4,28 @@ $GLOBALS['page_header_scripts'] = $GLOBALS['page_header_scripts'] ?? [];
$GLOBALS['page_footer_scripts'] = $GLOBALS['page_footer_scripts'] ?? []; $GLOBALS['page_footer_scripts'] = $GLOBALS['page_footer_scripts'] ?? [];
$GLOBALS['page_styles'] = $GLOBALS['page_styles'] ?? []; $GLOBALS['page_styles'] = $GLOBALS['page_styles'] ?? [];
function app_primary_domain(): string
{
return defined('APP_DOMAIN_PRIMARY') ? APP_DOMAIN_PRIMARY : 'usbcheck.it';
}
function app_primary_url(): string
{
$url = defined('APP_URL_PRIMARY') ? APP_URL_PRIMARY : 'https://usbcheck.it';
return rtrim($url, '/');
}
function app_fakecheck_domain(): string
{
return defined('APP_DOMAIN_FAKECHECK') ? APP_DOMAIN_FAKECHECK : 'ismyusbfake.com';
}
function app_fakecheck_url(): string
{
$url = defined('APP_URL_FAKECHECK') ? APP_URL_FAKECHECK : 'https://ismyusbfake.com';
return rtrim($url, '/');
}
/** /**
* Script registrieren * Script registrieren
* *