Commit graph

116 commits

Author SHA1 Message Date
ArthurHoaro
7fde6de121 New init function for plugins, supports errors reporting
All plugins can optionally add an init function named `pluginname_init()` which is called when the plugin is loaded.

This function is aware of the config, and can return initialization errors, which are displayed in the header template.

Note that the previous error system hack no longer work.
2016-10-14 13:22:58 +02:00
Teromene
5e148f8a52 Archive.org plugin: do not propose archival of private notes
Fixes #637
2016-10-13 16:37:43 +01:00
VirtualTam
8758bb0ac8 Merge pull request #619 from ArthurHoaro/plugins/param-desc
Add a description to plugin parameters
2016-08-13 14:48:51 +02:00
VirtualTam
db6dec0de1 Fix: add missing final newlines, untabify text
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-08-13 14:22:22 +02:00
ArthurHoaro
876533e868 Add a description to wallabag plugin parameters 2016-08-02 11:12:05 +02:00
Arthur
0c4c7ae818 Merge pull request #558 from ArthurHoaro/hashtag4
Hashtag system
2016-07-09 07:36:23 +02:00
Arthur
649af5b501 Merge pull request #570 from ArthurHoaro/config-manager
Introduce a configuration manager
2016-07-09 07:19:48 +02:00
ArthurHoaro
51def0d849 PluginManager no longer uses singleton pattern 2016-06-11 09:30:56 +02:00
ArthurHoaro
eeea1c3daa Use the configuration manager for wallabag and readityourself plugin 2016-06-11 09:30:56 +02:00
ArthurHoaro
9ccca40189 Hashtag system
* Hashtag are auto-linked with a filter search
  * Supports unicode
  * Compatible with markdown (excluded in code blocks)
2016-06-06 21:04:43 +02:00
ArthurHoaro
8c4e60186d The tag is no longer private
A private tag is never loaded for visitor, making this feature useless.
2016-05-30 18:51:00 +02:00
ArthurHoaro
e8b65d5f35 Markdown: inline code background color 2016-05-13 19:57:01 +02:00
ArthurHoaro
635d38c241 Process feeds content with Markdown 2016-03-26 17:13:58 +01:00
Arthur
1a84bf1e2b Merge pull request #520 from ArthurHoaro/plugins/nomarkdown
Markdown: Add the 'meta-tag' `.nomarkdown` which prevent a shaare fro…
2016-03-26 16:46:04 +01:00
ArthurHoaro
340252ae5d Update markdown plugin README documentation
* Add the `.nomarkdown` section.
  * Update misleading statements.
2016-03-26 16:43:14 +01:00
ArthurHoaro
3ce20d9e84 Markdown: Add the 'meta-tag' .nomarkdown which prevent a shaare from being parsed with markdown
Also add the tag in tag list in edit_link, so it will appear on autocompletion.
2016-03-21 18:46:34 +01:00
ArthurHoaro
bcd078bf0a Plugin: add render_feed hook and call it while generating ATOM and RSS feed.
Create an example of the new hook in the demo plugin.
2016-03-18 19:13:48 +01:00
kalvn
841df2dd55 Avoids populating a markdown empty container if there's no description. 2016-02-28 18:24:30 +01:00
ArthurHoaro
1b0e3c7fdf Fixes #411: remove hardcoded plugin icon size 2016-02-28 14:25:10 +01:00
Arthur
10269bc8c9 Merge pull request #491 from ArthurHoaro/markdown-escape2
Markdown: don't escape content + sanitize sensible tags
2016-02-25 08:52:42 +01:00
ArthurHoaro
2925687e1e Markdown: don't escape content + sanitize sensible tags
Instead of trying to fix broken content for Markdown parsing, parse it unescaped, then sanatize sensible tags such as scripts, etc.
2016-02-19 19:37:13 +01:00
Nicolas Danelon
01abde4f14 adding styles for code & pre tags 2016-02-19 09:58:01 -03:00
ArthurHoaro
9f57d1916c Wallabag plugin: add version parameter in the meta file 2016-02-10 13:08:19 +01:00
ArthurHoaro
1456358240 Fixes forced git changes
Probably related to the introduction of .gitattribute with forced line ending.
2016-01-31 19:22:14 +01:00
Arthur
53603f5823 Merge pull request #388 from ArthurHoaro/pluginadmin
Fixes #378 - Plugin administration UI.
2016-01-31 19:00:13 +01:00
Arthur
893338f0d4 Merge pull request #379 from ArthurHoaro/plugin-markdown
PLUGIN Markdown
2016-01-31 18:57:29 +01:00
ArthurHoaro
dea0ba28f9 Fixes #378 - Plugin administration UI. 2016-01-31 18:54:48 +01:00
VirtualTam
fc17813bd1 tests: add a make target to check file permissions
Additions:
- [makefile] check versioned files are not executable
- [travis]   call the new make target

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-01-17 21:02:24 +01:00
ArthurHoaro
c0a50f3663 Git *wants* to rewrite this file in the exact same way...
Probably a line ending issue...
2016-01-06 20:40:17 +01:00
ArthurHoaro
1be4afacf9 PLUGIN Markdown
Parse link description in Markdown (HTML) before rendering.

      * hard remove of Shaarli's HTML before parsing.
      * Using Parsedown <https://github.com/erusev/parsedown> PHP lib.
      * Includes basic markdown CSS.
      * Style: removed 400px height max limit for shaares.
      * Unit tests.
