Plugin to download all images/attachments in feeds

Post plugins and custom CSS snippets here
chris777
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 30 Jan 2017, 20:37

Plugin to download all images/attachments in feeds

Postby chris777 » 20 Apr 2017, 16:41

Hi,
I would like to be able to download all images (or attachments) in a feed (enable feature per feed or not).
I would like to do this for all past articles and then automatically for every new article.
This could also apply to recommended articles too.
Is there something similar already ?

Would you recommend an existing plugin I could start from ?

thanks a lot.

chris777
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 30 Jan 2017, 20:37

Re: Plugin to download all images/attachments in feeds

Postby chris777 » 21 Apr 2017, 13:40

I think I understood where I need to create a plugin and have to use the hooks to overload the functions/methods.
This is the list of hooks I found :

HOOK_ARTICLE_BUTTON = 1;
HOOK_ARTICLE_FILTER = 2;
HOOK_PREFS_TAB = 3;
HOOK_PREFS_TAB_SECTION = 4;
HOOK_PREFS_TABS = 5;
HOOK_FEED_PARSED = 6;
HOOK_UPDATE_TASK = 7; // *1
HOOK_AUTH_USER = 8;
HOOK_HOTKEY_MAP = 9;
HOOK_RENDER_ARTICLE = 10;
HOOK_RENDER_ARTICLE_CDM = 11;
HOOK_FEED_FETCHED = 12;
HOOK_SANITIZE = 13;
HOOK_RENDER_ARTICLE_API = 14;
HOOK_TOOLBAR_BUTTON = 15;
HOOK_ACTION_ITEM = 16;
HOOK_HEADLINE_TOOLBAR_BUTTON = 17;
HOOK_HOTKEY_INFO = 18;
HOOK_ARTICLE_LEFT_BUTTON = 19;
HOOK_PREFS_EDIT_FEED = 20;
HOOK_PREFS_SAVE_FEED = 21;
HOOK_FETCH_FEED = 22;
HOOK_QUERY_HEADLINES = 23;
HOOK_HOUSE_KEEPING = 24; // *1
HOOK_SEARCH = 25;
HOOK_FORMAT_ENCLOSURES = 26;
HOOK_SUBSCRIBE_FEED = 27;
HOOK_HEADLINES_BEFORE = 28;
HOOK_RENDER_ENCLOSURE = 29;
HOOK_ARTICLE_FILTER_ACTION = 30;
HOOK_ARTICLE_EXPORT_FEED = 31;
HOOK_MAIN_TOOLBAR_BUTTON = 32;



But I'm missing some information...
- what hook should I use when an article is starred ? HOOK_ARTICLE_BUTTON ?
- what hook when a new article is found ? HOOK_UPDATE_TASK ?
- what hook when an image in an article is displayed ? HOOK_RENDER_ARTICLE, HOOK_RENDER_ARTICLE_CDM, HOOK_RENDER_ENCLOSURE ...?

thank you for any help here.


Return to “Themes and plugins”

Who is online

Users browsing this forum: No registered users and 1 guest