<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://gwiki3.thatlinuxbox.com/index.php?action=history&amp;feed=atom&amp;title=Plugin_Auto-Uninstall</id>
		<title>Plugin Auto-Uninstall - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://gwiki3.thatlinuxbox.com/index.php?action=history&amp;feed=atom&amp;title=Plugin_Auto-Uninstall"/>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Plugin_Auto-Uninstall&amp;action=history"/>
		<updated>2026-04-06T09:29:52Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.5</generator>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Plugin_Auto-Uninstall&amp;diff=5291&amp;oldid=prev</id>
		<title>Dirk: Typo</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Plugin_Auto-Uninstall&amp;diff=5291&amp;oldid=prev"/>
				<updated>2009-05-15T13:56:51Z</updated>
		
		<summary type="html">&lt;p&gt;Typo&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 13:56, 15 May 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot; &gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 'vars': a list of names to be removed from the &amp;lt;tt&amp;gt;gl_vars&amp;lt;/tt&amp;gt; table&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 'vars': a list of names to be removed from the &amp;lt;tt&amp;gt;gl_vars&amp;lt;/tt&amp;gt; table&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;As an example, here's the uninstall function for Geeklog' Calendar &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;plugin&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;As an example, here's the uninstall function for Geeklog'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;s [[&lt;/ins&gt;Calendar &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Plugin]]&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;function plugin_autouninstall_calendar ()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;function plugin_autouninstall_calendar ()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dirk</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Plugin_Auto-Uninstall&amp;diff=4860&amp;oldid=prev</id>
		<title>Dirk: typo</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Plugin_Auto-Uninstall&amp;diff=4860&amp;oldid=prev"/>
				<updated>2009-03-02T15:13:22Z</updated>
		
		<summary type="html">&lt;p&gt;typo&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:13, 2 March 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot; &gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* unregister plugin from Geeklog&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* unregister plugin from Geeklog&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For easy uninstallation of plugins, Geeklog provides the &amp;lt;tt&amp;gt;plugin_autouninstall_&amp;lt;/tt&amp;gt; API function, where the plugin simply returns information about the data to be removed and Geeklog then does the rest. This also reduces the risk of any coding errors for the uninstall, which may &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;lead &lt;/del&gt;the database in an undefined state.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For easy uninstallation of plugins, Geeklog provides the &amp;lt;tt&amp;gt;plugin_autouninstall_&amp;lt;/tt&amp;gt; API function, where the plugin simply returns information about the data to be removed and Geeklog then does the rest. This also reduces the risk of any coding errors for the uninstall, which may &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;leave &lt;/ins&gt;the database in an undefined state.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;function plugin_autouninstall_foo()&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;function plugin_autouninstall_foo()&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dirk</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Plugin_Auto-Uninstall&amp;diff=4856&amp;oldid=prev</id>
		<title>Dirk: Plugin Auto-Uninstall</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Plugin_Auto-Uninstall&amp;diff=4856&amp;oldid=prev"/>
				<updated>2009-02-23T15:33:50Z</updated>
		
		<summary type="html">&lt;p&gt;Plugin Auto-Uninstall&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Uninstalling a plugin usually requires a series of steps that are identical for most, if not all, plugins:&lt;br /&gt;
&lt;br /&gt;
* drop plugin-specific tables&lt;br /&gt;
* remove plugin groups and permissions&lt;br /&gt;
* unregister plugin from Geeklog&lt;br /&gt;
&lt;br /&gt;
For easy uninstallation of plugins, Geeklog provides the &amp;lt;tt&amp;gt;plugin_autouninstall_&amp;lt;/tt&amp;gt; API function, where the plugin simply returns information about the data to be removed and Geeklog then does the rest. This also reduces the risk of any coding errors for the uninstall, which may lead the database in an undefined state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function plugin_autouninstall_foo()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simply returns an array specifying the data to be removed from the database:&lt;br /&gt;
&lt;br /&gt;
* 'tables': a list of the tables to be dropped&lt;br /&gt;
* 'groups': a list of the plugin's groups to be removed from the database&lt;br /&gt;
* 'features': a list of plugin features to be removed&lt;br /&gt;
* 'php_blocks': a list of blocks associated with the plugin and to be removed from the &amp;lt;tt&amp;gt;gl_blocks&amp;lt;/tt&amp;gt; table&lt;br /&gt;
* 'vars': a list of names to be removed from the &amp;lt;tt&amp;gt;gl_vars&amp;lt;/tt&amp;gt; table&lt;br /&gt;
&lt;br /&gt;
As an example, here's the uninstall function for Geeklog' Calendar plugin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function plugin_autouninstall_calendar ()&lt;br /&gt;
{&lt;br /&gt;
    $out = array (&lt;br /&gt;
        /* give the name of the tables, without $_TABLES[] */&lt;br /&gt;
        'tables' =&amp;gt; array('events', 'eventsubmission', 'personal_events'),&lt;br /&gt;
&lt;br /&gt;
        /* give the full name of the group, as in the db */&lt;br /&gt;
        'groups' =&amp;gt; array('Calendar Admin'),&lt;br /&gt;
&lt;br /&gt;
        /* give the full name of the feature, as in the db */&lt;br /&gt;
        'features' =&amp;gt; array('calendar.edit', 'calendar.moderate', 'calendar.submit'),&lt;br /&gt;
&lt;br /&gt;
        /* give the full name of the block, including 'phpblock_', etc */&lt;br /&gt;
        'php_blocks' =&amp;gt; array('phpblock_calendar'),&lt;br /&gt;
&lt;br /&gt;
        /* give all vars with their name */&lt;br /&gt;
        'vars'=&amp;gt; array()&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    return $out;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that table names are given as their index into the &amp;lt;code&amp;gt;$_TABLES&amp;lt;/code&amp;gt; array, not as the actual table name.&lt;br /&gt;
&lt;br /&gt;
== Also see ==&lt;br /&gt;
&lt;br /&gt;
* [[Plugin Autoinstall]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugin Development]]&lt;/div&gt;</summary>
		<author><name>Dirk</name></author>	</entry>

	</feed>