Closed gnanet closed 6 years ago
This is a neat concept, Does the user create the new block in the UI or is it done via plugin/code?
In the proof-of-concept, i added two things:
from functions.php if there is a functions-custom.php file it gets included, this way i can create a class that overrides some functions from the parent OpenRSD class Either way there are functions to check for presence of hostapd, and list the AP clients etc
from dashboard.php if there is a dashboard-custom.php it gets included.
inside the dashboard-custom.php i check if it was included from dashboard.php, as an extra security, and then i check if some OpenRSD-custom class exsist, and instantiate that, if it is absent i simply instantiate the OpenRSD class, and use them to build the div-block for displaying the SSID, list the wifi interfaces, and list the AP clients.
This is rather a door to programatically extend the dash without having the "You modified OpenRSD files" continously shown (of course, the *-custom.php would be .gitignore-d in the master repository)
In my case the child class is needed to override the local ARP listing, and getting the client data from the main router in my home network, because DHCP is done over there, the OpenRSD is only a bridging AP
I have a plugin system that I ripped from another project (GNU-Social) That I use in my BootWiki project. It is easy to use and implement and could prove useful here. This week I will make a plugin system for this project that works.
Good work on this!
RE #29
A general plugin system is better, so i close this
What do you think, would it be a useful feature to let people add custom blockt to the dashboard page and for example display the WIFI AP clients list?