dir|^|Packages file|^|Packages/modification.mod|^|3709|^|1054061907 Package Uninstall File 1.1 (YabbSE 1.4.1/1.5.x) Jack.R.Abbit Jack.R.Abbit Jack.R.Abbit This mod adds a bit of code to the Package Manager that allows a mod to include an "uninstall.php" file to undo things that may have been executed in a "modification.php" file. This mod will work for either 1.4.1 or 1.5.x but each will produce a NOT FOUND when looking for the string from the other... this is not a problem. Just ignore it. no Sources/Packages.php if (!empty($filetokill)) { $packer = new Packer("Packages/$filetokill"); echo $packer->extract(".","",true); } if (!$try) { echo '
'; if (file_exists("Packages/uninstall.txt")) { echo '
' . $txt['yse175'] . '

';
			echo htmlspecialchars(implode("", file("Packages/uninstall.txt")));
			echo '

'; unlink("Packages/uninstall.txt"); } if (file_exists("Packages/uninstall.php")) { echo '
' . $txt['yse173'] . '
'; include("Packages/uninstall.php"); unlink("Packages/uninstall.php"); echo '
'; } if (file_exists("Packages/uninstall.sql")) { $fullfile = implode("", file("Packages/uninstall.sql")); $fullfile = str_replace("", $db_prefix, $fullfile); echo '
' . $txt['yse175b'] . '

';
			echo htmlspecialchars($fullfile);
			echo '

' . $txt['yse175c'] . '

';
	
			$SQL_query = mysql_query($fullfile);
	
			if (($SQL_error = mysql_error()) != '')
				echo "$txt[yse175d] $SQL_error";
			else if (mysql_affected_rows() != 0 || mysql_num_rows() != 0)
				echo "$txt[yse175e]";
			else
			{
				echo "";
				while ($SQL_row = mysql_fetch_row($SQL_query))
				{
					foreach($SQL_row as $SQL_printing)
						print "$SQL_printing  ";
					print "
\n"; } } print "

"; // Done unlink("Packages/uninstall.sql"); } }
$packer = new Packer("Packages/$filetokill"); echo $packer->extract(".","",true); if (!$try) { echo '
'; if (file_exists("Packages/uninstall.txt")) { echo '
' . $txt['yse175'] . '

';
			echo htmlspecialchars(implode("", file("Packages/uninstall.txt")));
			echo '

'; unlink("Packages/uninstall.txt"); } if (file_exists("Packages/uninstall.php")) { echo '
' . $txt['yse173'] . '
'; include("Packages/uninstall.php"); unlink("Packages/uninstall.php"); echo '
'; } if (file_exists("Packages/uninstall.sql")) { $fullfile = implode("", file("Packages/uninstall.sql")); $fullfile = str_replace("", $db_prefix, $fullfile); echo '
' . $txt['yse175b'] . '

';
			echo htmlspecialchars($fullfile);
			echo '

' . $txt['yse175c'] . '

';
	
			$SQL_query = mysql_query($fullfile);
	
			if (($SQL_error = mysql_error()) != '')
				echo "$txt[yse175d] $SQL_error";
			else if (mysql_affected_rows() != 0 || mysql_num_rows() != 0)
				echo "$txt[yse175e]";
			else
			{
				echo "";
				while ($SQL_row = mysql_fetch_row($SQL_query))
				{
					foreach($SQL_row as $SQL_printing)
						print "$SQL_printing  ";
					print "
\n"; } } print "

"; // Done unlink("Packages/uninstall.sql"); } }
file|^|Packages/modification.txt|^|344|^|1054061908 This mod adds a bit of code to the Package Manager that allows a mod to include an "uninstall.php" file to undo things that may have been executed in a "modification.php" file. This mod will work for either 1.4.1 or 1.5.x but each will produce a NOT FOUND when looking for the string from the other... this is not a problem. Just ignore it.