]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
make archive.org integration optional (ARCHIVE_ORG option, defaults to false) 51/head
authornodiscc <nodiscc@gmail.com>
Sat, 8 Nov 2014 17:19:52 +0000 (18:19 +0100)
committernodiscc <nodiscc@gmail.com>
Sat, 8 Nov 2014 17:21:19 +0000 (18:21 +0100)
index.php
tpl/linklist.html

index 06e5b7845a9407baf5ba8c286543d801ec43c13d..1d523a33c3622b21b9c0fd481c0d86baff1ff9ae 100644 (file)
--- a/index.php
+++ b/index.php
@@ -32,6 +32,7 @@ $GLOBALS['config']['RAINTPL_TPL'] = 'tpl/' ; // Raintpl template directory (keep
 $GLOBALS['config']['UPDATECHECK_FILENAME'] = $GLOBALS['config']['DATADIR'].'/lastupdatecheck.txt'; // For updates check of Shaarli.
 $GLOBALS['config']['UPDATECHECK_INTERVAL'] = 86400 ; // Updates check frequency for Shaarli. 86400 seconds=24 hours
                                           // Note: You must have publisher.php in the same directory as Shaarli index.php
+$GLOBALS['config']['ARCHIVE_ORG'] = false; // For each link, add a link to an archived version on archive.org
 // -----------------------------------------------------------------------------------------------
 // You should not touch below (or at your own risks!)
 // Optional config file.
index b7cf096f8d9748d4939e8c1857fbaf5ef4cccf12..770819fcf132b61fad9b24c20328c285012ddbdf 100644 (file)
@@ -48,7 +48,9 @@
                 {else}
                     <span class="linkdate" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span>
                 {/if}
+                {if="$GLOBALS['config']['ARCHIVE_ORG']"}
                 <span class="linkarchive"><a href="https://web.archive.org/web/{$value.url|htmlspecialchars}">archive</a> - </span>
+                {/if}
                 <div style="position:relative;display:inline;"><a href="http://qrfree.kaywa.com/?l=1&s=8&d={$scripturl|urlencode}%3F{$value.linkdate|smallHash}" 
                     onclick="showQrCode(this); return false;" class="qrcode" data-permalink="{$scripturl}?{$value.linkdate|smallHash}"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> - 
                 <span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span><br>