<?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 Template Text</title>
	<description lang="en">Allows you to easily add or modify text strings for specific templates, while all other template styles use the original text.</description>
	    <author-notes lang="en">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>1.0.0</mod-version>
		<installation>
			<level>easy</level>
			<time>120</time>
			<target-version>3.0.6</target-version>
		</installation>
		<history>
			<entry>
				<date>2009-04-19</date>
				<rev-version>1.0.0</rev-version>
				<changelog lang="en">
					<change>Initial release</change>
				</changelog>
			</entry>
		</history>
	</header>
	<action-group>
		<open src="includes/session.php">
			<edit>
				<find><![CDATA[		// We include common language file here to not load it every time a custom language file is included]]></find>
				<action type="before-add"><![CDATA[//-- mod: Prime Template Text -----------------------------------------------//
// We'll execute this code a little further down, after we know what template style will be used.
/*	
//-- end: Prime Template Text -----------------------------------------------//]]></action>
			</edit>
			<edit>
				<find><![CDATA[		$this->add_lang($lang_set);
		unset($lang_set);]]></find>
				<action type="after-add"><![CDATA[//-- mod: Prime Template Text -----------------------------------------------//
*/
//-- end: Prime Template Text -----------------------------------------------//]]></action>
			</edit>
			<edit>
				<find><![CDATA[		// Now parse the cfg file and cache it]]></find>
				<action type="before-add"><![CDATA[//-- mod: Prime Template Text -----------------------------------------------//
		$this->add_lang('common');
		$this->add_lang($lang_set);
		unset($lang_set);
//-- end: Prime Template Text -----------------------------------------------//
]]></action>
			</edit>
			<edit>
				<find><![CDATA[			if ($include_result === false)
			{
				trigger_error('Language file ' . $language_filename . ' couldn\'t be opened.', E_USER_ERROR);
			}]]></find>
				<action type="after-add"><![CDATA[//-- mod: Prime Template Text -----------------------------------------------//
			if(!empty($this->theme['template_path']) /*&& $this->theme['template_path'] != 'prosilver' && $this->theme['template_path'] != 'subsilver2'*/)
			{
				$template_filename = substr_replace($language_filename, '/templates/' . $this->theme['template_path'], strlen($this->lang_path . $this->lang_name), 0);
				if (file_exists($template_filename))
				{
					@include $template_filename;
				}
			}
//-- end: Prime Template Text -----------------------------------------------//]]></action>
			</edit>
		</open>
		<diy-instructions lang="en">
Create a new directory called "templates" in the "language/en/" directory. 
Inside this new "templates" directory, create a new directory with the same
name as your template style directory (the one found in the "styles" directory).
Inside this directory, place new language files with filenames that match those
that already exist. As an example, lets say your new template is called mytemplate
and you want to overwrite this string found in the viewtopic.php language file:
		'BOOKMARK_ADDED'		=> 'Bookmarked topic successfully.',

Then create a new language file "language/en/templates/mytemplate/viewtopic.php"
containing your new version of the string:
	$lang = array_merge($lang, array(
		'BOOKMARK_ADDED'		=> 'Bookmarked topic!',
	));
	
This version of the text will only be used for that specific template, while all
other templates use the original version of the text.
		</diy-instructions>
	</action-group>
</mod>
