xiuno 4.0如何新建一个单页

采用插件机制:

 

新建目录和文件,假定插件名为 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 (你的业务逻辑文件)

 

conf.json 内容:

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 内容:

1
case 'hello'include APP_PATH.'plugin/my_plugin/hello.php'break;

 

hello.php 内容:

1
2
3
<?php
message(0, 'Hello, Plugin');
?>
 评论
© 版权声明
1:本网站名称:源码库
2:本站永久网址:www.ymkuz.com
3:本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
4:分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
5:本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
6:本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7:如有链接无法下载、失效或广告,请联系管理员处理!
8:文章投稿-投诉建议E-mail:yunduanw@qq.com 站长QQ:99767152
THE END
点赞8 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容