From: Benjamin Mako Hill Date: Fri, 4 Aug 2023 05:08:13 +0000 (+0200) Subject: updated scuttle to add archive.org wayback links X-Git-Url: https://projects.mako.cc/source/scuttle/commitdiff_plain/d477c6adca34948d272e753cd0d11df35fcf23cb updated scuttle to add archive.org wayback links --- 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"; }