From 4aa12354e396c6f1551076d515e0e7a81bf54266 Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Fri, 4 Aug 2023 07:08:13 +0200 Subject: [PATCH] updated scuttle to add archive.org wayback links --- config.inc.php.example | 3 +++ templates/bookmarks.tpl.php | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config.inc.php.example b/config.inc.php.example index f690aee..c55666a 100644 --- a/config.inc.php.example +++ b/config.inc.php.example @@ -139,4 +139,7 @@ $email_blacklist = array( '/mailinator\.com/i' ); +$archive_links = TRUE; +$archive_base_url = "https://web.archive.org"; + include_once 'debug.inc.php'; diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php index a535590..fa40561 100644 --- a/templates/bookmarks.tpl.php +++ b/templates/bookmarks.tpl.php @@ -89,6 +89,12 @@ if (count($bookmarks) > 0) { $address = filter($row['bAddress']); + // Internet Archive WayBack Links + $archive_link = ''; + if ($GLOBALS["archive_links"]) { + $archive_link = ' - ' . T_('Archived Link') . ''; + } + // Redirection option if ($GLOBALS['useredir']) { $address = $GLOBALS['url_redir'] . $address; @@ -101,9 +107,9 @@ if (count($bookmarks) > 0) { echo '
'. filter($row['bDescription']) ."
\n"; } if ($row['bDatetime'] == $row['bModified']) { - echo '
'. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."
\n"; + echo '
'. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit . $archive_link ."
\n"; } else { - echo '
updated: '. date($GLOBALS['shortdate'], strtotime($row['bModified'])) . ', original: '. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . "" . $cats . $copy . $edit ."
\n"; + echo '
updated: '. date($GLOBALS['shortdate'], strtotime($row['bModified'])) . ', original: '. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . "" . $cats . $copy . $edit . $archive_link ."
\n"; } echo "\n"; } -- 2.39.2