aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/archiveorg/archiveorg.php6
-rw-r--r--plugins/isso/isso.php2
-rw-r--r--plugins/qrcode/qrcode.php4
3 files changed, 7 insertions, 5 deletions
diff --git a/plugins/archiveorg/archiveorg.php b/plugins/archiveorg/archiveorg.php
index f26e6129..922b5966 100644
--- a/plugins/archiveorg/archiveorg.php
+++ b/plugins/archiveorg/archiveorg.php
@@ -20,10 +20,12 @@ function hook_archiveorg_render_linklist($data)
20 $path = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH; 20 $path = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH;
21 21
22 foreach ($data['links'] as &$value) { 22 foreach ($data['links'] as &$value) {
23 if ($value['private'] && preg_match('/^\?[a-zA-Z0-9-_@]{6}($|&|#)/', $value['real_url'])) { 23 $isNote = startsWith($value['real_url'], '/shaare/');
24 if ($value['private'] && $isNote) {
24 continue; 25 continue;
25 } 26 }
26 $archive = sprintf($archive_html, $value['url'], $path, t('View on archive.org')); 27 $url = $isNote ? rtrim(index_url($_SERVER), '/') . $value['real_url'] : $value['real_url'];
28 $archive = sprintf($archive_html, $url, $path, t('View on archive.org'));
27 $value['link_plugin'][] = $archive; 29 $value['link_plugin'][] = $archive;
28 } 30 }
29 31
diff --git a/plugins/isso/isso.php b/plugins/isso/isso.php
index 16edd9a6..79e7380b 100644
--- a/plugins/isso/isso.php
+++ b/plugins/isso/isso.php
@@ -49,7 +49,7 @@ function hook_isso_render_linklist($data, $conf)
49 $isso = sprintf($issoHtml, $issoUrl, $issoUrl, $link['id'], $link['id']); 49 $isso = sprintf($issoHtml, $issoUrl, $issoUrl, $link['id'], $link['id']);
50 $data['plugin_end_zone'][] = $isso; 50 $data['plugin_end_zone'][] = $isso;
51 } else { 51 } else {
52 $button = '<span><a href="?%s#isso-thread">'; 52 $button = '<span><a href="'. ($data['_BASE_PATH_'] ?? '') . '/shaare/%s#isso-thread">';
53 // For the default theme we use a FontAwesome icon which is better than an image 53 // For the default theme we use a FontAwesome icon which is better than an image
54 if ($conf->get('resource.theme') === 'default') { 54 if ($conf->get('resource.theme') === 'default') {
55 $button .= '<i class="linklist-plugin-icon fa fa-comment"></i>'; 55 $button .= '<i class="linklist-plugin-icon fa fa-comment"></i>';
diff --git a/plugins/qrcode/qrcode.php b/plugins/qrcode/qrcode.php
index 56ae47b3..95499e39 100644
--- a/plugins/qrcode/qrcode.php
+++ b/plugins/qrcode/qrcode.php
@@ -42,7 +42,7 @@ function hook_qrcode_render_linklist($data)
42function hook_qrcode_render_footer($data) 42function hook_qrcode_render_footer($data)
43{ 43{
44 if ($data['_PAGE_'] == TemplatePage::LINKLIST) { 44 if ($data['_PAGE_'] == TemplatePage::LINKLIST) {
45 $data['js_files'][] = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH . '/qrcode/shaarli-qrcode.js'; 45 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/qrcode/shaarli-qrcode.js';
46 } 46 }
47 47
48 return $data; 48 return $data;
@@ -58,7 +58,7 @@ function hook_qrcode_render_footer($data)
58function hook_qrcode_render_includes($data) 58function hook_qrcode_render_includes($data)
59{ 59{
60 if ($data['_PAGE_'] == TemplatePage::LINKLIST) { 60 if ($data['_PAGE_'] == TemplatePage::LINKLIST) {
61 $data['css_files'][] = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.css'; 61 $data['css_files'][] = PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.css';
62 } 62 }
63 63
64 return $data; 64 return $data;