2016-01-03 17:36:10 +01:00
VirtualTam
defc8a3f03 Merge pull request #417 from ArthurHoaro/wallabag-improve
Wallabag plugin improvement
2016-01-02 20:09:29 +01:00
ArthurHoaro
938d9cce77 Wallabag plugin improvement
* Fixes a bug where URL weren't properly encoded.
  * Adds Wallabag V2 support.
  * Adds a URL function to handle trailing slash.
  * UT.
  * README updated.
2015-12-27 15:30:34 +01:00
VirtualTam
ccb7cf9855 Merge pull request #418 from ArthurHoaro/qrcode-bug
QRCode plugin: use url instead of real_url
2015-12-23 19:50:33 +01:00
ArthurHoaro
49e62f22ad QRCode plugin: use url instead of real_url
Fixes #414 and avoid usage of redirector in QRCode.

Also fixed a bug with URL encoding.
2015-12-22 10:59:41 +01:00
ArthurHoaro
28a4fc546f Fixes QRCode style
* fixes a regression misplacing QRCode popup.
 * adds a 'show' class in JS to handle CSS transition.
2015-12-21 14:01:52 +01:00
VirtualTam
79851b4890 Merge pull request #406 from ArthurHoaro/qrcode-style
Fixes #403 : Remove QRCode in core CSS and fix plugin layout
2015-12-09 01:00:52 +01:00
VirtualTam
2f3e74090a Merge pull request #408 from ArthurHoaro/gototop
Adding a new placeholder in render_footer hook.
2015-12-09 00:55:52 +01:00
ArthurHoaro
40a5f296a6 Adding a new placeholder in render_footer hook.
Allow free elements at the end of the page.
2015-12-08 16:02:46 +01:00
ArthurHoaro
38603b2450 Fixes #403: build the daily page through renderPage()
* new entry in the Router for daily page.
  * add an always displayed button in demo_plugin
2015-12-08 15:51:49 +01:00
ArthurHoaro
6a6f6c32e5 Fixes #403 : Remove QRCode in core CSS and fix plugin layout 2015-12-07 11:03:30 +01:00
nodiscc
8025c63906 [doc] add apache2 CSP config 2015-11-30 23:17:01 +01:00
nodiscc
a33c574461 remove obsolete doc 2015-11-30 22:43:28 +01:00
ArthurHoaro
90e5bd65c9 URL encode links when a redirector is set.
Fixes #328 - URL encode links when a redirector is set

  * WARNING - template edit - new variable available : "real_url"
  Contains the final real url (redirected or any other change on original URL)

  * Don't redirect shaares link in RSS/Atom.
  * Affects links shaared in description.
  * Move text2clickable and keepMultipleSpaces to Utils.php + unit test

