<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="./contrib/modx.prosilver.en.xsl"?>
<!-- 
	NOTICE: Please open this file in your web browser. If Internet Explorer presents a security bar, 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 BBCode Spoiler</title>
		<description lang="en">Adds a BBCode called "Spoiler", which obscures text in a box until the user clicks on it. Supports both inline and block-level spoilers. Functions as a standard spoiler when JavaScript is disabled (whereby selecting the text with your cursor reveals the spoiler).</description>
		<author-notes lang="en">Support is given for both prosilver and subsilver2 templates, though it should work with any template style. If you are using other templates then you might need to modify the template instructions slightly 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#bbcode_spoiler]]></homepage>
			</author>
		</author-group>
		<mod-version>1.4.2b</mod-version>
		<installation>
			<level>easy</level>
			<time>180</time>
			<target-version>3.0.1</target-version>
		</installation>
		<history>
			<entry>
				<date>2007-08-18</date>
				<rev-version>0.0.0</rev-version>
				<changelog lang="en">
					<change>Initial test release</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-08-19</date>
				<rev-version>0.0.1</rev-version>
				<changelog lang="en">
					<change>Moved the JavaScript code into a separate file. This way that file can get cached, and the browser won't have to download a block of JavaScript code for every spoiler box. Also, it makes it more convenient to change the colors if desired.</change>
					<change>Provided instructions for allowing the spoiler box height to shrink when the text is hidden.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-09-07</date>
				<rev-version>0.0.2</rev-version>
				<changelog lang="en">
					<change>Change: When the spoiler content is hidden, any spoiler boxes nested inside will also be hidden.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-09-12</date>
				<rev-version>1.0.0</rev-version>
				<changelog lang="en">
					<change>Moved most of the JavaScript code into a JavaScript file.</change>
					<change>Moved all color information into the stylesheet.</change>
					<change>Reduced the size of the JavaScript code (from 1160 bytes to 1015 bytes).</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-09-14</date>
				<rev-version>1.0.0a</rev-version>
				<changelog lang="en">
					<change>Relocated some files in the installation package to conform to MODX packaging rules.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-09-14</date>
				<rev-version>1.0.0b</rev-version>
				<changelog lang="en">
					<change>Relocated the included language file back to its original location in this package, as apparently the instruction I was given to relocate it was not correct.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-09-28</date>
				<rev-version>1.0.1</rev-version>
				<changelog lang="en">
					<change>Made it compatible with another MOD, Prime Links (which adds a class to the Show/Hide link).</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-09-28</date>
				<rev-version>1.2.0</rev-version>
				<changelog lang="en">
					<change>Added support for inline spoilers.</change>
					<change>Added the ability to include a title with the block-level spoilers.</change>
					<change>Moved the setting for collapsing a spoiler from the ACP BBCode create/edit page to the included JavaScript file. This way the option can be set on a per-style basis (and it also makes the included JavaScript file a bit smaller).</change>
					<change>Decreased the size of the included JavaScript file to under 1KB (984 bytes).</change>
					<change>Fixed a mistake with the instructions for installing the subsilver2 CSS.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-10-23</date>
				<rev-version>1.2.0b</rev-version>
				<changelog lang="en">
					<change>Updated for compatibility with phpBB3.0.RC7.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-10-26</date>
				<rev-version>1.2.0c</rev-version>
				<changelog lang="en">
					<change>Added a check for IN_PHPBB to the language file, as per RC7.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-11-26</date>
				<rev-version>1.2.0d</rev-version>
				<changelog lang="en">
					<change>Fixed a typo in the installation instructions.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-11-26</date>
				<rev-version>1.2.1</rev-version>
				<changelog lang="en">
					<change>Fixed: Spoilers would fail to collapse on loading of the page (if the collapse option was enabled).</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-01-15</date>
				<rev-version>1.4.0</rev-version>
				<changelog lang="en">
					<change>Functions as a standard spoiler when JavaScript is disabled (whereby selecting the text with your cursor reveals the spoiler).</change>
					<change>Left-justified the link that toggles the block spoiler so that spoiler titles will no longer look awkward.</change>
					<change>Once again decreased the size of the included JavaScript file to under 1KB (932 bytes).</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-01-18</date>
				<rev-version>1.4.1a</rev-version>
				<changelog lang="en">
					<change>Link to the included stylesheet from within the included HTML file, so it no longer needs to be imported from within the theme's main stylesheet.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-01-18</date>
				<rev-version>1.4.2</rev-version>
				<changelog lang="en">
					<change>Fixed: Setting the option to collapse spoilers prevented the ability to reveal inline spoilers.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-05-13</date>
				<rev-version>1.4.2a</rev-version>
				<changelog lang="en">
					<change>Added a German translation.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-06-04</date>
				<rev-version>1.4.2b</rev-version>
				<changelog lang="en">
					<change>Repackaged for MODX 1.2.0.</change>
				</changelog>
			</entry>
		</history>
		<link-group>
			<link type="template" href="contrib/templates/subsilver2.xml" lang="en">subsilver2</link>
			<link type="language" href="contrib/languages/de.xml" lang="en">German</link>
		</link-group>
	</header>
	<action-group>
		<copy>
			<file from="root/language/en/mods/prime_bbcode_spoiler.php" to="language/en/mods/prime_bbcode_spoiler.php" />
			<file from="root/styles/prosilver/template/prime_bbcode_spoiler.html" to="styles/prosilver/template/prime_bbcode_spoiler.html" />
			<file from="root/styles/prosilver/template/prime_bbcode_spoiler.js" to="styles/prosilver/template/prime_bbcode_spoiler.js" />
			<file from="root/styles/prosilver/theme/prime_bbcode_spoiler.css" to="styles/prosilver/theme/prime_bbcode_spoiler.css" />
		</copy>

		<open src="includes/session.php">
			<edit>
				<find><![CDATA[		// Does the user need to change their password?]]></find>
				<action type="before-add"><![CDATA[//-- mod: Prime BBCode Spoiler ----------------------------------------------//
		$this->add_lang('mods/prime_bbcode_spoiler');
//-- end: Prime BBCode Spoiler ----------------------------------------------//
]]></action>
			</edit>
		</open>

		<open src="styles/prosilver/template/overall_header.html">
			<edit>
				<find><![CDATA[</head>]]></find>
				<action type="before-add"><![CDATA[<!-- INCLUDE prime_bbcode_spoiler.html -->]]></action>
			</edit>
		</open>

		<diy-instructions lang="en"><![CDATA[Go to the Administration Control Panel and navigate to the "Posting" tab, then
to the "BBCodes" section. Click the "Add a new BBCode" button. The following
page is where you are to enter the information for the new BBCode.

    (1) In the "BBCode usage" area, enter the following:
        [spoiler={TEXT1}]{TEXT2}[/spoiler]

    (2) In the "HTML replacement" area, enter the following:
        <div class="spoiler"><div class="spoiler-top"><a href="#toggle_spoiler" class="spoiler-link" onclick="return(spoilerToggle(this));">{L_PRIME_BBCODE_SPOILER_SHOW}</a> {L_PRIME_BBCODE_SPOILER}: <span class="spoiler-title">{TEXT1}</span></div><div class="spoiler-box" onclick="spoilerToggle(this);"><div class="spoiler-hidden">{TEXT2}</div></div></div>

    (3) In the "Help line" area, enter the following:
        Note: [spoiler=optional title]hidden text[/spoiler]

    (4) In the "Settings" area, check the box for "Display on posting page" if
        you want a "spoiler=" button placed alongside the other BBCode buttons.

When that's all filled out, click "Submit". Now, we're going to create one more version of
this BBCode, so create a new BBCode and enter this information:

    (1) In the "BBCode usage" area, enter the following:
        [spoiler]{TEXT}[/spoiler]

    (2) In the "HTML replacement" area, enter the following:
        <span class="spoiler"><span class="spoiler-box" onclick="spoilerToggle(this);"><span class="spoiler-hidden">{TEXT}</span></span></span>

    (3) In the "Help line" area, enter the following:
        Note: [spoiler]hidden text[/spoiler]

    (4) In the "Settings" area, check the box for "Display on posting page" if
        you want a "spoiler" button placed alongside the other BBCode buttons.

When that's all filled out, click "Submit". Now, if you want the spoiler box 
height to shrink when the text is hidden, then open the included JavaScript
file "prime_bbcode_spoiler.js", find "spoiler_collapse = false", and change the value
to "true". Note that only the block-level spoilers will collapse; inline
spoilers will not.
]]></diy-instructions>
	</action-group>
</mod>
