Plugin coding guidance?

Post plugins and custom CSS snippets here
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 05 Mar 2017, 00:16

Plugin coding guidance?

Postby Redouane » 05 Mar 2017, 00:38


Thanks for making this great app, can't live without it.

First, let me try to explain what I'm trying to do: Let's say I'm subscribed to 10 'movie news' websites, which means they all pretty much report about the same things, what I want is to group the similar headlines in a way akin to Google News "In Depth" feature, but i'm a noob dev so i'm doing it in a hacky way by turning titles in to tags (minus the stop words) then using the tag cloud to browse the 'trending' tags.

What I did: couldn't find any documentation so I looked at some plugins and wrote a thing that doesn't work.

I'm really a noob so any help would be appreciated. I'm not sure I'm using the right hook or writing to the correct variables, how do you debug plugins?

Thank you.

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

Re: Plugin coding guidance?

Postby fox » 05 Mar 2017, 09:13

this is an interesting idea but you're doing it a bit wrong wrt hooking

1. you should use HOOK_ARTICLE_FILTER, filter action is for other stuff (this is a bit confusingly named i guess)
2. the function in your plugin should be called hook_article_filter()
3. you should return tags in $article["tags"] not "tag_cache"

look at any af_ plugin for an example, i.e. af_fsckportal.

the documentation for plugins is sadly missing because i can't really be arsed to write it so the idea is learning by example, there's bundled plugins and other example stuff on

Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 18 Mar 2013, 23:11

Re: Plugin coding guidance?

Postby bastage » 07 Mar 2017, 04:05

Hi Redouane,
If you wind up getting anything even halfway decent set up I'd love to help test since I could really use this type of feature.

Return to “Themes and plugins”

Who is online

Users browsing this forum: No registered users and 2 guests