ArthurHoaro
bcba6bd353
New plugin hook: ability to add custom filters to Shaarli search engine
...
A new plugin hook has been added: hook_test_filter_search_entry
This hook allows to filter out bookmark with custom plugin code when a search is performed.
Related to #143
2021-02-04 11:02:50 +01:00
ArthurHoaro
035a002edc
Fix default_colors plugin: update CSS file on color change
...
Last update of this plugin remove the save_plugin_parameters hook.
Fixes #1657
2020-12-29 11:59:14 +01:00
ArthurHoaro
a6e9c08499
Plugin system: allow plugins to provide custom routes
...
- each route will be prefixed by `/plugin/<plugin_name>`
- add a new template for plugins rendering
- add a live example in the demo_plugin
Check out the "Plugin System" documentation for more detail.
Related to #143
2020-11-15 12:41:43 +01:00
ArthurHoaro
358cb20bcb
Plugin wallabag: minor improvements
...
- hide the wallabag icon for logged out users
- set API V2 as default parameter
- fix URL encoding issue with special chars
Fixes #1147
2020-10-27 21:03:29 +01:00
ArthurHoaro
a5a9cf23ac
Compatibility with PHPUnit 9
2020-09-29 18:57:20 +02:00
ArthurHoaro
8f60e1206e
Comply with PHPUnit V8: setup/teardown functions must return void
2020-09-26 15:08:39 +02:00
ArthurHoaro
76fe68d924
Fix plugin base path in core plugins
...
Also fix note check in archiveorg plugin, and regression on vintage template.
Documentation regarding relative path has been added.
Fixes #1548
2020-09-22 13:50:19 +02:00
ArthurHoaro
4ff703e369
Plugins: do not save metadata along plugin parameters
...
Also prevent the token to be saved.
Fixes #1550
2020-09-12 13:29:34 +02:00
ArthurHoaro
972daa4513
Default colors plugin: generate CSS file during initialization
...
Current behaviour only generate the custom CSS file when the plugin settings are saved, which can be annoying if the file is deleted but the settings are set.
Most common use case is Docker deployment, because the plugin directory is not mounted as a volume.
2020-08-29 09:38:30 +02:00
ArthurHoaro
7e3dc0ba98
Better handling of plugin incompatibility
...
If a PHP is raised while executing plugin hook, Shaarli will display an error instead of rendering the error page (or just ending in fatal error for default hooks).
Also added phpErrorHandler which is handled differently that regular errorHandler by Slim.:
2020-08-27 12:04:36 +02:00
ArthurHoaro
9fbc42294e
New basePath: fix officiel plugin paths and vintage template
2020-07-26 14:43:10 +02:00
ArthurHoaro
1a8ac737e5
Process main page (linklist) through Slim controller
...
Including a bunch of improvements on the container,
and helper used across new controllers.
2020-07-23 21:19:21 +02:00
ArthurHoaro
03340c18ea
Slim router: handle add tag route
2020-07-23 21:19:21 +02:00
ArthurHoaro
e26e2060f5
Add and update unit test for the new system (Bookmark + Service)
...
See #1307
2020-01-18 09:56:32 +01:00
ArthurHoaro
354fb98cc9
Markdown plugin: fix RSS feed direct link reverse
...
The plugin was only reversing permalinks and failed with setting rss_permalinks set to false
2019-08-15 12:56:32 +02:00
ArthurHoaro
b550735054
Default colors plugin - Add unit tests
2019-07-20 09:32:52 +02:00
ArthurHoaro
520d29578c
Remove the redirector setting
...
Fixes #1239
2019-02-09 13:55:11 +01:00
VirtualTam
dea72c711f
Optimize and cleanup imports
...
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-13 00:04:42 +01:00
VirtualTam
9585441734
namespacing: add plugin tests to \Shaarli\Plugin\[...]
...
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-12 23:11:19 +01:00
VirtualTam
e185038834
namespacing: \Shaarli\Plugin\PluginManager
...
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-12 23:11:19 +01:00
VirtualTam
a932f486f2
namespacing: \Shaarli\Router
...
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-12 23:11:19 +01:00
VirtualTam
fe3713d2e5
namespacing: move LinkUtils along \Shaarli\Bookmark classes
...
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-12 22:47:48 +01:00
VirtualTam
f24896b237
namespacing: \Shaarli\Bookmark\LinkDB
...
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-12 22:47:48 +01:00
VirtualTam
067c2dd8f5
lint: apply phpcbf to tests/
...
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2018-12-02 22:39:16 +01:00
ArthurHoaro
e95247d41d
Merge pull request #1205 from ArthurHoaro/feature/opengraph
...
Add OpenGraph meta tags on permalink page
2018-10-06 13:31:07 +02:00
ArthurHoaro
fa8100c088
Merge pull request #1212 from ArthurHoaro/hotfix/hashtag-md-escape
...
Fix hashtags with markdown escape enabled
2018-10-06 13:28:51 +02:00
ArthurHoaro
0e54e1059f
Isso plugin: add an icon in linklist if enabled
...
Fixes #1075
2018-08-14 13:39:31 +02:00
ArthurHoaro
cb7940e2de
Fix hashtags with markdown escape enabled
...
They're now transformed to markdown syntax links before processing them through Parsedown.
Fixes #1210
2018-08-14 12:26:51 +02:00
ArthurHoaro
a120fb2977
Add OpenGraph meta tags on permalink page
...
Includes:
- og:title
- og:type -> article
- og:image -> if there is a thumbnail
- og:url -> permalink
- og:description -> first 300 chars of raw description
- article:published_time
- article:modified_time
- article:tag -> one OG meta tag for each shaare tag
Fixes #258
2018-08-13 10:55:48 +02:00
ArthurHoaro
dd6794cff8
Fix feed permalink rendering with markdown escape set to true
...
Fixes #1134
2018-05-19 12:55:43 +02:00
ArthurHoaro
c5ee13181e
Update parsedown to its latest version instead of fixed 1.6
2018-03-31 13:00:13 +02:00
ArthurHoaro
d2d4f993e1
PSR: use elseif instead of else if
...
See https://www.php-fig.org/psr/psr-2/\#51-if-elseif-else
2018-02-28 22:34:40 +01:00
kalvn
50142efd1b
Executes daily hooks before creating columns.
2018-02-01 13:16:58 +01:00
ArthurHoaro
86ceea054f
Add a whitelist of protocols for URLs
...
- for Shaare
- for markdown description links and images
Not whitelisted protocols will be replaced by `http://`
2017-05-25 14:58:34 +02:00
ArthurHoaro
8e33d0e767
Remove readityourself plugin
...
Fixes #818
2017-04-01 12:32:43 +02:00
VirtualTam
3c66e56435
application: introduce the Shaarli\Config namespace
...
Namespaces have been introduced with the REST API, and should be generalized
to the whole codebase to manage object scope and benefit from autoloading.
See:
- https://secure.php.net/manual/en/language.namespaces.php
- http://www.php-fig.org/psr/psr-4/
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-03-04 17:07:52 +01:00
ArthurHoaro
e037610115
Add markdown_escape setting
...
This setting allows to escape HTML in markdown rendering or not.
The goal behind it is to avoid XSS issue in shared instances.
More info:
* the setting is set to true by default
* it is set to false for anyone who already have the plugin enabled
(avoid breaking existing entries)
* improve the HTML sanitization when the setting is set to false - but don't consider it XSS proof
* mention the setting in the plugin README
2017-02-28 19:16:54 +01:00
ArthurHoaro
053673cb71
Remove CSS call for addlink toolbar plugin
...
Fixes #724
2017-01-15 17:50:16 +01:00
VirtualTam
93b1fe54fb
Cleanup: explicit method visibility
...
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-01-05 19:52:04 +01:00
ArthurHoaro
db90dfcbbc
Move PubSubHubbub code as a default plugin
2016-12-20 11:41:24 +01:00
ArthurHoaro
d592daea83
Add a persistent 'shorturl' key to all links
...
All existing link will keep their permalinks.
New links will have smallhash generated with date+id.
The purpose of this is to avoid collision between links due to their creation date.
2016-12-12 03:03:12 +01:00
ArthurHoaro
c3dfd89959
Unit Test for the new ID system
2016-12-12 03:03:12 +01:00
ArthurHoaro
266e3fe5c8
Markdown: fixes feed rendering with nomarkdown tag
...
* make sure we match exactly `nomarkdown` tag
* pass the whole link data to stripNoMarkdownTag() to:
* strip the noMD tag in taglist (array)
* strip the tag in tags (string)
Fixes #689
tmp
2016-11-22 10:26:03 +01:00
ArthurHoaro
c5941f316a
Fix an issue with links not being reversed in code blocks
...
Fixes #672
+ Markdown to HTML unit test
2016-10-22 11:13:48 +02:00
ArthurHoaro
bf26e7ebcb
Isso comments plugin
...
Use Isso client to let visitors comments on permalinks
2016-10-17 09:23:14 +02:00
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
ArthurHoaro
15170b5164
Parse plugin parameters description with the PluginManager
...
Plugin parameter can contain a description in their meta file under the key:
parameter.<param_name>="<description>"
2016-08-02 11:12:01 +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