<?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.5.xsd">
	<header>
		<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
		<title lang="en">Prime Quick Buddies</title>
		<description lang="en">Introduces icons for quickly setting post authors as friends or foes.</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 $2.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_buddies]]></homepage>
			</author>
		</author-group>
		<mod-version>2.0.4</mod-version>
		<installation>
			<level>easy</level>
			<time>120</time>
			<target-version>3.0.7-PL1</target-version>
		</installation>
		<history>
			<entry>
				<date>2008-01-05</date>
				<rev-version>1.0.0</rev-version>
				<changelog lang="en">
					<change>Initial release</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-01-16</date>
				<rev-version>1.0.1</rev-version>
				<changelog lang="en">
					<change>Added styling to ensure the two icons will remain next to each other.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-07-02</date>
				<rev-version>1.0.1a</rev-version>
				<changelog lang="en">
					<change>Repackaged for MODX 1.2.0.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-07-24</date>
				<rev-version>1.0.2</rev-version>
				<changelog lang="en">
					<change>Link to the stylesheet from the HTML file rather than the existing stylesheet file (so there is no need to refresh the theme when making style changes).</change>
					<change>Repackaged to fix the Firefox 3 restricted parent directory issue.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-09-06</date>
				<rev-version>2.0.0</rev-version>
				<changelog lang="en">
					<change>Added AJAX support, enabling friends and foes to be added without leaving the current page.</change>
					<change>Move the code into a separate file for easier maintainability.</change>
					<change>Make sure the add friends/foes module is available before displaying the icons.</change>
				</changelog>
			</entry>
			<entry>
				<date>2009-03-02</date>
				<rev-version>2.0.1</rev-version>
				<changelog lang="en">
					<change>Split the AJAX PHP code into a separate file.</change>
				</changelog>
			</entry>
			<entry>
				<date>2009-08-20</date>
				<rev-version>2.0.2</rev-version>
				<changelog lang="en">
					<change>Fixed a typo.</change>
					<change>Changed the image icon files from PNG to GIF.</change>
					<change>Included alternate icons based on the prosilver and subsilver2 styles.</change>
				</changelog>
			</entry>
			<entry>
				<date>2009-08-20</date>
				<rev-version>2.0.3</rev-version>
				<changelog lang="en">
					<change>Use prosilver and subsilver2 style icons as the default, and include generic icons as an alternative.</change>
				</changelog>
			</entry>
			<entry>
				<date>2010-05-31</date>
				<rev-version>2.0.4</rev-version>
				<changelog lang="en">
					<change>Fixed a typo in the code which prevented the AJAX feature from functioning.</change>
				</changelog>
			</entry>
		</history>
		<link-group>
			<link type="template" href="contrib/template subsilver2.xml" realname="subsilver2" lang="en">subsilver2</link>
		</link-group>
	</header>
	<action-group>
		<copy>
			<file from="root/prime_quick_buddies.php" to="prime_quick_buddies.php" />
			<file from="root/includes/prime_quick_buddies.php" to="includes/prime_quick_buddies.php" />
			<file from="root/styles/prosilver/template/prime_quick_buddies.html" to="styles/prosilver/template/prime_quick_buddies.html" />
			<file from="root/styles/prosilver/template/prime_quick_buddies.js" to="styles/prosilver/template/prime_quick_buddies.js" />
			<file from="root/styles/prosilver/theme/prime_quick_buddies.css" to="styles/prosilver/theme/prime_quick_buddies.css" />
			<file from="root/styles/prosilver/theme/images/add_friend.gif" to="styles/prosilver/theme/images/add_friend.gif" />
			<file from="root/styles/prosilver/theme/images/add_foe.gif" to="styles/prosilver/theme/images/add_foe.gif" />
		</copy>
		<open src="viewtopic.php">
			<edit>
				<find><![CDATA[	// Dump vars into template]]></find>
				<action type="before-add"><![CDATA[//-- mod: Prime Quick Buddies -----------------------------------------------//
	include($phpbb_root_path . 'includes/prime_quick_buddies.' . $phpEx);
	$prime_quick_buddies->update_postrow($postrow, $row);
//-- end: Prime Quick Buddies -----------------------------------------------//
]]></action>
			</edit>
		</open>
		<open src="styles/prosilver/template/overall_header.html">
			<edit>
				<find><![CDATA[</head>]]></find>
				<action type="before-add"><![CDATA[<!-- INCLUDE prime_quick_buddies.html -->]]></action>
			</edit>
		</open>
		<open src="styles/prosilver/template/viewtopic_body.html">
			<edit>
				<find><![CDATA[					<!-- IF postrow.U_JABBER --><li class="jabber-icon"><a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->]]></find>
				<action type="after-add"><![CDATA[					<!-- IF postrow.U_ADD_FRIEND and postrow.U_ADD_FOE --><li class="buddy-icon"><a class="friend-icon" href="{postrow.U_ADD_FRIEND}" title="{L_ADD_FRIEND}"{postrow.S_ADD_FRIEND_ONCLICK}></a><a href="{postrow.U_ADD_FOE}" class="foe-icon" title="{L_ADD_FOE}"{postrow.S_ADD_FOE_ONCLICK}></a></li><!-- ENDIF -->]]></action>
			</edit>
		</open>
		<diy-instructions lang="en">From the Administration Control Panel, refresh all themes that make use of the database, such as the prosilver theme.</diy-instructions>
	</action-group>
</mod>
