We use Discourse as a forum for our game and I’d like to create custom user pages with data from the game.
Such as rankings, stats, achievements etc.
I’ve followed the setup tutorials and managed to setup the development environment and I’ve started the plugin.
Since there isn’t really a good place with documentation I already have several questions.
And in general I’d like to know if this is even possible or if it’s too ambitious.
What I have is a forum with SSO login and a MySQL database for where I need to get the data from.
If it’s not possible to get it directly from the DB in ruby I could write a REST API or something to fetch the data of users by external ID.
What I’d like to make is a page on the profile with custom data.
And maybe display some values on other places too such as league icons etc but I’m sure I’ll be able to figure this all out once I get the basics.
Is it possible to fetch user data from our MySQL DB?
If so, should I just follow a tutorial such as MySQL Ruby tutorial - programming MySQL in Ruby or is there an alternative way?
I couldn’t find any handle to add a new user page is there support for this?
The plugin that shows handles doesn’t really show any on the user pages.
General question if it’s possible to override stuff in Discourse through plugins or is it only possible to add extra functionality with handles and JS etc?
(4) Also, is it really necessary to exit and start the bundle for each change?
I’ve done some experimenting already of course but none of my changes were on the forum after a refresh.
I had to restart the bundle for each change.
Restarting it isn’t so bad but the first load takes like 15 seconds.
(5) Finally, in general I’d like to know if there is any documentation I might have missed because it’s quite hard to get started on this even though I have quite a lot of experience as developer.
All the documentation I could find was the http://learndiscourse.org and some posts on here but they only explain the basics how to set the plugin up but then don’t go in any depth how to actually make stuff.
Of course I’m also looking in the soure code of already made plugins but to get started it’d be pretty nice to have some basic documenation.
Topics such as controllers, widgets, database, custom locale, models, services, views etc.
I see a lot of plugins with folder structures with things mentioned above but nowhere is really explained what it’s all about.