First Plugin Advice

(James Cook) #1

I would like to attempt my first Discourse plugin and was hoping some nice folks could point me in the right direction. I’ve been reading through the Discourse codebase for a couple of days but trying to absorb it all is proving rather difficult.

I’ve also read the plugin how-to guides, but these are very basic and are more on how to actually load the plugin as opposed to doing much else.

What I want to do:

I would like to create a plugin that can show categories as images/buttons above the latest topic/category list. I would use the category logo as the image to show.

I’d also like to have a setting on each category that turns this on/off for each category, and another setting for optionally also hiding that category from the standard category list.

I have no problem modifying templates using a plugin, that is pretty straightforward. What I need to wrap my head around is where everything else lives. For example, what would be the best approach of adding two more settings to each category?

I’ve included this mockup to make it easier to see what I mean:

This wouldn’t be exclusive to top level categories either and I should be able to make child categories appear at the top too. I’m obviously planning on replacing those grey boxes with logos, this is just to keep things simple.

I’d also want this to show on categories and latest tab, but I don’t suspect this makes it any more or less difficult.

I really would like to start getting up to speed with plugin development, so really only looking for advice on how to approach this. I’d rather not take any shortcuts with CSS hacks etc.

Thanks for reading!

(Sam Saffron) #2

Be sure to have a look at car talk for some inspiration, see make & model

What you are describing is not a trivial extension. I would recommend starting small here.