]>
git.immae.eu Git - github/shaarli/Shaarli.git/blob - plugins/readityourself/readityourself.php
4 * Plugin readityourself
7 // If we're talking about https://github.com/memiks/readityourself
8 // it seems kinda dead.
12 * Init function, return an error if the server is not set.
14 * @param $conf ConfigManager instance.
16 * @return array Eventual error.
18 function readityourself_init($conf)
20 $riyUrl = $conf->get('plugins.READITYOUSELF_URL');
22 $error = 'Readityourself plugin error: '.
23 'Please define the "READITYOUSELF_URL" setting in the plugin administration page.';
29 * Add readityourself icon to link_plugin when rendering linklist.
31 * @param mixed $data Linklist data.
32 * @param ConfigManager $conf Configuration Manager instance.
34 * @return mixed - linklist data with readityourself plugin.
36 function hook_readityourself_render_linklist($data, $conf)
38 $riyUrl = $conf->get('plugins.READITYOUSELF_URL');
43 $readityourself_html = file_get_contents(PluginManager
::$PLUGINS_PATH . '/readityourself/readityourself.html');
45 foreach ($data['links'] as &$value) {
46 $readityourself = sprintf($readityourself_html, $riyUrl, $value['url'], PluginManager
::$PLUGINS_PATH);
47 $value['link_plugin'][] = $readityourself;