aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/readityourself
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-04-01 12:26:31 +0200
committerArthurHoaro <arthur@hoa.ro>2017-04-01 12:32:43 +0200
commit8e33d0e767579f9f9c783973b6cce14ccf4620dd (patch)
tree411cfdbda1f3834c2f9789b88d8f442a11f61b57 /plugins/readityourself
parent4b385d6c344c4a0a0b424622833bc72974c21cb5 (diff)
downloadShaarli-8e33d0e767579f9f9c783973b6cce14ccf4620dd.tar.gz
Shaarli-8e33d0e767579f9f9c783973b6cce14ccf4620dd.tar.zst
Shaarli-8e33d0e767579f9f9c783973b6cce14ccf4620dd.zip
Remove readityourself plugin
Fixes #818
Diffstat (limited to 'plugins/readityourself')
-rw-r--r--plugins/readityourself/book-open.pngbin568 -> 0 bytes
-rw-r--r--plugins/readityourself/readityourself.html1
-rw-r--r--plugins/readityourself/readityourself.meta2
-rw-r--r--plugins/readityourself/readityourself.php51
4 files changed, 0 insertions, 54 deletions
diff --git a/plugins/readityourself/book-open.png b/plugins/readityourself/book-open.png
deleted file mode 100644
index 36513d7b..00000000
--- a/plugins/readityourself/book-open.png
+++ /dev/null
Binary files differ
diff --git a/plugins/readityourself/readityourself.html b/plugins/readityourself/readityourself.html
deleted file mode 100644
index 5e200715..00000000
--- a/plugins/readityourself/readityourself.html
+++ /dev/null
@@ -1 +0,0 @@
1<span><a href="%s?url=%s"><img class="linklist-plugin-icon" src="%s/readityourself/book-open.png" title="Read with Readityourself" alt="readityourself" /></a></span>
diff --git a/plugins/readityourself/readityourself.meta b/plugins/readityourself/readityourself.meta
deleted file mode 100644
index bd611dd0..00000000
--- a/plugins/readityourself/readityourself.meta
+++ /dev/null
@@ -1,2 +0,0 @@
1description="For each link, add a ReadItYourself icon to save the shaared URL."
2parameters=READITYOUSELF_URL; \ No newline at end of file
diff --git a/plugins/readityourself/readityourself.php b/plugins/readityourself/readityourself.php
deleted file mode 100644
index 961c5bda..00000000
--- a/plugins/readityourself/readityourself.php
+++ /dev/null
@@ -1,51 +0,0 @@
1<?php
2
3/**
4 * Plugin readityourself
5 */
6
7// If we're talking about https://github.com/memiks/readityourself
8// it seems kinda dead.
9// Not tested.
10
11/**
12 * Init function, return an error if the server is not set.
13 *
14 * @param $conf ConfigManager instance.
15 *
16 * @return array Eventual error.
17 */
18function readityourself_init($conf)
19{
20 $riyUrl = $conf->get('plugins.READITYOUSELF_URL');
21 if (empty($riyUrl)) {
22 $error = 'Readityourself plugin error: '.
23 'Please define the "READITYOUSELF_URL" setting in the plugin administration page.';
24 return array($error);
25 }
26}
27
28/**
29 * Add readityourself icon to link_plugin when rendering linklist.
30 *
31 * @param mixed $data Linklist data.
32 * @param ConfigManager $conf Configuration Manager instance.
33 *
34 * @return mixed - linklist data with readityourself plugin.
35 */
36function hook_readityourself_render_linklist($data, $conf)
37{
38 $riyUrl = $conf->get('plugins.READITYOUSELF_URL');
39 if (empty($riyUrl)) {
40 return $data;
41 }
42
43 $readityourself_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/readityourself/readityourself.html');
44
45 foreach ($data['links'] as &$value) {
46 $readityourself = sprintf($readityourself_html, $riyUrl, $value['url'], PluginManager::$PLUGINS_PATH);
47 $value['link_plugin'][] = $readityourself;
48 }
49
50 return $data;
51}