diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/playvideos/README.md | 26 | ||||
-rw-r--r-- | plugins/qrcode/qrcode.php | 2 |
2 files changed, 18 insertions, 10 deletions
diff --git a/plugins/playvideos/README.md b/plugins/playvideos/README.md index ec1ead8d..b1698470 100644 --- a/plugins/playvideos/README.md +++ b/plugins/playvideos/README.md | |||
@@ -1,21 +1,29 @@ | |||
1 | ### ► Play Videos plugin for Shaarli | 1 | ### ► Play Videos plugin for Shaarli |
2 | This plugin adds a `► Play Videos` button to [Shaarli](https://github.com/shaarli/Shaarli)'s toolbar. Click this button to play all videos on the page in an overlay HTML5 player. Nice for continuous stream of music, documentaries, talks... | ||
3 | 2 | ||
4 | This uses code from https://zaius.github.io/youtube_playlist/ and is currently only compatible with Youtube videos. | 3 | Adds a `► Play Videos` button to [Shaarli](https://github.com/shaarli/Shaarli)'s toolbar. Click this button to play all videos on the page in an overlay HTML5 player. Nice for continuous stream of music, documentaries, talks... |
4 | |||
5 | <!-- TODO screenshot --> | ||
5 | 6 | ||
6 | ![](https://cdn.mediacru.sh/D_izf0zjAtxy.png) | 7 | This uses code from https://zaius.github.io/youtube_playlist/ and is currently only compatible with Youtube videos. |
7 | 8 | ||
8 | #### Installation and setup | 9 | #### Installation and setup |
9 | Place the files in the `tpl/plugins/playvideos/` directory of your Shaarli. | ||
10 | This is a default Shaarli plugin, you just have to enable it. | ||
11 | 10 | ||
12 | To enable the plugin, add `playvideos` to the `TOOLBAR_PLUGINS` config option in your `index.php` or `data/options.php`. Example: | 11 | This is a default Shaarli plugin, you just have to enable it. See https://github.com/shaarli/Shaarli/wiki/Shaarli-configuration/ |
13 | 12 | ||
14 | $GLOBALS['config']['TOOLBAR_PLUGINS'] = array('aplugins', 'anotherone', 'playvideos'); | ||
15 | 13 | ||
16 | #### Troubleshooting | 14 | #### Troubleshooting |
15 | |||
17 | If your server has [Content Security Policy](http://content-security-policy.com/) headers enabled, this may prevent the script from loading fully. You should relax the CSP in your server settings. Example CSP rule for apache2: | 16 | If your server has [Content Security Policy](http://content-security-policy.com/) headers enabled, this may prevent the script from loading fully. You should relax the CSP in your server settings. Example CSP rule for apache2: |
18 | `Header set Content-Security-Policy "script-src 'self' 'unsafe-inline' https://www.youtube.com https://s.ytimg.com 'unsafe-eval'"` | 17 | |
18 | In `/etc/apache2/conf-available/shaarli-csp.conf`: | ||
19 | |||
20 | ```apache | ||
21 | <Directory /path/to/shaarli> | ||
22 | Header set Content-Security-Policy "script-src 'self' 'unsafe-inline' https://www.youtube.com https://s.ytimg.com 'unsafe-eval'" | ||
23 | </Directory> | ||
24 | ``` | ||
25 | |||
26 | Then run `a2enconf shaarli-csp; service apache2 reload` | ||
19 | 27 | ||
20 | ### License | 28 | ### License |
21 | ``` | 29 | ``` |
@@ -68,4 +76,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||
68 | THE SOFTWARE. | 76 | THE SOFTWARE. |
69 | 77 | ||
70 | ---------------------------------------------------- | 78 | ---------------------------------------------------- |
71 | ``` \ No newline at end of file | 79 | ``` |
diff --git a/plugins/qrcode/qrcode.php b/plugins/qrcode/qrcode.php index 1080c964..5f6e76a2 100644 --- a/plugins/qrcode/qrcode.php +++ b/plugins/qrcode/qrcode.php | |||
@@ -17,7 +17,7 @@ function hook_qrcode_render_linklist($data) | |||
17 | $qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html'); | 17 | $qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html'); |
18 | 18 | ||
19 | foreach ($data['links'] as &$value) { | 19 | foreach ($data['links'] as &$value) { |
20 | $qrcode = sprintf($qrcode_html, $value['url'], $value['url'], PluginManager::$PLUGINS_PATH); | 20 | $qrcode = sprintf($qrcode_html, $value['real_url'], $value['real_url'], PluginManager::$PLUGINS_PATH); |
21 | $value['link_plugin'][] = $qrcode; | 21 | $value['link_plugin'][] = $qrcode; |
22 | } | 22 | } |
23 | 23 | ||