php - discuz post_image_btn_extra 与post_image_tab_extra无效?

查看:71
本文介绍了php - discuz post_image_btn_extra 与post_image_tab_extra无效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

我想做一个discuz的插件。我按照教程上做了下测试:

    if(!defined('IN_DISCUZ')) {
        exit('Access Denied');
    }
    class plugin_tutu{
        function post_image_btn_extra(){
            return "aaa";
        }
        function post_image_tab_extra(){
            return "sss";
        }
    }

可是没有任何反应。
然后我把post_image_btn_extra替换成global_usernav_extra1,却成功在相应位置输出了!

解决方案

最终没人回答我的问题……最终我自己找到解决方法了……

if(!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
class plugin_tutu{
    
}
class plugin_tutu_forum extends plugin_tutu{
        function  post_image_btn_extra(){
        return "aaa";
    }
    function post_image_tab_extra(){
        return 'sss';
    }
}

这篇关于php - discuz post_image_btn_extra 与post_image_tab_extra无效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