Plugin Outlet Locations

I’ve still got a lot to learn, and this is a very simple plugin.

But it is my hope that it will prove useful for others wanting to get into Discourse plugin development

Any questions or suggestions are more than welcome
(other than criticizing my poor design skills that is, I know that :smirk:)

discourse-plugin-outlet-locations

This plugin allows developers to easily see were plugin-outlet locations are inserted into hbs templates.
True, plugin-outlet locations may be used for purposes other than adding visual content, this plugin is only a starting point.

Things that may be of interest

admin-menu
In addition to showing where the plugin-outlet is, it shows a way to allow all staff to see the additional tab, or restrict it to Admins only.

site-map-links
Shows a way to add a text input in the ACP Settings page that is used by the plugin.

topic-admin-menu-buttons
Shows a way to use the client.en.yml file to add custom text

Warnings

If you are developing your own plugin, please note:
The plugin.rb file must have both the name: and version: comments or the plugin will break the Admin Plugins page.
yml files are very sensitive to correct indentation or the entire app will fail, please validate your yml files.

Tips

If you are developing your own plugin, please note:
Although not necessary, having Admin Settings toggles are a courtesy to others so they won’t need to uninstalll the plugin to deactivate it.
To have a link to a plugins “home” page in the Admin Plugins there must be a url: comment in the plugin.rb file.
Giving template files the hbs extension, (and JavaScript files the es6 extension), allow Discourse to do “magic”

27 Likes

Very nice, @Mittineague! I think that will help others develop plugins much more. Also, the tips section is really nice. Have you thought about creating a plugin-template (I can assure you, I have :wink: ).

May I do one request? Could you edit the first post of the topic, to state, what the plugin does and maybe outline the features (basically just copy paste part of the readme from the repo here)? I found it very useful to have a short overview on discourse, too .

Thanks heaps!
ben

4 Likes

Please Note

Currently, having this plugin installed interferes with the Solved plugin so that the “solved by” does not display in the OP. i.e. the

Note that AFAIK it does not break the Solved plugin in any other way.

As it is unlikely that this plugin will be used in production sites this is not a big problem,
but, if you are also testing the Solved plugin you should be aware of this conflict.

My best guess is it has something to do with sharing the plugin-outlet, but I have not been able to determine the cause yet, :sadpanda:

Well, it’s taken longer than I would have expected it to, but I’ve finally managed to get the plugin up-to-date.

Some of it isn’t needed by the plugin but is included as working examples of

Beginner’s Guide to Creating Discourse Plugins Part 5: Admin Interfaces

and

Beginner’s Guide to Creating Discourse Plugins Part 6: Acceptance Tests

And there is still a to-do list (isn’t there always?), but if you have the previous version you should switch to this newer version.

3 Likes

This is great! Added a mention of it to our Contribution Guidelines.

1 Like

Awesome! This keeps me from searching the master repo and hunting down CSS classes. :wink:

2 Likes

A useful plugin. Helps me to visualize the best spot to insert new content. Thanks!

2 Likes

I’m starting developing my first plugin and this one is soooooo awesome for that, man, thank you so much :thumbsup:

4 Likes

A post was split to a new topic: Plugin outlet locations theme component

Take a look here:

For a more up-to-date way to highlight plugin-outlets