The export getFactory
which contains widget helpers and factories.
Included are two files:
server/included/boilerplate.lua
, a boilerplate structure fileserver/included/demo.lua
, a showcase / demo of features
Both provide a starting step for how to use this system.
They can be enabled in the __resource.lua
file if you want to preview them in the webadmin interface. Make sure you are logged in and have the webadmin
ACE permission.
Please read the server/included/demo.lua
file for an in-depth look at the available features, and the code behind it all.
Use server/included/boilerplate.lua
to start creating your own plugins.
A plugin can be contained in its own resource, you can also add the plugin code to existing resources. A resource can have multiple plugins, there's no inherent limit.
- Create a resource as you would normally.
- In the
__resources.lua
file, adddependency 'webadmin-lua'
- Create a copy of
server/included/boilerplate.lua
and run it as a server script. - Edit the
CreatePage
function to produce the page you want to see.
You can freely restart your resource without worrying about duplicate pages, Webadmin automatically handles plugin data for you.
This project is not supposed to be a one-and-only solution to Webadmin plugins, it's merely a simple solution for creating plugins in Lua. Its main goal is to provide widget generation with a simple API. The boilerplate setup makes it easier to get started.
Most widget layouts are taken from the CoreUI documentation.
Do not re-upload or remix this, link to this repository instead if you create a plugin that depends on the resource.
Contributions and feedback are highly wanted!