<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="./contrib/xsl/modx.prosilver.en.xsl"?>
<!-- 
	NOTICE: Please open this file in your web browser. If presented with a security warning, you may safely tell it to allow the blocked content.
-->
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.0.xsd">
	<header>
		<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
		<title lang="en">Prime Quick Style</title>
		<description lang="en">Adds a style dropdown box to the header of every page for quickly switching between styles. The dropdown box will only be displayed if the board is set to allow multiple styles.</description>
	    <author-notes lang="en">Support is given for both prosilver and subsilver2 templates. If you are using other templates then you will need to modify the template instructions to fit your templates.

Creating, maintaining, and updating MODs requires a lot of time and effort, so if you like this MOD and have the desire to express your thanks through donations, that would be greatly appreciated. My Paypal ID is primehalo@gmail.com, or contact me for my mailing address. The suggested donation amount for this MOD is $5.00 (but any amount will help).</author-notes>
		<author-group>
			<author>
				<realname>Ken F. Innes IV</realname>
				<email>primehalo@gmail.com</email>
				<username>primehalo</username>
				<homepage><![CDATA[http://www.absoluteanime.com/admin/mods.htm#quick_style]]></homepage>
			</author>
		</author-group>
		<mod-version>1.2.0</mod-version>
		<installation>
			<level>easy</level>
			<time>120</time>
			<target-version>3.0.2</target-version>
		</installation>
		<history>
			<entry>
				<date>2008-01-12</date>
				<rev-version>1.0.0</rev-version>
				<changelog lang="en">
					<change>Initial release.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-01-12</date>
				<rev-version>1.0.1</rev-version>
				<changelog lang="en">
					<change>Hide the submission button if JavaScript is enabled.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-03-18</date>
				<rev-version>1.0.2</rev-version>
				<changelog lang="en">
					<change>Add superfluous DIV tags so HTML code would validate under XHTML 1.0 Strict.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-07-02</date>
				<rev-version>1.0.2a</rev-version>
				<changelog lang="en">
					<change>Repackaged for MODX 1.2.0.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-08-26</date>
				<rev-version>1.2.0</rev-version>
				<changelog lang="en">
					<change>Moved the code into a class structure, inside a separate file.</change>
					<change>Allow guests to change styles.</change>
				</changelog>
			</entry>
		</history>
		<link-group>
			<link type="template" href="contrib/template subsilver2.xml" lang="en">subsilver2</link>
		</link-group>
	</header>
	<action-group>
		<copy>
			<file from="root/includes/prime_quick_style.php" to="includes/prime_quick_style.php" />
			<file from="root/language/en/mods/prime_quick_style.php" to="language/en/mods/prime_quick_style.php" />
			<file from="root/styles/prosilver/template/prime_quick_style.html" to="styles/prosilver/template/prime_quick_style.html" />
		</copy>

		<open src="includes/functions.php">
			<edit>
				<find><![CDATA[	// application/xhtml+xml not used because of IE]]></find>
				<action type="before-add"><![CDATA[//-- mod: Prime Quick Style -------------------------------------------------//
	include($phpbb_root_path . 'includes/prime_quick_style.' . $phpEx);
	$prime_quick_style->select_style();
//-- end: Prime Quick Style -------------------------------------------------//
]]></action>
			</edit>
		</open>

		<open src="ucp.php">
			<edit>
				<find><![CDATA[// Only registered users can go beyond this point]]></find>
		       <action type="before-add"><![CDATA[//-- mod: Prime Quick Style -------------------------------------------------//
include($phpbb_root_path . 'includes/prime_quick_style.' . $phpEx);
$prime_quick_style->switch_style();
//-- end: Prime Quick Style -------------------------------------------------//
]]></action>
			</edit>
		</open>

		<open src="includes/session.php">
			<edit>
				<find><![CDATA[			// Set up style]]></find>
		       <action type="after-add"><![CDATA[//-- mod: Prime Quick Style -------------------------------------------------//
			include($phpbb_root_path . 'includes/prime_quick_style.' . $phpEx);
			$prime_quick_style->set_guest_style($style);
//-- end: Prime Quick Style -------------------------------------------------//
]]></action>
			</edit>
		</open>

		<open src="styles/prosilver/template/overall_header.html">
			<edit>
				<find><![CDATA[				<!-- IF U_PRINT_PM --><li class="rightside"><a href="{U_PRINT_PM}" title="{L_PRINT_PM}" accesskey="p" class="print">{L_PRINT_PM}</a></li><!-- ENDIF -->]]></find>
				<action type="after-add"><![CDATA[				<!-- INCLUDE prime_quick_style.html -->]]></action>
			</edit>
		</open>
	</action-group>
</mod>