How to deactivate this manually?
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #1
How to deactivate this manually?
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:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?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();
}

?>

10-18-2010 07:19 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: How to deactivate this manually?
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.

My Blog
10-18-2010 08:09 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #3
RE: How to deactivate this manually?
Also, 1m1, you might  consider contacting Janota to let them know of this problem.


[Image: leelink.gif]
MYBB1.6 & XThreads
10-18-2010 09:27 AM
Visit this user's website Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #4
RE: How to deactivate this manually?
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
10-18-2010 08:02 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: