vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] Staff have normal rank mod - View Topic
Topic Rating: *****
Printable View
This topic was locked 22nd Apr 08 at 6:42am by Michael
dog199200
Guest
[F] Staff have normal rank mod (21st Apr 08 at 2:05am UTC)
Resolved
can i get a mod fo this code so that i will only show the rank image not the rank name?

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. var ranks = Array(); var r=0;
  4.  
  5. ranks[r++] = Array(0, 'Freshie', 1, 'http://i25.photobucket.com/albums/c51/dog199200/Digimon/fresh.png');
  6. ranks[r++] = Array(50, 'In-Training', 1, 'http://i25.photobucket.com/albums/c51/dog199200/Digimon/training.png');
  7. ranks[r++] = Array(100, 'Rookie', 1, 'http://i25.photobucket.com/albums/c51/dog199200/Digimon/rookie.png');
  8. ranks[r++] = Array(200, 'Champion', 1, 'http://i25.photobucket.com/albums/c51/dog199200/Digimon/champion.png');
  9. ranks[r++] = Array(500, 'Ultimate', 1, 'http://i25.photobucket.com/albums/c51/dog199200/Digimon/Ultimate.png');
  10. ranks[r++] = Array(1000, 'Mega', 1, 'http://i25.photobucket.com/albums/c51/dog199200/Digimon/Mega.png');
  11. ranks[r++] = Array(2500, 'Bio-Merge', 1, 'http://i25.photobucket.com/albums/c51/dog199200/Digimon/Bio-Merge.png');
  12. ranks[r++] = Array(5000, 'Sublime', 1, 'http://i25.photobucket.com/albums/c51/dog199200/Digimon/Sublime.png');
  13.  
  14. function assign_rank(display_name, posts) {
  15.     if(!display_name.match(/group(0|$)/i)) {
  16.         posts = parseInt(posts.replace(/,/g, ''));
  17.         r = 0;
  18.         while(ranks[r] && ranks[r][0] < posts) {
  19.             r++;
  20.         }
  21.         if(r > 0)
  22.         r--;
  23.         var rank_str = "<tr><td class=\"window1\" align=\"center\">" + ranks[r][1] + "<br />";
  24.         for(c=0; c<ranks[r][2]; c++) {
  25.             rank_str += "<img src=\""+ ranks[r][3] +"\" alt=\"*\" /></tr></td>";
  26.         }
  27.         document.write(rank_str);
  28.     }
  29. }
  30. //-->
  31. </script>
 
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Staff have normal rank mod (21st Apr 08 at 9:47pm UTC)
remove:

+ ranks[r][1] + "<br />"
dog199200
Guest
Re: Staff have normal rank mod (22nd Apr 08 at 1:19am UTC)
ok that works try
 Printable View

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