How change ttrss_entries.content when fetch a entry

Post plugins and custom CSS snippets here
cyttorak
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 29 Sep 2016, 22:53

How change ttrss_entries.content when fetch a entry

Postby cyttorak » 29 Sep 2016, 23:03

Hello

Is there a example about how change a entry just before it is stored in the database?

I want to change the content of the entry for the real body of the web linked in the url destination.

And maybe another things like add or remove tags and modify the entry's title.

Thanks.

User avatar
fox
^ me reading your posts ^
Posts: 6267
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: How change ttrss_entries.content when fetch a entry

Postby fox » 29 Sep 2016, 23:45

a lot of plugins do exactly this, i.e. readability or w/e else

cyttorak
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 29 Sep 2016, 22:53

Re: How change ttrss_entries.content when fetch a entry

Postby cyttorak » 29 Sep 2016, 23:55

can you link me one? please
or tell me which hook I have to use.

Thanks.

User avatar
fox
^ me reading your posts ^
Posts: 6267
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: How change ttrss_entries.content when fetch a entry

Postby fox » 30 Sep 2016, 07:54

article filter hook, any of the af_ plugins would do as an example. the reddit embed one, for example.

cyttorak
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 29 Sep 2016, 22:53

Re: How change ttrss_entries.content when fetch a entry

Postby cyttorak » 30 Sep 2016, 08:21

thanks

cyttorak
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 29 Sep 2016, 22:53

Re: How change ttrss_entries.content when fetch a entry

Postby cyttorak » 30 Sep 2016, 11:36

Sorry, but I don't find this example in
https://tt-rss.org/gitlab/fox/tt-rss-at ... er/plugins
neither
https://tt-rss.org/gitlab/fox/tt-rss-sa ... le-plugins

where is af_ plugins/reddit example?

Thanks

cyttorak
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 29 Sep 2016, 22:53

Re: How change ttrss_entries.content when fetch a entry

Postby cyttorak » 30 Sep 2016, 11:47

Hi

I have found this: https://gist.github.com/pluser/3039ffacfffa8c55e63d
So, I think is HOOK_ARTICLE_FILTER the hook I need, isn't it?
Is this hook executed before ttrss_entries.content is stored in the data base?

User avatar
fox
^ me reading your posts ^
Posts: 6267
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: How change ttrss_entries.content when fetch a entry

Postby fox » 30 Sep 2016, 12:02

the file you're looking for is (tt-rss)/plugins/af_redditimgur (any other af plugin would do)

>So, I think is HOOK_ARTICLE_FILTER the hook I need, isn't it?

that's what i said

>Is this hook executed before ttrss_entries.content is stored in the data base?

well it would be rather useless to do it the other way around doesn't it

maybe start thinking a bit on your own before posting


Return to “Themes and plugins”

Who is online

Users browsing this forum: No registered users and 5 guests