From 154464bab5f7344ed3ebd81edc8de983044c8e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?s=C3=B8renpeter?= Date: Tue, 11 Feb 2025 18:36:08 +0100 Subject: [PATCH] Change Nick render back to alway show nick and server --- libs/twtxt.php | 5 +++++ partials/profile_card.php | 2 +- partials/timeline.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/twtxt.php b/libs/twtxt.php index 0fed709..ce2ee85 100644 --- a/libs/twtxt.php +++ b/libs/twtxt.php @@ -475,6 +475,7 @@ function getTwtsFromTwtxtString($url) { } // Fallback for nick and url if not set in twtxt.txt + if ($twtxtData->nick === "") { $str = parse_url($url, PHP_URL_HOST); $str = str_replace("www.", "", $str); @@ -486,14 +487,18 @@ function getTwtsFromTwtxtString($url) { } // Use only nick as handle if nick and domain is the same + $twtxtData->domain = parse_url($twtxtData->mainURL, PHP_URL_HOST); + /* if ($twtxtData->nick === $twtxtData->domain) { $twtxtData->domain = ""; } else { $twtxtData->domain = "@".$twtxtData->domain; } + */ + // if (!str_starts_with($currentLine, '#')) { $explodedLine = explode("\t", $currentLine); diff --git a/partials/profile_card.php b/partials/profile_card.php index dc0635b..6a3709d 100644 --- a/partials/profile_card.php +++ b/partials/profile_card.php @@ -63,7 +63,7 @@ if ($is_gallery) {
- @nick?>domain?> + nick?> (domain?>)

description?>

diff --git a/partials/timeline.php b/partials/timeline.php index 6e32ef1..145abc6 100644 --- a/partials/timeline.php +++ b/partials/timeline.php @@ -20,7 +20,7 @@ include_once 'partials/pagination.php';
- @nick?>domain?> + nick?> (domain?>)