view contrib/MultiRaceRankThemesIntegration.xml @ 15:fe74124d7205 default tip

Finally commit fix released back in 2012!
author IBBoard <dev@ibboard.co.uk>
date Fri, 24 Jul 2015 19:51:56 +0100
parents 1b7db8283b8d
children
line wrap: on
line source

<?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/-->
<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-gb">Special and Normal Rank Images - Multi-Race Rank Theme changes</title>
		<description lang="en-gb">This MOD will allow users with special ranks (e.g. Administrators) to have a normal rank theme in addition to their special rank image in topics.</description>
		<author-notes lang="en-gb"><![CDATA[These changes are dependant on both the "Special and Normal Rank Images" MOD and v1.2.x of the "Multi-Race Rank Themes" MOD. The following instructions should be performed after installing both MODs. The changes make the Special and Normal Rank Images MOD more compatible with the Multi-Race Rank Theme MOD so that even members with special ranks can select a rank theme.

Note: These extra instructions do not allow users with special ranks to change the theme of their special rank, just the theme of their normal rank. A MOD may follow that allows this functionality, but the Multi-Race Rank Theme MOD and the Special and Normal Rank Images MOD are designed to extend the method used by phpBB, not replace and majorly change it.]]></author-notes>
		<author-group>
			<author>
				<realname>IBBoard</realname>
				<email>phpbb@ibboard.co.uk</email>
				<username>IBBoard</username>
				<homepage>http://www.ibboard.co.uk</homepage>
			</author>
		</author-group>
		<link-group>
			<link type="parent" href="../install.xml" lang="en-gb">Main instructions</link>
		</link-group>
		<mod-version>1.2.0</mod-version>
		<installation>
			<level>intermediate</level>
			<time>300</time>
			<target-version>3.0.9</target-version>
		</installation>
		<history>
			<entry>
				<date>2010-08-01</date>
				<rev-version>1.2.0</rev-version>
				<changelog lang="en-gb">
					<change>Update version number and other minor fixes for release</change>
				</changelog>
			</entry>
			<entry>
				<date>2009-06-15</date>
				<rev-version>1.1.0</rev-version>
				<changelog lang="en-gb">
					<change>Update: Change instructions to match the alterations in v1.1.0 of the main MOD</change>
					<change>Update: Try to make sure all instructions add the parameter at the end, even if other MODs are applied before or after</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-11-09</date>
				<rev-version>0.1.3b</rev-version>
				<changelog lang="en-gb">
					<change>No code updates - change to MODX 1.2.1 format</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-05-10</date>
				<rev-version>0.1.2b</rev-version>
				<changelog lang="en-gb">
					<change>Update: Change instructions to match the alterations in 0.1b4 of the main "Special and Normal Rank Images" mod.</change>
				</changelog>
			</entry>
			<entry>
				<date>2008-04-13</date>
				<rev-version>0.1.1a</rev-version>
				<changelog lang="en-gb">
					<change>Initial release</change>
				</changelog>
			</entry>
		</history>
	</header>
	<action-group>
		<open src="includes/functions_display.php">
			<edit>
				<find><![CDATA[* @param string &$rank_img_src the additional rank image source is stored here after execution, if the user has an additional rank]]></find>
				<action type="after-add"><![CDATA[
* @param int $rank_theme the rank theme set to load the extra rank from (defaulting to DEFAULT_RANK_THEME_ID)]]></action>
			</edit>
			<edit>
				<find><![CDATA[function get_user_additional_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)]]></find>
				<inline-edit>
					<inline-find>)</inline-find>
					<inline-action type="before-add">, $rank_theme = DEFAULT_RANK_THEME_ID</inline-action>
				</inline-edit>
			</edit>
			<edit>
				<find><![CDATA[		get_user_rank(0, $user_posts, $rank_title, $rank_img, $rank_img_src);]]></find>
				<inline-edit>
					<inline-find>);</inline-find>
					<inline-action type="before-add">, $rank_theme</inline-action>
				</inline-edit>
			</edit>
		</open>
		<open src="includes/ucp/ucp_profile.php">
			<edit>
				<!-- Do a partial find and replace to make it forward compatible with planned changes to Multi-Race Rank Theme MOD -->
				<find><![CDATA[				if ($user->data['user_rank'] == 0]]></find>
				<inline-edit>
					<inline-find>$user->data['user_rank'] == 0</inline-find>
					<inline-action type="replace-with">true</inline-action>
				</inline-edit>
			</edit>
		</open>
		<open src="memberlist.php">
			<edit>
				<find><![CDATA[				//Reset our ranks, since show_profile() gets the values for the profile page
				get_user_rank($user_rank, (($user_id == ANONYMOUS) ? false : $row['user_posts']), $memberrow['RANK_TITLE'], $memberrow['RANK_IMG'], $memberrow['RANK_IMG_SRC']);]]></find>
				<inline-edit>
					<inline-find>);</inline-find>
					<inline-action type="before-add">, $row['user_rank_theme']</inline-action>
				</inline-edit>
			</edit>
			<edit>
				<find><![CDATA[	get_user_additional_rank($data['user_rank'], $data['user_posts'], $rank_title, $rank_img, $rank_img_src);]]></find>
				<inline-edit>
					<inline-find>);</inline-find>
					<inline-action type="before-add">, $data['user_rank_theme']</inline-action>
				</inline-edit>
			</edit>
			<edit>
				<find><![CDATA[	get_user_additional_rank($data['user_rank'], $data['user_posts'], $extra_rank_title, $extra_rank_img, $extra_rank_img_src);]]></find>
				<inline-edit>
					<inline-find>);</inline-find>
					<inline-action type="before-add">, $data['user_rank_theme']</inline-action>
				</inline-edit>
			</edit>
		</open>
		<open src="viewtopic.php">
			<edit>
				<find><![CDATA[				get_user_additional_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);]]></find>
				<inline-edit>
					<inline-find>);</inline-find>
					<inline-action type="before-add">, $row['user_rank_theme']</inline-action>
				</inline-edit>
			</edit>
			<edit>
				<find><![CDATA[				get_user_additional_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['extra_rank_title'], $user_cache[$poster_id]['extra_rank_image'], $user_cache[$poster_id]['extra_rank_image_src']);]]></find>
				<inline-edit>
					<inline-find>);</inline-find>
					<inline-action type="before-add">, $row['user_rank_theme']</inline-action>
				</inline-edit>
			</edit>
		</open>
	</action-group>
</mod>