Mercurial > repos > phpBB-MODs > User_Rank_Progression_Bar
changeset 21:706b0d6c2ba1 1.0.3
Create v1.0.3 (no-open-ticket):
* Update target version
* Fix mistakes in instructions
author | root |
---|---|
date | Sat, 27 Aug 2011 19:28:31 +0000 |
parents | d6ea397a5322 |
children | ec6b709fa0f9 |
files | contrib/SpecialAndNormalRanksIntegration.xml install.xml |
diffstat | 2 files changed, 368 insertions(+), 357 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/SpecialAndNormalRanksIntegration.xml Sat Dec 04 11:46:44 2010 +0000 +++ b/contrib/SpecialAndNormalRanksIntegration.xml Sat Aug 27 19:28:31 2011 +0000 @@ -1,16 +1,16 @@ -<?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"> +<?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">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 v1.2.0 so that users with both a special and normal rank can see their progress towards the next rank.</description> + <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 v1.2.0 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> @@ -18,120 +18,124 @@ <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> + </author-group> + <link-group> + <link type="parent" href="../install.xml" lang="en-gb">Main install instructions</link> </link-group> - <mod-version>1.0</mod-version> + <mod-version>1.0.3</mod-version> <installation> <level>intermediate</level> <time>180</time> - <target-version>3.0.8</target-version> + <target-version>3.0.9</target-version> </installation> - <history> - <entry> - <date>2010-08-01</date> - <rev-version>1.0</rev-version> - <changelog lang="en-gb"> - <change>Update to final release</change> - </changelog> - </entry> - <entry> - <date>2009-06-15</date> - <rev-version>0.2</rev-version> - <changelog lang="en-gb"> - <change>Update: Replace large "find and replace" with small modifications in functions_display.php</change> - <change>Add: Add extra instructions to bring it up to date with v1.1.0 of the Special and Normal Rank Images MOD</change> - </changelog> - </entry> - <entry> - <date>2009-06-03</date> - <rev-version>0.1</rev-version> - <changelog lang="en-gb"> - <change>Initial release</change> - </changelog> + <history> + <entry> + <date>2011-08-27</date> + <rev-version>1.0.3</rev-version> + <changelog lang="en-gb"> + <change>Remove unused instructions</change> + <change>Fix progress for members with special rank by adding missing "&" to 2nd instruction</change> + </changelog> + </entry> + <entry> + <date>2010-08-01</date> + <rev-version>1.0</rev-version> + <changelog lang="en-gb"> + <change>Update to final release</change> + </changelog> + </entry> + <entry> + <date>2009-06-15</date> + <rev-version>0.2</rev-version> + <changelog lang="en-gb"> + <change>Update: Replace large "find and replace" with small modifications in functions_display.php</change> + <change>Add: Add extra instructions to bring it up to date with v1.1.0 of the Special and Normal Rank Images MOD</change> + </changelog> + </entry> + <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"> - <edit> - <find><![CDATA[* @param string &$rank_img_src the rank image source is stored here after execution]]></find> - <action type="after-add"></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>$rank_img_src</inline-find> - <inline-action type="after-add"><![CDATA[, $percentage_progress]]></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>$rank_img_src</inline-find> - <inline-action type="after-add"><![CDATA[, $percentage_progress]]></inline-action> - </inline-edit> + </header> + <action-group> + <open src="includes/functions_display.php"> + <edit> + <find><![CDATA[* @param string &$rank_img_src the rank image source is stored here after execution]]></find> + <action type="after-add"><![CDATA[* @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"]]></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>$rank_img_src</inline-find> + <inline-action type="after-add"><![CDATA[, &$percentage_progress = 0]]></inline-action> + </inline-edit> </edit> - </open> - <open src="includes/ucp/ucp_pm_viewmessage.php"> - <edit> - <find><![CDATA[ get_user_additional_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);]]></find> - <inline-edit> - <inline-find>$user_row['rank_image_src']</inline-find> - <inline-action type="after-add"><![CDATA[, $user_row['percentage_progress']]]></inline-action> - </inline-edit> - </edit> - <edit> - <find><![CDATA[ get_user_additional_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['extra_rank_title'], $user_row['extra_rank_img'], $user_row['extra_rank_img_src']);]]></find> - <inline-edit> - <inline-find>$user_row['extra_rank_img_src']</inline-find> - <inline-action type="after-add"><![CDATA[, $user_row['percentage_progress']]]></inline-action> - </inline-edit> - </edit> - </open> - <open src="memberlist.php"> - <edit> - <find><![CDATA[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>$memberrow['RANK_IMG_SRC']</inline-find> - <inline-action type="after-add"><![CDATA[, $memberrow['PERCENTAGE_PROGRESS_NUM']]]></inline-action> - </inline-edit> - </edit> - <edit> - <find><![CDATA[ if (isset($cp_row['row']) && sizeof($cp_row['row']))]]></find> - <action type="before-add"><![CDATA[]]></action> - </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>$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> + <find><![CDATA[ get_user_rank(0, $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> + </open> + <open src="includes/ucp/ucp_pm_viewmessage.php"> + <edit> + <find><![CDATA[ get_user_additional_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);]]></find> + <inline-edit> + <inline-find>$user_row['rank_image_src']</inline-find> + <inline-action type="after-add"><![CDATA[, $user_row['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> + <find><![CDATA[ get_user_additional_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['extra_rank_title'], $user_row['extra_rank_img'], $user_row['extra_rank_img_src']);]]></find> + <inline-edit> + <inline-find>$user_row['extra_rank_img_src']</inline-find> + <inline-action type="after-add"><![CDATA[, $user_row['percentage_progress']]]></inline-action> + </inline-edit> + </edit> + </open> + <open src="memberlist.php"> + <edit> + <find><![CDATA[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>$memberrow['RANK_IMG_SRC']</inline-find> + <inline-action type="after-add"><![CDATA[, $memberrow['PERCENTAGE_PROGRESS_NUM']]]></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>$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> \ No newline at end of file
--- a/install.xml Sat Dec 04 11:46:44 2010 +0000 +++ b/install.xml Sat Aug 27 19:28:31 2011 +0000 @@ -1,20 +1,20 @@ -<?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"> +<?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">User Rank Progression Bar</title> <description lang="en-gb">This MOD will show a progress bar for each user, showing how far they have progressed towards the next rank in a rank set.</description> - <author-notes lang="en-gb"><![CDATA[This mod behaves in the same way as Smix's Rank Progress Bar mod, but has been rewritten for efficiency, additional features and compatibility with other mods. Thanks to Smix for writing the original and to youngjediknight for first pointing me to it. - -The styling used by this mod is entirely arbitrary and was included as an example. You may wish to use different HTML and CSS for your template. If you don't want the progress bar to appear in all of the locations below (e.g. you just want it in a topic but not in PMs, profile view or members list) then just ignore the changes to the relevant template (.html) file. - + <author-notes lang="en-gb"><![CDATA[This mod behaves in the same way as Smix's Rank Progress Bar mod, but has been rewritten for efficiency, additional features and compatibility with other mods. Thanks to Smix for writing the original and to youngjediknight for first pointing me to it. + +The styling used by this mod is entirely arbitrary and was included as an example. You may wish to use different HTML and CSS for your template. If you don't want the progress bar to appear in all of the locations below (e.g. you just want it in a topic but not in PMs, profile view or members list) then just ignore the changes to the relevant template (.html) file. + Note: If you are also installing my "Multi-Race Rank Themes" MOD then install the other mod first and then this mod. Because the additional parameter to the get_user_rank function is optional for the Multi-Race Rank Themes mod it must be the last parameter in the list.]]></author-notes> <author-group> <author> @@ -23,252 +23,259 @@ <username>IBBoard</username> <homepage>http://www.ibboard.co.uk</homepage> </author> - </author-group> - <link-group> - <link type="template" href="subsilver2.xml" lang="en-gb">subsilver2</link> - <link type="contrib" href="contrib/SpecialAndNormalRanksIntegration.xml" lang="en-gb">Special and Normal Ranks MOD integration</link> + </author-group> + <link-group> + <link type="template" href="subsilver2.xml" lang="en-gb">subsilver2</link> + <link type="contrib" href="contrib/SpecialAndNormalRanksIntegration.xml" lang="en-gb">Special and Normal Ranks MOD integration</link> </link-group> - <mod-version>1.0.2</mod-version> + <mod-version>1.0.3</mod-version> <installation> <level>intermediate</level> <time>600</time> - <target-version>3.0.8</target-version> + <target-version>3.0.9</target-version> </installation> - <history> - <entry> - <date>2010-10-30</date> - <rev-version>1.0.2</rev-version> - <changelog lang="en-gb"> - <change>Change: Add fractions of a percent, as suggested by the phpBB team (1 decimal place)</change> - </changelog> - </entry> - <entry> - <date>2010-10-03</date> - <rev-version>1.0.1</rev-version> - <changelog lang="en-gb"> - <change>Fix: Add default value for percentage complete in get_user_rank so that we are more compatible with other MODs</change> - <change>Fix: Change order of find in viewtopic.php to fix AutoMOD</change> - </changelog> - </entry> - <entry> - <date>2010-08-01</date> - <rev-version>1.0</rev-version> - <changelog lang="en-gb"> - <change>Update to final release</change> - <change>Fix: Switch two instructions to correct ordering of code changes in viewtopic.php</change> - </changelog> - </entry> - <entry> - <date>2010-07-06</date> - <rev-version>0.2.1</rev-version> - <changelog lang="en-gb"> - <change>Fix additional SubSilver instructions</change> - </changelog> - </entry> - <entry> - <date>2009-06-15</date> - <rev-version>0.2</rev-version> - <changelog lang="en-gb"> - <change>Add: Add templating for Memberlist, profiles and PMs</change> - <change>Add: Add subsilver2 stylings</change> - <change>Fix: Add missing lang value</change> - <change>Fix: Add extra checks to progress calculation to handle pre-existing values and the final rank in a scheme</change> - </changelog> - </entry> - <entry> - <date>2009-06-03</date> - <rev-version>0.1</rev-version> - <changelog lang="en-gb"> - <change>Initial release - just puts progress bar on viewtopic page</change> - </changelog> + <history> + <entry> + <date>2011-08-27</date> + <rev-version>1.0.3</rev-version> + <changelog lang="en-gb"> + <change>No major changes (updated target version and fixed contrib)</change> + </changelog> + </entry> + <entry> + <date>2010-10-30</date> + <rev-version>1.0.2</rev-version> + <changelog lang="en-gb"> + <change>Change: Add fractions of a percent, as suggested by the phpBB team (1 decimal place)</change> + </changelog> + </entry> + <entry> + <date>2010-10-03</date> + <rev-version>1.0.1</rev-version> + <changelog lang="en-gb"> + <change>Fix: Add default value for percentage complete in get_user_rank so that we are more compatible with other MODs</change> + <change>Fix: Change order of find in viewtopic.php to fix AutoMOD</change> + </changelog> + </entry> + <entry> + <date>2010-08-01</date> + <rev-version>1.0</rev-version> + <changelog lang="en-gb"> + <change>Update to final release</change> + <change>Fix: Switch two instructions to correct ordering of code changes in viewtopic.php</change> + </changelog> + </entry> + <entry> + <date>2010-07-06</date> + <rev-version>0.2.1</rev-version> + <changelog lang="en-gb"> + <change>Fix additional SubSilver instructions</change> + </changelog> + </entry> + <entry> + <date>2009-06-15</date> + <rev-version>0.2</rev-version> + <changelog lang="en-gb"> + <change>Add: Add templating for Memberlist, profiles and PMs</change> + <change>Add: Add subsilver2 stylings</change> + <change>Fix: Add missing lang value</change> + <change>Fix: Add extra checks to progress calculation to handle pre-existing values and the final rank in a scheme</change> + </changelog> + </entry> + <entry> + <date>2009-06-03</date> + <rev-version>0.1</rev-version> + <changelog lang="en-gb"> + <change>Initial release - just puts progress bar on viewtopic page</change> + </changelog> </entry> </history> - </header> - <action-group> - <open src="includes/functions_display.php"> - <edit> - <find><![CDATA[* @param string &$rank_img_src the rank image source is stored here after execution]]></find> - <action type="after-add"><![CDATA[* @param int &$percent_complete the percentage of the way a user is to the next rank, where -1 means "not applicable"]]></action> - </edit> - <edit> - <find><![CDATA[function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)]]></find> - <inline-edit> - <inline-find>, &$rank_img_src</inline-find> - <inline-action type="after-add">, &$percent_complete = 0</inline-action> - </inline-edit> - </edit> - <edit> - <find><![CDATA[ if (!empty($user_rank))]]></find> - <action type="before-add"><![CDATA[ if (!is_int($percent_complete) || $percent_complete < 0 || $percent_complete > 100) - { - $percent_complete = -1; - }]]></action> - </edit> - <edit> - <find><![CDATA[ else if ($user_posts !== false) - {]]></find> - <action type="after-add"><![CDATA[ $next_rank_post_count = -1;]]></action> - </edit> + </header> + <action-group> + <open src="includes/functions_display.php"> + <edit> + <find><![CDATA[* @param string &$rank_img_src the rank image source is stored here after execution]]></find> + <action type="after-add"><![CDATA[* @param int &$percent_complete the percentage of the way a user is to the next rank, where -1 means "not applicable"]]></action> + </edit> + <edit> + <find><![CDATA[function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)]]></find> + <inline-edit> + <inline-find>, &$rank_img_src</inline-find> + <inline-action type="after-add">, &$percent_complete = 0</inline-action> + </inline-edit> + </edit> + <edit> + <find><![CDATA[ if (!empty($user_rank))]]></find> + <action type="before-add"><![CDATA[ if (!is_int($percent_complete) || $percent_complete < 0 || $percent_complete > 100) + { + $percent_complete = -1; + }]]></action> + </edit> + <edit> + <find><![CDATA[ else if ($user_posts !== false) + {]]></find> + <action type="after-add"><![CDATA[ $next_rank_post_count = -1;]]></action> + </edit> <edit> <find><![CDATA[ if ($user_posts >= $rank['rank_min'])]]></find> - <action type="before-add"><![CDATA[ if ($user_posts < $rank['rank_min']) - { - $next_rank_post_count = $rank['rank_min']; - } - else -]]> + <action type="before-add"><![CDATA[ if ($user_posts < $rank['rank_min']) + { + $next_rank_post_count = $rank['rank_min']; + } + else +]]> + </action> + </edit> + <edit> + <find><![CDATA[ $rank_title = $rank['rank_title'];]]></find> + <action type="before-add"><![CDATA[ if ($percent_complete == -1 && $next_rank_post_count > -1) + { + $rank_difference = $next_rank_post_count - $rank['rank_min']; + $user_progress = $user_posts - $rank['rank_min']; + $percent_complete = round(($user_progress / $rank_difference) * 100, 1); + } +]]> </action> - </edit> - <edit> - <find><![CDATA[ $rank_title = $rank['rank_title'];]]></find> - <action type="before-add"><![CDATA[ if ($percent_complete == -1 && $next_rank_post_count > -1) - { - $rank_difference = $next_rank_post_count - $rank['rank_min']; - $user_progress = $user_posts - $rank['rank_min']; - $percent_complete = round(($user_progress / $rank_difference) * 100, 1); - } -]]> - </action> + </edit> + </open> + <open src="includes/ucp/ucp_pm_viewmessage.php"> + <edit> + <find><![CDATA[ 'RANK_IMG' => $user_info['rank_image'],]]></find> + <action type="after-add"><![CDATA[ + 'PERCENTAGE_PROGRESS_NUM' => $user_info['percentage_progress'], + 'PERCENTAGE_PROGRESS' => sprintf($user->lang['PERCENTAGE_PROGRESS'], $user_info['percentage_progress']),]]></action> + </edit> + <edit> + <find><![CDATA[get_user_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);]]></find> + <inline-edit> + <inline-find>, $user_row['rank_image_src']</inline-find> + <inline-action type="after-add">, $user_row['percentage_progress']</inline-action> + </inline-edit> + </edit> + </open> + <open src="language/en/common.php"> + <edit> + <find><![CDATA[?>]]></find> + <action type="before-add"><![CDATA[$lang = array_merge($lang, array( + 'PERCENTAGE_PROGRESS' => '%s%%', + 'PROGRESS_TO_NEXT_RANK' => 'Progress to next rank:' +)); +]]></action> </edit> - </open> - <open src="includes/ucp/ucp_pm_viewmessage.php"> - <edit> - <find><![CDATA[ 'RANK_IMG' => $user_info['rank_image'],]]></find> - <action type="after-add"><![CDATA[ - 'PERCENTAGE_PROGRESS_NUM' => $user_info['percentage_progress'], - 'PERCENTAGE_PROGRESS' => sprintf($user->lang['PERCENTAGE_PROGRESS'], $user_info['percentage_progress']),]]></action> - </edit> - <edit> - <find><![CDATA[get_user_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);]]></find> - <inline-edit> - <inline-find>, $user_row['rank_image_src']</inline-find> - <inline-action type="after-add">, $user_row['percentage_progress']</inline-action> - </inline-edit> - </edit> - </open> - <open src="language/en/common.php"> - <edit> - <find><![CDATA[?>]]></find> - <action type="before-add"><![CDATA[$lang = array_merge($lang, array( - 'PERCENTAGE_PROGRESS' => '%s%%', - 'PROGRESS_TO_NEXT_RANK' => 'Progress to next rank:' -)); -]]></action> - </edit> - </open> - <open src="memberlist.php"> - <edit> - <find><![CDATA[ get_user_rank($row['user_rank'], (($row['user_id'] == ANONYMOUS) ? false : $row['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_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $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[ 'RANK_IMG_SRC' => $rank_img_src,]]></find> - <action type="after-add"><![CDATA[ 'PERCENTAGE_PROGRESS_NUM' => $percentage_progress, - 'PERCENTAGE_PROGRESS' => sprintf($user->lang['PERCENTAGE_PROGRESS'], $percentage_progress),]]></action> - </edit> - </open> - <open src="styles/prosilver/template/memberlist_body.html"> - <edit> - <find><![CDATA[<!-- IF memberrow.RANK_IMG --><span class="rank-img">{memberrow.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{memberrow.RANK_TITLE}</span><!-- ENDIF -->]]></find> - <inline-edit> - <inline-find><![CDATA[<!-- ENDIF -->]]></inline-find> - <inline-action type="after-add"><![CDATA[<!-- IF memberrow.PERCENTAGE_PROGRESS_NUM > -1 --><div class="rank_progress_bar" title="{L_PROGRESS_TO_NEXT_RANK}"><span style="width:{memberrow.PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{memberrow.PERCENTAGE_PROGRESS}</span></div><!-- ENDIF -->]]></inline-action> - </inline-edit> - </edit> - </open> - <open src="styles/prosilver/template/memberlist_view.html"> - <edit> - <find><![CDATA[<!-- IF RANK_IMG --><dd style="text-align: center;">{RANK_IMG}</dd><!-- ENDIF -->]]></find> - <action type="after-add"><![CDATA[<!-- IF PERCENTAGE_PROGRESS_NUM > -1 --><dd>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->]]></action> - </edit> - <edit> - <find><![CDATA[<!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE --> <!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt> <dd>{RANK_IMG}</dd><!-- ENDIF -->]]></find> - <action type="after-add"><![CDATA[<!-- IF PERCENTAGE_PROGRESS_NUM > -1 --><dt>{L_PROGRESS_TO_NEXT_RANK}</dt><dd><div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->]]></action> - </edit> - </open> - <open src="styles/prosilver/template/ucp_pm_viewmessage.html"> - <edit> - <find><![CDATA[ <!-- IF RANK_IMG --><dd>{RANK_IMG}</dd><!-- ENDIF -->]]></find> - <action type="after-add"><![CDATA[ <!-- IF PERCENTAGE_PROGRESS_NUM > -1 --><dd>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->]]></action> - </edit> - </open> + </open> + <open src="memberlist.php"> + <edit> + <find><![CDATA[ get_user_rank($row['user_rank'], (($row['user_id'] == ANONYMOUS) ? false : $row['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_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $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[ 'RANK_IMG_SRC' => $rank_img_src,]]></find> + <action type="after-add"><![CDATA[ 'PERCENTAGE_PROGRESS_NUM' => $percentage_progress, + 'PERCENTAGE_PROGRESS' => sprintf($user->lang['PERCENTAGE_PROGRESS'], $percentage_progress),]]></action> + </edit> + </open> + <open src="styles/prosilver/template/memberlist_body.html"> + <edit> + <find><![CDATA[<!-- IF memberrow.RANK_IMG --><span class="rank-img">{memberrow.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{memberrow.RANK_TITLE}</span><!-- ENDIF -->]]></find> + <inline-edit> + <inline-find><![CDATA[<!-- ENDIF -->]]></inline-find> + <inline-action type="after-add"><![CDATA[<!-- IF memberrow.PERCENTAGE_PROGRESS_NUM > -1 --><div class="rank_progress_bar" title="{L_PROGRESS_TO_NEXT_RANK}"><span style="width:{memberrow.PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{memberrow.PERCENTAGE_PROGRESS}</span></div><!-- ENDIF -->]]></inline-action> + </inline-edit> + </edit> + </open> + <open src="styles/prosilver/template/memberlist_view.html"> + <edit> + <find><![CDATA[<!-- IF RANK_IMG --><dd style="text-align: center;">{RANK_IMG}</dd><!-- ENDIF -->]]></find> + <action type="after-add"><![CDATA[<!-- IF PERCENTAGE_PROGRESS_NUM > -1 --><dd>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->]]></action> + </edit> + <edit> + <find><![CDATA[<!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE --> <!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt> <dd>{RANK_IMG}</dd><!-- ENDIF -->]]></find> + <action type="after-add"><![CDATA[<!-- IF PERCENTAGE_PROGRESS_NUM > -1 --><dt>{L_PROGRESS_TO_NEXT_RANK}</dt><dd><div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->]]></action> + </edit> + </open> + <open src="styles/prosilver/template/ucp_pm_viewmessage.html"> + <edit> + <find><![CDATA[ <!-- IF RANK_IMG --><dd>{RANK_IMG}</dd><!-- ENDIF -->]]></find> + <action type="after-add"><![CDATA[ <!-- IF PERCENTAGE_PROGRESS_NUM > -1 --><dd>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->]]></action> + </edit> + </open> <open src="styles/prosilver/template/viewtopic_body.html"> <edit> <find><![CDATA[ <!-- IF postrow.RANK_TITLE or postrow.RANK_IMG --><dd>{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF -->]]></find> - <action type="after-add"><![CDATA[ <!-- IF postrow.PERCENTAGE_PROGRESS_NUM > -1 --><dd>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{postrow.PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{postrow.PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->]]> + <action type="after-add"><![CDATA[ <!-- IF postrow.PERCENTAGE_PROGRESS_NUM > -1 --><dd>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{postrow.PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{postrow.PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->]]> </action> </edit> - </open> - <open src="styles/prosilver/theme/common.css"> - <edit> - <find><![CDATA[.clear {]]></find> - <action type="before-add"><![CDATA[.rank_progress_bar { - border: 1px solid #b4bac0; - margin-right: 1em; - position: relative; - clear:right -} -.rank_progress_bar span { - z-index:2; - position:relative -} -.rank_progress_bar .bar { - background-color: #fff; - border-right: 1px solid #b4bac0; - display:block; - height: 100%; - z-index:1; - position:absolute; - top: 0; - left: 0 -}]]></action> - </edit> - </open> - <open src="viewtopic.php"> - <edit> - <find><![CDATA[ if ($poster_id == ANONYMOUS) - { - $user_cache[$poster_id] = array(]]></find> - <action type="after-add"><![CDATA[ - 'percentage_progress' => -1,]]></action> - </edit> - <edit> - <find><![CDATA[get_user_rank($row['user_rank'], false, $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[ $id_cache[] = $poster_id; - - $user_cache[$poster_id] = array(]]></find> - <action type="after-add"><![CDATA[ - 'percentage_progress' => -1,]]></action> - </edit> - <edit> - <find><![CDATA[get_user_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> + </open> + <open src="styles/prosilver/theme/common.css"> + <edit> + <find><![CDATA[.clear {]]></find> + <action type="before-add"><![CDATA[.rank_progress_bar { + border: 1px solid #b4bac0; + margin-right: 1em; + position: relative; + clear:right +} +.rank_progress_bar span { + z-index:2; + position:relative +} +.rank_progress_bar .bar { + background-color: #fff; + border-right: 1px solid #b4bac0; + display:block; + height: 100%; + z-index:1; + position:absolute; + top: 0; + left: 0 +}]]></action> + </edit> + </open> + <open src="viewtopic.php"> <edit> - <find><![CDATA[ 'RANK_IMG_SRC' => $user_cache[$poster_id]['rank_image_src'],]]></find> - <action type="after-add"><![CDATA[ - 'PERCENTAGE_PROGRESS_NUM' => $user_cache[$poster_id]['percentage_progress'], - 'PERCENTAGE_PROGRESS' => sprintf($user->lang['PERCENTAGE_PROGRESS'], $user_cache[$poster_id]['percentage_progress']),]]></action> - </edit> + <find><![CDATA[ if ($poster_id == ANONYMOUS) + { + $user_cache[$poster_id] = array(]]></find> + <action type="after-add"><![CDATA[ + 'percentage_progress' => -1,]]></action> + </edit> + <edit> + <find><![CDATA[get_user_rank($row['user_rank'], false, $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[ $id_cache[] = $poster_id; + + $user_cache[$poster_id] = array(]]></find> + <action type="after-add"><![CDATA[ + 'percentage_progress' => -1,]]></action> + </edit> + <edit> + <find><![CDATA[get_user_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[ 'RANK_IMG_SRC' => $user_cache[$poster_id]['rank_image_src'],]]></find> + <action type="after-add"><![CDATA[ + 'PERCENTAGE_PROGRESS_NUM' => $user_cache[$poster_id]['percentage_progress'], + 'PERCENTAGE_PROGRESS' => sprintf($user->lang['PERCENTAGE_PROGRESS'], $user_cache[$poster_id]['percentage_progress']),]]></action> + </edit> </open> </action-group> </mod> \ No newline at end of file