MyBB Hacks

Full Version: How to deactivate this manually?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I had installed this plugin and it caused severe problem in acp as i cant access plugin and settings section and also i'm unable to connect to phpmyadmin, which is giving an storage error.

How can i uninstall this manually and what edits do i need to make manually?

Code:
<?php
//////////////////////////////////////////////
/* Author: Janota                           */
//////////////////////////////////////////////
/* Plugin: Default Signature Size           */
//////////////////////////////////////////////

    if(!defined("IN_MYBB"))
{
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
        
////////////////////////////////////////////////////////////////////// Functions ///////////////////////////////////////////////////////////////////////    

function default_sigsize_info()
{
    return array(
        "name"            => "Default Signature Size",
        "description"    => "<div style=\"margin-top: 5px;\"><img src=\"/images/plugin.ico\" style=\"margin-right: 8px;\" align=\"left\">Allows admins to set the a default size for signatures</div>",
        "website"        => "http://www.mybbextras.com",
        "author"        => "Janota",
        "authorsite"    => "http://www.mybbextras.com",
        "version"        => "1.0",
        "compatibility" => "16*"
    );
}
function default_sigsize_activate()
{
    
    global $db, $mybb;
    $default_sigsize_group = array(
        "gid" => "NULL",
        "name" => "default_sigsize",
        "title" => "Default Signature Size",
        "description" => "Settings",
        "disporder" => "1",
        "isdefault" => "no",
    );
    $db->insert_query("settinggroups", $default_sigsize_group);
    
    $gid = $db->insert_id();
    $default_sigsize_setting_1 = array(
        "sid"            => "NULL",
        "name"            => "default_sigsize_1",
        "title"            => "Default Signature Height",
        "description"    => "Set you default height here (Default is 150)",
        "optionscode"    => "text",
        "value"            => '150',
        "disporder"        => '2',
        "gid"            => intval($gid),
    );
    $gid = $db->insert_id();
    $default_sigsize_setting_2 = array(
        "sid"            => "NULL",
        "name"            => "default_sigsize_2",
        "title"            => "Default Signature Width",
        "description"    => "Set you default width here (Default is 500)",
        "optionscode"    => "text",
        "value"            => '500',
        "disporder"        => '2',
        "gid"            => intval($gid),
    );
    $db->insert_query("settings", $default_sigsize_setting_1);
    $db->insert_query("settings", $default_sigsize_setting_2);


    require MYBB_ROOT."/inc/adminfunctions_templates.php";
    
    find_replace_templatesets("postbit", "#".preg_quote('{$post[\'signature\']}')."#i",'<style type="text/css">
.signature img {
max-height: {$mybb->settings[\'default_sigsize_1\']}px;
max-width: {$mybb->settings[\'default_sigsize_2\']}px;
}
</style>
<div class="signature">
{$post[\'signature\']}
</div>');

    find_replace_templatesets("postbit_classic", "#".preg_quote('{$post[\'signature\']}')."#i",'<style type="text/css">
.signature img {
max-height: {$mybb->settings[\'default_sigsize_1\']}px;
max-width: {$mybb->settings[\'default_sigsize_2\']}px;
}
</style>
<div class="signature">
{$post[\'signature\']}
</div>');
    
    
// Rebuilding settings
    rebuild_settings();
}


function default_sigsize_deactivate()
{
    global $db, $mybb;
    $db->query("DELETE FROM ".TABLE_PREFIX."settinggroups WHERE name='default_sigsize'");
    $db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='default_sigsize_1'");
    $db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='default_sigsize_2'");

    require MYBB_ROOT."/inc/adminfunctions_templates.php";
    
    find_replace_templatesets("postbit", "#".preg_quote('<style type="text/css">
.signature img {
max-height: {$mybb->settings[\'default_sigsize_1\']}px;
max-width: {$mybb->settings[\'default_sigsize_2\']}px;
}
</style>
<div class="signature">
{$post[\'signature\']}
</div>')."#i", '{$post[\'signature\']}', 0);

find_replace_templatesets("postbit_classic", "#".preg_quote('<style type="text/css">
.signature img {
max-height: {$mybb->settings[\'default_sigsize_1\']}px;
max-width: {$mybb->settings[\'default_sigsize_2\']}px;
}
</style>
<div class="signature">
{$post[\'signature\']}
</div>')."#i", '{$post[\'signature\']}', 0);
    
    
// Rebuilding settings
    rebuild_settings();
}

?>

If phpMyAdmin is stuffing up, there's something stuffed up on your server.

Otherwise, you can simply delete the file and delete the settings and reverse the template edits.
Also, 1m1, you might  consider contacting Janota to let them know of this problem.
Thanks for the suggestions. I had found that it is the problem with the server as it went out of disk space for phpmyadmin. Now it is working fine.
Smile
I lost my mind as i thought its a big problem occured after installing everything and i cant access the plugins, settings in ACP and phpMyAdmin. For a while i thought of deleting the DB and installing again. I had made this question at mybb too and got a quick response, so i didnt done anything and waited to contact the server admin.

Finally everything is resolved. Biggrin
Reference URL's