Home > Backend Development > PHP Tutorial > discuz post_image_btn_extra and post_image_tab_extra are invalid?

discuz post_image_btn_extra and post_image_tab_extra are invalid?

WBOY
Release: 2016-08-04 09:21:10
Original
1201 people have browsed it

I want to make a discuz plug-in. I followed the tutorial and did the test:

<code class="php">    if(!defined('IN_DISCUZ')) {
        exit('Access Denied');
    }
    class plugin_tutu{
        function post_image_btn_extra(){
            return "aaa";
        }
        function post_image_tab_extra(){
            return "sss";
        }
    }</code>
Copy after login
Copy after login

But there was no response.
Then I replaced post_image_btn_extra with global_usernav_extra1, but it was successfully output at the corresponding location!

Reply content:

I want to make a discuz plug-in. I followed the tutorial and did the test:

<code class="php">    if(!defined('IN_DISCUZ')) {
        exit('Access Denied');
    }
    class plugin_tutu{
        function post_image_btn_extra(){
            return "aaa";
        }
        function post_image_tab_extra(){
            return "sss";
        }
    }</code>
Copy after login
Copy after login

But there was no response.
Then I replaced post_image_btn_extra with global_usernav_extra1, but it was successfully output at the corresponding location!

In the end no one answered my question...Finally I found the solution myself...

<code>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';
    }
}</code>
Copy after login
Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template