Skip to content

Steps to create a new plugin

Artyom edited this page Jun 5, 2024 · 7 revisions
  1. Create a “your-plugin-name” folder in the static folder and copy the contents of any of the existing folders.
  • In the file admin.html find with Ctrl+F all words, where the name of the plugin you copied is used and replace it “your-plugin-name”. Then do the same in index.html and in js/admin.js.
  • In folder img replace the pictures of teams with your own pictures and rename them.
  1. Create a “your-plugin-name”.go file in app/models, then rewrite it (copy one of the files in this folder and rename the structures "some-plugin"OverlayFields and "some-plugin"Overlay to "your-plugin-name"OverlayFields and "your-plugin-name"Overlay and change their name to yours in other places where they are used).
  • In the New “your-plugin-name ”Overlay function, change the players variable - change the team and logo parameters to the names and paths to their images that you created earlier.
  1. In app/routes.go in functions, where there is a check for plugin, add a condition: else if plugin == “your-plugin-name” then copy the condition body from any past and replace the structure with your own.
Clone this wiki locally