1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-06-13 18:12:00 +02:00
Commit Graph

44 Commits

Author SHA1 Message Date
Dag
e21394d2d3 refactor: html format ()
* refactor: html format

Fix a few small bugs too

* fix

* fix

* trigger build

* striptags instead of encode title
2022-10-16 12:03:57 +02:00
Dag
2bbce8ebef refactor: general code base refactor ()
* refactor

* fix: bug in previous refactor

* chore: exclude phpcompat sniff due to bug in phpcompat

* fix: do not leak absolute paths

* refactor/fix: batch extensions checking, fix DOS issue
2022-08-06 22:46:28 +02:00
d107f8ed30 Improve Factory variable names () 2022-07-06 12:14:04 +02:00
Dag
4f75591060 Reformat codebase v4 ()
Reformat code base to PSR12

Co-authored-by: rssbridge <noreply@github.com>
2022-07-01 15:10:30 +02:00
Dag
af5648d928 refactor: FormatFactory () 2022-06-22 18:27:20 +02:00
fb501652d5 Formats: Remove display & related method ()
Format should not be responsible for sending HTTP response.
2022-06-07 18:05:33 +02:00
dag
dc01891634 fix: enclosure link privacy () 2022-04-08 23:14:43 +02:00
dag
c87f4631f2 [core] feat: improve date rendering in html formatter () 2022-03-22 20:41:13 +01:00
ecaae735d9 [core] Support for bridge maintainers' donation URLs () 2021-06-26 00:45:25 +05:00
b25674b3a0 [HtmlFormat] Use str_ireplace() when creating feed format URLs ()
Fixes feed format URLs not being created with correct format value if html feed URL uses a lowercase format value.
2021-03-08 12:17:12 +05:00
d65714fa47 [HtmlFormat] Add syndication links ()
Adds <link> elements for each additional output format in the <head> of
HTML format output to allow RSS readers to find the actual feeds
directly from the HTML page.
2019-11-09 18:43:21 +01:00
c8d5c85c76 formats: Add getMimeType() function ()
Allows getting the expected MIME type of the format's output. A
corresponding MIME_TYPE constant is also defined in FormatAbstract for
the format implementations to overwrite.
2019-10-31 19:00:12 +01:00
987f42d6d4 logo: Add logo to the project
References 
2019-06-25 18:42:11 +02:00
99d4571c6b core: Make RSS-Bridge more usable via mobile devices
Adds styles for display sizes smaller than 768px where
elements are currently hardly usable. Note that RSS-Bridge
is not designed for mobile use, but some users may want
to try things on their mobile phone before using it in
real life applications.

Resolves 
2019-06-22 18:46:37 +02:00
7ff97c0c7b [HtmlFormat] Dynamically build buttons for other feed formats
Adding or removing feed formats from the "formats/" directory
currently has no effect on the buttons shown in the HTML format.
This can cause errors if users press one of the buttons for a
format that is no longer available on the server.

This commit changes the behavior to dynamically add buttons based
on the available formats. Syndication feeds, however, are no longer
supported as they require knowledge about the content type, which
is not known without further changes to the formats API (may be
added later if there is a demand).

Closes 
2019-06-19 23:13:37 +02:00
988635dcf3 core: Add FeedItem class ()
Add transformation from legacy items to FeedItems, before transforming
items to the desired format. This allows using legacy bridges alongside
bridges that return FeedItems.

As discussed in , instead of throwing exceptions on invalid
parameters, add messages to the debug log instead

Add support for strings to setTimestamp(). If the provided timestamp
is a string, automatically try to parse it using strtotime().

This allows bridges to simply use `$item['timestamp'] = $timestamp;`
instead of `$item['timestamp'] = strtotime($timestamp);`

Support simple_html_dom_node as input paramter for setURI

Support simple_html_dom_node as input parameter for setContent
2018-12-26 22:41:32 +01:00
e7d3a006c8 global: Fix code violations 2018-12-26 21:58:07 +01:00
93e7ea9fea [HtmlFormat] Make feeds available via syndication links 2018-09-22 19:51:18 +02:00
f8c6400373 [HtmlFormat] Hide "Categories" label, if array of categories is empty () 2018-08-09 16:46:53 +02:00
049ee52fb5 Implemented feed item categories () 2018-07-16 12:32:24 +02:00
a4b9611e66 [phpcs] Add missing rules
- Do not add spaces after opening or before closing parenthesis

  // Wrong
  if( !is_null($var) ) {
    ...
  }

  // Right
  if(!is_null($var)) {
    ...
  }

