xiuno 4.0如何新建一个单页

下载地址已下载 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');
?>
 评论
THE END
© 版权声明
点赞8 分享
暂无内容
暂无更新日志
暂无内容
暂无历史版本

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');
?>
 评论
© 版权声明
THE END
点赞8 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容