vForums Support > vForums :: Report a Bug :: Resolved Bugs :: > Rank Error

Rank Error - Posted By dog199200 (dog199200) on 25th Jan 08 at 5:28am
For some reason on my FMA forum and my Inuyasha forum, the ranks start out at the second rank even if they have 0 posts..and i check the modify rank area and it is how it is suppose to be there, and i hit modify and it still starts out at rank two...also if you check this check a none staff member, because staff members ranks are altered so it is forced to start out at one for them.

http://fmaadvanced.virtualforums.co.uk

http://inuyashasworld.virtualforums.co.uk/

Re: Rank Error - Posted By Ross (admin) on 25th Jan 08 at 9:11am
Looking at the first site it is starting out at the first rank you have in there, "Trainie". They may not have enough posts to be in that rank but they have no choice since you've not got a rank where there are 0 posts required.

Re: Rank Error - Posted By dog199200 (dog199200) on 25th Jan 08 at 8:26pm
umm ya i noticed that but i check it before i posted this and the first one was there..

Edit: ok again I added in the rank but it still starts out at the second rank.. http://fmaadvanced.virtualforums.co.uk/

Re: Rank Error - Posted By dog199200 (dog199200) on 26th Jan 08 at 10:10pm
bump...I know for a fact that the 0 post rank is on there i just checked it, and yet it still shows that it starts out at rank two.

http://fmaadvanced.virtualforums.co.uk/action/view_profile/user/sarah/

Re: Rank Error - Posted By Michael (wrighty) on 26th Jan 08 at 10:13pm
are you sure that rank 2 doesn't start at 0 too.?

Re: Rank Error - Posted By dog199200 (dog199200) on 26th Jan 08 at 10:20pm
yes want me to show a screen shot?

http://i25.photobucket.com/albums/c51/dog199200/untitled.jpg

Edit: Its happening on all my boards and not just two...

Re: Rank Error - Posted By Michael (wrighty) on 26th Jan 08 at 10:20pm
It would help as I can't access your admin panel.

Re: Rank Error - Posted By Michael (wrighty) on 26th Jan 08 at 10:45pm
ok I have found the error! {Wink}

http://fmaadvanced.virtualforums.co.uk/action/view_profile/user/sarah/
and
http://fmaadvanced.virtualforums.co.uk/action/view_profile/user/rawr/

The first one actually does have a post, if you look in the 'recent posts' part of her profile.

the 2nd one has no posts (none in recent) and therefore shows up fine.

This is indeed a bug! {Smile}

Re: Rank Error - Posted By dog199200 (dog199200) on 26th Jan 08 at 10:48pm
umm nope not exactly.... it show that the rawr account has 1rank because it is a staff account..any account that doesn't have a staff accout or a member group starts out at rank two all because of this code

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. var ranks = Array(); var r=0;
  4.  
  5. ranks[r++] = Array(0, 'Newbe', 1, 'http://s4.images.proboards.com/star.gif');
  6. ranks[r++] = Array(50, 'Trainie', 2, 'http://s4.images.proboards.com/star.gif');
  7. ranks[r++] = Array(125, 'Apprentice', 3, 'http://s4.images.proboards.com/star.gif');
  8. ranks[r++] = Array(250, 'Teacher', 4, 'http://s4.images.proboards.com/star.gif');
  9. ranks[r++] = Array(500, 'Master', 5, 'http://s4.images.proboards.com/star.gif');
  10.  
  11.  
  12. function assign_rank(display_name, posts) {
  13. if(!display_name.match(/group0/i)) {
  14. posts = parseInt(posts.replace(/,/g, ''));
  15. r = 0;
  16. while(ranks[r] && ranks[r][0] < posts) {
  17. r++;
  18. }
  19. if(r > 0)
  20. r--;
  21. var rank_str = "<br />" + ranks[r][1] + "<br />";
  22. for(c=0; c<ranks[r][2]; c++) {
  23. rank_str += "<img src=\""+ ranks[r][3] +"\" alt=\"*\" />";
  24. }
  25. document.write(rank_str);
  26. }
  27. }
  28. //-->
  29. </script>
 

Re: Rank Error - Posted By Michael (wrighty) on 26th Jan 08 at 11:22pm
try destaffing the rawr member! {Smile}

Re: Rank Error - Posted By Ross (admin) on 26th Jan 08 at 11:27pm
Should be good now.

Re: Rank Error - Posted By dog199200 (dog199200) on 26th Jan 08 at 11:59pm
yep its fixed but umm now people with out a group has two ranks sets not one and only the people in a group should have two..

Re: Rank Error - Posted By Ross (admin) on 27th Jan 08 at 12:03am
Posted By dog199200 on 26th Jan 08 at 11:59pm
 
yep its fixed but umm now people with out a group has two ranks sets not one and only the people in a group should have two..


Links to profiles?

Re: Rank Error - Posted By dog199200 (dog199200) on 27th Jan 08 at 12:12am
http://fmaadvanced.virtualforums.co.uk/action/view_profile/user/rawr/

http://fmaadvanced.virtualforums.co.uk/action/view_profile/user/sarah/

http://fmaadvanced.virtualforums.co.uk/action/view_profile/user/mariya/

http://fmaadvanced.virtualforums.co.uk/action/view_profile/user/clericiv/

all of those are none staff

Re: Rank Error - Posted By Ross (admin) on 27th Jan 08 at 12:17am
They're not being given the group0 class. Most probably an error when regsitering. I've added a fix but it won't show up on existing mini profiles as they've been cached. When the users post or modify their profile (which I've done for those 4) the mini profile will be re-created and the correct class applied causing the code to work properly.

Re: Rank Error - Posted By Michael (wrighty) on 27th Jan 08 at 12:17am
use this code instead:

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. var ranks = Array(); var r=0;
  4.  
  5. ranks[r++] = Array(0, 'Newbe', 1, 'http://s4.images.proboards.com/star.gif');
  6. ranks[r++] = Array(50, 'Trainie', 2, 'http://s4.images.proboards.com/star.gif');
  7. ranks[r++] = Array(125, 'Apprentice', 3, 'http://s4.images.proboards.com/star.gif');
  8. ranks[r++] = Array(250, 'Teacher', 4, 'http://s4.images.proboards.com/star.gif');
  9. ranks[r++] = Array(500, 'Master', 5, 'http://s4.images.proboards.com/star.gif');
  10.  
  11.  
  12. function assign_rank(display_name, posts) {
  13. if(!display_name.match(/group(0|$)/i)) {
  14. posts = parseInt(posts.replace(/,/g, ''));
  15. r = 0;
  16. while(ranks[r] && ranks[r][0] < posts) {
  17. r++;
  18. }
  19. if(r > 0)
  20. r--;
  21. var rank_str = "<br />" + ranks[r][1] + "<br />";
  22. for(c=0; c<ranks[r][2]; c++) {
  23. rank_str += "<img src=\""+ ranks[r][3] +"\" alt=\"*\" />";
  24. }
  25. document.write(rank_str);
  26. }
  27. }
  28. //-->
  29. </script>
 

Re: Rank Error - Posted By dog199200 (dog199200) on 27th Jan 08 at 12:23am
ok ty that works

Re: Rank Error - Posted By Michael (wrighty) on 27th Jan 08 at 12:37am
No worries! {Smile}