├── scss └── quickstart.scss ├── .npmignore ├── renovate.json ├── test ├── .eslintrc └── index.js ├── languages ├── en-GB │ └── quickstart.json ├── en-US │ └── quickstart.json └── de │ └── quickstart.json ├── templates ├── quickstart.tpl └── admin │ └── plugins │ ├── quickstart │ └── partials │ │ └── sorted-list │ │ ├── form.tpl │ │ └── item.tpl │ └── quickstart.tpl ├── eslint.config.mjs ├── static └── samplefile.html ├── public └── lib │ ├── quickstart.js │ ├── acp-main.js │ ├── main.js │ └── admin.js ├── commitlint.config.js ├── lib └── controllers.js ├── .gitattributes ├── plugin.json ├── README.md ├── LICENSE ├── package.json ├── library.js ├── .gitignore └── yarn.lock /scss/quickstart.scss: -------------------------------------------------------------------------------- 1 | /* Place any SASS in here */ -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | sftp-config.json 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:recommended" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "mocha": true 4 | }, 5 | "rules": { 6 | "no-unused-vars": "off" 7 | } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /languages/en-GB/quickstart.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": "This is a translation string, it gets translated to the users language. See the languages folder in the root of this plugin." 3 | } -------------------------------------------------------------------------------- /languages/en-US/quickstart.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": "This is a translation string, it gets translated to the users language. See the languages folder in the root of this plugin." 3 | } -------------------------------------------------------------------------------- /languages/de/quickstart.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": "Dies ist eine Übersetzungszeichenkette, sie wird in die Sprache des Benutzers übersetzt. Siehe den Ordner 'languages' im Stammverzeichnis dieses Plugins." 3 | } -------------------------------------------------------------------------------- /templates/quickstart.tpl: -------------------------------------------------------------------------------- 1 |
This is a custom page.
3 |Your uid is {uid}!
4 | 5 |[[quickstart:info]]
7 |This file is served by nodebb at domain.com/assets/plugins/nodebb-plugin-quickstart/static/samplefile.html
4 | 5 | Check plugin.json for the "staticDirs" property if you want to change the path. -------------------------------------------------------------------------------- /public/lib/quickstart.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | This file is located in the "modules" block of plugin.json 5 | It is only loaded when the user navigates to /quickstart page 6 | It is not bundled into the min file that is served on the first load of the page. 7 | */ 8 | 9 | define('forum/quickstart', function () { 10 | var module = {}; 11 | module.init = function () { 12 | $('#last-p').text('quickstart.js loaded!'); 13 | }; 14 | return module; 15 | }); 16 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: ['@commitlint/config-angular'], 5 | rules: { 6 | 'header-max-length': [1, 'always', 72], 7 | 'type-enum': [ 8 | 2, 9 | 'always', 10 | [ 11 | 'breaking', 12 | 'build', 13 | 'chore', 14 | 'ci', 15 | 'docs', 16 | 'feat', 17 | 'fix', 18 | 'perf', 19 | 'refactor', 20 | 'revert', 21 | 'style', 22 | 'test', 23 | ], 24 | ], 25 | }, 26 | }; 27 | -------------------------------------------------------------------------------- /templates/admin/plugins/quickstart/partials/sorted-list/form.tpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/controllers.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const Controllers = module.exports; 4 | 5 | Controllers.renderAdminPage = function (req, res/* , next */) { 6 | /* 7 | Make sure the route matches your path to template exactly. 8 | 9 | If your route was: 10 | myforum.com/some/complex/route 11 | your template should be: 12 | templates/some/complex/route.tpl 13 | and you would render it like so: 14 | res.render('some/complex/route'); 15 | */ 16 | 17 | res.render('admin/plugins/quickstart', { 18 | title: 'Quick Start', 19 | }); 20 | }; 21 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /templates/admin/plugins/quickstart/partials/sorted-list/item.tpl: -------------------------------------------------------------------------------- 1 |