- Add space after closing parenthesis

  // Wrong
  if(true){
    ...
  }

  // Right
  if(true) {
    ...
  }

- Add body into new line
- Close body in new line

  // Wrong
  if(true) { ... }

  // Right
  if(true) {
    ...
  }

Notice: Spaces after keywords are not detected:

  // Wrong (not detected)
  // -> space after 'if' and missing space after 'else'
  if (true) {
    ...
  } else{
    ...
  }

  // Right
  if(true) {
    ...
  } else {
    ...
  }
2017-07-29 19:55:12 +02:00
1a4c3f4418 Add a search bar to simplify looking for a bridge. ()
* Add a search bar to simplify looking for a bridge.

* Fix phpcs line length.

* Change the phpcs config.
2017-03-21 20:31:10 +00:00
72f40fbd75 [formats] Allow multiple enclosures
All formats now support multiple enclosures. RSS
will show a warning if more than one enclosure
is used since many feed reader don't support
multiple enclosures with RSS (also not clearly
specified in the specification)
2016-11-12 22:04:42 +01:00
42cbc2e889 [formats] Fix enclosures
All bridges failed due to missing 'enclosures' element in
the items array. With this commit all formats (ATOM, RSS
and HTML) provide support for a single 'enclosure' element
2016-11-09 18:59:17 +01:00
3a2cb9ea1e [formats] Use custom characterset in all formats
The specified characterset will now apply to all formats
thus allowing other charactersets than 'UTF-8'
2016-11-09 18:43:06 +01:00
ab16af631e [core] Apply some fixes 2016-09-10 21:01:02 +02:00
62eec43980 [core] Apply common indentation
All files are now using tabs for indentation
2016-09-10 20:41:11 +02:00
cf146523be [formats] Rename variable 'data' to 'item'
This makes the intend of the variable more clear and is now
coherent with all Bridges
2016-08-29 19:47:21 +02:00
a84016bcb6 [core] Rename item getter/setter
getDatas -> getItems
setDatas -> setItems

Note: Bridge->setDatas actually sets data, where Bridge->getItems
only returns items (this is why Bridge->setDatas was not changed)
2016-08-29 19:42:58 +02:00
1e9b5c8611 [formats] Remove all unnecessary code comments 2016-08-29 19:24:31 +02:00
7961f8081e [HtmlFormat] Revert use of filter_input to $_SERVER
https://bugs.php.net/bug.php?id=49184
indicates a verified (not solved) bug where filter_input returns
NULL when used with INPUT_SERVER
2016-08-23 19:46:41 +02:00
9173e7da54 [HtmlFormat] Fix format query replacements 2016-08-23 18:36:49 +02:00
eb3392db82 [core] simplify dynamic formats discovery
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-23 14:29:53 +02:00
1f3361c6b4 [formats] Change item to associative array
Previously the item class was used to dump literaly any data
into an object. The same can be archived by using an array
with named keys (associative array).

Technically it makes more sense to use an array as we want to
be able to store any parameter into our item.
2016-08-22 18:54:36 +02:00
d79366f479 [HtmlFormat] Add button for MRSS feed 2016-08-09 17:18:16 +02:00
606e756bc1 formats: Use same general entity generation order 2016-08-09 17:12:28 +02:00
82f06ad2c5 [HtmlFormat] Add anchor for bridge URI to title 2016-08-07 15:29:59 +02:00
d98a7d6644 [HtmlFormat] Return to bridge #id when pressing 'back to rss-bridge' 2016-08-07 14:55:58 +02:00
d6e7b75b42 Re-add rss feed link. 2016-08-03 22:01:44 +02:00
1b02330302 Improved style for HtmlFormat. 2016-08-03 20:07:49 +02:00
372ddf2792 Core: add author to HTML output format 2015-10-13 18:04:45 +02:00
0874e13824 Improve HTML output 2014-05-28 16:57:30 +02:00
4bf90735ef Corrections
* Corrected GoogleBridge (URI extraction was incorrect)
* Corrected ATOM format:
* mime-type was incorrect
* Hyperlinks were not clickable.
* non-UTF8 characters are now properly filtered.
* Corrected HTML format output:
* Hyperlinks were not clickable.
* Corrected error message when SimpleHtmlDom library is not installed.
* Added changelog.
2013-08-12 22:37:19 +02:00
927b04dfef Refonte du code 2013-08-11 13:30:41 +02:00