Commit Graph

331 Commits

Author SHA1 Message Date
Alexandre Alapetite
7e72033859 Filter on last user modified (#8093)
Example: `userdate:PT1H` to select only articles modified by user during the last hour
Fix https://github.com/FreshRSS/FreshRSS/issues/4280#issuecomment-3393078024

Useful for instance to bulk mark as unread recently marked articles by error:
1. Click on the toggle button to show the read articles (making sure the toggle for the unread articles is off)
2. Sort by *User modified 9→1*
3. Filter by *user modified date*, for instance to the last 3 hours by typing `userdate:PT3H`
4. Click in the drop-down menu *Mark selection as unread*

P.S.: I have added at the same time a bunch of unit tests for date-related logic
2025-10-15 00:12:19 +02:00
Alexandre Alapetite
e070c3ed2b Implement search form (#8103)
* Add UI for advanced search
To help users with the seach operators.
Obviously not as powerful as a manually-written search query.
Lack in particular negation and logical *and* for now, but I might try to do something about it.

<img width="939" height="1438" alt="image" src="https://github.com/user-attachments/assets/0bcad39b-eff3-4f44-876b-a2552af2af00" />

* Consistency: allow multiple user queries like S:1,2

* Fix user query and add tests
2025-10-15 00:08:40 +02:00
Alexis Degrugillier
b6f4276c6c Change regional language codes (#8065)
* Change regional language codes

According to `ISO-639-1` and `ISO-3166-1 alpha-2` recommendations, regional
languages must be written with the language code in lowercase and the region
in uppercase. For instance, we should have `en-US` instead of `en-us`.

Folders have been updated to reflect those recommendations and regional
language codes have been updated in the translation files.

* Update README files

* Fix configuration for typos

* Revert language order in documentation

* Remove unnecessary code

* Change language configuration getter

* Fix phpstan error

* Fix typo

* Add types

* escape regex

* Move language logic to avoid magic or deprecated methods

* Minor fix on regex
2025-10-06 21:09:01 +02:00
Inverle
be49726ebb Replace translation status flags with text section (#7842)
* Replace translation status flags with text section

* make fix-all

* Update README.md

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>

* Improve with suggestions

* Improve with further suggestions

* fix headers

* BCP 47
https://developer.mozilla.org/en-US/docs/Glossary/BCP_47_language_tag

* en-US: `TODO` -> `IGNORE`

* i18n: fr

* i18n: fr

* i18n: fr

* Links

---------

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-10-02 23:00:16 +02:00
Alexis Degrugillier
032316155c Add a new hook in the UI (#8054)
* Add a new hook in the UI

The new hook allows extension to add their own tool bar to navigate between
entries. For instance, if the user wants less or more buttons that what's
available by default.

See #7912
See #7913

* add link data to ease navigation
2025-10-02 15:33:53 +02:00
Alexis Degrugillier
dac275ce3a Add support for extension priority (#8038)
Extension can now define their hook priority. This will allow to define the order in which hooks are triggered.

See #7110

Closes #7110

Changes proposed in this pull request:

- Add support for extension priority

How to test the feature manually:

1. Create an extension with 2 hooks on the same hook type but different priority
2. The hooks must be prepending the title with different values
3. Validate that changing the hook priority changes the final title accordingly.
2025-10-01 11:01:31 +02:00
maTh
2bcc090622 configurable notification timeout (#7942)
Ref #7931
Ref #5466
Ref #6409

added configuration in "Display"
<img width="636" height="167" alt="grafik" src="https://github.com/user-attachments/assets/7bbc9f26-d91b-4dd2-b715-1d3f9b7a9ad3" />

* i18n: fr

* Update app/i18n/pl/conf.php

Co-authored-by: Inverle <inverle@proton.me>

* make fix-all

* max()

* Minor whitespace
(I am not a fan of excessive vertical indenting)

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Inverle <inverle@proton.me>
2025-10-01 10:48:07 +02:00
Alexis Degrugillier
72884813e1 Add hook enums (#8036)
- add an enum to handle hook types (enum are available since PHP 8.1)
- change hook calls from string value to enum value
2025-09-30 22:59:41 +02:00
Alexandre Alapetite
34532c0dd4 Add new visibility priority *Show in its feed* (#7972)
* Add new visibility priority *Show in its feed*
fix https://github.com/FreshRSS/FreshRSS/pull/7970#issuecomment-3293917428 (you can't directly filter a hidden feed, it just shows a 404 page)
And add a new visibility *Show in its feed* to show the feed in the list but not its articles.
Ensure that visibility *hidden* is not shown to API.

* TODO for later

* Update app/i18n/pl/sub.php

Co-authored-by: Inverle <inverle@proton.me>
2025-09-30 10:05:17 +02:00
beerisgood
f0388f64ac Update German (#7833)
* Update sub.php

German translation added.

* Update gen.php

German translation added

* make fix-all

* Update conf.php

* make fix-all

* Update index.php

* make fix-all

* Update admin.php

* Update feedback.php

* Update app/i18n/de/index.php

* make fix-all

* Apply suggestions from code review

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>

* Update app/i18n/de/index.php

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>

* Update app/i18n/de/feedback.php

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>

* Icon

* make fix-all

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
Co-authored-by: Alexis Degrugillier <aledeg@users.noreply.github.com>
2025-09-21 13:45:12 +02:00
Horváth Zsolt
508b1bb1ce 6846 i18n update hungarian language (#7986)
* Update hungarian translation

* Update hungarian translation status as well
2025-09-20 00:10:26 +02:00
KleinMann
d670bf1e72 Add entry_before_update and entry_before_add hooks (#7977)
Discussion: https://github.com/FreshRSS/FreshRSS/discussions/7973

Changes proposed in this pull request:

- Add new extension hook "entry_before_add"
- Add new extension hook "entry_before_update"

How to test the feature manually:

1. Create extension that uses the hooks and confirm they are invoked correctly.

Extension to use for testing
https://github.com/rnkln/freshrss-xExtension-Discord/pull/2
2025-09-18 23:44:17 +02:00
scmaybee
38b7daedf7 i18n zh-CN: Update conf.php (#7944)
* Update conf.php

Supplementary part of the translation.

* Update app/i18n/zh-cn/conf.php

* Update app/i18n/zh-cn/conf.php

* Update app/i18n/zh-cn/conf.php

* Fixes

---------

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-09-15 22:12:25 +02:00
Inverle
697240813d i18n: add missing string in pl (#7963)
It was supposed to be done in https://github.com/FreshRSS/FreshRSS/pull/7712#discussion_r2179851787, but that PR hasn't been yet finished for some time now.
2025-09-14 21:25:21 +02:00
Denys Nykula
6d0bec14e5 Translate to Ukrainian (#7961) 2025-09-14 21:17:30 +02:00
Bastian Greshake Tzovaras
8e8ff4014d add collection of scraping settings (#7937)
Closes #7894

Changes proposed in this pull request:

- adds the link to the collection of XPath scraping settings to the appropriate documentation page
2025-09-11 09:10:30 +02:00
Frans de Jonge
c6c2e1bc55 Translate Dutch (#7940)
* Translate Dutch

* ignore

* update the SVG file

* without newline
2025-09-10 21:34:34 +02:00
Alexis Degrugillier
a1411c7f2c Translate the API information page (#7922)
Closes #6222
Translate the `api/index.php` page

* Update app/i18n/pl/api.php

Co-authored-by: Inverle <inverle@proton.me>

* Update app/i18n/de/api.php

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>

* i18n: fr
* <kbd>

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

---------

Co-authored-by: Inverle <inverle@proton.me>
Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-09-10 07:04:17 +02:00
triatic
56df7f826a Should be REMOTE_USER not Remote-User (#7828)
For fastcgi, REMOTE_USER is the correct variable.
2025-08-15 12:15:54 +02:00
Inverle
2b85a50ed7 Show warning when unsafe CSP policy is in use (#7804)
* Show warning when unsafe CSP policy is in use

* Fix bare markdown URL

* i18n: fr

* Minor i18n: fr

* Add target="_blank" to i18n strings

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-08-09 21:47:39 +02:00
Inverle
d9197d7e32 New JS attribute: data-auto-leave-validation (#7785)
Instead of a repeating pattern like: `<input type="text" value="something" data-leave-validation="something">`, you can now put a `data-auto-leave-validation="1"` attribute on a `<form>` for example, and it will automatically set the `data-leave-validation` attributes inside the form elements.

`data_auto_leave_validation(parent)`  from `extra.js` is called on slider open and page load.

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2025-08-08 17:39:38 +02:00
Ali Moslemi
084f954980 Add Persian (fa) translations for FreshRSS (#7795)
* Add Persian (fa) translations for FreshRSS

* Fix Persian translation and syntax issues

* Apply fix-all for Persian translation2

* Fix syntax errors and update Persian translations

* Mark untranslated strings as IGNORE and fix remaining TODOs

* make fix-all

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-08-08 11:01:47 +02:00
Alexandre Alapetite
1f8273803f Add more unicity criteria based on title and/or content (#7789)
* Add more unicity criteria based on title and/or content
https://github.com/FreshRSS/FreshRSS/discussions/7788

* More
2025-08-07 22:20:08 +02:00
Inverle
3ce64d271b Implement sudo mode / reauthentication (#7753)
* Implement sudo mode / reauthentication

* i18n: fr

* generate flags

* Improvements

* Remove HMAC check
* Don't require reauth to access logs when signed in as admin
* Notify user of bad login via notification instead

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-07-31 13:53:14 +02:00
Inverle
f85333e98a Require current password when setting new password (#7763)
* Require current password when setting new password

* i18n: fr

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-07-31 09:24:37 +02:00
Inverle
e33ef74af9 before_login_btn hook + system conf attributes (#7761)
* `before_login_btn` hook + system conf attributes

* phpstan fix

* Refactoring

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-07-30 08:03:04 +02:00
Alexandre Alapetite
5489d864f6 Fix i18n translation flags 2025-07-16 17:03:39 +02:00
Inverle
f9a42adade Show translation status in README.md (#7715)
* Show translation status in README.md

* Fix colon

* markdownlint: Allow tag `<translations>`

* Use mostly Unicode flags instead

* Only `oc.svg` remains in an image format
* `check.translation.php` still supports `.png` even though there aren't any PNGs as of right now

* Fix CodeSniffer

* Attempt approach with generating local SVGs

* Fixes for local SVG approach

* Cleanup old code

* PHPStan fix

* Remove decimal precision from percentages

* Suggestions + better error messages

* codesniffer fix v2

* Revert `ghSearchUrl` change

* Generate readme

* Fix syntax highlight, maybe

* Regenerate

* Update help message

* Use existing translation files instead of .txt

* Add test against wrong Unicode flag

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-07-16 16:11:51 +02:00
Inverle
7915abd833 Implement custom feed favicons (#7646)
Closes #3789, #6503

Icon setting when no custom icon is set yet:

![image](https://github.com/user-attachments/assets/28b07dd0-7dac-4c76-b1d7-77035f91a87a)

- `Change...` button opens a file dialog, and after selecting a file shows the chosen icon in the preview on the left. `Submit` must be clicked after selecting the icon.
- `Reset to default` changes the preview icon to the default one, and also requires `Submit` to be clicked to apply the changes.

Full list of changes:
- CSP now includes `blob:` in `img-src` for
   - `indexAction()` and `feedAction()` in `subscriptionController.php`
   - all of the view actions in `indexController.php`
- Introduce new attribute `customFavicon (boolean)` for feeds that indicates if the feed has a custom favicon
   - `hashFavicon()` in `Feed.php` is dependent on this attribute
      - `hashFavicon()` has a new parameter called `skipCache (boolean)` that allows the reset of the favicon hash for the Feed object
      - `resetFaviconHash()` just calls `hashFavicon(skipCache: true)`
- `f.php` URLs now have the format of `/f.php?h=XXXXX&t=cachebuster`, where the `t` parameter is only used for serving custom favicons
   - if `t` parameter is set, `f.php` returns a `Cache-Control: immutable` header
- `stripos` and `strpos` were changed to `str_contains` in various places (refactor)
- JS for handling the custom favicon configuration logic is in `extra.js` inside `init_update_feed()` which is called when feed configuration is opened from the aside or when the subscription management page with the feed is loaded
   - Server-side code for uploading the icon in `subscriptionController.php` under `feedAction()`
   - Errors that may occur during the setting of a custom favicon:
      - Unsupported image file type (handled only server-side with `isImgMime()`)
      - When the file is bigger than 1 MiB (default), handled both client-side and server-side
      - Standard feed error when `updateFeed()` fails
- JS vars `javascript_vars.phtml` are no longer escaped with `htmlspecialchars()`, instead with json encoding,
- CSS for disabled buttons was added
- Max favicon file size is configurable with the `max_favicon_upload_size` option in `config.php` (not exposed via UI)
- Custom favicons are currently deleted only when they are either reset to the default icon, or the feed gets deleted. They do not get deleted when the user deletes their account without removing their feeds first.
- ` faviconPrepare()` and `faviconRebuild()` are not allowed to be called when the `customFavicon` attribute is `true`
- New i18n strings:
   - `'sub.feed.icon' => 'Icon'`
   - `'sub.feed.change_favicon' => 'Change…'`
   - `'sub.feed.reset_favicon' => 'Reset to default'`
   - `'sub.feed.favicon_changed_by_ext' => 'The icon has been set by the <b>%s</b> extension.'`
   - `'feedback.sub.feed.favicon.too_large' => 'Uploaded icon is too large. The maximum file size is <em>%s</em>.'`
   - `'feedback.sub.feed.favicon.unsupported_format' => 'Unsupported image file format!'`
- Extension hook `custom_favicon_hash`
   - `setCustomFavicon()` method
   - `resetCustomFavicon()` method
   - `customFaviconExt` and `customFaviconDisallowDel` attributes
   - example of usage: https://github.com/FreshRSS/Extensions/pull/337
- Extension hook `custom_favicon_btn_url`
   - Allows extensions to implement a button for setting a custom favicon for individual feeds by providing an URL. The URL will be sent a POST request with the `extAction` field set to either `query_icon_info` or `update_icon`, along with an `id` field which describes the feed's ID.
2025-06-30 12:01:56 +02:00
Alexandre Alapetite
c8bbf35534 Add search operator c: for categories (#7696)
* Add search operator `c:` for categories
fix https://github.com/FreshRSS/FreshRSS/discussions/7692
Allow searching for e.g. `c:23,34`
2025-06-29 11:09:08 +02:00
Stefan
51298cd6bc Exposed the reading modes for extensions through Minz (#7668)
* + Exposed the reading modes for extensions through Minz. Now extensions can add a custom view mode. Graceful fallback to normal view in case the extension was disabled without resetting the view_mode through the uninstall method. In that case the user will be informed via Minz_Request::setBadNotification that the view has been reset to normal.
+ Added translation strings for de, en and en-us for the notification

* + Added missing, generated translations

* Simplify indexAction, performance

* Minor settings htmlspecialchars

* i18n: fr

* Minor wording

* Doc

* Fix i18n

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-06-22 00:36:32 +02:00
Alexandre Alapetite
aa45bcbe5a Fix Markdown 78a4256 (#7678)
Fix for 78a4256362
2025-06-18 22:15:54 +02:00
ghostvirus
78a4256362 Merge commit from fork 2025-06-18 21:11:41 +02:00
Alexandre Alapetite
2b94cffeab Archive some change logs (#7650)
* Move old changelog

* Archive some logs
2025-06-04 11:39:59 +02:00
Alexandre Alapetite
cc35094bb2 Add API endpoint for extensions (#7576)
* Add API endpoint for extensions
Useful for https://github.com/FreshRSS/FreshRSS/issues/7572

* Support PATH_INFO
Now also support being invoked like `/api/misc.php/Extension%20Name/`

* More  documentation
2025-06-03 00:16:17 +02:00
dependabot[bot]
7d86cbe804 Bump markdownlint-cli from 0.44.0 to 0.45.0 (#7632)
* Bump markdownlint-cli from 0.44.0 to 0.45.0

Bumps [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) from 0.44.0 to 0.45.0.
- [Release notes](https://github.com/igorshubovych/markdownlint-cli/releases)
- [Commits](https://github.com/igorshubovych/markdownlint-cli/compare/v0.44.0...v0.45.0)

---
updated-dependencies:
- dependency-name: markdownlint-cli
  dependency-version: 0.45.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix Markdown

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-06-01 22:50:58 +02:00
Alexandre Alapetite
f2a7af03e8 Remove Apache 2.2 (only support Apache 2.4+) (#7561)
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/7552
I cannot find any distribution still supporting Apache 2.2
2025-05-07 14:45:43 +02:00
Alexandre Alapetite
0c33d27139 Secure serving of user files from extensions (#7495)
* Secure serving of user files from extensions
fix https://github.com/FreshRSS/FreshRSS/issues/4930

* More fixes

* Typo
2025-04-07 08:47:42 +02:00
22cs
89b0e1168e Update 10_filter.md to provide detailed explanations of the time syntax. (#7464)
* Update 10_filter.md to provide detailed explanations of the time syntax.

* Update 03_Main_view.md to provide detailed explanations of the time syntax.

* Reworded

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-04-01 17:55:39 +02:00
hkcomori
9e8c306b3e JavaScript: new event to detect context loaded (#7452)
* Add JavaScript event: freshrss:globalContextLoaded

* Update docs

* Update docs: fix typo
2025-03-25 10:18:33 +01:00
docxml
2567f76950 Update 02_Prerequisites.md (#7448)
* Update 02_Prerequisites.md

Line numbers have varied over time

* Same for fr

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-03-22 23:16:20 +01:00
Alexandre Alapetite
a7361a3e7c Implement JSON string concatenation with & operator (#7414)
Inspired by [JSONata syntax](https://docs.jsonata.org/expressions).
fix https://github.com/FreshRSS/FreshRSS/issues/6565
2025-03-13 22:40:41 +01:00
Alexandre Alapetite
af1b4cfa5f Changelog + credits 2025-03-13 22:20:03 +01:00
Olicorne
31c797b3fc docs: add link to freshrss_python_api (#7401)
as suggested here: https://github.com/FreshRSS/FreshRSS/discussions/7395

Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
2025-03-04 23:50:48 +01:00
Elanna Grossman
60b5459cac Update Reader Link Documentation (#7362)
* docs(docs): update Reeder link to point to Reeder Classic

* docs(CREDITS): add name to credits
2025-02-24 12:35:00 +01:00
Alexandre Alapetite
df82c23943 Release 1.26.0 2025-02-23 16:15:36 +01:00
kleintux
f59cb6ed4f Replace opml generateing nline tool with working link (#7346)
* Update 04_Subscriptions.md

* Update 04_Subscriptions.md
2025-02-21 11:29:40 +01:00
Alexandre Alapetite
6c6695b835 Docker Compose remove deprecated version (#7309)
Minor doc
2025-02-19 11:26:07 +01:00
Alexandre Alapetite
bf7a8bbdc5 API documentation link to more tips (#7305)
https://github.com/jocmp/capyreader/discussions/533#discussioncomment-11341808
While waiting for https://github.com/FreshRSS/FreshRSS/issues/7304
We should then consolidate the API synchronisation recommendations in our documentation
2025-02-06 23:14:20 +01:00
Logan
7e90dfd048 Add documentation for adding Pocket ID as OIDC provider (#7291)
* Add documentation for OIDC login via Pocket IT

* Images for the Pocket ID OIDC docs

* Update 16_OpenID-Connect.md

* Recompress images (too big)

* Fix typo and reduce long lines

* Remove advise on changing username
Which only work to some extent with SQLite (breaking a few minor things such as WebSub, API) and not at all with other databases

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-02-02 21:42:36 +01:00