Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

just display available formats in Html-format #942

Closed
DJCrashdummy opened this issue Nov 22, 2018 · 2 comments
Closed

just display available formats in Html-format #942

DJCrashdummy opened this issue Nov 22, 2018 · 2 comments
Labels
Code-Refactoring Code refactoring

Comments

@DJCrashdummy
Copy link
Contributor

DJCrashdummy commented Nov 22, 2018

i disabled the formats Json, Mrss and Plaintext at my setup by deleting the corresponding files, because i don't need them and too much options confuse the noobs of my family and friends.

on the main page this works like a charm (the remaining formats are displayed side by side in the center), but at the Html-format it shows still the buttons to go "<- back to rss-bridge", "RSS feed (ATOM)" and "RSS feed (MRSS)", which of course shows an error ("Error 0: The format you looking for does not exist.") if used.

it is not a big issue, but it would be nice if the same method of displaying just available formats can be used as at the main page.

@DJCrashdummy DJCrashdummy changed the title [AmazonPriceTrackerBridge] just display available formats in html-view just display available formats in html-view Nov 22, 2018
@DJCrashdummy DJCrashdummy changed the title just display available formats in html-view just display available formats in Html-format Nov 22, 2018
@logmanoriginal
Copy link
Contributor

Good idea, thanks for suggesting it!

The buttons are indeed hard-coded, which is why they don't disappear. In the mean time, removing these lines should work for you:

<a href="./?{$atomquery}"><button class="rss-feed">RSS feed (ATOM)</button></a>
<a href="./?{$mrssquery}"><button class="rss-feed">RSS feed (MRSS)</button></a>

@logmanoriginal logmanoriginal added the Code-Refactoring Code refactoring label Nov 23, 2018
@DJCrashdummy
Copy link
Contributor Author

thanks for considering this improvement!

manually removing the hard-coded links like suggested works flawless for sure.

infominer33 pushed a commit to web-work-tools/rss-bridge that referenced this issue Apr 17, 2020
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 RSS-Bridge#942
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code-Refactoring Code refactoring
Projects
None yet
Development

No branches or pull requests

2 participants