All pastes #927307 Raw Edit

Untitled

public text v1 · immutable
·published 2008-03-04 04:50 UTC
rendered paste body
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
<!--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/-->
<!-- $Id: install.xml 189 2007-11-14 14:20:27Z paul $ -->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.1.xsd">
	<header>
	<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
	<title lang="en">Ajax ShoutBox</title>
	<description lang="en">This mod add a shoutbox to your forum index.</description>
	<author-notes lang="en">This mod requires for the user visiting the forum that he has eneblad JavaScript. Without JavaScript, the shoutbox isn't displayed.

You can place this shoutbox eveywhere on the forum, the only thing you has to do is editing the correct html file, with the changes that are normally done for index_body.html.
If you place it somewhere else as index_body.html you need also to move the call to $user->add_lang in index.php to the correct page.

Please report bug or feature requests ONLY at http://www.paulsohier.nl/ajax/ Thats the only place where I will answer bugreports and featurerequests!</author-notes>
	<author-group>
		<author>
		<realname>Paul Sohier</realname>
		<email>mods@paulscripts.nl</email>
		<username>Paul</username>
		<homepage>http://www.paulscripts.nl/</homepage>
		<contributions />
		</author>
	</author-group>
	<mod-version>
		<major>1</major>
		<minor>0</minor>
		<revision>3</revision>
	</mod-version>
	<installation>
		<level>easy</level>
		<time>500</time>
		<target-version>
			<target-primary>3.0.RC7</target-primary>
			<target-major allow="exact">3</target-major>
			<target-minor allow="exact">0</target-minor>
		</target-version>
	</installation>
	<history>
		<entry>
		<date>2007-05-28</date>
		<rev-version>
			<major>0</major>
			<minor>0</minor>
			<revision>1</revision>
		</rev-version>
		<changelog lang="en">
			<change>First release for phpBB3.</change>
		</changelog>
		</entry>
		<entry>
		 	<date>2007-06-18</date>
		 	<rev-version>
		 		<major>0</major>
		 		<minor>0</minor>
		 		<revision>2</revision>
		 	</rev-version>
	 		<changelog lang="en">
	 			<change>Update code to fit code guidelines a bit more</change>
	 			<change>Dont display page numbers when there is only 1 page (xsnslaine)</change>
	 			<change>Changed way of handling errors (Bug by xsnslaine)</change>
	 			<change>Refresh shoutbox after deleting message (Mrtb)</change>
	 			<change>Added 3px left padding to message (dr.death)</change>
	 			<change>Usernames where not bold displayed when user has a color (dr.death)</change>
	 			<change>Underline bbcode wasnt working (Mrtb)</change>
	 			<change>U bbcode button wasnt underlined (Mrtb)(Dont work with firefox!)</change>
	 			<change>Moved language file to mods directory.</change>
	 			<change>Fixed underlined space in bbcode button (ZeroT)</change>
	 			<change>Rewrited pagination functions</change>
	 			<change>Subsilver2 compitable</change>
	 			<change>Changed empty message check</change>
	 			<change>Fixed refreshing of pagination</change>
	 		</changelog>
		</entry>

		<entry>
		 	<date>2007-07-20</date>
		 	<rev-version>
		 		<major>0</major>
		 		<minor>0</minor>
		 		<revision>3</revision>
		 	</rev-version>
	 		<changelog lang="en">
	 			<change>Better followed MODX rules.</change>
	 			<change>Code guidelines updates</change>
	 			<change>Fixed wrong path to language file.</change>
	 			<change>XHTML compitable fix</change>
	 			<change>Fixed a small JS error</change>
	 			<change>Changed way the subsilver version is displayed. Looks lot beter now</change>
	 		</changelog>
		</entry>

		<entry>
			<date>2007-08-04</date>
			<rev-version>
				<major>1</major>
				<minor>0</minor>
				<revision>0</revision>
			</rev-version>
			<changelog lang="en">
				<change>Fixed UTF8 issues.</change>
				<change>Fixed error handling again</change>
				<change>MOD submitted to MODDB, but without subsilver version.</change>
			</changelog>
			</entry>

			<entry>
				<date>2007-09-17</date>
				<rev-version>
					<major>0</major>
					<minor>0</minor>
					<revision>5</revision>
				</rev-version>
				<changelog lang="en">
					<change>Adding $phpbb_root_path to append_sid calls</change>
					<change>Use big number for messages in opera</change>
					<change>Lowered number of messages in IE</change>
					<change>Fixed table prefix in install file</change>
					<change>Fixed a cookie bug</change>
					<change>Change way for checking cdata blocks. Borrowed from cortex xml, written by Vic</change>
					<change>Language items uppercase. NOTE: This means ALL old lang files will NOT longer work!!!</change>
				</changelog>
			</entry>

			<entry>
				<date>2007-09-23</date>
				<rev-version>
					<major>0</major>
					<minor>0</minor>
					<revision>6</revision>
				</rev-version>
				<changelog lang="en">
					<change>NOTE: This version isnt publicly released!</change>
					<change>Fixed a mistake with the new cdata function.</change>
					<change>A lot of updates for submissions. Mostly code guideline thingies</change>
				</changelog>
			</entry>

			<entry>
				<date>2007-10-06</date>
				<rev-version>
					<major>0</major>
					<minor>0</minor>
					<revision>7</revision>
				</rev-version>
				<changelog lang="en">
					<change>Fixed a problem with UTF8 data.</change>
					<change>Moved static javascript to static.js</change>
					<change>Moved dynamic javascript to js.php. This both change means that you need to edit 2 files when upgrading, see contrib dir for more info!</change>
					<change>Moved loading of language to index.php instead including it everywhere.</change>
					<change>Fixed some tabs in the js files.</change>
					<change>Moved html for the shoutbox to a seperate file thats included within the shoutbox</change>
				</changelog>
			</entry>

			<entry>
				<date>2007-10-06</date>
				<rev-version>
					<major>0</major>
					<minor>0</minor>
					<revision>8</revision>
				</rev-version>
				<changelog lang="en">
					<change>RC6-dev lang file change</change>
					<change>Fixed a bug with the number of shouts.</change>
				</changelog>
			</entry>

			<entry>
				<date>2007-10-06</date>
				<rev-version>
					<major>1</major>
					<minor>0</minor>
					<revision>2</revision>
				</rev-version>
				<changelog lang="en">
					<change>See all changes above for the versions after 1.0.1.</change>
				</changelog>
			</entry>

			<entry>
				<date>2007-03-11</date>
				<rev-version>
					<major>0</major>
					<minor>0</minor>
					<revision>9</revision>
				</rev-version>
				<changelog lang="en">
					<change>Bug #8: &amp;nbsp; causes to invalid xml.</change>
					<change>Bug #10: Fixed a typo in subsilver install file</change>
					<change>Bug #12: RC7 compitable, bbcode field should be 8 chars instead of 5</change>
					<change>Bug #20: Fixed a bug when the shoutbox was displayed at the posting page</change>
					<change>Bug #24: Let html work in dates</change>
					<change>Bug #25: typo in lang file</change>
					<change>Moved the prosilver changes to the main install file to prevent support questions</change>
					<change>Changed way of inserting bbcode, related to bug 20. This means bbcode.js is not longer needed, and the default phpBB bbcode functions are used.</change>
				</changelog>
			</entry>
			<entry>
				<date>2007-11-12</date>
				<rev-version>
					<major>0</major>
					<minor>0</minor>
					<revision>10</revision>
				</rev-version>
				<changelog lang="en">
					<change>Dont add a [*] at the end of the message. (This fix was also backported to a repacked 0.0.9)</change>
					<change>Let the bbcode work again. (This fix was also backported to a repacked 0.0.9)</change>
					<change>Changed the function that create html a bit so it allow nearly all tags by default, except script</change>
					<change>Added better support for subsilver2, css and html tweaked/created by Mrtb</change>
					<change>Fixed bbcode buttons in IE (I hate that browser @_@)</change>
					<change>All changes below are fixes from the validation done by the MOD team:</change>
					<change>Replaced several die's with exit;</change>
					<change>Several whitespace issues fixed</change>
					<change>Using do while instead of while and for</change>
					<change>Added a error when a guest *tries* to post, this should normally not possible. Note that this adds a new lang var</change>
					<change>Removed the generate_text_for_storage_no_quote function, as its not needed longer</change>
					<change>Replaced some dutch with english in the xml</change>
					<change>Used fetchfield instead of fetchrow where possible</change>
					<change>Removed a strlen, and hardcode the value (including a comment what the number is :P)</change>
					<change>Changed some var names in the js.php file so they are a bit more descriptive</change>

				</changelog>
			</entry>
			
			<entry>
				<date>2007-11-14</date>
				<rev-version>
					<major>1</major>
					<minor>0</minor>
					<revision>3</revision>
				</rev-version>
				<changelog lang="en">
					<change>See all changes above for the versions after 1.0.2.</change>
				</changelog>
			</entry>
		</history>
		<meta name="generator" content="Phpbb.ModTeam.Tools (c#)" />
	</header>
	<action-group>
		<sql>CREATE TABLE phpbb_shoutbox (
	shout_id int(11) unsigned NOT NULL auto_increment,
	shout_user_id mediumint(8) NOT NULL,
	shout_time int(11) NOT NULL,
	shout_ip varchar(32) character set latin1 NOT NULL,
	shout_text text collate utf8_bin NOT NULL,
	shout_bbcode_bitfield varchar(255) character set latin1 NOT NULL,
	shout_bbcode_uid varchar(8) character set latin1 NOT NULL,
	shout_bbcode_flags int(11) unsigned NOT NULL default '7',
	PRIMARY KEY	(shout_id)
) DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
		</sql>
		<copy>
			<file from="root/ajax.php" to="ajax.php" />
			<file from="root/js.php" to="js.php" />
			<file from="root/static.js" to="static.js" />
			<file from="root/includes/functions_shoutbox.php" to="includes/functions_shoutbox.php" />
			<file from="root/language/en/mods/shout.php" to="language/en/mods/shout.php" />
			<file from="root/styles/prosilver/template/shout_body.html" to="styles/prosilver/template/shout_body.html" />
		</copy>
		<open src="index.php">
			<edit>
				<find>$user->setup('viewforum');</find>
					<action type="after-add">$user->add_lang('mods/shout');</action>
			</edit>
		</open>
		<open src="includes/constants.php">
			<edit>
				<find><![CDATA[?>]]></find>
				<action type="before-add">define('SHOUTBOX_TABLE', $table_prefix . 'shoutbox');</action>
			</edit>
		</open>
		<open src="includes/functions.php">
			<edit>
				<find><![CDATA[	// The following assigns all _common_ variables that may be used at any point in a template.
		$template->assign_vars(array(]]></find>
				<action type="after-add"><![CDATA[	'U_SHOUT'		=> append_sid("{$phpbb_root_path}js.$phpEx"),
		'U_SHOUT_STATIC'	=> append_sid("{$phpbb_root_path}static.js"),]]></action>
			</edit>
		</open>
		
		<open src="styles/prosilver/template/editor.js">
		    <edit>
			    <find><![CDATA[	for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)]]></find>
				<action type="before-add">try
{
				</action>
			</edit>
			<edit>
				<find>      // we ignore the end value for IE, this is already dirty enough and we don't need it
      caretPos.start = txtarea.sel_start;
      caretPos.end = txtarea.sel_start;</find>
                <action type="after-add">}
catch(e)
{
}
				</action>
			</edit>
			
		</open>


		<open src="styles/prosilver/template/index_body.html">
			<edit>
				<find><![CDATA[<!-- IF NEWEST_USER -->
		<h3>{L_STATISTICS}</h3>
		<p>{TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}</p>
	<!-- ENDIF -->]]></find>
				<action type="after-add"><![CDATA[<!-- INCLUDE shout_body.html -->]]></action>
			</edit>
		</open>
		<open src="styles/prosilver/template/overall_header.html">
			<edit>
				<find><![CDATA[</head>]]></find>
				<action type="before-add"><![CDATA[
	<script type="text/javascript" src="{U_SHOUT_STATIC}"></script>
	<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
	<script type="text/javascript" src="{U_SHOUT}"></script>]]></action>
			</edit>
		</open>

	</action-group>
</mod>