Extensions (PHP) · Developer mode
Developer mode
Extensions are real PHP: their own pages, database tables, settings, permissions and listeners. You build them on your own ForumSpark install with developer mode on, on your computer or your own server. That forum gets a Developer section in its admin panel and the fs: commands on the command line.
Where you can build
| Forum | How to turn it on |
|---|---|
| Your own self-hosted forum | Add FORUMSPARK_DEVELOPER=true to the .env file, then run php artisan config:clear. |
| A cloud developer board | Not for code extensions. Cloud boards share their servers with other forums, so they never run PHP that has not been reviewed. A developer board is for themes, widgets, scripts and template add-ons, and for trying your approved extension the way members will see it. |
Use a test forum, never the forum your members use. Developer mode loads your extension straight from your workspace, so a half-finished change shows up immediately.
What changes with developer mode on
- Admin panel, Developer appears, with the overview, the Build pages, the checks and the reference.
- The
fs:make,fs:sync,fs:check,fs:cycleandfs:buildcommands become available. - Set
FORUMSPARK_MAIL_FOLDERto a folder and every email the forum sends is saved there as a file instead of being sent. - The admin panel stops asking you to confirm your password after a while.
Your workspace
On a self-hosted forum, extensions you are working on live in the extensions/ folder, one folder per vendor and name, like extensions/harbour/member-map. Set FORUMSPARK_WORKSPACE to use another folder. Open that folder in your editor. Save a file and reload the page to see the change; there is nothing to upload.
When you add a table or a column, the database needs updating once. The Developer overview then shows Apply new migrations. Press it, or run php artisan fs:sync.