<?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 Self Topics</title>
		<description lang="en">Adds a "View your topics" link next to the "View your posts" link.</description>
		<author-notes lang="en">Support is given for both prosilver and subsilver2 templates. If you are using other templates then you may need to modify the template instructions to fit your templates. Instructions for subsilver2 are located in the templates directory.

ICreating, 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 a donation, 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 $1.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#self_topics]]></homepage>
			</author>
		</author-group>
		<mod-version>1.0.1d</mod-version>
		<installation>
			<level>easy</level>
			<time>180</time>
			<target-version>3.0.2</target-version>
		</installation>
		<history>
			<entry>
				<date>2007-09-26</date>
				<rev-version>1.0.0</rev-version>
				<changelog lang="en">
					<change>Initial release</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-09-26</date>
				<rev-version>1.0.1</rev-version>
				<changelog lang="en">
					<change>Added the link to the main page of the User Control Panel.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-10-22</date>
				<rev-version>1.0.1a</rev-version>
				<changelog lang="en">
					<change>Repackaged.</change>
					<change>Confirmed compatibility with phpBB3.0.RC7.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-01-19</date>
				<rev-version>1.0.1b</rev-version>
				<changelog lang="en">
					<change>Confirmed compatibility with phpBB3.0 Gold.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-01-19</date>
				<rev-version>1.0.1b</rev-version>
				<changelog lang="en">
					<change>Added a Brazilian Portuguese translation.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-07-02</date>
				<rev-version>1.0.1c</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.1d</rev-version>
				<changelog lang="en">
					<change>Repackaged to fix the Firefox 3 restricted parent directory issue.</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/language/en/mods/prime_self_topics.php" to="language/en/mods/prime_self_topics.php" />
		</copy>

		<open src="includes/ucp/ucp_main.php">
			<edit>
				<find><![CDATA[
			break;

			case 'subscribed':]]></find>
				<action type="before-add"><![CDATA[//-- mod: Prime Self Topics -------------------------------------------------//
				$user->add_lang('mods/prime_self_topics');
				$template->assign_var('U_SEARCH_USER_TOPICS', ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user->data['user_id'] . '&amp;sf=firstpost&amp;sr=topics'): '');
//-- end: Prime Self Topics -------------------------------------------------//]]></action>
			</edit>
		</open>


		<open src="includes/functions.php">
			<edit>
				<find><![CDATA[	// application/xhtml+xml not used because of IE]]></find>
				<action type="before-add"><![CDATA[//-- mod: Prime Self Topics -------------------------------------------------//
	$user->add_lang('mods/prime_self_topics');
	$template->assign_var('U_SELF_TOPICS', append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=egosearch&amp;sf=firstpost'));
//-- end: Prime Self Topics -------------------------------------------------//
]]></action>
			</edit>
		</open>

		<open src="search.php">
			<edit>
				<find><![CDATA[				$l_search_title = $user->lang['SEARCH_SELF'];]]></find>
				<action type="after-add"><![CDATA[//-- mod: Prime Self Topics -------------------------------------------------//
				$user->add_lang('mods/prime_self_topics');
				$l_search_title = ($search_fields === 'firstpost') ? $user->lang['PRIME_SELF_TOPICS'] : $l_search_title;
//-- end: Prime Self Topics -------------------------------------------------//]]></action>
			</edit>
		</open>

		<open src="styles/prosilver/template/overall_header.html">
			<edit>
				<find><![CDATA[					<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>]]></find>
				<action type="before-add"><![CDATA[					<a href="{U_SELF_TOPICS}">{L_PRIME_SELF_TOPICS}</a> &bull;]]></action>
			</edit>
		</open>

		<open src="styles/prosilver/template/ucp_main_front.html">
			<edit>
				<find><![CDATA[<strong><a href="{U_SEARCH_USER}">{L_SEARCH_YOUR_POSTS}</a></strong>]]></find>
				<inline-edit>
					<inline-find><![CDATA[<strong><a href="{U_SEARCH_USER}">{L_SEARCH_YOUR_POSTS}</a></strong>]]></inline-find>
					<inline-action type="after-add"><![CDATA[<!-- IF U_SEARCH_USER_TOPICS --> | <strong><a href="{U_SEARCH_USER_TOPICS}">{L_PRIME_YOUR_TOPICS}</a></strong><!-- ENDIF -->]]></inline-action>
				</inline-edit>
			</edit>
		</open>
	</action-group>
</mod>
