View Single Post
  #328  
Old 07-10-2005, 11:12 AM
sketch42's Avatar
sketch42 sketch42 is offline
 
Join Date: May 2004
Location: Brooklyn, NY
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by XrayHead
Please can someone give me the steps to remove this hack and the tables ETC I need to remove from my SQL database?

Thanks

Xray
well these are the queries i could find that are in the databse

Code:
<?php

// The query should probably be enclosed by '
// Be sure you include TABLE_PREFIX
// Replace 'build' with either 'new', 'uninstall', or the build number the query is meant to upgrade FROM.

$query['uninstall'][] = 'DROP TABLE `maf_application`;';
$query['uninstall'][] = 'DROP TABLE `maf_ratings`;';
?>
there may be more but its late so i didnt finish looking

also if you want this is the contents of the uninstaller
PHP Code:
<?php

// ###################### Uninstall ###########################
if ($_REQUEST['do'] == 'uninstall') {
        if (
$step == '0') {
                
// Put the hacks in an array and print some text.
                
$hacks explode("|||"$_REQUEST['hacks']);
                echo 
"These are the hacks you have selected to uninstall: <ul>";
                foreach (
$hacks as $key => $hack) {
                        
// Put the hack name in an array.
                        
$hackd $hack;
                        unset(
$hack);
                        
$hack['name'] = $hackd;
                        
$hack['displayname'] = str_replace("_"" "$hack['name']);
                        
// Check for installed varsions and set some variables.
                        // Some sanity checking as well.
                        
if (isset($installedhack[$hack[displayname]])) {
                                
// There is a record of the hack being installed.
                                
$hack['installed_build'] = $installedhack[$hack[displayname]]['build'];
                                
$hack['installed_version'] = $installedhack[$hack[displayname]]['version'];
                                
$hack['path'] = $path_to_install "hacks/$hack[name]/";
                                
$hack['build'] = $hack['installed_build'];
                        } elseif (!isset(
$override)) {
                                
// We can't find a record of the hack being installed and override is not enabled.
                                
echo "There is no record of $hack[displayname] being installed. It cannot be uninstalled.";
                                unset(
$hacks[$key]);
                                
$ohnoes true;
                        } else {
                                
// The hack hasn't been found to be installed, but we have override on.
                                // Path to the hack directory.
                                
$hack['path'] = $path_to_install "hacks/$hack[name]/";
                                
$hack_dir opendir($hack['path']);
                                
// Find all the builds.
                                
while (($file readdir($hack_dir)) !== false) {
                                        if (
is_numeric($file) && $file != "." && $file != "..") {
                                                
$hack['builds'][$file] = $file;
                                        }
                                }
                                
// Find the latest build.
                                
if (!empty($hack['builds'])) {
                                        
arsort($hack['builds']);
                                        foreach (
$hack['builds'] as $build) {
                                                
$hack['build'] = $build;
                                                break;
                                        }
                                }
                        }
                        
// Sanity checking and require the file.
                        
if (file_exists("./hacks/$hack[name]/$hack[build]/index.php")) {
                                
chdir("./hacks/$hack[name]/$hack[build]");
                                require_once(
"./index.php");
                                
chdir('./../../../');
                        } else {
                                if (!isset(
$ohnoes)) {
                                        echo 
$hack['displayname'] . " build #" $hack['build'] . " contains no index.php containing hack information and cannot be uninstalled.<br /><br />";
                                        unset(
$hacks[$key]);
                                        
$ohnoes true;
                                }
                        }
                        
// If we are still sane, print out the hack name.
                        
if (!isset($ohnoes)) {
                                echo 
"<li>$hack[displayname]</li>";
                        } else {
                                unset(
$ohnoes);
                        }
                }
                
// Print some text and some links and continue.
                
$hacks implode("|||"$hacks);
                echo 
"</ul><p>We're sorry you didn't like these hacks. Running this script will remove all settings and templates created.</p>";
                echo 
"<p><a href=\"hack_install.php?do=uninstall&amp;step=1&hacks=$hacks$fileurl$override\">Click here to uninstall --&gt;</b></a></p>\n";
        }

        if (
$step == '1') {
                
// Put the hacks in an array.
                
$hacks explode("|||"$_REQUEST['hacks']);
                foreach (
$hacks as $key => $hack) {
                        
// Put the hack name in an array.
                        
$hackd $hack;
                        unset(
$hack);
                        
$hack['name'] = $hackd;
                        
$hack['displayname'] = str_replace("_"" "$hack['name']);
                        
// Check for installed versions.
                        
if (isset($installedhack[$hack[displayname]])) {
                                
// There is a record of the hack being installed.
                                
$hack['installed_build'] = $installedhack[$hack[displayname]]['build'];
                                
$hack['installed_version'] = $installedhack[$hack[displayname]]['version'];
                                
$hack['path'] = $path_to_install "hacks/$hack[name]/";
                                
$hack['build'] = $hack['installed_build'];
                        } elseif (!isset(
$override)) {
                                
// There is no record of the hack being installed and override is not enabled.
                                
echo "There is no record of $hack[displayname] being installed. It cannot be uninstalled.";
                                unset(
$hacks[$key]);
                                
$ohnoes true;
                        } else {
                                
// There is no record of the hack being installed, but we have override.
                                // Path to the hack folder.
                                
$hack['path'] = $path_to_install "hacks/$hack[name]/";
                                
$hack_dir opendir($hack['path']);
                                
// Find all the builds.
                                
while (($file readdir($hack_dir)) !== false) {
                                        if (
is_numeric($file) && $file != "." && $file != "..") {
                                                
$hack['builds'][$file] = $file;
                                        }
                                }
                                
// Find the latest build.
                                
if (!empty($hack['builds'])) {
                                        
arsort($hack['builds']);
                                        foreach (
$hack['builds'] as $build) {
                                                
$hack['build'] = $build;
                                                break;
                                        }
                                }
                        }
                        
// Some sanity and require the file.
                        
if (file_exists("./hacks/$hack[name]/$hack[build]/index.php")) {
                                
chdir("./hacks/$hack[name]/$hack[build]");
                                require_once(
"./index.php");
                                
chdir('./../../../');
                        } else {
                                if (!isset(
$ohnoes)) {
                                        echo 
$hack['displayname'] . " build #" $hack['build'] . " contains no index.php containing hack information and cannot be uninstalled.<br /><br />";
                                        unset(
$hacks[$key]);
                                        
$ohnoes true;
                                }
                        }
                        
// If we are still sane, uninstall the hack.
                        
if (!isset($ohnoes)) {
                                
// Kill the settinggroups.s
                                
if (isset($settinggroup)) {
                                        foreach (
$settinggroup as $group => $sg) {
                                                
settinggroup_kill_list($group$sg['phrase']);
                                        }
                                }
                                
// Kill the settings.
                                
if (isset($setting)) {
                                        foreach (
$setting as $varname => $set) {
                                                
setting_kill_list($varname$set['titlephrase']);
                                        }
                                }
                                
kill_settings();
                                
// Kill the phrases.
                                
if (isset($phrase)) {
                                        foreach (
$phrase as $varname => $text) {
                                                
phrase_kill_list($varname);
                                        }
                                        
kill_phrases();
                                }
                                
// Kill the adminhelp.
                                
if (isset($adminhelp)) {
                                        foreach (
$adminhelp as $ah) {
                                                
adminhelp_kill_list($ah['script'], $ah['action'], $ah['optionname'], $ah['title']);
                                        }
                                        
kill_adminhelp();
                                }
                                
// Kill the templates.
                                
if (isset($templates)) {
                                        foreach (
$templates as $name => $content) {
                                                
template_kill_list($name);
                                        }
                                        
kill_templates();
                                }
                                
// Run uninstallation queries.
                                
if (isset($query)) {
                                        foreach (
$query as $build => $querie) {
                                                if (
$build == "uninstall") {
                                                        foreach (
$querie as $i => $querieie) {
                                                                
$DB_site->query($querieie);
                                                        }
                                                }
                                        }
                                        echo 
"<font size=\"1\">$hack[displayname]: Ran removal queries.</font><br />";
                                }
                                
// Remove the hack from the installation log, print some text, and unset a lot of crap.
                                
$DB_site->query("DELETE FROM ".TABLE_PREFIX."his_installed WHERE hack='".addslashes($hack['displayname'])."'");
                                echo 
"<font size=\"1\">$hack[displayname]: Removed from installation log.</font><br /><br /><br />";
                                unset(
$hack);
                                unset(
$templates);
                                unset(
$adminhelp);
                                unset(
$settinggroup);
                                unset(
$setting);
                                unset(
$phrase);
                                unset(
$query);
                        } else {
                                unset(
$ohnoes);
                        }
                }
                
$hacks implode("|||"$hacks);
                
// Print the ending text and some links. We are done.
                
echo "<br /><b>Hacks Uninstalled!</b><br /><br />";
                echo 
"<a href=\"hack_install.php?do=install&step=doedits&noinstall=1&hacks=$hacks$fileurl&override=1\"><b>Click here to view these hacks' modifications - you must do them backwards to finish the install. --&gt;</b></a><br />\n";
                echo 
"<a href=\"$vboptions[bburl]/$admincpdir/index.php\"><b>Click here to log into your Admin CP. --&gt;</b></a><br />\n";
                echo 
"<a href=\"hack_install.php\"><b>Click here to go back to the hack selection page. --&gt;</b></a><br />\n";
        }
}

// Finish up the page with the footer.
$DB_site->free_result($installedhacks);
if (!isset(
$_REQUEST['no_cp_footer']) && ($_REQUEST['do'] != "genreadme" && $_REQUEST['do'] != "nothing" && $_REQUEST['text'] != 1)) {
        
print_cp_footer();
}

$DB_site->free_result($installedhacks);

?>
you should be able to copy and paste that into a new file and call it uninstall.php and run it. although i dont see how it would make a difference since i just copied it and it crashed on you before but hey worth a try
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01654 seconds
  • Memory Usage 2,040KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete