MyBB Community Forums

Full Version: Plugin uninstall button isn't showing up!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Im trying to create my first plugin but ran into a issue that my uninstall button won't appear!

http://prntscr.com/f4gnrk


My Code:
https://pastebin.com/mTWbfcZ2
You checking in is installed if a table exists but you not create any table... instead of looking for a table you can try to look if a setting is exist that you created.
(2017-05-05, 02:54 PM)broatcast Wrote: [ -> ]You checking in is installed if a table exists but you not create any table... instead of looking for a table you can try to look if a setting is exist that you created.

O so based of the is_installed function the Uninstall or Install button appears in the Plugins section at the AdminCP?
Correct, if the is_installed function return false its show you install, is it return true its show uninstall.

For example you can check for a setting instead of the table:
function mybb_jsxc_is_installed()
{
    global $mybb;

    return (isset($mybb->settings['jsxc_server']));
}
(2017-05-05, 03:40 PM)broatcast Wrote: [ -> ]Correct, if the is_installed function return false its show you install, is it return true its show uninstall.

For example you can check for a setting instead of the table:
function mybb_jsxc_is_installed()
{
    global $mybb;

    return (isset($mybb->settings['jsxc_server']));
}

Alright Thanks, I understand now!