diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-05-14 11:37:28 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-05-14 11:37:28 +0200 |
commit | 08dcd8ea58c07cd8258567ca14260aa18ba2660f (patch) | |
tree | 4e3a94b7469f5b2e3eaf946756235730429bf9d4 /doc/Plugins.md | |
parent | c01bd08eafe2bf52b02c3f285c7543b8d559dce1 (diff) | |
download | Shaarli-08dcd8ea58c07cd8258567ca14260aa18ba2660f.tar.gz Shaarli-08dcd8ea58c07cd8258567ca14260aa18ba2660f.tar.zst Shaarli-08dcd8ea58c07cd8258567ca14260aa18ba2660f.zip |
Doc update
Signed-off-by: ArthurHoaro <arthur@hoa.ro>
Diffstat (limited to 'doc/Plugins.md')
-rw-r--r-- | doc/Plugins.md | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/doc/Plugins.md b/doc/Plugins.md new file mode 100644 index 00000000..81167fcf --- /dev/null +++ b/doc/Plugins.md | |||
@@ -0,0 +1,77 @@ | |||
1 | #Plugins | ||
2 | ## Plugin installation | ||
3 | |||
4 | There is a bunch of plugins shipped with Shaarli, where there is nothing to do to install them. | ||
5 | |||
6 | If you want to install a third party plugin: | ||
7 | |||
8 | * Download it. | ||
9 | * Put it in the `plugins` directory in Shaarli's installation folder. | ||
10 | * Make sure you put it correctly: | ||
11 | |||
12 | ``` | ||
13 | | index.php | ||
14 | | plugins/ | ||
15 | |---| custom_plugin/ | ||
16 | | |---| custom_plugin.php | ||
17 | | |---| ... | ||
18 | |||
19 | ``` | ||
20 | |||
21 | * Make sure your webserver can read and write the files in your plugin folder. | ||
22 | |||
23 | ## Plugin configuration | ||
24 | |||
25 | In Shaarli's administration page (`Tools` link), go to `Plugin administration`. | ||
26 | |||
27 | Here you can enable and disable all plugins available, and configure them. | ||
28 | |||
29 | ![administration screenshot](https://camo.githubusercontent.com/5da68e191969007492ca0fbeb25f3b2357b748cc/687474703a2f2f692e696d6775722e636f6d2f766837544643712e706e67)[](.html) | ||
30 | |||
31 | ## Plugin order | ||
32 | |||
33 | In the plugin administration page, you can move enabled plugins to the top or bottom of the list. The first plugins in the list will be processed first. | ||
34 | |||
35 | This is important in case plugins are depending on each other. Read plugins README details for more information. | ||
36 | |||
37 | **Use case**: The (non existent) plugin `shaares_footer` adds a footer to every shaare in Markdown syntax. It needs to be processed *before* (higher in the list) the Markdown plugin. Otherwise its syntax won't be translated in HTML. | ||
38 | |||
39 | ## File mode | ||
40 | |||
41 | Enabled plugin are stored in your `config.php` parameters file, under the `array`: | ||
42 | |||
43 | ```php | ||
44 | $GLOBALS['config'['ENABLED_PLUGINS']]('ENABLED_PLUGINS'].html) | ||
45 | ``` | ||
46 | |||
47 | You can edit them manually here. | ||
48 | Example: | ||
49 | |||
50 | ```php | ||
51 | $GLOBALS['config'['ENABLED_PLUGINS'] = array(]('ENABLED_PLUGINS']-=-array(.html) | ||
52 | 'qrcode', | ||
53 | 'archiveorg', | ||
54 | 'wallabag', | ||
55 | 'markdown', | ||
56 | ); | ||
57 | ``` | ||
58 | |||
59 | ### Plugin usage | ||
60 | |||
61 | #### Official plugins | ||
62 | |||
63 | Usage of each plugin is documented in it's README file: | ||
64 | |||
65 | * `addlink-toolbar`: Adds the addlink input on the linklist page | ||
66 | * `archiveorg`: For each link, add an Archive.org icon | ||
67 | * [`markdown`](https://github.com/shaarli/Shaarli/blob/master/plugins/markdown/README.md): Render shaare description with Markdown syntax.[](.html) | ||
68 | * [`playvideos`](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md): Add a button in the toolbar allowing to watch all videos.[](.html) | ||
69 | * `qrcode`: For each link, add a QRCode icon. | ||
70 | * `readityourself`: For each link, add a ReadItYourself icon to save the shaared URL | ||
71 | * [`wallabag`](https://github.com/shaarli/Shaarli/blob/master/plugins/wallabag/README.md): For each link, add a Wallabag icon to save it in your instance.[](.html) | ||
72 | |||
73 | |||
74 | |||
75 | #### Third party plugins | ||
76 | |||
77 | See [Community & related software](https://github.com/shaarli/Shaarli/wiki/Community-%26-Related-software#third-party-plugins)[](.html) | ||