Customizing SMF > Tips and Tricks

Resetting Forum...

(1/9) > >>

Kindred:
So, as you may have heard - I set up a test forum in which I installed over 160 mods.

Now... I can manually reset the forum using the large upgrade archive - but that doesn't clean everything.

So, I wrote a script which does.
1- truncates/removes the error logs from the DB
2- truncates/removes the package list from the DB (thus marking all packages as "uninstalled")
3- removes (via delTree) any themes installed, other than default
4- removes all installed themes (other than default) and all member options from the smf_themes tables
5- removes the backup tar.gz files from Packages/backups
6- removes *.php~ files from the forum root, /Sources, /Themes/default and /Themes/default/languages
7- removes *.css~ files from Themes/default/css
8- removes most of the common hooks

it does NOT:
delete mod specific installed files (i.e. mymod.php)
remove mod specific installed tables or columns from the database

BEWARE: the does only a minimal security check for admin - it is NOT recommended to leave the file sitting in an accessible place on your server

BEWARE EVEN MORE - this script does NOT ask for validation...  it WILL delete settings, directories and files without asking you. It assumes that you intended to run it....

Assumptions:
A- The reset script has been uploaded to the forum root (i.e. where Settings.php and SSI.php are)
B- you have also uploaded a file called "test_reset.zip" which has the clean forum files. (my test_reset.zip file is the large upgrade package with the avatars, the smileys, the upgrade files and core theme directory removed)

FINAL WARNING - the actions in this script are NOT recoverable without a full backup of your database AND files. If you don't have a backup, then take one!

Labradoodle-360:
Also might be good to note that this is for SMF 2.0x only, and not the 1.1x branch. Great idea, Kindred.

4Kstore:
thanks, this is a good tool to have in mind

Bigguy:
Very nice. :) I like it. Was there not another one that did the same thing in the works or is this it. ???

Labradoodle-360:

--- Quote from: Bigguy on February 16, 2012, 12:22:20 AM ---Very nice. :) I like it. Was there not another one that did the same thing in the works or is this it. ???

--- End quote ---
No...Yoshi wanted one developed, and I said I'd do it, but only started a little bit today.

Navigation

[0] Message Index

[#] Next page

Go to full version