vForums Support Banner


Visit Base Classics - Gaming Chairs

 

Welcome Guest! Please Login or Register
vForums Support :: vForums :: Report a Bug :: Resolved Bugs :: Rank Error - View Topic (Page 2 of 2)Page: 1 2
Topic Rating: *****
Printable View
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Rank Error (27th Jan 08 at 12:17am UTC)
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>
 
dog199200
Guest
Re: Rank Error (27th Jan 08 at 12:23am UTC)
ok ty that works
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Rank Error (27th Jan 08 at 12:37am UTC)
No worries! {Smile}
 Printable View
Page: 1 2

All times are GMT+0 :: The current time is 1:26pm
Page generated in 0.2013 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums