ArthurHoaro
4e3875c0ce
Feature: highlight fulltext search results
...
How it works:
1. when a fulltext search is made, Shaarli looks for the first
occurence position of every term matching the search. No change here,
but we store these positions in an array, in Bookmark's additionalContent.
2. when formatting bookmarks (through BookmarkFormatter
implementation):
1. first we insert specific tokens at every search result positions
2. we format the content (escape HTML, apply markdown, etc.)
3. as a last step, we replace our token with displayable span
elements
Cons: this tightens coupling between search filters and formatters
Pros: it was absolutely necessary not to perform the
search twice. this solution has close to no impact on performances.
Fixes #205
2020-10-16 20:31:12 +02:00
ArthurHoaro
4b3aca6623
Strict types: fix an issue in daily where the date could be an int
2020-10-16 12:04:46 +02:00
ArthurHoaro
efb7d21b52
Add strict types for bookmarks management
...
Parameters typing and using strict types overall increase the codebase
quality by enforcing the a given parameter will have the expected type.
It also removes the need to unnecessary unit tests checking methods
behavior with invalid input.
2020-10-13 13:50:11 +02:00
ArthurHoaro
fd1ddad98d
Add mutex on datastore I/O operations
...
To make sure that there is no concurrent operation on the datastore file.
Fixes #1132
2020-10-13 12:38:19 +02:00
ArthurHoaro
458b6b9918
Merge pull request #1540 from ArthurHoaro/fix/metadata-regexes
...
Improve regex to extract HTML metadata (title, description, etc.)
2020-10-13 12:26:55 +02:00
ArthurHoaro
1ea09a1b8b
Fix warning if the encoding retrieved from external headers is invalid
...
Also fixed the regex to support this failing header: charset="utf-8"\r\n"
2020-09-30 11:11:19 +02:00
ArthurHoaro
6128ab6a55
Merge pull request #1552 from ArthurHoaro/feature/better-initializer
2020-09-12 12:14:18 +02:00
ArthurHoaro
da7acb9830
Improve default bookmarks after install
...
Used @nodiscc suggestion in #1148 (slightly edited).
It provides a description of what Shaarli does, Markdown rendering demo, and a thumbnail link.
Fixes #1148
2020-09-10 16:29:17 +02:00
ArthurHoaro
27ddfec3c3
Fix visibility issue on daily page
...
This filter (links by day) didn't apply any visibility parameter.
Fixes #1543
2020-09-06 14:11:02 +02:00
ArthurHoaro
2cd0509b50
Improve regex to extract HTML metadata (title, description, etc.)
...
Also added a bunch of tests to cover more use cases.
Fixes #1375
2020-09-03 17:46:26 +02:00
ArthurHoaro
a8e210faa6
Fixed: Pinned bookmarks are displayed first in ATOM/RSS feeds
...
Fixes #1485
2020-08-29 10:06:40 +02:00
ArthurHoaro
1a68ae5a29
Bookmark's thumbnails PHPDoc improvement
2020-08-01 11:14:03 +02:00
ArthurHoaro
d6e5f04d39
Remove anonymous permission and initialize bookmarks on login
2020-08-01 11:10:57 +02:00
ArthurHoaro
301c7ab1a0
Better support for notes permalink
2020-07-28 20:46:11 +02:00
ArthurHoaro
c4ad3d4f06
Process Shaarli install through Slim controller
2020-07-23 21:19:21 +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
c22fa57a55
Handle shaare creation/edition/deletion through Slim controllers
2020-07-23 21:19:21 +02:00
ArthurHoaro
c4d5be53c2
Process Daily RSS feed through Slim controller
...
The daily RSS template has been entirely rewritten to handle the whole feed through the template engine.
2020-07-23 21:19:21 +02:00
ArthurHoaro
69e29ff65e
Process daily page through Slim controller
2020-07-23 21:19:21 +02:00
ArthurHoaro
c79473bd84
Handle tag filtering in the Bookmark service
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
b0428aa9b0
Migrate cache purge function to a proper class
...
And update dependencies and tests.
Note that SESSION['tags'] has been removed a log ago
2020-07-23 21:19:21 +02:00
ArthurHoaro
485b168a96
Process picwall rendering through Slim controller + UT
2020-07-23 21:19:21 +02:00
ArthurHoaro
a39acb2518
Fix an issue with private tags and fix nomarkdown tag
...
The new bookmark service wasn't handling private tags properly.
nomarkdown tag is now shown only for logged in user in bookmarks, and hidden for everyone in tag clouds/lists.
Fixes #726
2020-01-18 11:39:26 +01: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
cf92b4dd15
Apply the new system (Bookmark + Service) to the whole code base
...
See https://github.com/shaarli/Shaarli/issues/1307
2020-01-18 09:55:59 +01:00
ArthurHoaro
336a28fa4a
Introduce Bookmark object and Service layer to retrieve them
...
See https://github.com/shaarli/Shaarli/issues/1307 for details
2020-01-17 18:42:11 +01:00
ArthurHoaro
9f9627059a
Make sure that bookmark sort is consistent, even with equal timestamps
...
Fixes #1348
2019-08-07 13:18:02 +02:00
ArthurHoaro
6a4872520c
Automatically retrieve description for new bookmarks
...
If the option is enabled, it will try to find a meta tag containing
the page description and keywords, just like we do for the page title.
It will either look for regular meta tag or OpenGraph ones.
The option is disabled by default.
Note that keywords meta tags is mostly not used.
In `configure` template, the variable associated with this setting
is `$retrieve_description`.
Fixes #1302
2019-07-06 12:21:52 +02:00
ArthurHoaro
cc69aad4a9
Merge pull request #1271 from ArthurHoaro/hotfix/thumb-note-retrieve
...
Do not try to retrieve thumbnails for internal link
2019-03-02 10:54:06 +01:00
ArthurHoaro
a8e7da0114
Do not try to retrieve thumbnails for internal link
...
Also adds a helper function to determine if a link is a note and apply it across multiple files.
2019-02-24 12:25:50 +01:00
ArthurHoaro
c21dcc8199
Merge pull request #1270 from ArthurHoaro/hotfix/sticky-warning
...
Fix a warning if links sticky status isn't set
2019-02-24 11:30:35 +01:00
ArthurHoaro
b790f900c9
Fix a warning if links sticky status isn't set
...
- initiate its status to false when the link is created
- if not defined, initiate its status to false (can happen if the updater hasn't run)
2019-02-09 14:04:16 +01: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
fe3713d2e5
namespacing: move LinkUtils along \Shaarli\Bookmark classes
...
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-12 22:47:48 +01:00
VirtualTam
6696729b88
namespacing: \Shaarli\Bookmark\LinkFilter
...
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