Xiuno一个单页插件开发实例教程
feng 2021-8-25

 Xiuno插件实例,一个单页的例子

  • 新建目录和文件,假定插件名为 my_plugin:

plugin/

    my_plugin/

        conf.json (配置文件)

        icon.png (图标宽高:54*54)

        hook/

           index_route_case_end.php  (插入点,该插入点在 index.php)

        hello.php (你的业务逻辑文件)

  • conf.json 内容:
{
	"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 内容:

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

hello.php 内容:

<?php
message(0, 'Hello, Plugin');
?>

网址访问:http://xxx.com/?hello.htm

最新回复 (6)
全部楼主
  • 浅唱 站长
    2021-8-26 2
    0
    不错的帖子!
  • 775566
    2022-10-7 3
    0
    请问做俩单页怎么弄 反冲突
  • 775566
    2022-10-7 4
    0
    浅唱 不错的帖子!
    请问做俩单页怎么弄 反冲突
  • feng 楼主
    2022-10-8 5
    0
    775566 请问做俩单页怎么弄 反冲突
    检查一下名字属性或者其他导致的冲突,改一下应该就可以了
  • ccccc
    2月前 6
    0
    哈哈,不错哦!
  • ccccc
    2月前 7
    0
    感谢楼主ing!!!
返回