]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - doc/md/Plugin-System.md
Generate HTML documentation using MkDocs (WIP)
[github/shaarli/Shaarli.git] / doc / md / Plugin-System.md
similarity index 88%
rename from doc/Plugin-System.md
rename to doc/md/Plugin-System.md
index addd792dedf5b9f3a1ac2b3544769535070e2ed5..d55ffe7e65d8b26f181a3f2f08ecc58e01c6ab2a 100644 (file)
@@ -1,7 +1,6 @@
-#Plugin System
-[**I am a developer.** Developer API.](#developer-api)[](.html)
+[**I am a developer.** Developer API.](#developer-api)
 
-[**I am a template designer.** Guide for template designer.](#guide-for-template-designer)[](.html)
+[**I am a template designer.** Guide for template designer.](#guide-for-template-designer)
 
 ## Developer API
 
@@ -48,7 +47,7 @@ hook_<plugin_name>_<hook_name>($data, $conf)
 
 Parameters:
 
-  - data: see [$data section](https://github.com/shaarli/Shaarli/wiki/Plugin-System#plugins-data)[](.html)
+  - data: see [$data section](https://github.com/shaarli/Shaarli/wiki/Plugin-System#plugins-data)
   - conf: the `ConfigManager` instance.
 
 For exemple, if my plugin want to add data to the header, this function is needed:
@@ -76,9 +75,9 @@ RainTPL displays every element contained in the placeholder's array. These eleme
 For example, let's add a value in the placeholder `top_placeholder` which is displayed at the top of my page:
 
 ```php
-$data['top_placeholder'[] = 'My content';](]-=-'My-content';.html)
+$data['top_placeholder'][] = 'My content';
 # OR
-array_push($data['top_placeholder'], 'My', 'content');[](.html)
+array_push($data['top_placeholder'], 'My', 'content');
 
 return $data;
 ```
@@ -93,9 +92,9 @@ For exemple, in linklist, it is possible to alter every title:
 
 ```php
 // mind the reference if you want $data to be altered
-foreach ($data['links'] as &$value) {[](.html)
+foreach ($data['links'] as &$value) {
     // String reverse every title.
-    $value['title'] = strrev($value['title']);[](.html)
+    $value['title'] = strrev($value['title']);
 }
 
 return $data;
@@ -117,25 +116,25 @@ Each file contain two keys:
 
 Use `demo_plugin` as a functional example. It covers most of the plugin system features.
 
-If it's still not working, please [open an issue](https://github.com/shaarli/Shaarli/issues/new).[](.html)
+If it's still not working, please [open an issue](https://github.com/shaarli/Shaarli/issues/new).
 
 ### Hooks
 
 | Hooks         | Description   |
 | ------------- |:-------------:|
-| [render_header](#render_header) | Allow plugin to add content in page headers. |[](.html)
-| [render_includes](#render_includes) | Allow plugin to include their own CSS files. |[](.html)
-| [render_footer](#render_footer) | Allow plugin to add content in page footer and include their own JS files. | [](.html)
-| [render_linklist](#render_linklist) | It allows to add content at the begining and end of the page, after every link displayed and to alter link data. |[](.html)
-| [render_editlink](#render_editlink) |  Allow to add fields in the form, or display elements. |[](.html)
-| [render_tools](#render_tools) |  Allow to add content at the end of the page. |[](.html)
-| [render_picwall](#render_picwall) |  Allow to add content at the top and bottom of the page. |[](.html)
-| [render_tagcloud](#render_tagcloud) |  Allow to add content at the top and bottom of the page, and after all tags. |[](.html)
-| [render_taglist](#render_taglist) |  Allow to add content at the top and bottom of the page, and after all tags. |[](.html)
-| [render_daily](#render_daily) |  Allow to add content at the top and bottom of the page, the bottom of each link and to alter data. |[](.html)
-| [render_feed](#render_feed) | Allow to do add tags in RSS and ATOM feeds. |[](.html)
-| [save_link](#save_link) | Allow to alter the link being saved in the datastore. |[](.html)
-| [delete_link](#delete_link) | Allow to do an action before a link is deleted from the datastore. |[](.html)
+| [render_header](#render_header) | Allow plugin to add content in page headers. |
+| [render_includes](#render_includes) | Allow plugin to include their own CSS files. |
+| [render_footer](#render_footer) | Allow plugin to add content in page footer and include their own JS files. | 
+| [render_linklist](#render_linklist) | It allows to add content at the begining and end of the page, after every link displayed and to alter link data. |
+| [render_editlink](#render_editlink) |  Allow to add fields in the form, or display elements. |
+| [render_tools](#render_tools) |  Allow to add content at the end of the page. |
+| [render_picwall](#render_picwall) |  Allow to add content at the top and bottom of the page. |
+| [render_tagcloud](#render_tagcloud) |  Allow to add content at the top and bottom of the page, and after all tags. |
+| [render_taglist](#render_taglist) |  Allow to add content at the top and bottom of the page, and after all tags. |
+| [render_daily](#render_daily) |  Allow to add content at the top and bottom of the page, the bottom of each link and to alter data. |
+| [render_feed](#render_feed) | Allow to do add tags in RSS and ATOM feeds. |
+| [save_link](#save_link) | Allow to alter the link being saved in the datastore. |
+| [delete_link](#delete_link) | Allow to do an action before a link is deleted from the datastore. |
 
 
 
@@ -154,19 +153,19 @@ Allow plugin to add content in page headers.
 
 ##### Template placeholders
 
-Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html)
+Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders:
 
   * `buttons_toolbar`: after the list of buttons in the header.
 
-![buttons_toolbar_example](http://i.imgur.com/ssJUOrt.png)[](.html)
+![buttons_toolbar_example](http://i.imgur.com/ssJUOrt.png)
 
   * `fields_toolbar`: after search fields in the header.
 
 > Note: This will only be called in linklist.
 
-![fields_toolbar_example](http://i.imgur.com/3GMifI2.png)[](.html)
+![fields_toolbar_example](http://i.imgur.com/3GMifI2.png)
 
 #### render_includes
 
@@ -183,7 +182,7 @@ Allow plugin to include their own CSS files.
 
 ##### Template placeholders
 
-Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html)
+Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders:
 
@@ -206,14 +205,14 @@ Allow plugin to add content in page footer and include their own JS files.
 
 ##### Template placeholders
 
-Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html)
+Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders:
 
   * `text`: called after the end of the footer text.
   * `endofpage`: called at the end of the page.
 
-![text_example](http://i.imgur.com/L5S2YEH.png)[](.html)
+![text_example](http://i.imgur.com/L5S2YEH.png)
 
   * `js_files`: called at the end of the page, to include custom JS scripts.
 
@@ -234,25 +233,25 @@ It allows to add content at the begining and end of the page, after every link d
 
 ##### Template placeholders
 
-Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html)
+Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders:
 
   * `action_plugin`: next to the button "private only" at the top and bottom of the page.
 
-![action_plugin_example](http://i.imgur.com/Q12PWg0.png)[](.html)
+![action_plugin_example](http://i.imgur.com/Q12PWg0.png)
 
   * `link_plugin`: for every link, between permalink and link URL.
 
-![link_plugin_example](http://i.imgur.com/3oDPhWx.png)[](.html)
+![link_plugin_example](http://i.imgur.com/3oDPhWx.png)
 
   * `plugin_start_zone`: before displaying the template content.
 
-![plugin_start_zone_example](http://i.imgur.com/OVBkGy3.png)[](.html)
+![plugin_start_zone_example](http://i.imgur.com/OVBkGy3.png)
 
   * `plugin_end_zone`: after displaying the template content.
 
-![plugin_end_zone_example](http://i.imgur.com/6IoRuop.png)[](.html)
+![plugin_end_zone_example](http://i.imgur.com/6IoRuop.png)
 
 #### render_editlink
 
@@ -268,13 +267,13 @@ Allow to add fields in the form, or display elements.
 
 ##### Template placeholders
 
-Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html)
+Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders:
 
   * `edit_link_plugin`: after tags field.
 
-![edit_link_plugin_example](http://i.imgur.com/5u17Ens.png)[](.html)
+![edit_link_plugin_example](http://i.imgur.com/5u17Ens.png)
 
 #### render_tools
 
@@ -290,13 +289,13 @@ Allow to add content at the end of the page.
 
 ##### Template placeholders
 
-Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html)
+Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders:
 
   * `tools_plugin`: at the end of the page.
 
-![tools_plugin_example](http://i.imgur.com/Bqhu9oQ.png)[](.html)
+![tools_plugin_example](http://i.imgur.com/Bqhu9oQ.png)
 
 #### render_picwall
 
@@ -313,7 +312,7 @@ Allow to add content at the top and bottom of the page.
 
 ##### Template placeholders
 
-Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html)
+Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders:
 
@@ -321,7 +320,7 @@ List of placeholders:
 
   * `plugin_end_zone`: after displaying the template content.
 
-![plugin_start_end_zone_example](http://i.imgur.com/tVTQFER.png)[](.html)
+![plugin_start_end_zone_example](http://i.imgur.com/tVTQFER.png)
 
 #### render_tagcloud
 
@@ -338,7 +337,7 @@ Allow to add content at the top and bottom of the page.
 
 ##### Template placeholders
 
-Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html)
+Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders:
 
@@ -350,7 +349,7 @@ For each tag, the following placeholder can be used:
 
   * `tag_plugin`: after each tag
 
-![plugin_start_end_zone_example](http://i.imgur.com/vHmyT3a.png)[](.html)
+![plugin_start_end_zone_example](http://i.imgur.com/vHmyT3a.png)
 
 
 #### render_taglist
@@ -368,7 +367,7 @@ Allow to add content at the top and bottom of the page.
 
 ##### Template placeholders
 
-Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html)
+Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders:
 
@@ -395,13 +394,13 @@ Allow to add content at the top and bottom of the page, the bottom of each link
 
 ##### Template placeholders
 
-Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html)
+Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders:
 
   * `link_plugin`: used at bottom of each link.
 
-![link_plugin_example](http://i.imgur.com/hzhMfSZ.png)[](.html)
+![link_plugin_example](http://i.imgur.com/hzhMfSZ.png)
 
   * `plugin_start_zone`: before displaying the template content.
 
@@ -423,7 +422,7 @@ Allow to add tags in the feed, either in the header or for each items. Items (li
 
 ##### Template placeholders
 
-Tags can be added in feeds by adding an entry in `$data['<placeholder>']` array.[](.html)
+Tags can be added in feeds by adding an entry in `$data['<placeholder>']` array.
 
 List of placeholders: