FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


HELP! : Uninstalling phpBB2 mod





exarkun
i had just installed a birthday mod on my phpBB2 forum. The result: a unstable phpBB2 forum on my site. I now wishes to uninstall the birthday mod.

I know that files can be converted back to its previous form by reverting the adding process of the mods. But what about the MySQL database? The database install script that come with the mod configed MySQL database, and I wishes to remove them. However, I know nuts about which to remove. Can anyone help me with it. Thnx a lot.

Quote:
Code:

<?php
#########################################################
## SQL commands to phpBB2
## Author: Niels Chr. Rĝd
## Nickname: Niels Chr. Denmark
## Email: ncr@db9.dk
##
## Ver 1.0.7
##
## phpBB2 database update script for mods
## this file is intended to use with phpBB2, when installing mods
## after so you may delete this file, but only admin can use so it really doesen't matter
## The script will look what prefix you are using, and use the existing DB defined by congig.php
## The execution of this script's included SQL is harmless, so you can run it as meny times you like
## note, though that the users last visit, will be set back to his/her last login,
## but that is a minor cosmetic isue, that will correct it self next time the use  logs in
##
## the following example are from my mods, and you can add some self, for other mods if you like
## you will after execution get a list over those commands that are run with succes and those with warnings !
## delete the sample lines if you are using it only for other mods
##
#########################################################

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
define('SITE_HISTORY_TABLE', $table_prefix.'site_history');

###################################################################################################
##
## put the SQL commands below here, the SQL commands listed below are only exampels, substitude them with the one you need ##
##
###################################################################################################
$sql=array(
'ALTER TABLE '.USERS_TABLE.' ADD user_birthday INT DEFAULT "999999" not null  ',
'ALTER TABLE '.USERS_TABLE.' ADD user_next_birthday_greeting INT DEFAULT "0" not null ',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("birthday_required", "0")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("birthday_greeting", "1")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("max_user_age", "100")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("min_user_age", "5")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("birthday_check_day", "7")'
);

$mods = array (
'Birthday PART 1 Mod','Birthday PART 1 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod',
);

############################################### Do not change anything below this line #######################################

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

if ($userdata['user_level']!=ADMIN)
      message_die(GENERAL_ERROR, "You are not Authorised to do this");
$n=0;
$message="<b>This list is a result of the SQL queries needed for the additional mods in the pre-moded pack</b><br/><br/>";
while($sql[$n])
{
   $message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
   if(!$result = $db->sql_query($sql[$n]))
   $message .= '<b><font color=#FF0000>[Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
   else $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
   $n++;
}
 message_die(GENERAL_MESSAGE, $message);
?>


So, which part of my MySQL should I remove?
Thnx again. Wink
wumingsden
If you re-install all of the files then in my opinion you don't need to worry about the database. No errors will occur if you leave it as it is, the SQL raw queries processed are not dependant on any of phpBB's vanilla functions.
exarkun
No, I am not going to to reinstall the files. Instead, I am trying to reverse the process and remove any editing of my phpbb2 core files.

So I am now concern about how to remove the strings added and which string to remove when I run the above php file to insert any lines in MySQL database.

--added---

I think I know what you mean by now, but will the extra, unused strings slow down my forum or anything like that?
n0obie4life
No. They won't.
wumingsden
exarkun wrote:
No, I am not going to to reinstall the files. Instead, I am trying to reverse the process and remove any editing of my phpbb2 core files.

So I am now concern about how to remove the strings added and which string to remove when I run the above php file to insert any lines in MySQL database.

--added---

I think I know what you mean by now, but will the extra, unused strings slow down my forum or anything like that?


So sorry, I ment to type uninstall not reinstall. Basically the database doesn't matter because of the fact that no files refer to that specific table and because no other functions are relying on the sql working correctly. Basically just leave the db alone, it will be fine.
exarkun
Thnx for the reply anyway
So I will just modify back my edited files. Wink

I have one more question, althought irrelevant to the topic here Embarassed :
how do you make that sig of yours? It just automatically displays the stats of your site. I would like to learn that too...
wumingsden
exarkun wrote:
Thnx for the reply anyway
So I will just modify back my edited files. Wink

I have one more question, althought irrelevant to the topic here Embarassed :
how do you make that sig of yours? It just automatically displays the stats of your site. I would like to learn that too...


I will PM you the scripts with instructions in a couple of days. I am extremely busy so sorry I cannot do it sooner.
Related topics
PHP problem...
Phpbb2 mod proposal's
Help with Attachment mod for phpBB
Request: Help with Attachment Mod
need help installing a mod
Help me :(**need mod help**
Need serious help with phpBB2 here!!!
Video card +mother board help
Need help with phpbb2 installation
Help with Cash Mod on My Site!
I need help with phpBB2
Installing my phpbb2 MOD's
Help needed with mod rewrite
Help!! Need to mod LimeSurvey! Will pay Frih$
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.