UPDATE:

* keepMultipleSpaces renamed to space2nbsp
* space2nbsp improved to handle single space at line beginning
* links in text description aren't 'nofollow' anymore
2015-11-26 20:14:38 +01:00
ArthurHoaro
e4b9a7633d Bugfix: do not store plugin errors in data.php
Before this, calling writeConfig() would have write error messages in data.php, because it uses 'plugins' array which is used for plugin configuration.

Causing the message error appear everytime.
2015-11-22 14:45:09 +01:00
VirtualTam
a7921b2445 cleanup: remove the executable bit from source scripts
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-11-11 19:19:24 +01:00
ArthurHoaro
056107ab4e Handle errors raised by plugins in template. fixes #370 2015-11-08 13:22:44 +01:00
Arthur
89dfc37b0a Merge pull request #286 from ArthurHoaro/plugin-demo_plugin
PLUGIN demo_plugin
2015-11-08 12:54:02 +01:00
ArthurHoaro
786ddad91d PLUGIN demo_plugin
This plugin try to cover Shaarli's plugin API entirely.
Can be used by plugin developper to make their own.
2015-11-08 12:47:44 +01:00
Arthur
66017e2893 Merge pull request #281 from ArthurHoaro/plugin-wallabag
PLUGIN wallabag
2015-11-08 12:46:17 +01:00
Arthur
e760840fea Merge pull request #280 from ArthurHoaro/plugin-readityourself
PLUGIN readityourself
2015-11-08 12:45:19 +01:00
Arthur
00c25040c5 Merge pull request #279 from ArthurHoaro/plugin-addlink_toolbar
PLUGIN: addlink_toolbar
2015-11-08 12:45:07 +01:00
ArthurHoaro
1696f6aa07 unit tests for the wallabag plugin
+ removed exit error if the config is not found
+ coding style
2015-11-08 12:44:29 +01:00
ArthurHoaro
b11c8f25df unit tests for readityourself plugin + remove hard error 2015-11-08 12:42:29 +01:00
ArthurHoaro
ff5bda8238 unit test for addlink_toolbar + coding style 2015-11-08 12:40:14 +01:00
ArthurHoaro
1b2b44f4bd PLUGIN: addlink_toolbar
Add a field in linklist page to paste a new link.

Displayed in fields toolbar.
2015-11-08 12:20:20 +01:00
ArthurHoaro
75b69987b3 PLUGIN readityourself
Add an icon for each link (linklist) for ReadItYourself
2015-11-08 12:02:41 +01:00
Arthur
245432e796 Merge pull request #284 from ArthurHoaro/plugin-playvideos
PLUGIN playvideos
2015-11-07 16:53:07 +01:00
Arthur
c536c98ae1 Merge pull request #285 from ArthurHoaro/plugin-qrcode
PLUGIN QRCode
2015-11-07 16:52:53 +01:00
ArthurHoaro
263d1f6495 PLUGIN wallabag
Add a Wallabag icon in linklist for each link.
2015-11-07 16:45:20 +01:00
ArthurHoaro
9a364c283e Add unit test for archiveorg plugin
+ coding style
2015-11-07 16:40:25 +01:00
ArthurHoaro
b7b9dbb0d5 PLUGIN archiveorg
Display an archive.org icon in linklist, foreach links.
2015-11-07 16:40:25 +01:00
ArthurHoaro
840caea64f Add unit tests for Playvideos plugin
+ coding style
2015-11-07 16:30:56 +01:00
ArthurHoaro
b17c19ff76 PLUGIN playvideos
Display a button in buttons toolbar which allows to play all videos found.
2015-11-07 16:21:21 +01:00
ArthurHoaro
abb3ff38f5 Add unit tests for the QRCode plugin
+ coding style
2015-11-07 16:13:08 +01:00
ArthurHoaro
14c8efbe31 PLUGIN QRCode
Add an icon in linklist to display links QRCode
2015-11-07 15:32:28 +01:00
ArthurHoaro
0aec972a8b Plugins TODO.md 2015-11-07 15:27:22 +01:00