Mercurial > repos > phpBB-MODs > User_Rank_Progression_Bar
view contrib/SpecialAndNormalRanksIntegration.xml @ 0:609491027bb4 0.1
Initial commit of v0.1 code
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 05 Jun 2009 20:32:20 +0000 |
parents | |
children | d2b86ef4f74b |
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.1.xsd"> <header> <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> <title lang="en-gb">User Rank Progression Bar - Special and Normal Rank MOD Integration</title> <description lang="en-gb">These additional instructions provide integration with the Special and Normal Rank Images MOD so that users with both a special and normal rank can see their progress towards the next rank.</description> <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 install instructions</link> </link-group> <mod-version>0.1</mod-version> <installation> <level>intermediate</level> <time>180</time> <target-version>3.0.5</target-version> </installation> <history> <entry> <date>2009-06-03</date> <rev-version>0.1</rev-version> <changelog lang="en-gb"> <change>Initial release</change> </changelog> </entry> </history> </header> <action-group> <open src="includes/functions_display.php"> <!-- The documentation for this method currently duplicates the standard method, so as this is my MOD we'll just do the easy method and replace the lot --> <edit> <find><![CDATA[/** * Get user's additional (normal) rank title and image if they have a special rank * * @param int $user_rank the current stored users rank id * @param int $user_posts the users number of posts * @param string &$rank_title the rank title will be stored here after execution * @param string &$rank_img the rank image as full img tag is stored here after execution * @param string &$rank_img_src the rank image source is stored here after execution * */ function get_user_additional_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src) { if (!empty($user_rank)) { //Always pass 0 to save duplicating get_user_rank get_user_rank(0, $user_posts, $rank_title, $rank_img, $rank_img_src); } //else the user doesn't have a special rank and so they don't have a special rank }]]></find> <action type="replace-with"><![CDATA[/** * Get user's additional (normal) rank title and image if they have a special rank * * @param int $user_rank the current stored users rank id * @param int $user_posts the users number of posts * @param string &$rank_title the rank title will be stored here after execution * @param string &$rank_img the rank image as full img tag is stored here after execution * @param string &$rank_img_src the rank image source is stored here after execution * @param int &$percent_complete the percentage of the way a user is to the next rank will be stored here after execution, where -1 meaning "not applicable" * */ function get_user_additional_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src, &$percent_complete) { if (!empty($user_rank)) { //Always pass 0 to save duplicating get_user_rank get_user_rank(0, $user_posts, $rank_title, $rank_img, $rank_img_src, $percent_complete); } //else the user doesn't have a special rank and so they don't have a special rank }]]></action> </edit> </open> <open src="memberlist.php"> <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>$rank_img_src</inline-find> <inline-action type="after-add"><![CDATA[, $percentage_progress]]></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>$extra_rank_img_src</inline-find> <inline-action type="after-add"><![CDATA[, $percentage_progress]]></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>$user_cache[$poster_id]['rank_image_src']</inline-find> <inline-action type="after-add"><![CDATA[, $user_cache[$poster_id]['percentage_progress']]]></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>$user_cache[$poster_id]['extra_rank_image_src']</inline-find> <inline-action type="after-add"><![CDATA[, $user_cache[$poster_id]['percentage_progress']]]></inline-action> </inline-edit> </edit> </open> </action-group> </mod>