Mercurial > repos > phpBB-MODs > User_Rank_Progression_Bar
changeset 12:0015bde97600 1.0.1
Fixes #4: Fix User Rank Progression submission issues
* Re-order FIND instructions to correct order for auto-mod
Also:
* Add default value for a parameter so that we play nicely with other MODs
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 30 Oct 2010 09:06:14 +0000 |
parents | d36b974f4f93 |
children | c722ef9ace4c |
files | contrib/SpecialAndNormalRanksIntegration.xml install.xml |
diffstat | 2 files changed, 23 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/SpecialAndNormalRanksIntegration.xml Sat Aug 14 12:55:46 2010 +0000 +++ b/contrib/SpecialAndNormalRanksIntegration.xml Sat Oct 30 09:06:14 2010 +0000 @@ -11,7 +11,7 @@ <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.1.0, which will become v1.2.0) so that users with both a special and normal rank can see their progress towards the next rank.</description> + <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>
--- a/install.xml Sat Aug 14 12:55:46 2010 +0000 +++ b/install.xml Sat Oct 30 09:06:14 2010 +0000 @@ -37,6 +37,14 @@ </installation> <history> <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"> @@ -80,7 +88,7 @@ <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</inline-action> + <inline-action type="after-add">, &$percent_complete = 0</inline-action> </inline-edit> </edit> <edit> @@ -222,6 +230,13 @@ </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> @@ -229,22 +244,19 @@ </inline-edit> </edit> <edit> - <find><![CDATA['joined' => '',]]></find> - <action type="before-add"><![CDATA[ + <find><![CDATA[ $id_cache[] = $poster_id; + + $user_cache[$poster_id] = array(]]></find> + <action type="after-add"><![CDATA[ 'percentage_progress' => -1,]]></action> - </edit> - <edit> + </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['joined' => $user->format_date($row['user_regdate']),]]></find> - <action type="before-add"><![CDATA[ - 'percentage_progress' => -1,]]></action> - </edit> <edit> <find><![CDATA[ 'RANK_IMG_SRC' => $user_cache[$poster_id]['rank_image_src'],]]></find> <action type="after-add"><![CDATA[