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

Extensions work for specific subscription? #242

Open
Nikkiiw opened this issue Jun 16, 2024 · 8 comments
Open

Extensions work for specific subscription? #242

Nikkiiw opened this issue Jun 16, 2024 · 8 comments

Comments

@Nikkiiw
Copy link

Nikkiiw commented Jun 16, 2024

Hi!
Firstly thx for all the work.
Can extensions work for specific subscription?
Like ImageProxy, some pic of subscription do not need proxy , but some other do.
Thank you for reply.

@math-GH
Copy link
Contributor

math-GH commented Jun 16, 2024

Can extensions work for specific subscription?

yes. It depends on the extension.

Like ImageProxy, some pic of subscription do not need proxy , but some other do.

It depends on the used proxy. See: https://github.com/FreshRSS/Extensions/tree/master/xExtension-ImageProxy
If WSRV.NL is used I cannot find a fitting configuration

@Nikkiiw
Copy link
Author

Nikkiiw commented Jun 17, 2024

@math-GH Thx!
But ImageProxy is just a exemple.
Does FreshRSS has a switch or something can let user choose which extension work for a specific subscription?
Like subscription A use ImageProxy,
subscription B use FeedTitleBuilder

Or some config file?

@Alkarex
Copy link
Member

Alkarex commented Jun 18, 2024

Does FreshRSS has a switch or something can let user choose which extension work for a specific subscription?

There is no such function at the moment, but extensions can decide which feed to apply to and could expose some settings for that

@Nikkiiw
Copy link
Author

Nikkiiw commented Jun 18, 2024

@Alkarex thx! I will do some research

@Nikkiiw
Copy link
Author

Nikkiiw commented Jun 18, 2024

@Alkarex I'm really sorry I do some research but can not find out how to do it.
Can you show some example?
appreciate that!

@Nikkiiw
Copy link
Author

Nikkiiw commented Jun 18, 2024

scheme_default (default: auto): which scheme to use for resources that do not include one; if set to -, those will not be proxied; if set along scheme_include, the scheme included in the URL will either be auto-matically derived from your current connection or the one explicitly specified

This is from Image Proxy.Use this function to decide? Am I correct?

@Alkarex
Copy link
Member

Alkarex commented Jun 18, 2024

You would have to patch the extension for your needs.

In the following code, $entry has access to the feed information:

public static function setImageProxyHook(FreshRSS_Entry $entry): FreshRSS_Entry {
$entry->_content(
self::swapUris($entry->content())
);
return $entry;

@Nikkiiw
Copy link
Author

Nikkiiw commented Jun 19, 2024

@Alkarex Nice!really thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants