document.writeln('');
采用插件機制:
新建目錄和文件,假定插件名為 my_plugin:
1 2 3 4 5 6 7 | plugin/ my_plugin/ conf.json (配置文件) icon.png (圖標寬高:54*54) hook/ index_route_case_end.php (插入點,該插入點在 index.php) hello.php (你的業(yè)務邏輯文件) |
conf.json 內(nèi)容:
1 2 3 4 5 6 7 8 9 10 11 | { "name":"我的第一個 Xiuno BBS 插件", "brief":"我的插件介紹。", "version":"1.0", "bbs_version":"4.0", "installed":0, "enable":0, "hooks_rank":[], "overwrites_rank":[], "dependencies":[]} |
index_route_case_end.php 內(nèi)容:
1 | case hello: include APP_PATH.plugin/my_plugin/hello.php; break; |
hello.php 內(nèi)容:
1 2 3 | <?phpmessage(0, Hello, Plugin);?> |