1) When you load a script it goes through it and makes the necessary modifications to the file. IF there is an error and a line cant be changed (because nothing matches), have an option for the admin to manually change the step during installtion, and then continue. The manually changed step will then be saved as an alternate step so if it's run again it will try the first one, then the alternate.
2) In the install script have an option to have an alternate step if a particular step fails. Good for supporting other modifications modders might make.
3) When you install mod's they have an order thing to them, so if you uninstall a mod, they can be uninstalled in reverse order.
4) Use the "Mod Installer" for IPB upgrades (maybe). When you run an IPB upgrade it uninstalls all modifications (the script part and template part) before upgrade. After upgrade is complete it re-installs the mod's (the script and template parts), or atleast try's to.
5) Have a mod packaging thing with it where you take the installation script and select source files (like new plugins) to bundle into an xml package.
6) Support SQL statements
Here's a possible example of a mod installtion file:
CODE
[TITLE]My Modification[/TITLE]
[VERSION]1.0[/VERSION]
[COMMENTS]Pretty cool eh?[/COMMENTS]
[HOME]http://www.mysite.com[/HOME]
[AUTHOR]Me[/AUTHOR]
[SCRIPT]
[OPEN="/sources/register.php"]
[CHANGE]
[MAIN]
[FIND]$ibforums->cache['stats']['mem_count'] += 1;[/FIND]
[REPLACE]//$ibforums->cache['stats']['mem_count'] += 1;[/REPLACE]
[/MAIN]
[ALT]
[FIND]$ibforums->cache['stats']['mem_count'] = $ibforums->cache['stats']['mem_count'] + 1;[/FIND]
[REPLACE]//$ibforums->cache['stats']['mem_count'] = $ibforums->cache['stats']['mem_count'] + 1;[/REPLACE]
[/ALT]
[ALT]
{IGNORE}
[/ALT]
[/CHANGE]
[CHANGE]
[MAIN]
[FIND]$this->email->send_mail();[/FIND]
[AFTER]
//replace with comment
[/AFTER]
[ALT]
{USER}
[/ALT]
[/MAIN]
[/CHANGE]
[/OPEN]
[/SCRIPT]
[TEMPLATE]
[OPEN="skin_global,Error"]
[CHANGE]
[FIND]
# Same Type of stuff as before, just with templates
[/FIND]
[/CHANGE]
[/OPEN]
[/TEMPLATE]
[SQL]
# Some sql queries here
[/SQL]
[VERSION]1.0[/VERSION]
[COMMENTS]Pretty cool eh?[/COMMENTS]
[HOME]http://www.mysite.com[/HOME]
[AUTHOR]Me[/AUTHOR]
[SCRIPT]
[OPEN="/sources/register.php"]
[CHANGE]
[MAIN]
[FIND]$ibforums->cache['stats']['mem_count'] += 1;[/FIND]
[REPLACE]//$ibforums->cache['stats']['mem_count'] += 1;[/REPLACE]
[/MAIN]
[ALT]
[FIND]$ibforums->cache['stats']['mem_count'] = $ibforums->cache['stats']['mem_count'] + 1;[/FIND]
[REPLACE]//$ibforums->cache['stats']['mem_count'] = $ibforums->cache['stats']['mem_count'] + 1;[/REPLACE]
[/ALT]
[ALT]
{IGNORE}
[/ALT]
[/CHANGE]
[CHANGE]
[MAIN]
[FIND]$this->email->send_mail();[/FIND]
[AFTER]
//replace with comment
[/AFTER]
[ALT]
{USER}
[/ALT]
[/MAIN]
[/CHANGE]
[/OPEN]
[/SCRIPT]
[TEMPLATE]
[OPEN="skin_global,Error"]
[CHANGE]
[FIND]
# Same Type of stuff as before, just with templates
[/FIND]
[/CHANGE]
[/OPEN]
[/TEMPLATE]
[SQL]
# Some sql queries here
[/SQL]
Well you kinda get the idea (i guess). And with the xml package, the selected files and new template sets are copied.
